各タブがユーザーをUITableViewControllerに誘導するタブバーアプリケーションがあります。NSObject を拡張する MyTimer という別のオブジェクトを作成しました。MyTimer に関数[MyTimer refreshTables]
を毎分実行させたい。refreshTables 関数の内容は、次のようになります。
-(void) refreshTables:(NSTimer *)timer
{
[tabbar.firstuitableviewcontroller.tableView reloadData];
[tabbar.seconduitableviewcontroller.tableView reloadData];
[tabbar.thirduitableviewcontroller.tableView reloadData];
}
問題は、ハンドル tabbar.firstuitableviewcontroller、tabbar.seconduitableviewcontoller などを取得するために使用する必要がある変数名の正しい構文またはチェーンがわからないことです... appdelegate オブジェクトからそれらのハンドルを取得できますか? または他の方法ですか?
ありがとう