unwind-segue

How to perform unwind segue without animation?

二次信任 提交于 2019-12-10 22:41:19
问题 How do i perform unwind segue without any animation. I tried setting up a unwind segue and in the storyboard on the right side unchecking "Animates" but its still animated(it slides down), how can i fix that? 回答1: Using Xcode 7, running on an iOS Simulator, this works as expected. Simply unchecking "Animates" on the unwind segue in Interface Builder in the Attributes Inspector will cause the modally presented view controller(s) to instantly disappear instead of animate down off screen. Do

How to pop back to a view in a different navigation controller?

泪湿孤枕 提交于 2019-12-07 18:43:59
问题 I want to create the following user flow in my Swift application: User clicks a button A modal view pops over with a choice. The user selects a choice. A second view appears with another choice (using a "show" transition, so the user can press < Back to alter choice #1). The user selects the second choice. The second modal view segues back to the original view (which has the button). To do this, I created the following structure: --> NC1 --> VC1 --modal-> NC2 --> VC2 --show-> VC3 (NC =

How to pop back to a view in a different navigation controller?

限于喜欢 提交于 2019-12-06 05:30:30
I want to create the following user flow in my Swift application: User clicks a button A modal view pops over with a choice. The user selects a choice. A second view appears with another choice (using a "show" transition, so the user can press < Back to alter choice #1). The user selects the second choice. The second modal view segues back to the original view (which has the button). To do this, I created the following structure: --> NC1 --> VC1 --modal-> NC2 --> VC2 --show-> VC3 (NC = UINavigationController, ^ | VC = UIViewController) | | ----Segue I'm trying to achieve----- I've tried to pop

Unwind segue doesn't dismiss adaptive popover presentation when not modal

落花浮王杯 提交于 2019-12-03 13:23:35
问题 Update for iOS 9 beta: Apple may have fixed this for iOS 9. If you work(ed) around this issue for iOS 8, make sure it also works correctly on iOS 9. In storyboard, I've created a popover presentation segue to present a navigation and view controller from a button, as well as creating an unwind segue. In portrait orientation, the modal (fullscreen) presentation is unwound/dismissed, as expected. In landscape orientation, the unwind segue also gets called, however the popover presentation is

How to pass data in conditional unwind segue?

假装没事ソ 提交于 2019-12-02 13:00:37
I try to build an rss reader. On the "adding feed" page, if I tap the "add" button, I hope to check if the feed is successfully added. If it is added, then trigger the unwind segue, and back to the main page. If it is not added, stay in the current page. I know I can build an IBAction on the "add" button, and check if the feed is added. However there are two requirements I need to meet in order to add a feed. First, after I parse the url, I need to know if the parse results can generate a feed. To parse the url, I need to use the method defined in the mainViewController. Second, I need to

iOS Pass data back from viewController2 to viewController 1 with presentModalSegue

99封情书 提交于 2019-12-02 11:17:05
问题 I have viewController1 that makes a modal segue to my viewController2 but the viewController2 is embebed on a navigation controller because I need the navigation bar there. I've implemented a protocol to send the data back from viewController2 to viewController1 but it doesn't function. Here is my code: protocol writeValueBackDelegate { func writeValueBack(value: String) } class viewController1: UITableViewController, writeValueBackDelegate { override func prepareForSegue(segue:

Swift 4 Odd unexpected jump back to earlier storyboard

◇◆丶佛笑我妖孽 提交于 2019-12-02 10:33:17
I’m very new to Swift and Xcode and I’ve built a simple two storyboard app which has a welcome screen and a button that triggers a seque to second storyboard (for which I have created its own class based on UIVIewController. Second storyboard has a couple of UIPickerView objects a and a couple of UIDatePickerView objects and a button. I have some basic actions under the didSelectRow function. However when I build and run the app I get an odd and seemingly random bevahiour where selecting something in the first picker view takes me back to the welcome screen (an unwind seque?). I haven’t put in

iOS Pass data back from viewController2 to viewController 1 with presentModalSegue

核能气质少年 提交于 2019-12-02 05:09:27
I have viewController1 that makes a modal segue to my viewController2 but the viewController2 is embebed on a navigation controller because I need the navigation bar there. I've implemented a protocol to send the data back from viewController2 to viewController1 but it doesn't function. Here is my code: protocol writeValueBackDelegate { func writeValueBack(value: String) } class viewController1: UITableViewController, writeValueBackDelegate { override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { if segue.identifier == "SelectAddress"{ if let dest = segue

unwind segue vs. popViewControllerAnimated

微笑、不失礼 提交于 2019-12-02 04:55:31
I have a mapview that is connected to several viewControllers. I needed to implement an 'unwind' from another button (as opposed to just the back button), so I used: self.navigationController?.popViewControllerAnimated(true) My question is: as the above works, should I even bother trying to implement unwind in code using prepareForUnwind and canPerformUnwindSegueAction in the parent view controller + ctrl-drag from the viewController to exit in Storyboard? If so, why? Basically if you are just dimissing a presented UIViewController or popping a UIViewController from the navigation stack,you

unwind segue not triggering

时光总嘲笑我的痴心妄想 提交于 2019-12-01 21:17:13
问题 I have been learning swift and have made the foundation of most of my app. I have the following storyboard app storyboard Everything works fine. For example, I have an unwind segue on the add course view controller that triggers when you press save and you are returned to the 'your courses' view controller. When you are on the my courses view controller, you can select a course and the topics are displayed, you can then select a topic and you are taken to an update score view controller, this