uistoryboardsegue

Rotation issue from the first view (splash) to first viewController

痞子三分冷 提交于 2019-12-12 04:48:26
问题 I am working in Xcode 4.5.2, targeting iOS6 for an iPad app, using storyboards and segues. Preamble: my root controller (loaded by the app delegate) is a splash screen with only an image, an upgrade button and an open button. App takes a few seconds to load. I have shouldAutorotate and supportedInterfaceOrientations in all three of my full screen controllers. For rotation notification, I am using the following two methods in my root view controller: - (void)awakeFromNib { [UIDevice

PrepareforSegue not displaying destinationviewcontroller

为君一笑 提交于 2019-12-12 04:39:37
问题 Segue destinationviewcontroller pdfviewcontroller not displaying pageviewcontroller - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"MYSegue"]) { // Get destination view PDFViewController *pdfviewController = [segue destinationViewController]; NSString *path = [[NSBundle mainBundle] pathForResource:@"paper" ofType:@"pdf"]; PageViewController *page = [[PageViewController alloc] initWithPDFAtPath:path]; pdfviewController= page; } }

perform segue and send tuple as sender

风格不统一 提交于 2019-12-12 04:29:01
问题 I've been trying to set a tuple to the sender object when doing a perform segue like: performSegue(withIdentifier: "", sender: ("hello", "hello2")) But inside override func prepare(for segue: UIStoryboardSegue, sender: Any?) I'm getting cast exception when trying to cast sender as (String, String) It seems that only the first element of the tuple is in sender . I'd expect since sender is of type Any? I could use a tuple as variable? Has anyone else experienced this? 回答1: Per the documentation

How to configure animated in custom segue in iOS using swift?

混江龙づ霸主 提交于 2019-12-12 03:59:00
问题 I have a created a custom segue like below class DismissSegue: UIStoryboardSegue { override func perform() { sourceController.dismissViewControllerAnimated(true, completion: nil) } } In some scenarios I want to dismiss my currentVC without animation but in some cases with animation. How does it possible? I tried setting up @IBInspectable but no luck it doesn't show up property in storyboard. Any kind of help is appreciated. Thanks. 回答1: A couple of thoughts: If you are determined to use your

XCode - Navigation Controller Push Segue - Pass Data between Views and Skip Navigation Sequence

我们两清 提交于 2019-12-12 02:38:31
问题 I have 2 questions about this storyboard test project. I am new to Xcode, and I can't find solution to this problem. This is Storyboard setup View Controller A is Root View Controller. View B and View C extend from it separetely. Table View extends from View C. View B has 2 buttons - To Table View and to View B. (I forgot to add textField on View B, and segue from B to A) 1) Button To Table View pushes Table View. Table Cell contains a string. Pressing the cell, view goes back to View

Receiver (<ViewController:>) has no segue with identifier 'showAlerting''

我怕爱的太早我们不能终老 提交于 2019-12-12 02:35:20
问题 The segue runs but the app crashes with the above error. Why do I get this no segue with identifier message? I defined the segue Identifier. Here is the viewDidAppear method - (void)viewDidAppear:(BOOL)animated { [self performSegueWithIdentifier:@"showAlerting" sender:self]; } - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"showAlerting"]) { NSLog(@"Logging showAlerting"); } } I got these log messages 2015-03-28 20:04:33.025

How to segue to one view controller from multiple navigation controllers and when done go back to whichever view controller presented it swift

雨燕双飞 提交于 2019-12-12 02:12:26
问题 So I have two navigation controller hierarchies that both lead to one view controller. I pass that one view controller data based on which one presented it with a push segue. How do I dismiss the final view controller and go back to the navigation stack that presented it? I don't need to pass any info back, but when I tried to do an unwind segue I was getting an error stating "this class is not key value coding-compliant for the key doneButtonTapped" I tried unWind segue and popVC segue. I

Retain SourceViewController after custom push segue

别说谁变了你拦得住时间么 提交于 2019-12-12 02:02:50
问题 I've got a custom UIStoryboardSegue called leftToRightSegue . Every time this segue is triggered and I move back to the source view, the viewdidload method of the sourceViewController is called. This is not something I want, since the setup is quite heavy. This is the code I'm using for the segue: #import "LeftToRightPushSegue.h" #import "QuartzCore/QuartzCore.h" @implementation LeftToRightPushSegue -(void)perform { UIViewController *sourceViewController = (UIViewController*)[self

UITableView detail transition

末鹿安然 提交于 2019-12-11 23:02:20
问题 I'm tryin to do a detail list but i can't do it and i don't understand why. Is a storyboard, the storyboard is connected ok. Is only one tableView and View controller for detail. I'm trying to push in one cell and go to the detail screen and at the detail class i've two propertys but when i push in a cell, the app crash and i've a exception: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name

UIViewImage push to new UIViewController IN STORYBOARD

丶灬走出姿态 提交于 2019-12-11 20:53:48
问题 From questions like this and this, I know how to have a UIViewImage push to a new UIViewController programatically. But how can I do this in completely in Storyboard ? I like Storyboard and would like to not have multiple xib files everywhere. I've already enable User Interaction through Storyboard , but I still can't create a transition... 回答1: Drag UIViewController object onto your Storyboard canvas Select that ViewController and in the top menu bar, click Editor > Embed in > Navigation