uistoryboard

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

人走茶凉 提交于 2019-12-21 07:12:30
问题 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

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

有些话、适合烂在心里 提交于 2019-12-21 05:21:06
问题 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

Passing ManagedObjectContext to view controllers using storyboards with a root UITabBarController

最后都变了- 提交于 2019-12-21 04:52:39
问题 Using storyboards you have no easy access to the first view controller in appDelegate (though once you do prepareForSegue makes it easy to pass the ManagedObjectContext down the navigation stack. I've settled on giving each view controller (or superclass of each view controller) requiring Core Data access a moc member: @synthesize moc = _moc; @property (nonatomic) __weak NSManagedObjectContext *moc; I'm uneasy about it because it doesn't seem a very elegant way to do it - too much code. But

I want to be able to scroll a UITableViewCell left and right using a Storyboard. Is this not possible?

独自空忆成欢 提交于 2019-12-21 04:31:24
问题 I've tried every thing I can think of, and nothing is working. Similar to the effect in iOS 7's Mail.app, I want to be able to slide the cells of my table view right and left. I want to be able to do this in a Storyboard and Auto Layout, as most of my app is done with those. I understand scroll views with Storyboards calculate their contentSize by the constraints of their subviews. With that, I've predominantly tried two strategies. The first, just have a label in the scrollview that I can

UiSegmentedControl on NavigationBar below Title

偶尔善良 提交于 2019-12-21 04:27:15
问题 I am new on iOS Development and during my works for an app I am building right now some doubts have appeared to me. I am trying to build a Screen that will be compounded by multiple ViewControllers, but on the NavigationBar I would like to have a UiSegmentedControl above the Title, something like a Scope Bar to control the navigation between the children ViewController. I wanted to build something similar to what we have on HealthKit Dashboard: . What kind of approach do you suggest to do

XCode 4.2 Version Inspector Hides Storyboard

梦想的初衷 提交于 2019-12-21 03:19:09
问题 I'm not sure if anyone else is having the problem...but when I click the Version Editor button in XCode...my Storyboard switches to XML view and I can't figure out how to get the Visual editor back. Can anyone help? I'm really hoping this is just a result of late night coding sleepiness...thanks in advance 回答1: Right click on the storyboard file -> Open As -> iOS Storyboard 回答2: An easier way to do that is to go to the File menu and close the file. I had to close all open storyboards then

Wrong frame value while accessing the view from storyboard in IOS

筅森魡賤 提交于 2019-12-20 19:57:33
问题 I am accessing the size of the frame of view from storyboard. Below is my code for accessing frame property from storyboard. SmallView *smallView = [self.storyboard instantiateViewControllerWithIdentifier:@"SmallView"]; CGRect frame = smallView.view.frame; self.containerView.frame = frame; In story board the frame size of the view is (200,400). But when I am accessing the frame size from the code it's always giving (320,460).Why? In the above code I got small view object from storyboard so

Perform Segue Programmatically Without Button Connection?

我的梦境 提交于 2019-12-20 10:23:32
问题 I have two view controllers in my storyboard and I need to push from view 1 to view 2. I need to do this without connecting a segue directly from a button in my storyboard, I need to do it programatically. How can I? Thanks. 回答1: When you click the button call: [self performSegueWithIdentifier:@"SegueIdentifier" sender:self]; You will need to create the segue in the storyboard but you can do it from view controller to view controller instead of button to viewcontroller. 回答2: If you want to

Storyboard Entry Point Missing

我的梦境 提交于 2019-12-20 09:59:07
问题 In xcode 7.2 there is no Storyboard Entry Point item in the Object List. I need to use Storyboard Entry Point , I couldn't find any similar problem by google searches so can anyone help me here. 回答1: Click on Top of ViewController or Controller in Document Outline window (on left side) of the Controller you want to make Storyboard Entry Point. Click on Attribute inspector button (in right side). Enable "Is Initial View Controller". Storyboard Entry Point will reappear hopefully. 回答2: There is

Sharing the Same UIViewController as the rootViewController with Two UINavigationControllers

早过忘川 提交于 2019-12-20 09:57:09
问题 Update: I have decided to go a different route with my problem. Instead of trying to reuse the same UIViewController directly, I use two vanilla UIViewControllers that are set as rootViewControllers . In their loadView methods, they make a call to [storyboard instantiateViewControllerWithIdentifier:] to get the former UIViewController and set their views to the controller's view. This is probably the preferred approach anyway, since I need to set several variables and delegates. I have a