これが私の状況です。次のようにして、ViewController クラス A に TableViewController クラス B に移動するボタンを付けました。
- (void) goToClassB
{
ViewControllerB *viewController =
[[ViewControllerB alloc] initWithStyle:UITableViewStylePlain];
// Present view controller modally.
if ([self
respondsToSelector:@selector(presentViewController:animated:completion:)]) {
[self presentViewController:viewController animated:YES completion:nil];
} else {
[self presentModalViewController:viewController animated:YES];
}
}
クラス A とクラス B の両方からアクセスおよび編集できる配列を使用できるようにしたいのですが、どうすればこれを達成できますか?