triggering the segue manually after signup process
I am trying to implement a sign in and register process using storyboard.
For the sign up process is, I have a done button in navigation
bar(embedded) and once the user puts the right info for verification, done
button gets enabled and should go to the profile view. But apparently I am
not triggering the segue right(I believe). I tried this and this and I was
able to show a tableview but I don't see the label that I put on the
tableview. For the testing purposes,I enabled done button on start.
Before this, I made a sign up process using xib files but for some reason,
when I tried to redo the whole thing in storyboard, I was unable to
trigger the segue properly(meaning that I was unable to grab the username
and email address and send it to appropriate labels in the tableview with
the should perform segue method. So I am redoing the whole login
process,starting from the segue. This is what my storyboard looks like at
the moment, screenshot of storyboard.
If someone can tell me if this is the right way to go, or help me with a
walkthrough, i would really appreciate. Thank you.
newUserSignUpViewController.m
#import "NewUserSignUpViewController.h"
#import "ProfileViewController.h"
#import <Parse/Parse.h>
@interface NewUserSignUpViewController ()
@end
@implementation NewUserSignUpViewController
@synthesize barButtonItem = _doneButtonInTheBar;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle
*)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
}
-(void)viewDidAppear:(BOOL)animated
{
if (_doneButtonInTheBar.enabled == YES) {
UIStoryboard *storyboard = [UIStoryboard
storyboardWithName:@"MainStoryboard" bundle:nil];
ProfileViewController *myProfileViewCont = (ProfileViewController
*)[storyboard
instantiateViewControllerWithIdentifier:@"ProfileView"];
//profile view is the storyboard id of the tableview controller
[self.navigationController pushViewController:myProfileViewCont
animated:YES];
}
No comments:
Post a Comment