The Model-View-Controller approach assumes that the boolean belongs to the model code of your application. It is a common idea to make your model a single:
QuizModel.h
@interface QuizModel : NSObject @property (nonatomic, readwrite) BOOL isMultiplayer; -(id)init; +(QuizModel*)instance; @end
QuizModel.m
static QuizModel* inst = nil; @implementation QuizModel @synthesize isMultiplayer; -(id)init { if(self=[super init]) { self.isMultiplayer = NO; } return self; } +(QuizModel*)instance { if (!inst) inst = [[QuizModel alloc] init]; return inst; } @end
Now you can use the boolean value in your controller code: include "QuizModel.h" and write
if ([QuizModel instance].isMultiplayer)
or
[QuizModel instance].isMultiplayer = YES;
source share