Xcode Storyboard preview size classes blank - xcode

I have a problem with storyboard preview. When I select a old ViewController created with a previous version of Xcode (6.0), the preview show me only the navigation bar. But, if I create a new ViewController and put inside it some elements, the preview works. The current version of Xcode is the 6.3.2.
Thanks

The interface elements that you put inside the "old ViewController" were added under a particular size class. You are not in that size class with your preview, so those interface elements are not present.

Related

How to convert manual view controller to storyboard as a launch screen

New iOS requirements need Apps for iPhone or iPad must be built with the iOS 13 SDK or later and use an Xcode storyboard to provide the app’s launch screen.
But my project is very old and has never used Storyboards. All UI elements are created dynamically using ViewControllers.
I managed to create a storyboard file and set it as a launcher but it has no scenes and I do not know how to proceed. I would like to:
Create a scene where I place only the original launch image inside (hoping that apple still accepts this branding)
If it is possible to just connect my main ViewController with the scene (if that works with dynamical ViewControllers)
If nothing helps than I would need to create a simple scene which has just a bottom bar like my ViewController
I had this exact issue, here's what I did:
Create LaunchScreen.storyboard and set to use it as launch screen
Using the + button in the top-right (this was not an obvious step), add a View Controller into the storyboard
Untick "Use Safe Area Layout Guides" on the right panel if you're getting that error
Tick "Is Initial View Controller"
Then clean and run, for me it just worked. I did have trouble seeing it update though, as discussed here: Launch Screen storyboard not displaying image

Toolbar fades out after a second in iOS 11

I'm just starting out on a new app with Xcode 9 and iOS 11. I placed a Toolbar at the bottom of the view, then added suggested constraints. Inside the toolbar I placed two buttons, "Sites" and "Item".
When I run the application, the toolbar disappears after a second whenever I launch the app.
Any idea what's causing this? How do I fix it? There's currently no code added to it, just the elements I've mentioned.
You are putting the elements on the launch screen instead of the actual first screen of the application.
If you are using the default configuration, search for the storyboard called Main.storyboard and put the items you want to show there.

NSPanel removed in Xcode 8?

In the past I can find Panel available in Interface Builder's Library, but in Xcode 8, I searched the whole library in storyboard editor, no Panel available. Has Apple just removed NSPanel or I got something wrong?
Assuming you want to add a second window (as a panel) to your storyboard, add a new window controller. Then select its window and change its class to NSPanel. In the attributes inspector you will find that your panel can then be changed to regular, utility or HUD.
For Cocoa apps, I find that Nibs/Xibs are sometimes easier to work with than storyboards.

Hover over IBOutlets to find corresponding item in the Main Storyboard in Xcode (Swift)

I'm not totally sure but I thought it was possible in the past to find the corresponding interface element in the storyboard while hovering over the circle in front of an IBOutlet in the code view while you are in the Assistent Editor. I found a screenshot of an older version of Xcode.
But this somehow doesn't work anymore (Xcode 7.1.1 7B1005, Xcode 7.2 beta 4 7C62b and 10.10.5)
Is there another way to quickly find the connection between IBOutlets and their interface element except for their names?
Try updating your Xcode to Xcode7, because it's working on that

UITableView no longer scrolling using xCode 4.5, deploying on 5.x or 6.0

Deployed project using UITableView for display of images.
Upgraded to xCode 4.5, suddenly my UITableView no longer scrolls.
This occurs both on the device and on the simulator with iOS 5.0 -> 6.0
Additionally, I have found that I can no longer set the number of minimum touches for the PanGestureRecognizer programmatically.
Other StackOverflow ticket
In fact, a Zombie analysis reveals that the recognizer has been released. This could definitely explain the above behavior. My attempt to set the recognizer is as follows and crashes.
UIPanGestureRecognizer* pgr = [imageTableView panGestureRecognizer];
[pgr setMinimumNumberOfTouches:2];
[pgr setMaximumNumberOfTouches:2];
Is anyone else seeing this issue?
I had a similar problem when moving to iOS6/XCode 4.5. It seems that the UIPanGestureRecognizer now steals touches from underlying UIScrollViews or UITableViews.
I found a work around for this in the post below. It's not the top rated answer, so I'll re-paste the content below as well:
iphone - UIGestureRecognizer prevents UITableView from scrolling in Xcode 4.5
I had the same issue: I used to drag my TabGestureRecognizer directly onto the storyboard instead of creating them through code. With iOS6 this now seems to break scrolling.
I prefer adding views, gestures, etc directly onto the storyboard instead of through code.
You can still do this but with two changes:
1) Referencing Outlet Collections
Right-click the GestureRecognizer which is visible to you within the scene's dock.
Clear the section Referencing Outlet Collections
2) Attach the GestureRecognizer to the related view through code
Create an outlet for your GestureRecognizer
Add the following line within the viewDidLoad method:
[self.tableView addGestureRecognizer:_tabGesture];

Resources