segue

What's the difference between all the Selection Segues?

狂风中的少年 提交于 2019-11-26 14:57:27
问题 Show Show Detail Present Modally Popover presentation Custom What is the difference between them? I couldn't find any documentation on it. There used to be some which I found in a Google search, but it's now gone: https://developer.apple.com/library/ios/recipes/xcode_help-interface_builder/articles-storyboard/StoryboardSegue.html 回答1: Here is a quick summary of the segues and an example for each type. Show - Pushes the destination view controller onto the navigation stack, sliding overtop

Conditionally start at different places in storyboard from AppDelegate

杀马特。学长 韩版系。学妹 提交于 2019-11-26 14:52:57
I have a storyboard set up with working login and main view controller, the latter is the view controller to which the user is navigated to when login is successful. My objective is to show the main view controller immediately if the authentication (stored in keychain) is successful, and show the login view controller if the authentication failed. Basically, I want to do this in my AppDelegate: // url request & response work fine, assume success is a BOOL here // that indicates whether login was successful or not if (success) { // 'push' main view controller } else { // 'push' login view

Dark shadow on navigation bar during segue transition after upgrading to Xcode 5.1 and iOS 7.1

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 12:51:40
问题 When I am navigating back & forth between parent and child controllers in a master - detail navigation controller, i see a dark shadow on the right side of navigation bar at top. It started after I upgraded to Xcode 5.1. It feels rough and distracting. How can I get rid of it? 回答1: self.navigationController.view.backgroundColor = [UIColor whiteColor]; I solved this problem by setting the background color of the navigation controller's view. 回答2: self.navigationController.navigationBar

How to make a push segue when a UITableViewCell is selected

為{幸葍}努か 提交于 2019-11-26 12:46:47
I have a list of effects in a table view. I have created a top right bar button which does a push segue to another view controller which helps create a new effect. Now I want to add push segues to the table view cells so that the effects values maybe loaded on the add effects view controller and I can save the edited values. The question is can I create a push segue programmatically? If not can I pass the effect through a prepareforsegue ? If I try to use a prepareforsegue , I run into a problem where control dragging from the UITableView does not let me create a push segue to the add effects

How do I go from SKScene to UIViewController by code?

China☆狼群 提交于 2019-11-26 12:45:16
问题 All I want if for when the user touches a skspritenode in the skscene, it will go to a different view like performseguewithidentifier . Thanks for any help. I can post code, but it seems like a generic question so I figured that you wouldn\'t need any. By the way, I already figured out how to detect the tapping the skspritenode. I have been looking at this for a long time and I am stumped. Please help. 回答1: You cannot present a viewController from within a SKScene as it is actually only being

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

依然范特西╮ 提交于 2019-11-26 12:29:53
问题 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

NSInvalidArgumentException - receiver has no segue with identifier

三世轮回 提交于 2019-11-26 12:28:10
问题 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

iOS Segue - Left to Right -

只谈情不闲聊 提交于 2019-11-26 11:58:42
问题 I\'ve read the other posts on segues but none solve my question. Simply put, my ViewController s are ordered, like a book. I want backward transitions (example: from page 9 to 8) to always present (slide over) from left to right. I want forward transitions (from page 9 to 10) to present from right to left. Yes, my nav-controller back button (top left) presents like this if you are paging through page by page. However, if you jump in from an Index then the back function on the nav controller

Sending data with Segue with Swift

风格不统一 提交于 2019-11-26 11:45:17
I have two view controllers and two views. In my first view, I set the variable 'currentUser' to false. I need to be able to set 'currentUser' to true in the second view controller. When trying to reference 'currentUser' from the second view it's not picking it up as 'currentUser' is defined in the first view controller. How do I carry across variables with segue? Set values from Any ViewController to a Second One using segues Like this: override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { if(segue.identifier == "yourIdentifierInStoryboard") { let

IOS - How to segue programmatically using swift

这一生的挚爱 提交于 2019-11-26 11:33:37
I'm creating an app that uses the Facebook SDK to authenticate users. I'm trying to consolidate the facebook logic in a separate class. Here is the code (stripped for simplicity): import Foundation class FBManager { class func fbSessionStateChane(fbSession:FBSession!, fbSessionState:FBSessionState, error:NSError?){ //... handling all session states FBRequestConnection.startForMeWithCompletionHandler { (conn: FBRequestConnection!, result: AnyObject!, error: NSError!) -> Void in println("Logged in user: \n\(result)"); let storyboard = UIStoryboard(name: "Main", bundle: NSBundle.mainBundle()) let