uistoryboard

How to switch to different Storyboard for iPhone 5?

五迷三道 提交于 2019-11-26 23:56:48
Just as an app utilizes different storyboards for iPad and iPhone, I would like my app to use a different storyboard for the iPhone 5. Since there is no option in the Info.plist to select default storyboard for iPhone 5, how would I programmatically call the storyboard? I do not want to use AutoLayout for this app unless it is absolutely the last resort. I understand how to detect if a user is using an iPhone 5 or other device with the same screen size. I just need to know how to set the default storyboard without the plist. lionserdar I was looking for the same answer couple of weeks ago here

UITextView - setting font not working with iOS 6 on XCode 5

末鹿安然 提交于 2019-11-26 22:07:24
I'm using storyboards for my UI. I was previously using XCode 4.6 and released on iOS 6. I have since updated to iOS 7 using XCode 5 and updated the Storyboard to work nicely with XCode 5. I have one issue though: UITextView doesn't want to display font changes within code. Text colour changes work fine. Any other property changes are fine. Font, not at all. I was using a custom font, so I checked different fonts with different sizes (i.e. systemFontOfSize: ) but that didn't work. The text view only shows the font that's set in the Storyboard. What could I be missing here? Are there any auto

IBOutlet is nil, but it is connected in storyboard, Swift

谁说胖子不能爱 提交于 2019-11-26 20:10:34
Using Swift 1.1 and Xcode 6.2. I have a UIStoryboard containing a singular, custom UIViewController subclass. On it, I have an @IBOutlet connection of type UIView from that controller to a UIView subclass on the storyboard. I also have similar outlets for subviews of that view. See figure A. But at run time, these properties are nil (Figure B). Even though I have assured I've connected the outlets in Interface Builder. Thoughts : Is it possible that because I am using a subclass of a subclass something messes up with the initialization? I am not overriding any initializers awakeFromNib: is not

Segue to another storyboard?

五迷三道 提交于 2019-11-26 19:17:18
Is it possible to segue from one storyboard to another, or to embed a storyboard in a view controller in another storyboard? I need to place a UITabBarController in a UINavigationController , and I'd like to keep them nice and separate. lnafziger Yes, but you have to do it programmatically: // Get the storyboard named secondStoryBoard from the main bundle: UIStoryboard *secondStoryBoard = [UIStoryboard storyboardWithName:@"secondStoryBoard" bundle:nil]; // Load the initial view controller from the storyboard. // Set this by selecting 'Is Initial View Controller' on the appropriate view

Call storyboard scene programmatically (without needing segue)?

做~自己de王妃 提交于 2019-11-26 18:58:23
问题 I have a modal storyboard scene that I want to be accessible to all my other scenes. Creating a modal segue to it from every scene on my storyboard creates a big mess of strings going everywhere. Is there a way that I leave off the segues and call the scene programmatically instead? Basically I want to do something like this: MyNewViewController *myNewVC = [[MyNewViewController alloc] init]; [self presentModalViewController:myNewVC animated:YES]; except instead of creating and pushing a view

Retrieve custom prototype cell height from storyboard?

蹲街弑〆低调 提交于 2019-11-26 18:55:49
When using "Dynamic Prototypes" for specifying UITableView content on the storyboard, there is a "Row Height" property that can be set to Custom. When instantiating cells, this custom row height is not taken into account. This makes sense, since which prototype cell I use is decided by my application code at the time when the cell is to be instantiated. To instantiate all cells when calculating layout would introduce a performance penalty, so I understand why that cannot be done. The question then, can I somehow retrieve the height given a cell reuse identifier, e.g. [myTableView

Instantiate View Controller from Storyboard vs. Creating New Instance

99封情书 提交于 2019-11-26 18:17:29
问题 What is the functional difference between instantiating a View Controller from the storyboard and creating a new instance of it? For example: #import "SomeViewController.h" ... SomeViewController *someViewController = [SomeViewController new]; versus #import "SomeViewController.h" ... UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil]; SomeViewController *someViewController = [storyboard instantiateViewControllerWithIdentifier:@"SomeViewController"]; In either

Using Multiple Storyboards in iOS

会有一股神秘感。 提交于 2019-11-26 18:04:49
My objective is to create a tabbed application, then the view for each of the tabs are constructed in separate storyboards. My mainstoryboard is a tab view. Then I create a secondary storyboard (storyboard#2) with 2 View Controllers. The first view controller (also ticked as initial) have a button, and segue (modal) to 2nd view. I managed to load the view by subclassing and overriding loadView from storyboard#2. Here's the simulator output. When click on the "click me" button, I get a EXC_BAD_ACCESS . The segue does not work, seems like the second storyboard is not being loaded completely. Has

Status Bar Text Color iOS 7 [duplicate]

僤鯓⒐⒋嵵緔 提交于 2019-11-26 17:54:54
问题 This question already has an answer here: How to change Status Bar text color in iOS 52 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

Embed a UIViewController in a NavigationController using segues

随声附和 提交于 2019-11-26 17:47:05
问题 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