I had a project A
which is started before new screen size is introduced. After upgrade my Xcode to 6.0, in storyboard and IB, I still use 4.0 screen when developing User Interface. And when I tested the project on 4.7 screen and 5.5 screen, the view could scale automatically and looks the same as 4.0. For example, In IB, i have an UIImageView which size is 60x60 (In 320x568 View), and when I run it in iPhone 6 simulator, the image view size become 70x70.
Recently I created another project B
which has quite different initial settings. (For example, there is no *-Prefix.pch file). I still developed User Interface in 4.0 screen, but when I tested on iPhone 6 simulator, the view didn't scale.
Therefore, I started run some tests. Both tests are developed in 4.0 Screen Size. First I created a view with label in the centre in Project A
's Storyboard and run in iPhone 6 simulator. Second test I created the exact same view in Project B
's Storyboard and run in iPhone 6 simulator. The result is quite different.
Result for test 1 (Project A
):
Result for test 2 (Project B
):
As we can see, when the code running in Project A
, the view could scale properly to larger screen, but in Project B
, it can't scale.
Can someone answer why they are different? Which result is normal? Because if the first test result is normal, then I don't need to worry about developing view in different size (Well still need to consider 3.5 inch)
UPDATE:
Seems like I need to make something clear in case using Auto Layout for both project and to control variables, I deselected Use size classes since project A
didn't have that before.
UPDATE:
I removed every view controllers and do that again in both projects. And the results remain the same as before. I looked over source code of storyboard, only differences are view controller ids.