0

私はこれを解決しましたが、これについて何も見つけられなかったので共有する価値があります。

UITableView のサブクラスがあり、detailTextLabel.text が表示されませんでした。detailTextLabel オブジェクト自体は通常どおり存在し、テキストが含まれていますが、画面には表示されません。

このバグは、iPhone 5 または Retina 4 インチ シミュレーターでのみ発生します。iPod 4 またはその他のシミュレーター「ハードウェア」では問題ありません。使用する iOS のバージョンに違いはありません。

答えは以下です。

4

2 に答える 2

0

問題のあるテーブルの表示をトリガーしたビュー コントローラーを、viewDidLoad の代わりに viewWillAppear で実行することで修正しました。

-(void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];

    //Used to do this in viewDidLoad, but that stopped the detailTextLabel showing
    //for this table view on the iPhone 5. If do it from here, it's fine.
    [friendsSubView addSubview:friendsTableViewController.view];
}
于 2013-01-05T16:42:22.113 に答える
0

以下は正しいコードですか?[friendsSubView addSubview:friendsTableViewController.tableView];

于 2013-01-05T17:19:54.793 に答える