uistoryboard

How do I reset specific size class data on a storyboard in Xcode6?

帅比萌擦擦* 提交于 2019-12-04 03:46:19
I am using size classes to create a storyboard that can target all the various screen sizes and orientations. I have been working in the Any Width-Any Height size class. I ran into a display issue and decided to make those changes in the Compact Width - Regular Height size class. At a Later time, I was able to resolve my layout issue by making constraint changes to the Any Width-Any Height size class. How can I revert the changes made to the Compact Width - Regular Height size class so that the Any Width-Any Height size class will be used at runtime without manually reverting the changes? I

How to add storyboard reference in another storyboard

独自空忆成欢 提交于 2019-12-04 03:40:10
I have 2 storyboard - mainStoryBoard1 and mainStoryBoard2 . I need to perform a segue from ViewController of mainStoryBoard1 to ViewController of mainStoryBoard2. Anyone has idea how to do this? Interface Builder in Xcode 7 has "Storyboard Reference" object in the "Object library": Just drag that onto your storyboard. You can then select that storyboard reference and specify the storyboard to which it refers in the attributes inspector: Then you can now add segue to this reference and you'll segue from the scene in one storyboard to a scene in another storyboard. 来源: https://stackoverflow.com

iOS: Storyboard CollectionView segue not being triggered

独自空忆成欢 提交于 2019-12-04 03:20:10
I have a UICollectionView controller embedded inside a navigation controller. The collectionView lists projects and each cell is supposed to segue to a ProjectDetail screen. I simply cannot get the segue to trigger. If I simply drop a button on the nav bar and hook up a segue to the detail, it works. But triggering from my CollectionView cell doesn't. Here is what the storyboard looks like: http://cl.ly/RfcM I do have a segue hooked up from the CollectionViewCell to the ProjectDetailViewController Here's the relevant code inside my ProjectDetailViewController: @interface

Adding navigationItem.titleView in storyboard is failing

喜夏-厌秋 提交于 2019-12-04 02:37:06
I can add a titleView to my navigationItem very easily in code: UIImageView *navImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"nav_logo"]]; UIView *titleView = [[UIView alloc] initWithFrame:navImageView.frame]; [titleView addSubview:navImageView]; self.navigationItem.titleView = titleView; However, I'm trying to do this within my storyboard, and am failing miserably. Here's what I've done: Drag and drop a UIView on top of my VC's Navigation Item. Drag and drop a UIImageView on top of the UIView Add width/height/leading/top constraints Set the image property of the

How to honor Dynamic Type Accessibility Sizes with a custom font in an iOS storyboard

≯℡__Kan透↙ 提交于 2019-12-04 01:32:50
How can I use the dynamic type text style "Title 1" and set the font face to the built-in font Chalkboard SE for a UILabel in a storyboard? I need to honor the Dynamic Type size in iOS (Apple has been encouraging this since iOS 7?) I also need to use the built-in font Chalkboard SE, which is not used by default for the "text styles" fonts. I am currently using a custom font as shown in the image, but need the font to change size in accordance with the user's Dynamic Type / Accessibility Sizes preference just as all the Text Styles fonts do. The best Text Styles option is Title 1 , but the font

Is it possible to check whether an identifier exists in a storyboard before instantiating the object?

我们两清 提交于 2019-12-04 01:31:15
In my code I have this line, but I was wondering if there is way to check whether @"SomeController" exists before I use it with the " instantiateViewControllerWithIdentifier " method. If the identifier doesn't exist then the app crashes. It's not a huge problem if there isn't a good way to do it, I can just be a bit more careful not to fat finger the identifier names, but I was hoping I could handle it more gracefully. UIViewController *newTopViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"SomeController"]; No, there is no check for this. However, you don't need to.

Segue between two view controllers

£可爱£侵袭症+ 提交于 2019-12-03 23:49:41
On my storyboard (shown above), I have a ViewController which holds an MKMapView with annotations. These annotations hold a disclosure icon, which when tapped, should navigate the user to another ViewController. To do so I've created a push segue between the view controllers. I've then given it an identifier of 'showDetail' and implemented the following code. - (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control { [self performSegueWithIdentifier:@"showDetail" sender:self]; } However I get the following error. Could not

Memory problems when pushing many view controllers on UINavigationController

懵懂的女人 提交于 2019-12-03 20:15:20
I'm making an interactive book for the iPad and am using UINavigationController to implement the navigation between a page and the next. When a user turns the page, the next page is pushed on top of the navigation stack. I'm now 15 pages into the app, and the app crashes when I try to go from page 14 to page 15. No error message in the console, nothing in the device's crash logs neither. Each view controller's scene in the storyboard has UIImageViews displaying images that are between 5MB and 20MB. The view controllers' viewDidLoad method is called just once. The total size of all the app's

iOS 6 - programmatically triggering Unwind Segue does nothing

廉价感情. 提交于 2019-12-03 17:31:16
On my app's start up, it programmatically shows a LoginViewController using a segue. The view controller is presented modally with transition set to cross dissolve. Upon successful authentication, I want to dismiss the login view by programmatically triggering an unwind segue. So I added this to my header file: - (IBAction)unwindSegue:(UIStoryboardSegue *)segue; now in IB I'm able to control-drag from the "File's Owner" LoginViewController to the Exit button and choose unwindSegue: . This creates a manual segue, it shows up in the Connections inspectors for the File's Owner and the Exit button

Correctly present conditional login screen at app startup with storyboards and split view controllers?

試著忘記壹切 提交于 2019-12-03 16:47:38
This seems like it should be simple, but it is proving to have a lot of challenging nuances - and I haven't found an answer elsewhere on Stack Overflow that answers this fully, clearly, and simply. In a nutshell - I have an iPad application that uses storyboards to layout the application flow, and a split view controller as the primary root view controller. This application checks at startup if there are login credentials stored, and if they are it jumps straight to the UI, and if not it presents a full-screen login page. The challenge though - where should this conditional check be made, and