uistoryboardsegue

Popover segue to static cell UITableView causes compile error

假如想象 提交于 2019-12-06 21:21:37
问题 I currently have an application with two view controllers. The first is a view controller with an embedded table view that has dynamic cells. The second is a table view controller with static cells. If I add a segue from selecting one of the dynamic table's cells to the static table view controller (using the Push or Modal style setting), I can see that the segue works as expected. However, when I change the style to Popover I get the following compile error: Couldn't compile connection:

Push to root View controller in UIStoryboard

依然范特西╮ 提交于 2019-12-06 14:58:47
问题 I have hierarchy of ViewControllers in my storyboard structure. It is A-B-C-D . A is embed with NavigationController and the flow goes on till D viewController . All fours view attached through segues. Now I am on D viewController , I defined some action to the button of D that It should take me directly to A viewController that is rootViewController or B viewController . Then how can I achieve this. I tried everything but didn't succeed. I want something like it should not disturb A-B-C-D

swift: segue on button click

ⅰ亾dé卋堺 提交于 2019-12-06 09:34:02
问题 I want to move to the next controller on button click with using segue. I need to get number of press button in next controller. This is code from my controller: import UIKit class ViewController2: UIViewController, UITableViewDelegate, UITableViewDataSource { @IBOutlet var tblTable: UITableView! var buttonTitles = ["One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten"] override func viewDidLoad() { super.viewDidLoad() tblTable.delegate = self tblTable.dataSource =

Swift: Programmatically Navigate to ViewController and Pass Data

自作多情 提交于 2019-12-06 07:44:54
问题 I recently started to learn swift and it has been pretty good so far. Currently I'm having an issue trying to pass data between view controllers. I managed to figure out how to programmatically navigate between two view controllers using a navigation controller. Only problem is now I'm having a hard time trying to figure out how to pass three string entered by the user (for json api) to the next view. Here's my current attempt. Any help is much appreciated! ViewController: /* Get the status

Dismiss Popover using Unwind Segue in Xcode Storyboard

倾然丶 夕夏残阳落幕 提交于 2019-12-06 05:54:28
问题 I am using Xcode 4.5 and the new iOS 6 feature to unwind segues. I am presenting a navigation view controller inside a popover which is presented programmatically from a bar button item: - (IBAction)configChartTapped:(id)sender { if (self.popover.isPopoverVisible) { [self.popover dismissPopoverAnimated:YES]; } else { UINavigationController *chartConfigNavigationController = [self.storyboard instantiateViewControllerWithIdentifier:@"GrowthChartNavigationController"];

During custom segue transition, view's navigation bar items are misplaced

断了今生、忘了曾经 提交于 2019-12-06 05:50:44
I've got a custom segue that uses the UIViewAnimationOptionTransitionFlipFromLeft to transition between views. When the new view comes on screen, there is a brief but discernible 'blink' caused by the Navigation Bar elements jumping from a left-aligned state to their appropriate positions. Following is a screenshot captured near the very end of the transition: You can see that the title and two bar button items are left aligned; completely out of place from where they will eventually rest. Following is a screenshot captured after the transition has completed: Here the buttons and title are

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

本秂侑毒 提交于 2019-12-06 04:29:15
Recently my app is crashing when the app switch to the next ViewController. this is the prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender ShowInfoViewController *secondViewController = (ShowInfoViewController *)segue.destinationViewController; this is how i call the method : [self performSegueWithIdentifier:@"infoseg" sender:self]; in the interface builder i have a segue with the same identifier as well. any idea? this is the log's Print : Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<ViewController: 0x1dda97d0>) has no segue with

PrepareForSegue from a UIButton in a custom prototype cell

一笑奈何 提交于 2019-12-06 04:11:52
As the title say I have a tableView with prototype cell; cell is a custom cell (so I made a class called CustomCell.swift in witch I created the IBOutlet for image, label, button etc); here my class import UIKit class CustomCell: UITableViewCell { @IBOutlet var imageSquadra: UIImageView! @IBOutlet var button: UIButton! override func awakeFromNib() { super.awakeFromNib() // Initialization code } override func setSelected(selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) // Configure the view for the selected state } } then I made the UITableViewController :

When I use prepareForSegue to pass value to the aim controller, there are some problems

萝らか妹 提交于 2019-12-06 02:09:28
问题 Firstly, I use storyboard to create two uiviewcontroller: firstviewcontroller and secondviewcontroller . And using xcode to embed a uinavigationcontroller into secondviewcontroller (editor --> embed in --> navigation controller) . Then, I also want to use segue to pass value from first to second. there is the code: -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if([segue.identifier isEqualToString:@"passValue"]) { secondViewController *saveViewController = [segue

prepareForSegue **always** creates a new destinationViewController?

落花浮王杯 提交于 2019-12-06 01:59:57
问题 I Just realized that the following code always creates a new TagsFeedViewController. Is this the default behavior of segues? Is there a way to configure iOS to not create a new destinationViewController every time? - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqualToString:@"showSearchResult"]) { TagsFeedViewController *destViewController = segue.destinationViewController; destViewController.query = query; } } 回答1: Segues use whichever view