uistoryboardsegue

Passing variables between Storyboards without Segues - Swift

笑着哭i 提交于 2019-11-27 16:51:31
问题 I'm passing data between two different UIViewControllers located within two different .storyboard files within Xcode. (It's quite a large project so I had to break it up into different storyboards.) I have already established an "exercisePassed" variable (String) within the view I would like to Pass my data to, and I already know how to move between two views located within different storyboards. Like so. var storyboard = UIStoryboard(name: "IDEInterface", bundle: nil) var controller =

Perform segue after Login successful in Storyboards

感情迁移 提交于 2019-11-27 15:24:35
I have 2 UITextFields , one of them for Login and the another for the Password. Only if the Login is "succesful", I want to perform the Segue with Push to another View Controller . But when I touch the button, directly the View push to the Another View without check the Condition. In StoryBoard I drag from the UIButton to the View Controller I want to push, for creating the segue with push option. Here is my code: - (IBAction)buttonLogin:(id)sender { if (([self.textFieldLogin.text isEqualToString:@"User"]) && ([self.textFieldPassword.text isEqualToString:@"1515"])){ [self

Custom Push Segue removes navigation bar and tab bar in story board

两盒软妹~` 提交于 2019-11-27 14:43:26
问题 I have the following defined in a custom Segue, let us call it SegueX: @interface SegueX : UIStoryboardSegue @end @implementation SegueX - (void)perform { CATransition* transition = [CATransition animation]; transition.duration = 0.3; transition.type = kCATransitionFade; [[self.sourceViewController navigationController].view.layer addAnimation:transition forKey:kCATransition]; [[self.sourceViewController navigationController] pushViewController:[self destinationViewController] animated:NO]; }

Pass data between ViewController and ContainerViewController

隐身守侯 提交于 2019-11-27 14:22:06
I'm working on an app, and need to pass data between view and containerView. I need to send data and receive data from both Views. Let me explain better: I can change the Label Master (Touch the Container Button) by protocol , but I can not change the Label Container (Touch the Master button). What happens is the Master connects with the container by a following. But do not have a follow Container linking to the Master. I tried to add but segue to, but it worked. The Master View Controller: import UIKit protocol MasterToContainer { func changeLabel(text:String) } class Master: UIViewController

How to execute some code after a segue is done?

筅森魡賤 提交于 2019-11-27 13:55:18
Is it possible in iOS 6 to know when a UIStoryboardSegue has finished its transition? Like when i add a UIStoryboardSegue from UIButton to push another UIViewController on the navigationcontroler, i want to to something right after the push-transition is finished. New You can use the UINavigationControllerDelegate protocol and then define: – navigationController:didShowViewController:animated: In case you don't want to use the viewDidAppear: method, you could create a custom segue. In the perform method you would use an animation for the transition, and that can have a completion block. You

Custom Segue Animation

戏子无情 提交于 2019-11-27 11:51:18
I am trying to use a custom segue to perform a kind of zoom animation. When the transition is executed, the sourceViewController goes black, then the zoom occurs. Tried also to set the pushViewController: into the completion block but the transition is not executed at all. - (void)perform { UIViewController *sourceViewController = (UIViewController *) self.sourceViewController; UIViewController *destinationViewController = (UIViewController *) self.destinationViewController; [destinationViewController.view setTransform:CGAffineTransformMakeScale(0.5,0.5)]; [destinationViewController.view

Does anyone know what the new Exit icon is used for when editing storyboards using Xcode 4.5?

一笑奈何 提交于 2019-11-27 10:30:53
Right-clicking the Exit icon yields an empty window. Can't Ctrl-drag a connection to any IB elements or corresponding source files. Docs give no love. Doesn't appear in nib files, only storyboards. My assumption is that it's a corollary to segues, but I don't see any new methods to back it up. Anyone? Cal S There's a lot of information in the WWDC video "Session 407 - Adopting Storyboards in your App." Say you have two view controllers linked by a segue. Implement the following exit action on the first view controller: - (IBAction)done:(UIStoryboardSegue *)segue { NSLog(@"Popping back to this

Embed a UIViewController in a NavigationController using segues

北城以北 提交于 2019-11-27 08:53:40
I have a viewController that is usually (most often) accessed by using a push segue. This viewController needs to be embedded in a UINavigationController. So typically, this is no problem. The push segue manages pushing the viewController, and therefore the viewController has it's UINavigationController. My issue is that in a few cases, I'd like to present this same exact viewController using a modal segue. When I do this, the viewController is not embedded in a navigationController. Is there a way to do this using segues? I know this can be done purely in code without segues by creating a

Segue crashes my program. Has something to do with my NavigationController and my TabBarViewController

落花浮王杯 提交于 2019-11-27 08:36:05
问题 I encountered a problem while testing my app. You can see how I have setup my views in the following image: The thing is that everything works fine. I user my test user to login, and the following code executes the loginSegue, self.performSegueWithIdentifier("loginSegue", sender: self) which is a modal segue that links my login "View Controller" with the "Home Tab Bar View Controller". I get redirected to the "Initial Feed View Controller". Everything works great. But when I go to my

Storyboard segues causing memory leaks

自作多情 提交于 2019-11-27 08:29:41
I have two UIViewControllers with buttons triggering segue (modal) to each other. I wanted to discover if that's causing any memory leaks while jumping back and forth and I see that Living Object && allocated memory is going up, what eventually would leave to app crash. I don't have any single line of code - working with pure UIViewControllers. What I might be doing wrong? Could have I set something wrong in project settings? Am I reading profiler's statictics badly? Do I need to make any special release commands while working with segues? You aren't using the modal segues correctly. The way