last day (15 days later) » 

11:22 PM
2
A: Xcode - Switching View Controllers

Ty_Using loginViewFetchedUserInfo you're on the right trackā€¦ Use the below code to switch ViewControllers. - (void)loginViewFetchedUserInfo:(FBLoginView *)loginView user:(id<FBGraphUser>)user { //use this if you're using storyboard. set storyboard ID to "next" ne...

 
Real quick, I am receiving the following error, "Use of undeclared identifier 'nextview'". Do I need to implement something in my ".h" file like a variable decalration of some sort? Thanks
 
Ty_
I have declared the nextViewController for you in the code. Check if your class name is nextViewController and correct the syntax
 
Here is what I have and it is still yelling at me for an undeclared identifier 'nextView'. In story board I have selected the nextViewController and made sure that that class name is showing up as such. Here is what I have:
- (void)loginViewFetchedUserInfo:(FBLoginView *)loginView user:(id<FBGraphUser>)user { homeViewController *nextView = [self.storyboard instantiateViewControllerWithIdentifier:@"next"]; [self presentViewController:nextView animated:YES completion:^{ }]; NSLog(@"%@", user.name); }
 
Ty_
In your code you are using homeViewController instead if nextViewController...
 
right right, the actual name of the controller is "homeViewController" and I have made sure that they line up. I only stated "nextViewController" to make it easier to answer the question for me.
other than that, does everything look correct to you? It is still yelling at me and I am not sure why
 
Ty_
11:22 PM
Check you class name in you storyboard if it is "homeViewController" and storyboard id is "next"
Is there a warning in your code?
 
Ty, so yes I made sure that the storyboard's class name is "homeViewController" as well as the id being "next" (without quotes). The only build warning i have is "unsupported configuration, Segues initiated directly from view controllers must have an identifier..". Should I be using a segue, if so which one?
 
Ty_
The code I provided will switch the views without segue
 
I tried without as well, but no luck
I am hoping to achieve the task where a user clicks the "login with facebook" and right after the auth, it switches to the homeViewController. So frusterating at the moment
but regardless of that, the original code you have provided still throws errors for unideclared identifier
 
Ty_
hey
 
hey, thanks for the help bud
 
Ty_
11:35 PM
Send me a screenshot of your code. and ill check it out. I can't really debug your code by just commenting..
 
i understand haha
 
Ty_
sure buddy i got yah
I was a newbie once too I know the feeling
 
how do i send a screenshot?
 
Ty_
zip your code and send it to me ty@ustwo.com and ill check it out
 
deal
 
Ty_
11:37 PM
i think its quicker this way
u using Xcode 5 ?
or 6 ?
 
done
xcode 5.1.1
the thing is, this facebookSDK provides a uiview for the login button, and not an actual button, which is hindering me from easily switching views using a segue
im not sure why they would shy away from using a button, but I cannot for the life of me figure out how to get past this
 
Ty_
ok
 
were you able to get it open?
 
Ty_
no
no info.plist file found
 
huh
thats weird, i zipped my entire proect
 
Ty_
11:44 PM
xcode is always acting weird
 
do you have the facebookSDK at least?
and you can at least look inside the "viewController" and see what method I am struggling with correct?
i sent you the plist to your email, but it should have been in that directory
 
Ty_
I looked at your code. it looks fine
right i found your problem now
 
so i wonder what i am missing
oh yea??
 
Ty_
you forgot to import you homeViewController in your ViewController
in your ViewController.m
#import "homeViewController.h" on the very top
 
yay!! its working!!
thank you so much man, you have been fantastic
 
Ty_
11:50 PM
Cool man glad I helped :)
 
i appriciate the time you took out to help
 
Ty_
wondering why Xcode didnt give u an error tho
next time restart Xcode if its acting weird
Any time :)
 

last day (15 days later) »