segue

ios How To Segue From Single View To Split View Controller

陌路散爱 提交于 2019-12-03 23:42:39
I have two template Views (one is a single view and the other is a Split View Controller) each individually works fine. So I put a button on the Single View and put a Push Segue on the button to go to the Split View Controller. When I press the button I get a crash saying Push cant be used from outside UI Navigation Contoller. Ok so I put the single view template into a UI Navigation Controller and it now says: Split View Controllers cannot be pushed to a Navigation Controller. So ... how do I do this ?? Thanks ! Use a container view in a normal View Controller, covering up the whole viewing

ViewController Appears to Transition Twice

我们两清 提交于 2019-12-03 21:12:56
Problem Summary My mainVC --> second VC transtion appears to run twice. However, what's odd is that the second VC's viewDidLoad only runs once. This is the only transition in my project that has this problem. I have researched this and found load-twice issues but none are a match to my transition twice but load once scenario. Common issues, like someone having added two segues in the storyboard, do not appear in my project: In my first/root view controller (called mainVC) I programmatically add an edge pan gesture in the viewDidLoad: let panLeftEdgeGesture_MainVC =

Xcode custom segue animation

自闭症网瘾萝莉.ら 提交于 2019-12-03 20:56:14
I have a problem with the transition animation between two storyboard controllers. I have a singleView project with two view controllers in the storyboard. Now I wand to make a custom transition animation: my current view controller should disappear to the left the new view controller should come from the right I have already a UIStoryboardSegue class. But what should I write in the -(void)perform{} method?? Thanks a lot, Jonas. For that simple segue you can try something like this: - (void)perform { UIViewController* source = (UIViewController *)self.sourceViewController; UIViewController*

viewDidLoad called before prepareForSegue finishes

馋奶兔 提交于 2019-12-03 18:39:55
问题 I was under the impression that viewDidLoad will be called AFTER prepareForSegue finishes. This is even how Hegarty teaches his Stanford class (as recently as Feb 2013). However, for the first time today, I have noticed that viewDidLoad was called BEFORE prepareForSegue was finished. Therefore, the properties that I was setting in prepareForSegue were not available to the destinationViewController within the destinations viewDidLoad method. This seems contrary to expected behavior. UPDATE I

What are the differences between segues: “show”, “show detail”, “present modally”, “present as popover”? [closed]

纵饮孤独 提交于 2019-12-03 18:18:34
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . What do the different segues do in Xcode 6? 回答1: 1. Show - Pushes the destination view controller onto the navigation stack, moving the source view controller out of the way (destination slides overtop from right to left), providing a back button to navigate back to the source -

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

iOS segue executed twice

£可爱£侵袭症+ 提交于 2019-12-03 17:25:07
问题 I have a table view with different types of table view cells in it. In one of the cells, there are two buttons, which load a view controller when pressed. I am using the following function to handle the button press: - (IBAction)leftButtonPressed:(id)sender { // Getting the pressed button UIButton *button = (UIButton*)sender; // Getting the indexpath NSIndexPath *indPath = [NSIndexPath indexPathForRow:button.tag inSection:0]; // Loading the proper data from my datasource NSArray *clickedEvent

Custom Segue with UIViewAnimationOptionTransitionCurlDown

点点圈 提交于 2019-12-03 17:21:31
I'd like create a custom segue to swap ViewControllers with a curl up animation but I can't find a way, What would be the -(void)perform for this? I've got this -(void)perform{ UIViewController *dst = [self destinationViewController]; UIViewController *src = [self sourceViewController]; [UIView beginAnimations:nil context:nil]; //change to set the time [UIView setAnimationDuration:1]; [UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:src.view cache:YES]; [UIView commitAnimations]; } But I don't get to change the view, anyway

ios - Navigation between multiple NavigationControllers

谁说胖子不能爱 提交于 2019-12-03 17:09:28
问题 I'm trying to understand a behavior of navigating between ViewControllers with (and without) using a NavigationController and I'm misunderstanding some things while reading articles and docs so I decided to ask them. Main question is: What happened if we have multiple NavigationControllers in Storyboard and want to go from one to another? (And this can be achieved just using segues as we do between common VCs, am I right?) As I understand, a NavigationController represents a stack of

Set UITextField text property in prepareForSegue

核能气质少年 提交于 2019-12-03 17:07:12
问题 I have a textField in my ViewController1. I have a push segue to my ViewController2 which also has a textField. I need to set the textField.text in my ViewController2 to be equal to the text in the textField in my ViewController1. Here's the code I have: - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqual:@"ViewController2"]) { ViewController2 *VCT = [segue destinationViewController]; VCT.title = @"View Controller #2"; VCT.textField.text = self