segue

iOS delegate not working with performSegueWithIdentifier?

孤者浪人 提交于 2019-12-10 19:22:55
问题 I have two controllers (first,second) in a storyboard, xcode 4.2. First controller has a tableview and embedded in navigation controller. Second controller has a tableview too and embedded in navigation controller (not same as the first) In first.h: #import "second.h" ... @interface first : UIViewController <secondDelegate, UITableViewDelegate, UITableViewDataSource> ... In first.m: - (IBAction)add:(id)sender // action when tapped a button on topbar { [self performSegueWithIdentifier:@

Selecting programmatically a cell on a tableview doesn't perform associated segue

左心房为你撑大大i 提交于 2019-12-10 17:29:46
问题 Well, as I say in the subject, my problem is that I'm selecting programmatically a cell on a tableview with the intention of perform, automatically, the associated segue. I have the code to do this on the viewWillAppear of the associated tableviewcontroller. The result is that the cell is selected, but the segue is not performed. Do you know why? By the moment I'm performing the segue programmatically on the viewWillAppear to solve the problem, but I'm curious about why the segue is not

Swift 3 - how to hide Status Bar when using Over Full Screen

三世轮回 提交于 2019-12-10 17:14:15
问题 I'm developing a swift app and I can't find how to hide Status Bar when I use Over Full Screen presentation on my modal. However, I put this line of code in my Modal View Controller : override var prefersStatusBarHidden: Bool { return true } And it is working if I create a segue which is not a modal, or if I create a segue which is a modal but not with Over Full Screen presentation. I searched on internet how to fix it, and I found people who had the same problem but there had no solution.

Showing alert after unwind segue stops the segue. How do I make sure alert is shown after unwind segue is completed?

偶尔善良 提交于 2019-12-10 15:43:57
问题 I have an unwind segue from A view controller to B view controller. A network operation is done in B. After the operation is completed, the response will be shown in A view controller. I successfully made this structure. However there is an issue: When I try to show the alert, it shows but stops the segue. How do i make sure alert shows after segue is completed. The error is here: 2016-04-27 14:39:28.350 PROJECT[9100:128844] Presenting view controllers on detached view controllers is

How to properly use modal view controller with the xcode 4.2 storyboard

无人久伴 提交于 2019-12-10 13:17:44
问题 I was wondering how to properly use the storyboard to put up a view controller modally. Personally I prefer working with xibs, but it seems that the storyboard is gaining popularity and will be the way to go in the future. The way I would normally put up a view controller modally would be like this: let's say we have ViewControllerA (A for short) and ViewControllerB (B for short). I would then normally put a protocol in B.h specifying the delegate method when B wants to be dismissed and add

How to call viewDidLoad after [self dismissModalViewControllerAnimated:YES];

心已入冬 提交于 2019-12-10 11:36:38
问题 Okay. If you have two viewControllers and you do a modal Segue from the first to the second, then you dismiss it with [self dismissModalViewControllerAnimated:YES]; it doesn't seem to recall viewDidLoad. I have a main page (viewController), then a options page of sorts and I want the main page to update when you change an option. This worked when I just did a two modal segues (one going forward, one going back), but that seemed unstructured and may lead to messy code in larger projects. I

Polymorphism in Storyboard ViewControllers

孤人 提交于 2019-12-10 11:26:25
问题 I am wondering how can I implement polymorphism in the iPhone XCode storyboard ViewControllers. This is my problem: Two different ViewControllers in my application are segueing to a common ViewController. This common ViewController is behaving differently depending on the VC it was segued from - different remote API server calls and CoreData fetches are performed (for the first it presents all users in a table, for another it presents a list of admins - subclass of users, and I may have a

Storyboard & Segue - Passing datas am i doing it good?

廉价感情. 提交于 2019-12-10 11:17:10
问题 I'm using Storyboards & segues. I want to switch from "Contacts List" (tableView) to a "Profile view" (ScrollView). Three questions : Is this the best way (more clean & beautiful) to do this ? & Why ? When i do this : ProfileViewController *aProfileView = (ProfileViewController *)[segue destinationViewController]; is this instantiate a new view ? (Like it will create 2 Profile view). do i need to clean (delete the "Profile View" somewhere ?) or it's doing it alone with the Navigation

Wait until animation block finishes before segue

放肆的年华 提交于 2019-12-10 10:13:00
问题 I'm implementing some simple animations to my cards app. Everything is working great so far but I have just one more detail to fix before I can say it is done. The scenario is pretty simple: Three cards must exit the screen with an animation before segue modally brings up the new screen. Up until now he animation gets executed and the new view is loaded, but the detail I haven't been able to work out is the "wait until the animation finishes before bringing the new view". This is how I'm

Making an asynchronous call prior to a segue to the next view controller (Swift)

戏子无情 提交于 2019-12-10 04:28:34
问题 I have a bunch of view controllers (embedded navigation controller), and I need to make some async calls before I segue to the next screen. The problem is that I need to make this call at the time I click the button mapped to the segue, but since the async call hasn't returned yet, the segue is made and the next view controller is shown. How do people do this kind of thing to prevent view controller navigation happening before the async call is returned? 回答1: TL;DR You can create an @IBAction