tags:

views:

15

answers:

0
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if(![defaults boolForKey:@"acceptTC"]){
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Notice" message:@"By using this application you agree to be bound by the Terms and Conditions as stated within this application." delegate:self cancelButtonTitle:@"No Deal" otherButtonTitles:@"I Understand",nil];
    [alert show];
    [alert release];
}

I get this error from this bit of code. If i comment this out then it all works fine.

I'm running this code in viewDidLoad so not a problem with adding subviews before the main view is loaded.

I've look around and its all about resiging first responders and adding subviews before the main view. However I haven't found anything that will help me.

Nothing seems to be wrong with the app - as far as I can tell its working perfectly fine.

Thanks Tom