segue

Segue not Identified

谁说我不能喝 提交于 2019-12-11 05:07:32
问题 I want to switch between viewController by using containerViewController . For this I created multiple segues and viewController . when I run func segueIdentifierReceivedFromParent(_ identifier: String){ self.segueIdentifier = identifier self.performSegue(withIdentifier: self.segueIdentifier, sender: nil) } in it's parent controller file it works fine but when I called it through other controller file it gives error ContainerViewController: 0x7fd703707b40>) has no segue with identifier

How to pop back to root view from a 2nd view?

可紊 提交于 2019-12-11 03:04:17
问题 I have connected 3 views (root, 1st, 2nd) together using 2 modal segues in apple watch storyboard. 1) In root view: Once the "save" button is pressed, 1st modal view will be displayed 2) In 1st modal view: Once the "500" button is pressed, 2nd modal view will be displayed. (I can press cancel button to pop back to root view) 3) In 2nd modal view: Once the "saved" button is pressed, I want to go back to root view. How to do this? --> I don't want to press cancel button twice to go back to the

Disclosure Indicator doesn't call seque while Detail Disclosure does

北城以北 提交于 2019-12-11 02:53:41
问题 I have an interesting problem. I'd like to have detail screen pop up when people click on the arrow in the Table View. The cells are dynamic. When I select Disclosure Indicator - I do not get the segue called and and I don't get accessoryButtonTappedForRowWithIndexPath called either. When I change it to Detail Disclosure everything works just fine. Any guesses to what I can do to make the disclosure indicator act just like the detail disclosure? Thanks! 回答1: Disclosure indicators are not

Receiver has no segue with identifier“***”

蓝咒 提交于 2019-12-11 02:32:54
问题 I encounter this problem for the first time. I checked similar problems on stack overflow, but none of the solutions can solve my issue so I have this posting. Up to the present, I have two view controllers (let's say A and B) and I am trying to connect them with a segue with name "toB". When I run the program, Xcode told me Receiver(B) has no segue with identifier "toB" . I am pretty sure that the spellings of the identifier in the storyboard and in the code are exactly the same. And the

How to create Unwind segue programmatically

我与影子孤独终老i 提交于 2019-12-11 02:24:48
问题 I make an application using no storyboard and in this part of my app I need to create a unwind segue from ThirdViewController to FirstViewController programmatically only. I know how to do it using sotorybard but can't find any solution how to do it programmatically. Any sugestions? 回答1: You can't create an actual segue without a Storyboard, but you can do the equivalent action by calling popToViewController on navigationController . Here is an example that is connected to a button to return

UITableView only sending data to Detail View Controller on Second Try

天大地大妈咪最大 提交于 2019-12-11 01:17:24
问题 Hey there I have been working on a transit app for some time and have been stuck with this issue for a while now. I am using iOS 5 and a storyboard. Basically I have a UITableView that displays favorite bus stop locations, when a user selects a row I use: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { Favorite *favorite = [self.favoriteItems objectAtIndex:indexPath.row]; stopString = favorite.title; routeString = favorite.subtitle; } With the

Unwind segue and nav button items not triggering after tab bar controller added

纵饮孤独 提交于 2019-12-10 22:30:17
问题 I'm trying to implement an unwind segue that will take me from the last view controller back to the todo-list controller. Here's my storyboard Without the tab bar controller, the unwind segue works fine. However, as soon as I add the tab bar controller, the unwind stopped triggering. What am I doing wrong? Thanks Edit: Also, actions created on the bar button in the last view controller do not trigger when the tab bar controller is implemented 回答1: I have had a similar situation and I was able

How do I manually set the “Back” destination in iOS apps

佐手、 提交于 2019-12-10 20:47:16
问题 I have a UIViewController called 'detailViewController'. This view controller is accessed through multiple different segues using the push segue. The problem I am facing is that the back button on the detailViewController takes the user back to the previous view controller (as it should), however I would like the back button to take the user to the masterViewController (the default UIViewController in the app). How do I do this? I have tried changing the segue types however that didn't really

Populating an embedded UITableViewController

孤者浪人 提交于 2019-12-10 20:11:25
问题 I have an app using a navigation controller. In one of the views, I have a view container with an embedded UITableViewController using static cells. I need to populate this table view controller's labels with data passed in from a previous view. The flow is as follows View1 > segue-> Parent>Child I need to pass data from View1 to Child. When testing this, it appears that Child's viewDidLoad fires BEFORE Parent's viewDidLoad. This doesn't seem logical to me. Using viewDidAppear on the Child

iOS and xcode: how to give a segue a “storyboard id” so that I can programmatically manipulate it

烈酒焚心 提交于 2019-12-10 19:58:13
问题 I am wanting to create a modal segue from a view controller to an a new view, but not by linking the segue action to a button or anything. Instead, I'd like to just set the segue up so that I can call it in pageDidLoad and have it automatically execute if I want. To do this, I need to be able to reference the segue, such as this: [self performSegueWithIdentifier:@"mySegue" sender: ...]; After I control-click-drag a connection in storyboard to create a segue, how can I give it a name for later