- Sep 13, 2001
- 53,424
- 6,270
- 126
i'm working on updating an app for iOS 9 and for some reason the layout is completely screwed up on iOS 8 vs iOS 9 on the iPhone 6. it is like the iOS 8 stuff is scaling it to fit the graphic sizes, but the iOS 9 stuff isn't.
so i'm trying to basically calculate the table height when in iOS 9 based on scaling it. here is an image of what i'm trying to do and i'll explain after:
http://imgur.com/FZz76BI.jpg
so on the left is the res that i want it to scale to be similar to. on the right i want to solve for X based on the values for a,b,c in there. HOWEVER ... a is going to be a dynamic value, it isn't ALWAYS going to be 60 as in that example. the tables on my first 2 views have height of 60 (for what i want) but when it stays height 60 on iOS 9, it's not wide enough and screws up the look.
so right now i'm having a big brain fart on how to solve for x. when the height is always 60 for the first 2 screens, i'm just doing height = (677.0 * 60.0) / 568.0 and it's working, however when i try to use that dynamically for the 60 value, it doesn't work. i know i have to incorporate the width in there as well, but trying to think with a 6 month old right next to me screaming and playing, i'm having a big brain fart and haven't figured it out yet.
so i'm trying to basically calculate the table height when in iOS 9 based on scaling it. here is an image of what i'm trying to do and i'll explain after:
http://imgur.com/FZz76BI.jpg
so on the left is the res that i want it to scale to be similar to. on the right i want to solve for X based on the values for a,b,c in there. HOWEVER ... a is going to be a dynamic value, it isn't ALWAYS going to be 60 as in that example. the tables on my first 2 views have height of 60 (for what i want) but when it stays height 60 on iOS 9, it's not wide enough and screws up the look.
so right now i'm having a big brain fart on how to solve for x. when the height is always 60 for the first 2 screens, i'm just doing height = (677.0 * 60.0) / 568.0 and it's working, however when i try to use that dynamically for the 60 value, it doesn't work. i know i have to incorporate the width in there as well, but trying to think with a 6 month old right next to me screaming and playing, i'm having a big brain fart and haven't figured it out yet.