目標を達成するためのユーザー UiTableViewフレームプロパティ
テーブルビューを IBOutlet として宣言します
.h
interface MyViewController : UIViewController {
IBOutlet UITableView *myTableView;
}
@property (nonatomic, retain) IBOutlet UITableView *myTableView;
.m
@synthesize myTableView;
次に、.Xib を開き、myTableViewを .Xib テーブルに接続します。
次に、テーブル ビューのサイズを変更します
self.myTableView.frame = CGRectMake(0, 0, 320, 200); // assign you frame here
またはプログラムでUITableを追加してみてください..以下のコードを見てください
UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 100, 100); style:UITableViewStylePlain];
[self.view addSubview:tableView];
tableView.delegate = self;
tableView.dataSource = self;
[tableView reloadData];