프로그래밍 방식으로 뷰를 만들려고합니다. 내가 갖고 싶은 결과는 내부에 tableview가있는 스크롤 뷰입니다. 그리고이 테이블에서 내가 원하는 뷰가 일부 버튼테이블 뷰 아래에 단추 추가
나는이 시도 그렇게 정확히 방법을 모르는를 추가 할 수 있지만 작동하지 않습니다
내가 없거나 잘못을하고있는 중이 야 무엇- (void)loadView {
[super loadView];
tableView = [[UITableView alloc] initWithFrame:[[self view] bounds] style:UITableViewStyleGrouped];
[tableView setDelegate:self];
[tableView setDataSource:self];
scrollView = [[UIScrollView alloc] initWithFrame:[[self view] bounds]];
//[scrollView setBackgroundColor:[UIColor blackColor]];
[scrollView setBouncesZoom:YES];
deconnectButton = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain];
[deconnectButton setTitle:@"Deconect" forState:UIControlStateNormal];
[deconnectButton setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal];
//[deconnectButton addTarget:self action:action forControlEvents:UIControlEventTouchUpInside];
deconnectButton.frame = tableView.frame;
NSLog(@"Tableview frame : %@", NSStringFromCGRect(tableView.frame));
[scrollView addSubview:deconnectButton];
[scrollView addSubview:tableView];
[[self view] addSubview:scrollView];
}
?