Views have indention after opening storyboard in xcode 8 - ios

I want to upgrade my iOS 8 App to iOS 10 (In House App). After opening the project in Xcode 8 and running the app on an iPad/Simulator all custom views have indention from the navigationbar. (UITableViewController do not have this Problem.)
View as seen in IB
This is the View in the Interface Builder.
These are the settings in the inspector
View in Simulator
As you can see, the border of the "P"-Symbol has an unintended indention. The TableView Section Header is also not visible in the simulator.
So my Question is: How can I fix this? I tried to set the Storyboard Document type to Xcode 7.

Related

This version does not support collection view cell content view. Open this document with at least Xcode 11.0

I was excited to check out Xcode 11 with my existing xCode project, so I started coding with the latest beta version. Today I wanted to upload my new app update but of course Apple rejected the binaries advising me, to use a GM version of Xcode 11 (not released yet) or the latest Xcode 10 app.
I was able to revert all changes made by Xcode 11 (provisioning profile, etc.) and opened the project back in Xcode 10 but I stuck in an error saying
This version does not support collection view cell content view. Open
this document with at least Xcode 11.0.
I am not able to build, archive or even open the storyboard in xCode 10. I found a single collection view in my storyboard in Xcode 11 which I created using the beta. But also after deleting the entire UICollectionViewController incl. the cells and cleaning the project, I am not able open the storyboard back in Xcode 10.
I've read accepted answer, but it wasn't obvious where to find "property" which could be just switched off or something like.
To make it more clear: you just need to replace all occurencies of collectionViewCellContentView with view in storyboard source code. For example see screenshot:
Next, rebuild and Xcode will remove <capability name="collection view cell content view" minToolsVersion="11.0"/> requirement; or remove it manually if you're using Xcode 10.
Hope will be helpful.
EDIT
Found how to "switch off" using of collection view cell content view, but you'll still need Xcode 11 to open storyboard. Change size to Default in collection view cell prototype size inspector:
Try to open the storyboard file with a text editor and search for the property. Usually when there is a warning, Xcode will show this warning during compile time. See if double-clicking the warning redirects you to the line of code where the problem occurs.
Just go to your storyboard which is not opening. Right click on it , Open it with Source Code and search for the property which is not allowing xcode to open your Storyboard.
Search for the property e.g "collection view content view".
Delete that property block. Now Open your Story board as an Interface Builder.
Note: By Deleting the property you will lost that in your view controller screen. :)

Application design is not display properly in simulator after updating xcode 8

I have updated xcode 8 and then tested application in iphone 6 (ios 10) simulator.
Application desiging is not showing properly as it should be.
In xcode 8, storyboard designing is not proper.
Storyboard showing designs properly but runtime it's now showing properly.
I'm not able to get any solution.
If anyone know the answer please suggest me.
from storyboard, Select your view controller and set proper device from View As button. If your storyboard is designed using previous version of Xcode, try selecting iPhone SE from "View As" as shown in below image.

UISearchBar embedded in UIBarButtonItems (IT IS iPad document!)

I had UISearchBar embedded in UIBarButtonItems for a years in the iPad storyboard. Now when I turn Use Size Classes on, the storyboard (which is using exclusively for iPad), throw the compilation time error:
UISearchBar embedded in UIBarButtonItems (Only available in iPad
documents)
Is there any way to let XCode know that the storyboard is using with iPad only!?
This was a bug with Xcode. Apple fixed the bug in Xcode 8.2. Now you can use UISearchBar in UIToolbar in adaptive storyboards.

Understanding view layout in Xcode 6 InterfaceBuilder

I'm a bit of an newb with Xcode's InterfaceBuilder, trying to make my Hello World app but I don't understand why my layout of the UI elements in Interface Builder do not match what I see in the simulator.
I created a single view project with a new UIViewController class and a corresponding .xib file (I'm not using a storyboard yet). In the xib file, I placed a TextView and Toolbar onto the main view. I have also set File's owner as my custom UIViewController class and connected view outlet to the File Owner.
Here's how everything looks in interface builder:
When I launch the app in the simulator for iPhone 5 on iOS 7, I get a different layout than on iPhone 5 on iOS 8 and an all together different screen on iPhone 6 on iOS 8.
Here's what I see for iPhone 5 - iOS 7 (notice the black bar at top & bottom of the screens):
Here's what I see for iPhone 5 - iOS 8 (the toolbar is missing at the bottom):
Finally, everything looks right only on iPhone 6 - iOS 8:
How can I setup things so my UI elements appear such that:
I don't need to manually place the UITextView's y position at 20
to account for the status bar.
UITextView and UIToolBar are
placed such that UIToolBar will appear directly below the UITextView
and they fit whatever window size available on the device?
Can someone point me to a good resource to try understand Interface Builder layouts better?
First of all remove auto layout and size class.
Use auto resizing to make your screen compatible for all screen size.

How to make .xib files compatible to both iOS7, iOS6 and earlier [duplicate]

This question already has answers here:
Status bar and navigation bar issue in IOS7
(11 answers)
Closed 9 years ago.
I am using .xib files in my app and I am using xcode5.
If I run my app in iOS6 and earlier, the alignments are missing.
Any one know about this issue?
Do we have to create separate .xib files for iOS7 and iOS6?
EDIT: I turned off Autolayout but under iOS6, the views are still going down by 20 pixels.
If you haven't done so already, turn off AutoLayout in your xib files. Autolayout only came in with iOS 6 and newer iOS versions.
Also, you can preview what XIB files look like between iOS 6 and iOS 7 via a popup menu in the File Inspector:
in iOS7, the app windows starts from y=0px (in iOS6-, it begins at y=20px).
The quickest and easiest way to handle this, (and since you're already using Xcode5), is to switch off Autolayout and utilize the iOS6/7 Delta values for every view.
Basically:
Select every viewController's main view and uncheck "Use Autolayout"
Select every subView (UIButton, UILabel etc), go to the frame setting section
Increase their Y frame values by 20
but it seems you, #SudhakarTharigoppula, don't need to do this step.
...just do the next step
Enter a value of -20 for ΔY
This will start your app by leaving 20px in iOS7 but back in iOS6, the ΔY of -20px will compensate for the extra 20px you had given to every subView.
see: Status bar and navigation bar issue in IOS7

Resources