2011-12-02 112 views
0

我有一个表,我得到的数据之前,我做这个更改尺寸的tableview

[self.TableView setFrame:CGRectMake(kRowHorizontalPadding_iPad * 0.5,  kRowVerticalPadding_iPad * 0.5, 1024 - kRowHorizontalPadding_iPad, kCellHeight_iPad)]; 
self.TableView.rowHeight = 500; 

的事情是,我想改变高度和一次设备旋转框架!但不工作我试图reloadData但仍然无法正常工作,请帮助。

+0

阅读autoresizingmask的文档 – Rayfleck

回答

0
tableView:cellForRowAtIndexPath: 

tableView:heightForRowAtIndexPath: 

应该帮助你。也有

shouldAutorotateToInterfaceOrientation:interfaceOrientation 

方法,当你想在纵向/横向模式下工作可能会有用。

不要忘记UITableViewDataSource和的UITableViewDelegate添加到您的头文件,就像这样:

@interface myClassBlabla : UIViewController<UITableViewDataSource, UITableViewDelegate> 
{ 
    int checkInt; 
} 

希望它可以帮助