2011-09-12 27 views
0

を形成します。タップすると、適切なView Controllerが表示されるようにするには、didSelectRowAtIndexPathメソッドで行います。 「建物のクラス名は、私はこのような文字列の配列を持っている文字列

MapViewController *detailViewController = [[MapViewController alloc] initWithNibName:@"MapViewController" bundle:nil]; 
[self.navigationController pushViewController:detailViewController animated:YES]; 
[detailViewController release]; 

...と:代わりに大規模なスイッチを作成する

、またはそれから... else文..場合は、私が何とか地図MapViewControllerなるように、上記の文字列からクラス名を作成することができますWeb」はWebViewController等を作成する。

答えて

1
Class theClass = NSClassFromString(classNameStr); 
id myObject = [[theClass alloc] init]; 
関連する問題