objective c - IOS switch view after FB login -


I use the storyboard, and the first view is FB login. I can successfully login the login (FB login) I want to see the navigation controller later.

I do not know how to change the scene. I also use a button and push, but it is not working.

Fahlanvian Controller Class:

  #import "Mobile View Controller." #import & lt; FacebookSDK / Facebook SDK j & gt; @ Interface LoginStat Week Controller () - (to be) toggleHiddenState: (BOOL); @end @implementation FBLoginViewController - (zero) ToggleHindState: (BOOL) must {self.lblUsername.hidden = shouldhide; Self.lblEmail.hidden = shouldhide; Self.profilePicture.hidden = shouldhide; } - (id) initWithNibName: (NSString *) nibNameOrNil bundle: (NSBundle *) nibBundleOrNil {self = [super initWithNibName: nibNameOrNil bundle: nibBundleOrNil]; If (self) {// custom initialization} back itself; } - (zero) login view: (FBLoginView *) loginwall handle error: (nserror *) error {nslog (@ "% @", [error localized description]); } - (zero) loginViewShowingLoggedOutUser: (FBLoginView *) login view {self.lblLoginStatus.text = @ "You are logged out"; [Self-tooldheardstate: yes]; } - (zero) loginViewFetchedUserInfo: (FBLoginView *) login user: (id & lt; FBGraphUser & gt;) user {NSLog (@ "% @", user); Self.profilePicture.profileID = user.objectID; Self.lblUsername.text = user.name; Self.lblEmail.text = [User ObjectFor: @ "email"]; } - (zero) loginViewShowingLoggedInUser: (FBLoginView *) Login view {self.lblLoginStatus.text = @ "You are logged in."; [Self-Toldhystestate: NO]; } - (zero) viewDidoadload [[Super Viewedload]; // Setup an additional after loading the view [Self-Toldheadstate: Yes]; Self.lblLoginStatus.text = @ ""; Self.loginButton.readPermissions = @ [@ "public_profile", @ "email"]; Self.loginButton.delegate = self; }  

This method should be applied to your code in the point where you want to switch Use a new controller for further.

  [self display CIGU with the identifier: @ "yourSegueIdentifierName" sender: zero];  

You have to add a seg in the interface builder or you must provide a segment to the program in your application. This method will automatically trigger the prepareForSegue method to face the above statement and the next controller will appear.

Hope it helps.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -