segue

IOS StoryBoard multiple Segue's from a TableCell

。_饼干妹妹 提交于 2019-11-28 15:47:35
Hi I have a storyboard and am able to show a detail view when clicking on a table cell. I want to add extra functionality so that depending on what cell I click I show a different view controller. I tried dragging two segues from the same cell but it doesn't allow it. My thinking was that I would have two segue's from the cell each pointing to a different view and then invoke the desired segue: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger row = indexPath.row; NSLog(@"Selected Item :-) %@",[NSString stringWithFormat:@"%@",[myData

How to segue back to a UIViewController that's already loaded?

醉酒当歌 提交于 2019-11-28 15:31:35
I have a view on a storyboard the has a button to perform a certain action. To perform this action though, the user must be logged in. The button handler tests if the user is logged in and performs one segue if YES and another if NO. The NO segues pushes to a login view controller. There is another segue connecting back to the first view controller so if login is successfull the user can pick up where they left off. The view controllers are embedded in a navigation controller. Problem is, the 'return' segue is loading a whole new instance of the view controller and not referencing the

How to present view controller from right to left in iOS using Swift

非 Y 不嫁゛ 提交于 2019-11-28 15:14:42
I am using presentViewController to present new screen let dashboardWorkout = DashboardWorkoutViewController() presentViewController(dashboardWorkout, animated: true, completion: nil) This presents new screen from bottom to top but I want it to presented from right to left without using UINavigationController . I am using Xib instead of storyboard so how can I do that ? mrvincenzo It doesn't matter if it is xib or storyboard that you are using. Normally, the right to left transition is used when you push a view controller into presentor's UINavigiationController . UPDATE Added timing function

Programmatically go back to previous ViewController in Swift

十年热恋 提交于 2019-11-28 14:43:38
问题 I send the user over to a page on a button click. This page is a UITableViewController . Now if the user taps on a cell, I would like to push him back to the previous page. I thought about something like self.performSegue("back").... but this seems to be a bad idea. What is the correct way to do it? 回答1: Swift 3: If you want to go back to the previous view controller _ = navigationController?.popViewController(animated: true) If you want to go back to the root view controller _ =

How to perform segue from within a SKScene?

梦想的初衷 提交于 2019-11-28 13:27:35
I have been trying to perform a segue from within a sprite kit SKScene layer. My application requires the user to touch an image on the scene that would push up a new UIViewController. But every time I try to perform from within the SKScene game layer, it gives me output with has no segue with identifier error. I do have a segue and have specified it with an identifier. My simple question, how can one perfrom segue with a SKScene game layer running? Please help me out. Segues belong to view controllers, not SpriteKit scenes. If you want to perform a segue from within a SpriteKit node's event

“Could not instantiate class named UIStoryboardShowSegueTemplate” - how can I make a Storyboard happy with iOS 7 and iOS 8?

邮差的信 提交于 2019-11-28 12:22:35
I created a project in Xcode6, beta 6 or so (upgraded to b7 today). Using Swift, been developing for the iOS 8 SDK, etc. The Storyboard, so far, has two View Controllers, and a segue between the two set up as "Show" (it's not triggered by a button directly, it's handled by a successful login) Everything is groovy. And then I tried running the app on the iOS 7.1 simulator. It dies on the first screen with this message: *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named UIStoryboardShowSegueTemplate' Well, seeing as

Passing data back from detailViewController to UITableView

北慕城南 提交于 2019-11-28 12:19:58
问题 I am currently at the issue where I have a UITableviewCell that needs to be updated. When the user presses on the uitableviewcell - THERES ONLY 1!!, the user is pushed to a UITABLEVIEWCONTROLLER where the user is allowed to select 1 of multiple cells with their own titles. I need to get the clicked tableviewcells title and pass the value back to the parentviewcontroller and update the 1 tableviewcell's name to the one the user clicked in the pushed uitableivewcontroller. Here is a picture of

How to segue with data from one Tab to another Tab properly

左心房为你撑大大i 提交于 2019-11-28 12:01:48
I have a Tab Bar Controller which is the Initial View Controller, which also has a PFLoginViewController that pups up if a user isn't logged in. The Login/Signup flow works fine. The two tabs are 1. a UICollectionView which I will refer to as IntroVC from now on 2. a UITableView which I will refer to as FeedVC When a user clicks a photo in IntroVC , a Show segue is triggered (via prepareForSegue ) that shows a 3rd screen ( UIView ) which is technically not a tab. I will refer to this as the SelectVC from now on. NOTE: All of these screens are also Embed(ded) In a Navigation Controller. The

Perform segues when I want

别说谁变了你拦得住时间么 提交于 2019-11-28 11:08:31
问题 Evening, I have 2 show segues in my VC. But I want to fires these segues only when my pickerView has a row.count > 0 . This is what I have: Override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "searchImages" { if pickerView.numberOfRows(inComponent: 0) > 0 { let controller = (segue.destination) as! WebViewController //replacing " " with "+" for google search queries let type: WebViewController.SearchType = .image let queryString = String(nameLabel.text!

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

不羁的心 提交于 2019-11-28 10:24:42
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 to create a segue , all the generated cells automatically call the the segue - when i need only one to