segue

label not changing with Segue [duplicate]

谁都会走 提交于 2019-12-12 00:43:02
问题 This question already has an answer here : How can I set the value of a UILabel following a segue? (1 answer) Closed 6 years ago . I have a label on my DetailViewController and it's not changing when I try to edit it. This is how my code currently looks like - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"MySegue"]) { // Get destination view DetailViewController *vc = [segue destinationViewController]; NSLog(@"Goes here"); vc

How to change content of the destination view controller according to tapped UITableCell?

百般思念 提交于 2019-12-12 00:19:14
问题 I have two view controllers as UITableViewController and DestinationViewController . The content of DestinationViewController should change according to tapped UITableViewCell. I tried this tutorial but this one didn't make sense. How can I determine which cell is tapped and how can I perform segue when the cell tapped? EDIT: UITableViewController: let days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] var myIndex: Int? func tableView(tableView: UITableView,

if Condition is True before it performs segue

老子叫甜甜 提交于 2019-12-11 22:27:34
问题 I am using segue for the transition from ViewController B going to ViewController A and at the same time I am using segue to pass data from ViewController B going to ViewController A . I already constructed my codes wherein the user will tapped the backbutton and executes an alert controller using SCLAlertView cocoapods . It prompts before it proceeds to the next ViewController , but when I run it, the segue performs automatically without checking the condition first and it did not executes

How to disable auto segue back to main screen in Xcode?

梦想与她 提交于 2019-12-11 22:14:02
问题 When I create a new view controller, add a segue from the main screen to the new view controller. It seems that a default segue back to main screen is automatically created: When tap the upper part of the new view controller, it will go back to the main screen. Where can I find the code or setting that does this "auto back"? Thanks 回答1: If you want to use Partial Curl Transition and want to disable back tap you can use it. Create custom UIViewController subclass for presenting controller and

Tab Bar Controller / Segue Issue

大城市里の小女人 提交于 2019-12-11 20:50:15
问题 I am working with 4 views using a Tab Bar. The first view has a tableview of rounds of golf. The second view allows the user to enter data for a new round. I have a button on the "Add Round" view that saves the inputted data to Core Data. When the user saves the round I want the view to segue back to the "home screen" where the rounds are displayed. I created a segue called "SavetoHomeSegue" in storyboard. This is the code I use to switch between the views [self performSegueWithIdentifier:@

Saving or returning to previous iOS scenes

落爺英雄遲暮 提交于 2019-12-11 19:48:31
问题 I have an iOS app running right now in a storyboard with 3 viewcontrollers. The first one (initial view) features a play button to start a music stream and image for album cover of currently playing song. This scene has a a navigation controller and a bar button on it that will lead the user to the next view... A list view populated with hard coded stream's that the user can choose from. Very simple and working fine still. After choosing one, the user goes to a preview page that tells them

ios7 - Warning: Attempt to present UINavigationController on UINavigationController while a presentation is in progress

梦想的初衷 提交于 2019-12-11 19:35:36
问题 I'm getting the warning above when selecting a segue in didSelectRowAtIndexPath. This is happening on an iPad. The iPhone gives a different warning, and I'll see if a fix to this also fixes the other. I do have two segues in the method. The first works without incident. The second picks up the warning. I've looked around the net, and checked out others' solutions. nada, so I'm posting here.. Here's the code: (I'm open to better ways to write this!) -(void)tableView:(UITableView *)tableView

Programming tableviews segue drill down

丶灬走出姿态 提交于 2019-12-11 19:34:06
问题 I am currently trying to convert my apps to Storyboards. My data is currently stored in a plist file and I drill down through my tableviews very easily using the following code in my current didSelectRowAtIndexPath: method: -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSDictionary *dictionary = [self.tableDataSource objectAtIndex:indexPath.row]; NSArray *children = [dictionary objectForKey:@"Children"]; [tableView deselectRowAtIndexPath

Making a popover segue´s View Controller stay persistent (only allocate one instance)

与世无争的帅哥 提交于 2019-12-11 19:25:18
问题 I programmed my app initially for iPhone using a tab bar controller were the view controllers are initialized once and stays persistent - it does not initialize a new instance of the view controller when I tap the tab bar. on the iPad I am using a different GUI were instead I have one main view that always stays on the screen, and the rest are popovers segueing from the main view. I want the popovers to stay persistent (only initialize once) what is the best way of archiving this. If I had

UITableView refusing to go to detailViewController

ε祈祈猫儿з 提交于 2019-12-11 18:22:20
问题 Edit: This question has been moved to Getting an error from Xcode that is not on the internet related to index path because this question was fixed but presented with a new error. I have been at this for 4 days! I am getting no errors in the log, yet whenever I click on my cell that is populated with a dynamic array downloaded from mysql, it does not transition. Interestingly, I got no response from the self placed nslogs in prepareForSegue... ViewController.h #import <UIKit/UIKit.h> #import