0
我有一個以編程方式創建的tableView,並且滾動不起作用。選擇工作正常,但沒有滾動。有什麼建議麼? 我下面的代碼:以編程方式創建TableView時不滾動
.M
[dialogView addSubview:dialogTableView];
CGRect dialogTableViewFrame = CGRectMake(10, 150, 260, 300);
dialogTableView = [[UITableView alloc] initWithFrame:dialogTableViewFrame style: UITableViewStylePlain];
dialogTableView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
dialogTableView.scrollEnabled = YES;
dialogTableView.delegate = self;
dialogTableView.dataSource = self;
[dialogTableView reloadData];
[dialogView addSubview:dialogTableView];
.H
@interface MapsViewController : UIViewController <GMSMapViewDelegate,UITableViewDataSource, UITableViewDelegate> {
UIView *dialogView;
UITableView *dialogTableView;
UIScrollView *dialogScrollView;
}
@property (nonatomic, retain) UIView *dialogView;
@property (nonatomic, retain) UITableView *dialogTableView;
@property (nonatomic, retain) UIScrollView *dialogScrollView;
@property (nonatomic, retain) NSArray *people;
'[dialogTableView contentSize]'的結果是什麼? –
內容大小:260.000000 x 0.000000(!!!!?) – Oswaldo
嘗試刪除autoresizingMask我不確定是否需要此處。 –