could you please help me out
I'm implementing OAuth application:
This is the way how webView is being called:
CGRect rect = self.view.bounds;
rect.origin = CGPointZero;
UIWebView *webView = [[UIWebView alloc] initWithFrame:rect];
webView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
[self.view addSubview:webView];
self.webView = webView;
This is the way how webView is being closed:
self.webView.delegate = nil;
if (self.completionBlock) {
self.completionBlock(dict);
}
[self dismissViewControllerAnimated:YES completion:nil];
This is the method that receives data in tableViewController:
- (void)loginButtonPressed:(UIButton *)button {
[[ServerManager sharedInstance] authorizeUser:^(NSArray *data) {
self.demoDataArray = data;
NSLog(@"%@", self.demoDataArray);
[self.tableView reloadData];
NSArray *subviews = [self.view subviews];
for (UIView *subview in subviews) {
if (subview.tag == MY_CUSTOM_TAG) {
[self.view bringSubviewToFront:subview];
}
}
}];
}
I even tried to bring tableView as subview to front - but it doesn't work too
Sorry I Cant comment yet because I do not have enough reputation, but like Sandeep mentioned you must reload the table view on main thread After the data has been loaded with dispatch_async(dispatch_get_main_queue()). Have you checked this?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.