0

別のビューに小さな UITableView を持つ IPad アプリがありますが、十分な数のセルを追加すると、ScrollView が大きくなりません。なぜですか?

@edit: スクロールできないのは、一番上に戻ってしまうからです。

テーブルビューのフレーム変更のコードは次のとおりです。

- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
                                     duration:(NSTimeInterval)duration {
[super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];

if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft
    ||  toInterfaceOrientation == UIInterfaceOrientationLandscapeRight){
    CGRect rect = _table.frame; 
    rect.size.height = 565;
    _table.frame = rect;
    //_table.contentSize = CGSizeMake(_table.contentSize.width, 1000); // Doesn't work
}else{
    CGRect rect = _table.frame;
    rect.size.height = 820;
    _table.frame = rect;
    _table.contentSize = rect.size;
    //_table.contentSize = CGSizeMake(_table.contentSize.width, 1000); // Doesn't work
}}
4

0 に答える 0