I just installed xcode 6 to test out how my app works with it.
The facebook login button on the initial page does not appear to be working.
Here is my code:
@property (nonatomic, strong) UIButton *loginButton;
- (void)viewDidLoad
{
[super viewDidLoad];
self.loginButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 200, 70)];
self.loginButton.center = self.view.center;
[self.loginButton setImage:[UIImage imageNamed:@"login_fb.png"] forState:UIControlStateNormal];
[self.view addSubview:self.loginButton];
[self.loginButton addTarget:self action:@selector(loginButtonPressed) forControlEvents:UIControlEventTouchUpInside];
}
-(void)loginButtonPressed
{
// perform login
}
It is important to note that the app starts off on a different view. In that view controller I check to see if a user exists or not, and if not I present the login view. Here is that code:
if ([DCTUserIdentity currentIdentity] == nil) {
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:[NSBundle mainBundle]];
DCTInitialLoginVC *vc = [sb instantiateViewControllerWithIdentifier:@"InitialLogin"];
vc.delegate = self;
[self presentViewController:vc animated:NO completion:^{}];
}
I put a breakpoint in the loginButtonPressed
function and it never gets hit when I try clicking on the button....any idea whats going on?