プログラムに UIPicker を含めました。たとえば、A と B の 2 つのコンテンツが含まれています。必要なのは、ユーザーがピッカーから A を選択した場合、別のストーリーボードを移動する必要があることです。別のビューに移動できますが、何も表示されません。以下にコードを貼り付けます:-
- (void)pickerView:(UIPickerView *)thePickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
DemoViewController *demo =[[DemoViewController alloc] init];
AnotherViewController *another =[[AnotherViewController alloc] init];
NSString *content=[aray objectAtIndex:row];
if ([content isEqualToString:@"A"])
{
[self presentModalViewController:demo animated:YES];
}
else {
[self presentModalViewController:another animated:YES];
}
}
空白のストーリーボードが表示される理由を教えてください。