storyboard

Using static cells in a storyboard UIView with Xcode 4.2

喜夏-厌秋 提交于 2019-12-10 15:26:07
问题 I am attempting to create a very basic login screen, using the Storyboard designer in Xcode 4.2. I'd like a grouped table view to contain the login and password fields. There are some other elements on the view, such as a login button, a forgot password link, etc. Additionally, the background should be able to be tapped to dismiss the keyboard, when a input field has focus. Pre-Xcode 4.2, I accomplished this with a UIView that implemented the UITableViewDataSource protocol, generated and

Disable storyboard warnings

柔情痞子 提交于 2019-12-10 14:45:50
问题 I avoid getting warnings in my swift code. However when it comes to storyboard requirements it's a bit harder for me. So for now i just want to disable xcode showing warnings regarding storyboard issues. I have tried the following without success: 回答1: Disable show warnings option As you have mentioned the option Show warnings under Interface Builder Storyboard Compiler -Options must be kept no, for suppressing warnings related to your storyboard. What you missing to do Also after that you

The document “Main.Storyboard” could not be opened. Unrecognized file content

不羁的心 提交于 2019-12-10 14:25:35
问题 I cannot open my Storyboard after updating from Xcode 7 to Xcode 8. Can anyone help? Inside it did not show any error. 回答1: For me opening the storyboard as "Source code", fixing merge conflicts and then also restarting Xcode did the job. 回答2: I just find a solution as below: Make sure the storyboard extension should start from lower case s. Ex: it should be "Test.storyboard" not "Test.Storyboard" 来源: https://stackoverflow.com/questions/39760818/the-document-main-storyboard-could-not-be

Xcode ignore storyboard warning

醉酒当歌 提交于 2019-12-10 14:19:00
问题 How can I get Xcode to ignore this warning: Disabling segue animation is not available prior to iOS 9.0 I understand why the warning's there and am happy to ignore it because the app works just fine in 8. I need to continue supporting iOS 8 and I don't want to suppress all storyboard warnings - just this one. 回答1: In the properties panel for your storyboard, set the 'builds for' drop down to a value of 9.0 or later 来源: https://stackoverflow.com/questions/32890470/xcode-ignore-storyboard

How do I recover a storyboard in xcode?

五迷三道 提交于 2019-12-10 13:39:21
问题 I have a little bit of a situation here. A few days ago, I accidentally deleted my storyboard, so immediately went into my trash and dragged the storyboard back into the project. Everything worked fine. But then I just emptied my trash and the storyboard no longer appears to be in my project; the storyboard file is showing up red and when I click on it, nothing loads. To my dismay, I thought all was lost so I started building a new storyboard and connecting the classes, outlets and actions. I

How to properly use modal view controller with the xcode 4.2 storyboard

无人久伴 提交于 2019-12-10 13:17:44
问题 I was wondering how to properly use the storyboard to put up a view controller modally. Personally I prefer working with xibs, but it seems that the storyboard is gaining popularity and will be the way to go in the future. The way I would normally put up a view controller modally would be like this: let's say we have ViewControllerA (A for short) and ViewControllerB (B for short). I would then normally put a protocol in B.h specifying the delegate method when B wants to be dismissed and add

IBOutlets to other view controllers in storyboard

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 12:52:19
问题 I want to switch between multiple view controllers with a UIPageViewController . These view controllers are static though so i want to design them in my storyboard. Since one can't use relationships or segues to connect them to the UIPageViewController but a datasource, I need to have a datasource object with an IBOutletCollection holding the pages: @property (retain, nonatomic) IBOutletCollection(UIViewController) NSArray* pages; Although, I am not able to connect this outlet to the view

iOs set Storyboard orientation to landscape

我的梦境 提交于 2019-12-10 12:31:19
问题 I wish to set View Controller's orientation as landscape in Storyboard. I referred the below links but couldn't find the "orientation" option anywhere (screenshot attached) Links referred: Designing in landscape with Storyboards iOS 7 XCode 5 Storyboard set orientation to Landscape 回答1: In xcode 8 the option to change the orientation is not from Inspector, you will be able to change the orientation from bottom bar, please check the screenshot 回答2: Xcode 8 provides the option for landscape

UITableView Passing Data Between Controllers Embedded Inside Containers

試著忘記壹切 提交于 2019-12-10 12:17:26
问题 I have a simple test project. A UITableViewController (MasterViewController) embedded inside a navigation controller in storyboard. I am NOT segueing using the prepareForSegue to pass data to another view controller (DetailViewController). Instead, didSelectRowAtIndexPath is use to update a label in the detailviewcontroller as below: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { DetailViewController *detailViewController = [self.storyboard

Display Passcode / Pincode upon launching the app - Storyboard

余生颓废 提交于 2019-12-10 12:17:12
问题 I am trying to display a passcode/pincode (modal view controller) upon launching the app. You may see the code in AppDelegate.h : - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { if (![[NSUserDefaults standardUserDefaults] boolForKey:@"passcode_in"]) { //display passcode screen UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; UIViewController *vc = [storyboard