segue

UISplitViewController - Multiple Detail View Controllers via storyboard segues

大憨熊 提交于 2019-12-04 07:03:49
I'm trying to do a project for the iPad in which I'd like to utilized the split view controller. I'll be having different detail view controllers for each of the cells in the master view controller. I saw one solution how to do this via storyboard segues in this site. He basically linked each of his UITableViewCell to different detail view controllers. But I'd like to know if this is a "stable" or a "good" way of doing this. I mean, is it any better or as stable as doing it programmatically? What would be the consequences of doing his method, if there are any? Here is the link to the solution

IOS/Objective-C: Possible to Use Custom Segue in Modal Transition in Absence of a Storyboard Segue?

旧街凉风 提交于 2019-12-04 06:24:34
问题 I have two View Controllers in Storyboard and I would like to present the second one from the first modally using a custom downward segue (the opposite of the regular cover vertical). I have subclassed storyboard segue with code that I hope will work. However, in this instance, I did not drag a segue in Storyboard from one view controller to the other. Instead, I handle the Modal Presentation in code. Is it possible to invoke a custom segue if you are calling the second view controller in

How to perform conditional segue

南笙酒味 提交于 2019-12-04 06:15:13
问题 I've created a segue through IB. When buttonA is clicked, a transition to viewB will occur. In the button click action, I have performSegue(withIdentifier:sender:) wrapped in a condition. I want the segue to occur only if the condition is true. However, once the user clicks the button, the segue happens before the condition is even run. What is the best way to transition programmatically while still using segue identifiers defined in IB? 回答1: You have created segue from the UIButton to a

perform segue swift 4

試著忘記壹切 提交于 2019-12-04 05:11:02
问题 I am trying to validate the login of a user with my database. When the login button is pressed I want to say whether a segue will happen or no based on the info returned back from the database. I start with a variable decision set to true initially and if the I can't validate the user I want to set it to false and prevent segue. This is the code that I have, but there is a problem with it. The return statement at the end is always true. What happens basically is the return statement at the

Is there a way to avoid viewDidLoad beeing called after every segue?

谁都会走 提交于 2019-12-04 04:54:12
问题 i initialize tables, data etc in my main ViewController. For more settings, i want to call another Viewcontroller with: DateChangeController *theController = [self.storyboard instantiateViewControllerWithIdentifier:@"dateChangeController"]; [self presentViewController:theController animated:YES completion:^{NSLog(@"View controller presented.");}]; And some clicks later i return with a segue (custom:) NSLog(@"Scroll to Ticket"); [self.sourceViewController presentModalViewController:self

The label “Cancel” from modal segue in Apple Watch showing wrong text - “abbrechen”

南笙酒味 提交于 2019-12-04 04:19:30
When my WKInterfaceController poped up by pressing a menuItem (which was settup by " self.addMenuItem in mainScreen"), the title on the poped WKInterfaceController shows " abbrechen " instead of " Cancel ". Anyone know how to fix it to make it showing " Cancel "? Or like where did I probably make a mistake? //MainScreen.swift func setContextItems(directToEnabled: Bool) { self.clearAllMenuItems() self.addMenuItem(with: WKMenuItemIcon.decline, title: "direct", action: #selector(MainScreen.freePressed)) } Clues: It happens only on my Apple Watch device (WatchOS 3.1). When it runs on the simulator

Cant call a segue in code (Swift)

只谈情不闲聊 提交于 2019-12-04 03:33:05
I have a few views embedded in a navigation controller. I've created a few segues (some from buttons to other view controllers, some from one view controller to another one. for example I have a segue (Show) from one button to a view controller called name2, when I press the button it works great, but when I try to call it programmatically the app crashes and gives an error. This is how I call the segue on ViewController1 self.performSegueWithIdentifier("name2", sender: self) this is from ViewController1 to ViewController2 I also have a segue that is connected not to a button but from vc1 to

Unwind Segue in Xcode 6 Beta 4

那年仲夏 提交于 2019-12-04 03:08:42
问题 I've been trying to add an unwind segue to a swift app in Xcode 6, and, in the release notes for the first three betas, it was declared to be unsupported. However, in Beta 4, that bug note is no longer present. I have heard that people have been able to get it to work, but I have had no such luck. So, my question is this: how should I try to see if the unwind segue will work in my app? What should I try? I am using a UIBarButtonItem to trigger the segue. So far, I've put this code in the

NSInvalidUnarchiveOperationException with ContainerView

泄露秘密 提交于 2019-12-04 02:10:32
Using a ContainerView with an embed seque I'm getting this: * Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named UIStoryboardEmbedSegueTemplate' My searches didn't provide a lot, so: Does this mean "Sorry, only on iOS6" ? Yes, this really seems to be a "iOS 6 only"-feature. I did not see it in iOS 5 either... But didn't find it in the Docs so far. 来源: https://stackoverflow.com/questions/12868255/nsinvalidunarchiveoperationexception-with-containerview

How to perform Segue in AppDelegate?

随声附和 提交于 2019-12-04 01:20:01
I am trying to complete an application on IOS 5.1 with Storyboard. Basically I am doing a dropbox app. Since I am using Dropbox SDK link to Dropbox is handled in AppDelegate.m. User has the option of be able to unlink from a session and link again in different View Controllers. So every time user link and unlinked app has to switch view from Appdelegate to a view controller that is unconnected to rootviewcontroller In original Dropbox's example Dropbox handled transition like following code - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { if ([[DBSession