I'm trying to set a variable on a view that im getting ready to load. Heres the code for setting it:
NSInteger amountOfQuestions = [self.questions.text intValue];
Timer_ViewController *tvc = [[Timer_ViewController alloc] initWithNibName:@"Timer_ViewController" bundle:nil];
tvc.amountOfQuestions = &amountOfQuestions;
And here's the @interface for Timer_ViewController
:
@interface Timer_ViewController : UIViewController
{
NSInteger amountOfQuestions;
}
@property (nonatomic) NSInteger *amountOfQuestions;
@end
Im relatively new to objective-c so pointing out of obvious design flaws would be appreciated.