segue

iOS7 style mapview callout segue in the callout (calloutAccessoryControlTapped, UIButtonTypeDetailDisclosure)

◇◆丶佛笑我妖孽 提交于 2019-12-23 18:11:05
问题 I have mapview on iPad with annotations and callouts, each callout also has rightCalloutAccessoryView with detail disclosure button. I see the stock Maps app performs segue for callout details within the callout's object. It first performs a transition of the view from right to left like a push segue, then resizes the callout frame based on the detail's content. How should I configure the segue in storyboard to be performed within the original callout and not replace the entire screen? Is it

Segue Unwind back to the last specific View controller

妖精的绣舞 提交于 2019-12-23 16:30:46
问题 Is there a way to have one button unwind back to a specific view controller? For example suppose I have ViewController A and B. Both modally segue to ViewController C. Now I understand how to segue unwind back to one of the previous view controllers (As was explained here) but how do I go back to the specific view controller that presented VC C? So to sum it up, what I'm trying to figure out is... If A segued to C then I want to unwind back to A when the button is selected. If B segued to C

iOS Segue - When are the viewControllers Instantiated

青春壹個敷衍的年華 提交于 2019-12-23 13:08:59
问题 I have a simple storyboard with a Main View Controller and two Detail view Controllers as shown in the diagram. Question #1 - Where is the code that SequeA will present DetailA located Question #2 - In my code for the AppDelegate I need to create an array of all the ViewControllers that are in the App - How can I get that array? - It is in the story board but how do I programmatically access it. I can get the MainViewController by doing the following - myViewControllerMain =

Push segue in iOS 5 not working

烂漫一生 提交于 2019-12-23 09:39:08
问题 I am very much new to IOS. I am using the storyboard feature to create a app Here is what I want. I have two view Controllers, say oneViewController and twoViewController I have a button on oneViewController. I ctrl+dragged the button from oneViewController to twoViewController and selected push from Segue. I compiled the app on iOS 5.0 and run it, and it's not working. I changed push to model and it worked. Am I missing anything? I am using the a part of this link and this link as a guidance

IOS App crash: [__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array

我与影子孤独终老i 提交于 2019-12-23 09:38:13
问题 I have a method I pass an 'id' into here: NSString *id = @"4bf58dd8d48988d181941735"; [self getNames:id]; This works fine, but when I use the 'id' from an object passed within the segue: NSString *id = _selectedStore._id; [self getNames:id]; I get the error: 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array' What's going on? Here's where it's getting the error. My attempt (keep in mind i'm new at this) is to take an array of Foursquare id's,

Swift - TabBarController -> ViewController -> NavigationController

喜欢而已 提交于 2019-12-23 04:37:28
问题 i have the following situation: I got a TabBarController with some tabs(ViewControllers). When i am in one of these ViewControllers, i tap a button and i want to segue to a NavigationController AND still see the tabbar... Here is what i did: I created a new ViewController(DetailViewController) I embedded this new ViewController(DetailViewController) in a NavigationController I created a segue(Show) from the "viewcontroller which is embedded in the tabbarcontroller" to the "new

self.dismiss does nothing on 3rd level segue

为君一笑 提交于 2019-12-23 01:21:26
问题 I have a view controller embedded in a navigation controller. I segue to a view controller via a "show" segue. From there I navigate to a tableviewcontroller via a "show" segue. The navigation bar shows up with the back button but upon didclickrow self.dismiss does nothing. The completion block never executes. I'm baffled. There has to be some rule I don't understand about view controllers. self.dismiss(animated: true, completion: { print( "THIS NEVER EXECUTES AND NOTHING HAPPENS" ) }) 回答1:

fatal error when prepared to segue to view controller

青春壹個敷衍的年華 提交于 2019-12-22 18:47:09
问题 I'm currently getting a fatal error unexpectedly found nil while unwrapping an optional value at destViewController.titleLabel.text = "Testing Segue". How do I fixed it since it getting me a error when it segue to SecondViewController? How do I avoid getting nil at titleLabel.text? class ViewController: UIViewController { @IBAction func action(sender: AnyObject) { let alertController: UIAlertController = UIAlertController (title: "Next Page", message: "", preferredStyle: .Alert) let yesAction

Segue in swift based on a logic

六眼飞鱼酱① 提交于 2019-12-22 11:25:30
问题 I want show a one of the two views in swift based on a if statement when the application first launches how do I do that this is the logic if signupconfirmed == true { // have to show one view } else { // have to show another view } 回答1: One way is you can initiate viewController with identifier with below code: var signupconfirmed = true @IBAction func signUpPressed(sender: AnyObject) { if signupconfirmed { // have to show one view let storyboard = UIStoryboard(name: "Main", bundle: nil) let

Swift project not segue-ing properly after Facebook login

孤街浪徒 提交于 2019-12-22 10:34:56
问题 The initial ViewController, LoginViewController.swift: import UIKit class LoginViewController: UIViewController, FBSDKLoginButtonDelegate { override func viewDidLoad() { super.viewDidLoad() // Do view setup here. if (FBSDKAccessToken.currentAccessToken() != nil) { // User is already logged in, do work such as go to next view controller. performSegueWithIdentifier("loginSegue", sender: nil) print("segued due to login") } else { let loginView : FBSDKLoginButton = FBSDKLoginButton() self.view