У меня есть UITableView
, и я хочу добавить UIView
в качестве нижнего колонтитула. Это UIView
имеет UIWebView
и UIButton
. У меня есть следующий код:
- (void)viewWillAppear:(BOOL)animated {
CGRect frame = CGRectMake(10, 0, 280, 400);
self.webViewContent = [[UIWebView alloc] initWithFrame:frame];
self.webViewContent.delegate = self;
self.webViewContent.hidden = YES;
}
- (void)webViewDidFinishLoad:(UIWebView *)webView {
UIView *viewA = [[UIView alloc] initWithFrame:CGRectMake(webView.bounds.origin.x, webView.bounds.origin.y, webView.bounds.size.width+20, webView.bounds.size.height + firstFrameY)];
viewA.backgroundColor = [UIColor yellowColor];
[viewA addSubview:self.webViewContent];
[viewA addSubview:linkButton];
[self.emailDetailsTableView setTableFooterView:viewA];
}
Вывод: я вижу все, кроме UIWebView
.
Однако, если я проверю следующий код
- (void)webViewDidFinishLoad:(UIWebView *)webView {
UIView *viewA = [[UIView alloc] initWithFrame:CGRectMake(webView.bounds.origin.x, webView.bounds.origin.y, webView.bounds.size.width+20, webView.bounds.size.height + firstFrameY)];
viewA.backgroundColor = [UIColor yellowColor];
//[viewA addSubview:self.webViewContent];
[viewA addSubview:linkButton];
[self.emailDetailsTableView setTableFooterView:self.webViewContent];
}
Я вижу UIWebView
. Обратите внимание, что я прокомментировал строку, где я добавил UIWebView
к UIView
. Если я раскомментирую строку, я не вижу UIWebView
!!!
Есть идеи, что я делаю не так?
Спасибо.