image position iOS 7 vs iOS 6 - uiimageview

I have a background image issue for my app after I updated the project for iOS 7.
The app is navigation controller managed. I have a background image (UIImageView) created in IB. Since I place it a bit under the navigation menu I assume that the placement is calculated from the top of the view which in iOS 7 is beneath the Navigation Controller. When I run the app in iOS 6 the image is quite far down on the screen. Once again I assume this is because the top of the view in iOS 6 is below the Navigation Controller menu.
How do I fix so that the image has the same vertical distance from the navigation controller in iOS7 and iOS6?
Best regards
Frederik

iOS 7 brings several changes to how you lay out and customize the appearance of your UI. The changes in view-controller layout, tint color, and font affect all the UIKit objects in your app. In addition, enhancements to gesture recognizer APIs give you finer grained control over gesture interactions.
Please refer answer here.

One solution what I did is : I hooked background image to a reference from my xib, and set the frame programmatically from ViewDidLoad. It works fine.Please note that not forget to check iPhone 5 and iPhone 4 and set height to 568 and 480 respectively.

Related

Xcode 9 - How to customize a design in storyboards for just iPhone 5?

I'm using Objective-C and Xcode-9.
When using autolayout, my designs appear perfectly on everything but iPhone 5.
I am trying to see if I can edit my design for -just- iPhone 5/SE screen sizes without affecting my other design integrations.
I tried using "Vary for Traits" but it appears that all iPhone sizes are considered regular height, compact width while in portrait mode so editing the iPhone 5 on those parameters edits all phone sizes.
I think I'm missing something here but I'm not sure the exact keywords to Google.
How do I customize a design in storyboards to be unique for iPhone 5 only, but remain the same for other phone sizes?
There isn't any simple built-in way to design in the storyboard for just one device type/size. But you should not have to. You should be able to make your design work for any phone size through autolayout alone.
Still, if you really can't, just implement viewDidLayoutSubviews (or layoutSubviews in your view controller's main view) and adjust the layout "by hand". That is when autolayout does its work, so if you don't like the results, you can tweak them at this point "manually".

Xcode/Swift Adaptive Layout Issues

I am currently in the process of testing if my app works on both iphone and ipad and setting up the respective autolayout. For some reason on this particular viewcontroller, when I switch from iphone to ipad 9.7 the viewcontroller does not change the height and width of its view resulting in something that looks like this. Also, I am only having issues with this particular storyboard. The rest adjust their views to the correct size like they are supposed to .

How to account for size of status bar in Xcode 5 storyboard?

If I open my existing project that was created with XCode 4.6 with XCode 5 then my views and the status bar are overlapping in the storyboard but they are not with XCode 4.6. There is presumably some setting in IB to include/exclude the status bar to fix this but I'm unable to find it. See screen shots below
I would suggest looking into the iOS 7 design guidelines and perhaps rethinking the custom effect. If you are set on using a custom background for your navigation and status bars then you will probably want to set it to 64 points tall in order to cover both the status bar and the nav bar.
Another option you have, which will allow you to continue more closely to how you've used it in the past, is to use to new iOS 6/7 Deltas feature. See iOS 7 - Status bar overlaps the view for some great recommendations on how to handle this.

Xcode 4.5 "Apply retina 4 Form factor" toggle button not working properly

I'm trying to update an IOS app for IOS6 and iPhone 5, but I have a problem resizing some views from the main Storyboard.
When I click on the new "Apply Retina 4 Form Factor" button, some of the views included in the StoryBoard don´t resize. I´ve checked all the settings for every Scene and seem to be configured in the same way. Any idea? Thanks in advance.
You might have found your solution but I just had a similar problem. For future notice, I found the fix was in the show size inspector and instead of using layout rectangle, I used frame rectangle.
I was having the same problem, this answer worked for me and finally removed the letterbox:
https://stackoverflow.com/a/12927282/539149
So add a 640x1136 launch image called Default-568h#2x.png and set the "Retina (4-inch)" target setting to it. More info for the other sizes here:
http://www.idev101.com/code/User_Interface/launchImages.html
Just in case it helps others, I had tried these links and none of them got rid of the letterbox, but they did at least enable the resize masks:
Resize of UIViewController in storyboard
Xcode 4.5: can't set root view autoresizingMask in Interface Builder
how do you resize (visually, not programmatically) the detail view of a UISplitViewController in a storyboard?
iphone 5 and storyboard setting autoresizing masks

How to make an iOS app support landscape orientation in XCode?

How to make an iOS app support landscape orientation?
How do you make it support both landscape and portrait, where you can just press a button to activate it.
for any new people reading this old post just go to main.storyboard->click on the view controller click on simulated metrics (the fourth icon that pops up, looks kind of like a pentagon belt buckle)
then orientation->Landscape this is for Xcode 5

Resources