segue

IOS perform segue from tab bar item

寵の児 提交于 2019-12-18 09:38:29
问题 I have a Tab bar controller with 2 items. The first item is a VC which contains a table view. Clicking on a cell, performs a segue to some other view controller (not an item on the tab bar controller). The problem is that it removes the tab bar when segue completes. How can I just replace the item 1 with other VC and still keep the tab bar in the bottom? 回答1: You need to embed your Item1VC to NavigationController so that when you push from ItemVC to MoviesViewController it will not remove the

Passing data from the FirstViewController to the LastViewController

无人久伴 提交于 2019-12-18 09:31:55
问题 I have four viewControllers in my current design and I am designing an app to sell a product. FirstViewController gets the product image and when user clicks to the next button then it takes user to the secondviewcontroller where user describes the product and then user clicks next button which takes user to the thirdViewcontroller where price and condition are entered. In the lastviewcontolller there is a post button to send the product info to the server. I am using POST method. The

Pass Index Number between UITableView List segue

穿精又带淫゛_ 提交于 2019-12-18 08:11:12
问题 When I click a certain list item in my UITableView, I want to pass the index of the item that I clicked on to the next detailed view. This is my relevant code so far: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { HomeworkDetails *view = [[HomeworkDetails alloc] init]; int lastIndex = [indexPath indexAtPosition:[indexPath length] - 1]; NSLog(@"%u", lastIndex); [self performSegueWithIdentifier: @"HomeworkDetailsSegue" sender:self]; view

how can I pass data from one container to another, both embedded in the same uiviewcontroller in swift?

不打扰是莪最后的温柔 提交于 2019-12-18 07:12:22
问题 I have a parent UIViewController and it has two different view containers - each of them has embedded UIViewController inside. It looks somehow like this: I want to change the label on the right container when user presses the button stored on the left one. So far I was able to do it while having a button placed in a parent view controller, then I was just using a protocol: in my parent component I had: class ParentController: UIViewController { var delegateEmbedded:HandleEmbedded? override

how can I pass data from one container to another, both embedded in the same uiviewcontroller in swift?

有些话、适合烂在心里 提交于 2019-12-18 07:12:19
问题 I have a parent UIViewController and it has two different view containers - each of them has embedded UIViewController inside. It looks somehow like this: I want to change the label on the right container when user presses the button stored on the left one. So far I was able to do it while having a button placed in a parent view controller, then I was just using a protocol: in my parent component I had: class ParentController: UIViewController { var delegateEmbedded:HandleEmbedded? override

Xcode custom segue - Opposite of Cover Vertical (top to bottom) - COMPLETE NEWBIE

◇◆丶佛笑我妖孽 提交于 2019-12-17 19:40:57
问题 I have been trying for some time to create a custom segue that does the opposite of the cover vertical (to create a from top to bottom effect animation).I had looked through other questions, google and youtube but cannot get it working.I am completely new to the classes etc. so any help in a step by step guide or video would be so good. I believe that this URL is trying to do something similar to what I want: http://jrwren.wrenfam.com/blog/2012/02/01/storyboard-custom-segue-for-custom

instantiateViewControllerWithIdentifier - Storyboard id set but still not working

十年热恋 提交于 2019-12-17 19:07:08
问题 I have to created a segue programmatically however when I click on the button the view controller does not change to the next, Storyboard ID is set and still not working. Am I missing any other checks in order to make this work? Please see code below: EntryViewController *entryController = [self.storyboard instantiateViewControllerWithIdentifier:@"go"]; [self.navigationController pushViewController:entryController animated:YES]; its driving me mad. Thanks 回答1: Inside my viewDidLoad I have

Passing data with segue through navigationController

旧巷老猫 提交于 2019-12-17 18:46:42
问题 I'm trying to push data from one viewController to another. I've connected a viewController to another ViewController's navigationController and then set the identifier to "showItemSegue" . I get an error in these two lines: var detailController = segue.destinationViewController as ShowItemViewController detailController.currentId = nextId! Image illustration: The code: override func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) { nextId =

How do you perform a customized segue (modal segue) from a UIButton in storyboard

喜夏-厌秋 提交于 2019-12-17 18:22:18
问题 I would like to segue a destination scene through a button present in source scene. I also would like to have a control of the transition animation between the viewcontroller (I want to animate the 2 views from right to left). Is it possible to do so through the replace segue? I try both the replace segue and the push segue but the segue is not happening any suggestion how i should proceed there? Thanks! 回答1: I found out that the replace segue and push segue were misleading because the

Storyboard Segue From View Controller to Itself

寵の児 提交于 2019-12-17 17:34:03
问题 I am trying to make a mechanism to drill down a file / folder list. The idea is to show the same file list view controller every time the user selects a folder, and show a file detail view controller if he/she selects a file. So far, I have created a segue from the file list view controller to the file detail view controller, and a segue from the file list table view cell to the the file list table view controller: The issue with this is that as soon as the user taps the cell, the segue is