hi i wished to randomly load a view. the views are called view1 view2 and view3 below is the code im using. can any one tell me the the code i should place in the case section to replace - (void)viewDidLoad self.view = view1; etc as this is not working thanks
- (void)viewDidLoad {
[super viewDidLoad];
NSString *title = nil;
NSString *path = nil;
int Number = arc4random() % 3;
switch(Number) {
case 0:
- (void)viewDidLoad {
self.view = view1;
}
break;
case 1:
- (void)viewDidLoad {
self.view = view2;
}
break;
case 2:
- (void)viewDidLoad {
self.view = view3;
}
break;