ビューを変更せずにリスト(TableView)をビューに追加するにはどうすればよいですか。現在のビューの上にリストを表示したいのですが、ビューの中央に表示されるため、元のビューも表示されます。
labelを試してみましたが、labelの代わりにtableViewを追加すると問題が発生します。
UIView *testView = [[[UIView alloc] initWithFrame:CGRectMake(0,0, 100, 100)autorelease];
testView.backgroundColor = [[UIColor grayColor] colorWithAlphaComponent:0.2f]; UILabel *label = [[[UILabel alloc] init] autorelease];
label.text = @"TEST";
[label sizeToFit];
[testView addSubview:label];
[self addSubview:testView ];