I'm trying to show a NavigationBar with a Bar Button Item.
I drag and drop the elements in the StoryBoard and press Reset to Suggested Constraints, but the NavigationBar doesn't appear.
I tried setting the constraints manually in a different ways but can set it right.
There is a way to use layouts instead of constraints? In Android it is more simple, but using XCode and Swift I always have problems with the UI.
The segue that appears in top of the ViewController comes from a SWRevealController. That segue has sw_front as identifier, and class SWRevealViewControllerSegueSetController.
Please give some ideas about how to fix it.
Well, I fixed it some days ago.
In conclusion:
It is better to generate the NavigationBar creating a segue from the root of the NavigationView to another ViewController.
At least for me, the SideMenu is a better option (instead of SWReveal): it is more clear to get it working without a lot of changes in the StoryBoard: https://github.com/jonkykong/SideMenu
Related
When I create a new segue using the storyboard (ctrl+drag), it creates creepy lines on my otherwise tidy clean storyboard... I was wondering if there is any method to make them prettier š
š
https://ibb.co/iHt9N8
First off. It looks like you are using segues incorrectly. You should not be using segues to go backwards. You should use a segue forward and then dismiss backwards without segue.
Remove any segues that you are using to āgo backā.
Next, if it is still too untidy. Separate your app into different areas and use a storyboard for each area.
If you are dealing with a lot of storyboard view controllers, you cannot keep your storyboard clean.
Don't use segues. Just create an instance of the storyboard view controller programmatically and push/present it. Refer to this answer.
I duplicated a storyboard, and changed colors is all. What do I need to do to link my ViewController to use this other storyboard? thank you.
Select your project folder in the navigation window. Under the Deployment Info section, click on the "Main Interface" text field and select your alternate storyboard. This will set it as the initial interface at launch time. If you want to switch between the storyboards while the application is running, that's a little more complicated and not something I've had to figure out yet.
I often make use of views in interface builder that live outside of the viewcontroller hierarchy (see screen grab below for simple example).
Before upgrading to Xcode5 I could get this view to appear on the storyboard by writing an IBAction outlet and dragging a connection from the code to the view in the storyboard.
If you paused over the button for a moment it would flash and then open up as a view on the storyboard that is then a lot easier to work with.
Since upgrading this function no longer seems available. Has anyone found out how to get these views to appear on the storyboard?
Edit:
Using the temporary viewcontroller as described in this answer seems one approach, although fiddly since you need to move the UIView stack between viewcontrollers each time you want to edit the layout. Using a separate XIB is starting to seem like the sanest approach.
https://stackoverflow.com/a/13713385/1060154
Finally, we get this back in Xcode 7.
Hallelu!
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
When opening up a project today, there is some weird behavior in XCode. Things have disappeared in the storyboard view like the NavigationBar in viewController, the buttons associated with it, etc. I can see in the Scene list that they still exist. Is there any way to have these show up again?
You probably need to add a navigation controller to your storyboard and make your view controller the root. You cannot simply set the top bar in simulated metrics in storyboard to navigation bar.