uistoryboardsegue

Unwind then segue without showing intermediate view controller

时光毁灭记忆、已成空白 提交于 2019-12-01 12:16:08
I have three UIViewControllers where A -> B -> C, and A -> D. When the user is done in C I want to unwind back to A and then segue to D, but I cannot get this to work without briefly showing A before the segue to D happens. I have tried disabling the animates property for the segue but A still flashes into view for less than a second. Any idea as to how I can fix this? Try this Code in swift 3 :- let oldVCs = self.navigationController?.viewControllers var newVCs = [UIViewController]() // Add your root VC in new array of VCs newVCs.append(oldVCs![0]) // Add your new VC just after your root VC

Unwind then segue without showing intermediate view controller

走远了吗. 提交于 2019-12-01 10:56:58
问题 I have three UIViewControllers where A -> B -> C, and A -> D. When the user is done in C I want to unwind back to A and then segue to D, but I cannot get this to work without briefly showing A before the segue to D happens. I have tried disabling the animates property for the segue but A still flashes into view for less than a second. Any idea as to how I can fix this? 回答1: Try this Code in swift 3 :- let oldVCs = self.navigationController?.viewControllers var newVCs = [UIViewController]() //

Swift: programmatically enumerate outgoing segues from a UIVIewController

假如想象 提交于 2019-12-01 09:21:41
I want to list the outgoing segues from a UIViewController, as described in Programmatically enumerate outgoing Segues for a UIViewController , but in Swift. (Swift 2, Xcode 7, iOS8+). I can do override func viewDidLoad() { super.viewDidLoad() let s = valueForKey("storyboardSegueTemplates") print("switchingVC: segues: \(s)") } and that produces output like switchingVC: segues: Optional(( "<UIStoryboardPresentationSegueTemplate: 0x1754a130>", "<UIStoryboardPresentationSegueTemplate: 0x17534f60>", "<UIStoryboardPresentationSegueTemplate: 0x17534fc0>" )) but I struggle to produce anything after

Storyboard Could not instantiate class named UIStoryboardUnwindSegueTemplate crash

人盡茶涼 提交于 2019-12-01 06:46:57
I've just finished the Apple tutorial on Storyboard and ran the app on my iPhone 4 running iOS 5.1.1. On the simulator, when I press the add button, I get the modal view that slides up from the bottom, no crash. I can enter data, hit the done button and have my new entry shown. When performing the same action on my iPhone 4, tapping on the add button results in the app crashing, saying: * Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named UIStoryboardUnwindSegueTemplate' This feels like a common problem but no Google

Storyboard Could not instantiate class named UIStoryboardUnwindSegueTemplate crash

隐身守侯 提交于 2019-12-01 05:05:52
问题 I've just finished the Apple tutorial on Storyboard and ran the app on my iPhone 4 running iOS 5.1.1. On the simulator, when I press the add button, I get the modal view that slides up from the bottom, no crash. I can enter data, hit the done button and have my new entry shown. When performing the same action on my iPhone 4, tapping on the add button results in the app crashing, saying: * Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not

ios App - crash on multiple segue at the same time (going to other segue while one is animating)

一个人想着一个人 提交于 2019-12-01 00:34:17
While animation of one segue(like perforrmsegue) is going, if other segue occures (if user press other button at that time) then application is crashing. The same problem for the pop and pushViewController on UINavigationController is solved here . Can we use same trik for segue also or there is other solution. I get the following stack after crash. (Exeption at [NSException initWithCoder:]). 0 CoreFoundation 0x2f9fbf4b __exceptionPreprocess 1 libobjc.A.dylib 0x39d8b6af objc_exception_throw 2 CoreFoundation 0x2f9fbe8d -[NSException initWithCoder:] 3 UIKit 0x3217a48f -[UIView(Internal)

Storyboard UINavigation Controller Back Button Text

倖福魔咒の 提交于 2019-11-30 23:19:29
In XCode 4.5.1 creating a storyboard app with a Navigation controller, I am having a hard time trying to set the BACK button for any view controllers that are pushed. I'm using segue's and the view controller shows as expected. However I want to change the name of the navigation bar and back button dynamically and placed this in my ViewWillAppear: self.title = @"Select Songs"; [self.backButton setTitle:@"Add"]; changes the title of the navigation bar but the back button still displays the NAME of the pushed window rather than the text "Add". The Simulated Metrics are all Inferred. I also added

XCode custom segue class stuck

你说的曾经没有我的故事 提交于 2019-11-30 18:18:11
this question might seem a little weird, but I can't wrap my head around why this is happening. What I did was I renamed a custom segue class, and reflected it in the storyboard under 'custom class', but it still tries to call the old one. I have cleaned the build folder and searched the project for the old custom class name and it does not find anything in xcode at least. I look inside the storyboard file, it's not there either. Even if I delete the custom segue all toghether I get: 'Could not find a segue class named 'xxxxxxxxx'' The thing is I cannot understand from where it gets 'xxxxxxxxx

How to share one storyboard scene between multiple UIViewControllers

女生的网名这么多〃 提交于 2019-11-30 16:47:03
问题 I'm completely re-formulating this question having learned that I was originally off track but that having me no closer to solving the problem. With reference to this image... I am wanting to either create or manipulate the segue (highlighted in yellow) in code such that the Master view is any one of a number of subclasses of MFMasterViewController (highlighted in red). When doing this using Nibs I could create a Nib, SharedNib.xib & set the class as MFMasterViewController , then create my

'Receiver has no segue with identifier' when identifier exists

北城余情 提交于 2019-11-30 15:47:25
For an iOS app, I have a story board and multiple controllers, and a segue going from controller GameClass to controller SettingsClass . The segue, in view Controller GameClass has an identifier called GameToSettings : However, when I want to call the segue from my GameClass : [self performSegueWithIdentifier: @"GameToSettings" sender: self]; I get the error message *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<GameClass: 0xcf0c550>) has no segue with identifier 'GameToSettings'' I tried many tips I found in other articles (like renaming the