I think it could be a stupid mistake but I just couldn't figure it out. Can anyone tell me what do I missing??
-(void) receiveRecommendData {
//receive data//
NSURL *getResultUrl = [NSURL URLWithString:@"http://phdprototype.tk/getResultData.php"];
NSData *data = [NSData dataWithContentsOfURL:getResultUrl];
[self getData:data];
NSDictionary *jsonToDict = json[0]; //[json objectAtIndex:0];
int pageNumber = [[jsonToDict objectForKey:@"recommendData"]intValue];
switch (pageNumber) {
case 0:
UIViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"Collection_01ViewController"];
break;
case 1:
UIViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"Collection_01ViewController"];
break;
case 2:
UIViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"Collection_02ViewController"];
break;
case 3:
UIViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"Collection_03ViewController"];
break;
default:
break;
}
}
the errors occurred on the codes of
UIViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"Collection_01ViewController"];