uistoryboardsegue

Using shouldPerformSegueWithIdentifier( ) method in Swift

谁都会走 提交于 2019-11-27 07:05:26
问题 I am trying to use swift's shouldPerformSegueWithIdentifier() method, but it accepts 2 arguments. These are (identifier: String!, sender:AnyObject) My main goal is to execute the code when pressing a login button in my storyboard, and depending of a series of checks return TRUE or FALSE, depending if whether the correct username and password were provided. So here are my questions: What am I supposed to use as the identifier? Apple's documentation it explains that the identifier is a string

How do I do a Fade/No transition between view controllers

空扰寡人 提交于 2019-11-27 05:00:29
问题 Is it possible to do a fade in and fade out transition between View Controllers in Storyboard. Or without transition. If it's possible, what's the code for it? 回答1: If presenting a modal view controller, you can specify a modalTransitionStyle of UIModalTransitionStyleCrossDissolve. If doing this with a segue in your storyboard, select the attributes inspector for the segue, and specify the transition style there: If presenting the view controller programmatically, you can define your modal

is it possible to segue from a UITableViewCell on a UIView to another view

别说谁变了你拦得住时间么 提交于 2019-11-27 03:34:54
问题 Xcode 4.6.1 iOS 6 using storyboards My problem is this I have a UITableView with dynamic prototype cells on a UIView in a UIViewController (that is itself embedded in a navigation controller) and I want to segue from one specific cell to another view (Before anyone suggests I should just be using a UITableViewController , I do have other things on the UIView, so i'm set up this way for a reason.) Now i'm not sure how to go about creating the segue If I drag from the prototype UITableViewCell

Segues initiated directly from view controllers warning in storyboard xcode

六眼飞鱼酱① 提交于 2019-11-27 02:35:51
问题 Hi I have created button programmatically and I connected it to another view, but I got segue warning that I should use prepareForSegue method for storyboard but I don't know how, there are some sample on Internet but I get an error when I used that sample, would you please help me here is my code Creating Button UIButton * button = [UIButton buttonWithType:UIButtonTypeCustom]; button.backgroundColor=[UIColor colorWithRed: 201.0/255.0 green: 201.0/255.0 blue:201.0/255.0 alpha: 1.0]; button

iOS 9 Segue Causes App To Freeze (no crash or error thrown)

夙愿已清 提交于 2019-11-27 01:59:16
I have been working on this app for months now and from as far back as I can remember I have never had an issue with segues. The code is unchanged in terms of calling performSegueWithIdentifier but since my recent update to Xcode 7 and iOS 9 I have not been able to tack this issue. I have tried: Deleting button and creating new button w/ segue link Using a direct segue from button to view, without the use of performSegueWithIdentifier Connecting button to new blank viewController When I press the button, no initial load functions are called on the destination VC (Ex: ViewDidLoad ,

NSInvalidArgumentException - receiver has no segue with identifier

眉间皱痕 提交于 2019-11-27 01:32:23
I have been trying everything for hours, and nothing's worked. I am trying to segue between two view controllers, from one tableViewController to another tableViewController. The segue is hooked up to the top level view, not the tableviewcell. The identifier that was set in Xcode is identical to the one used in the code (copy and pasted). It was working fine last night, but now i can't seem to get it to segue without crashing. here are the methods in which the segue is called - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { self.photoList =

How to unwind through multiple views without displaying intermediate views

元气小坏坏 提交于 2019-11-26 23:04:07
问题 Assume we have three view controllers: 1, 2, and 3. Using the storyboard, it's pretty simple to unwind from view controller 3 to view controller 1 using an unwind segue. However, when unwinding, view controller 2 is briefly visible before view controller 1 is displayed. Is there any way to get from 3 to 1 without displaying 2 again? View Controller 1: - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; NSLog(@"one did appear"); } - (IBAction)goToTwo:(id)sender { NSLog(@"###

Instead of push segue how to replace view controller (or remove from navigation stack)?

心不动则不痛 提交于 2019-11-26 21:25:23
I have a small iPhone app , which uses a navigation controller to display 3 views (here fullscreen ): First it displays a list of social networks (Facebook, Google+, etc.): Then it displays an OAuth dialog asking for credentials: And (after that, in same UIWebView ) for permissions: Finally it displays the last view controller with user details (in the real app this will be the menu, where the multiplayer game can be started): This all works well, but I have a problem, when the user wants to go back and select another social network: The user touches the back button and instead of being

To stop segue and show alert

百般思念 提交于 2019-11-26 19:17:50
问题 Using iOS 5 storyboards, on a button I am performing a segue, what I want is to do validation on my textfield and if validation is failed I have to stop segue and throw an alert. Whats the way to do it? 回答1: If your deployment target is iOS 6.0 or later You can simply implement the shouldPerformSegueWithIdentifier:sender: method on your source view controller. Make this method return YES if you want to perform the segue, or NO if you don't. If your deployment target is earlier than iOS 6.0

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

心不动则不痛 提交于 2019-11-26 19:08:10
I have a navigation controller that has a segue links between them called "addSegue". When I click on the tableView cell though the app crashes and I get the error below: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<MSAddFriendsViewController: 0x98cc340>) has no segue with identifier 'addSegue' I don't think that I have any issues with my code. Here is the method in which I have the line showSegueWithIdentifier : - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSMutableSet *selectedUsers =