uistoryboardsegue

Nested push animations iOS7 bug?

ぐ巨炮叔叔 提交于 2019-12-04 07:49:12
I just encountered a problem with an app I bug-tested. I was banging my head to the wall to understand why I got this error: 2013-11-25 09:02:55.687[186:60b] nested push animation can result in corrupted navigation bar 2013-11-25 09:02:56.055[186:60b] Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted. 2013-11-25 09:02:57.666[186:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Can't add self as subview' After a while i created a new project to try to reproduce the bug: This happends when I press

prepareForSegue **always** creates a new destinationViewController?

房东的猫 提交于 2019-12-04 06:36:56
I Just realized that the following code always creates a new TagsFeedViewController. Is this the default behavior of segues? Is there a way to configure iOS to not create a new destinationViewController every time? - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqualToString:@"showSearchResult"]) { TagsFeedViewController *destViewController = segue.destinationViewController; destViewController.query = query; } } Caleb Segues use whichever view controllers are provided to their – initWithIdentifier:source:destination: methods. It's not the segue

When I use prepareForSegue to pass value to the aim controller, there are some problems

蓝咒 提交于 2019-12-04 05:52:26
Firstly, I use storyboard to create two uiviewcontroller: firstviewcontroller and secondviewcontroller . And using xcode to embed a uinavigationcontroller into secondviewcontroller (editor --> embed in --> navigation controller) . Then, I also want to use segue to pass value from first to second. there is the code: -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if([segue.identifier isEqualToString:@"passValue"]) { secondViewController *saveViewController = [segue destinationViewController]; [saveViewController setValue:data forKey:@"data"]; } } But there will report

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

Warning: Attempt to present * on * which is already presenting (null)

[亡魂溺海] 提交于 2019-12-03 22:02:31
This is my first application for iOS. So I have a UIVIewController with a UITableView where I have integrated a UISearchBar and a UISearchController in order to filter TableCells to display override func viewDidLoad() { menuBar.delegate = self table.dataSource = self table.delegate = self let nib = UINib(nibName: "ItemCellTableViewCell", bundle: nil) table.registerNib(nib, forCellReuseIdentifier: "Cell") let searchButton = UIBarButtonItem(barButtonSystemItem: .Search, target: self, action: "search:") menuBar.topItem?.leftBarButtonItem = searchButton self.resultSearchController = ({ let

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*

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 : firing multiple segues from a prototype cell in storyboards

血红的双手。 提交于 2019-12-03 16:07:15
Is there a way to connect a prototype cell to different scenes and on the didSelectRowAtIndexPath method call the [self performSegueWithIdentifier:@"NAMEOFTHESEGUE" sender:self] ? I can't seem to drag multiple segues from the prototype cell to different scenes... I know it is possible with static cells because you can draw a segue from each cell to the scene but what if i'm using prototype cells? I'm currently trying to implement this using the SWRevealViewController ( https://github.com/John-Lluch/SWRevealViewController ) plugin. In the storyboard example project he's using a table with 3

How to get reference to UIPopoverController when using adaptive segue?

蓝咒 提交于 2019-12-03 15:51:47
问题 In my iOS 7 app, I detected if a segue was a popover via this check in prepareForSegue : if ([segue isKindOfClass:[UIStoryboardPopoverSegue class]]) But now that I am using adaptive segues, the Present as Popover segue is no longer returning true in the above check. This is because segue is no longer a UIStoryboardPopoverSegue , instead it is a UIStoryboardPopoverPresentationSegue . However, one cannot simply add the Presentation word because that's not defined. What is the appropriate way to