uistoryboard

How to call a View Controller programmatically?

与世无争的帅哥 提交于 2019-11-27 10:33:18
I have looked at all the tutorials I can find on this one, and I still don't have the answer. I need to call another view from the code. I am using UIStoryboards . I have changed the view many times by control-dragging from UIButtons , but now it must be from the code. I am trying to call the info page from the main menu if it is the first time the user has opened the app. I cannot seem to find a way to change the views from the code, however. All my views are controlled by the same files ( ViewController2 ). The identifier of my main menu is ViewControllerMain , and the identifier of the info

Does anyone know what the new Exit icon is used for when editing storyboards using Xcode 4.5?

一笑奈何 提交于 2019-11-27 10:30:53
Right-clicking the Exit icon yields an empty window. Can't Ctrl-drag a connection to any IB elements or corresponding source files. Docs give no love. Doesn't appear in nib files, only storyboards. My assumption is that it's a corollary to segues, but I don't see any new methods to back it up. Anyone? Cal S There's a lot of information in the WWDC video "Session 407 - Adopting Storyboards in your App." Say you have two view controllers linked by a segue. Implement the following exit action on the first view controller: - (IBAction)done:(UIStoryboardSegue *)segue { NSLog(@"Popping back to this

iOS 7 UIDatePicker height inconsistency?

萝らか妹 提交于 2019-11-27 10:28:24
问题 I'm running into something weird when using UIDatePicker elements with Storyboards in iOS 7. In the Storyboard, the date picker has a fixed height of 162. In reality, however, the element takes up more space than that. So this turns into this: so I have to move everything below it down, guessing and eyeballing how much space the date picker will actually use. Is this a bug? Am I doing something wrong? To be clear, the date picker is totally transparent - can't figure out a way around that.

How to localize an iOS storyboard

▼魔方 西西 提交于 2019-11-27 10:23:36
I've an iPhone storyboard with some views. For instance, a navigation item title is named News , which should be translated for other languages. When I add a new localization to my storyboard, it created a duplicate of my current storyboard for the new language. Here I can change the title for the navigation item, but for me it does not seem very useful. What if my storyboard contains 100 views and I need to support 10 languages? If I need to change something in my original storyboard, I have to make the same changes for all languages. That seems very odd. In which situations can this be

Status Bar Text Color iOS 7 [duplicate]

江枫思渺然 提交于 2019-11-27 10:12:37
This question already has an answer here: How to change Status Bar text color in iOS 51 answers I am unable to change the text colour in the status bar in iOS 7 SDK. Currently its black and i want it to be white for all my view controllers in a storyboard. I have seen few questions on StackOverflow like THIS , THIS and THIS but they didn't of much help. Also may be due to the fact that i am unable to find UIViewControllerBasedStatusBarAppearance to YES in my plist file. Can any one tell me the right way to set the status bar text colour to white for all view controllers in the storyboard?

What is the best practice when using UIStoryboards?

三世轮回 提交于 2019-11-27 10:10:18
问题 Having used storyboards for a while now I have found them extremely useful however, they do have some limitations or at least unnatural ways of doing things. While it seems like a single storyboard should be used for your app, when you get to even a moderately sized application this presents several problems. Working within teams is made more difficult as conflicts in Storyboards can be problematic to resolve (any tips with this would also be welcome) The storyboard itself can become quite

Color in storyboard not matching UIColor

对着背影说爱祢 提交于 2019-11-27 09:46:39
问题 I am defining a color in code as [UIColor colorWithHue:32.0/360.0 saturation:0.88 brightness:0.97 alpha:1] If I try to set the same color in storyboard, when running the App it is a slightly different colour to the one defined in code. If I drag the color to the palate then select a different color and select the palate one again, the HSB values are slightly different. It seems it is snapping to a different (RGB?) color in interface builder. 回答1: Xcode 8+, iOS 10+ I recently faced this

A launch storyboard or xib must be provided unless the app requires full screen

冷暖自知 提交于 2019-11-27 09:44:43
问题 I don't use a storyboard/xib for launch screen and get these errors in Xcode7+. - All interface orientations must be supported unless the app requires full screen. - A launch storyboard or xib must be provided unless the app requires full screen. 回答1: Starting from iOS9 and Xcode 7 you are required to provide a LaunchScreen.storyboard for your launch screen in order to support the new multitasking feature on iPad. To opt out of being eligible to participate in Slide Over and Split View, add

Embed a UIViewController in a NavigationController using segues

北城以北 提交于 2019-11-27 08:53:40
I have a viewController that is usually (most often) accessed by using a push segue. This viewController needs to be embedded in a UINavigationController. So typically, this is no problem. The push segue manages pushing the viewController, and therefore the viewController has it's UINavigationController. My issue is that in a few cases, I'd like to present this same exact viewController using a modal segue. When I do this, the viewController is not embedded in a navigationController. Is there a way to do this using segues? I know this can be done purely in code without segues by creating a

Segue crashes my program. Has something to do with my NavigationController and my TabBarViewController

落花浮王杯 提交于 2019-11-27 08:36:05
问题 I encountered a problem while testing my app. You can see how I have setup my views in the following image: The thing is that everything works fine. I user my test user to login, and the following code executes the loginSegue, self.performSegueWithIdentifier("loginSegue", sender: self) which is a modal segue that links my login "View Controller" with the "Home Tab Bar View Controller". I get redirected to the "Initial Feed View Controller". Everything works great. But when I go to my