Hi all,
I'm building an iPhone application with a UITableView. On selecting a row a web page is loaded in a UIWebView in the next tab along. Currently this is all working, however, how can I set the application to automatically move into the tab where the webpage has been loaded into the UIWebView?
Is there some form of animation that slides into the next tab along, or just some simple function to change into another tab?
Code-wise, I'm controlling this within didSelectRowAtIndexPath and currently have:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSDictionary * story = [stories objectAtIndex:[indexPath row]];
NSString * storyLink = [NSString stringWithFormat:[story objectForKey:@"link"]];
webview.scalesPageToFit = YES;
[webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:storyLink]]];
}
Again just to clarify, the webpage successfully loads into the UIWebView 'webview' in the next tab along, but I have to manually click the tab to see it. How can the application automatically move into the next tab once the webpage has loaded without having to manually click the next tab?
Thanks in advance,
Benji