segue

UIBarButtonItem + popover segue creates multiple popovers

妖精的绣舞 提交于 2019-12-05 03:26:24
I've currently have an iPad app with a UIToolbar containing two UIBarButtonItems, each of which is connected to a popover segue. When the user touches either of the UIBarButtonItems, the popover is created rather than toggled. This creates multiple, overlapping popovers. I've been able to close the previously created popover using the following code - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // First close the preferences popover if it's open per Apple guidelines if ([self.popoverA.popoverController isPopoverVisible]) { [self.popoverA.popoverController

Use case for push versus modal segues?

陌路散爱 提交于 2019-12-05 01:56:23
Let's say, I have a scene (pushed view controller with a navigation bar), which displays some tabular data in a table view. In the navigation bar of that scene I have a + sign, which should open a new scene, where the user can add a new item (row to a core data table). In the table view, each row has an arrow on the right side of each cell, which opens a scene where the user can edit that particular item's details. Should I use a push or modal segue for the +? Should I use a push or modal segue for the arrow? What is the "best practise"? I understand the difference between push and modal

From XIB to Storyboard

流过昼夜 提交于 2019-12-05 01:33:13
问题 I got an app with a storyboard and one window in .xib. From the storyboard to the .xib i move in that way: ShowDreamNIBController *detailViewController = [[ShowDreamNIBController alloc] initWithNibName:nil bundle:nil]; [self presentModalViewController:detailViewController animated:nil]; How can i move back from the .xib to the storyboard? And one more question. Can i send some information when move to the .xib from storyboard? Like i do it throught segues in prepareForSegue method UPD I got

Conditionally skipping a UIViewController in an iOS 5 app with UINavigatonController

℡╲_俬逩灬. 提交于 2019-12-05 01:30:15
In our iOS application with three UIViewController s one after another, we would like to skip the middle one based on some condition and go directly from first to third. However, the user should be able to come back to the second one via the "Back" button on the third controller. I tried [self performSegueWithIdentifier:@"segueId" sender:sender]; from viewDidLoad , viewWillAppear but this corrupts the navigation bar as indicated by the debug log. Calling this code from viewDidAppear works fine, but then the second view is already displayed, which is what I was trying to avoid in the first

Defining a “generic” segue in Interface Builder

我是研究僧i 提交于 2019-12-05 01:17:48
I understand how to create a segue in XCode 4.2 by right clicking a control, let's say a button, and dragging it to a view controller in the storyboard. What I would like to do is create a segue that is not tied to a control, and must be invoked programmatically so I can do something like this: - (void)viewDidLoad { if (condition) { [self performSegueWithIdentifier: @"identifier" sender: self]; } } while still defining the "identifier" segue within Interface Builder. Is this possible? You can ctrl-drag from the source view controller to the other scene. You can use the view controller object

performSegueWithIdentifier produce no segue with identifier error

百般思念 提交于 2019-12-05 01:17:20
I am having hard time getting performSegueWithIdentifier to work. I keep getting "Receiver (<UINavigationController: 0x1e59a9d0>) has no segue with identifier 'identA'" What I did is that: Step: created a single view application and added a label - "View controller A" to the view controller. Step: Dragged and dropped another View Controller and added a label - "View controller B" to the new view controller. Step: Chose view controller A and performed Editor->embed in->navigation controller Step: wired View controller A to View controller B with push segue with Identifier "identA" Like this:

Custom Segue with UIViewAnimationOptionTransitionCurlDown

时光怂恿深爱的人放手 提交于 2019-12-05 01:13:09
问题 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

ios segue “cancel”

℡╲_俬逩灬. 提交于 2019-12-05 00:25:22
Depending on an XML return, I don't want the current segue to perform on UIButton touch. I know I can pick which segue I want to perform , but how to I make a segue not perform? Or at least not perform any of the available segues ? If your deployment target is iOS 6.0 or later, you can override the -[UIViewController shouldPerformSegueWithIdentifier:sender:] method to return YES if you want to perform the segue and NO if you don't. If your deployment target is earlier than iOS 6.0, you won't receive the shouldPerformSegueWithIdentifier:sender: message. So in your storyboard, don't draw the

Segue animation similar to opening an app in iOS 7: viewcontroller frame is not resizable

我的梦境 提交于 2019-12-04 21:59:39
I am willing to create a segue animation similar to opening an app in iOS 7. Now I consider this approach: Non-segue implementation , but encountered an issue: if being implemented in custom segue, the code cannot resize viewcontroller's frame, which is principal part of the animation. As I can see, it applies viewcontroller's position, but cannot change it's size. Am I correct, that property viewcontroller.view.frame cannot be animated and has to remain constant and equal to size of the device's screen? I already implemented something similar with CGAffineTransformMakeScale , but its a bit

viewWillAppear called twice with custom segue animation using transitionFromView

为君一笑 提交于 2019-12-04 21:36:51
问题 I'm looking to perform a segue to replace the window's root view controller by another view controller using a curl up animation. The idea is that I have a SplashViewController being displayed for a couple of seconds before transitioning ( performSegueWithIdentifier: ) to the next one, LoginViewController , using the curl up animation. I've created a custom UIStoryboardSegue class called AnimatedSegue . Here is the code of the overridden perform method: - (void)perform { UIViewController