Note that there are some explanatory texts on larger screens.

plurals
  1. POPushing UIWebView onto UIViewController
    text
    copied!<p>Almost all the examples I see are done with IB but I don't want to use IB.</p> <p>What I want to do is, when a user selects a row in the table a UIWebView will be pushed onto the stack and load that particular page while keeping the tab bar and navigation bar. I don't want all the features of a browser rather just be able to scroll through a page beacause the rest of my app controls how a person can navigate through the website through tables.</p> <p>So I've been able to push other viewcontrollers but pushing a UIWebView with the same method doesn't work.</p> <p>Here is what I have so far..</p> <p>This is the Threads.h file</p> <pre><code>#import "ThreadContent.h" #import &lt;UIKit/UIKit.h&gt; @interface Threads : UITableViewController { NSMutableArray *threadName; NSMutableArray *threadTitle; UIActivityIndicatorView *spinner; NSOperationQueue *operationQueue; UILabel *loadingLabel; NSMutableDictionary *cachedForum; NSMutableArray *forumID; NSInteger *indexPathRowNumber; NSMutableArray *threadID; ThreadContent *threadContent; } @property (nonatomic, assign) NSMutableArray *forumID; @property (nonatomic, assign) NSInteger *indexPathRowNumber; @end </code></pre> <p>Part of my Threads.m file where I am trying to push the UIWebView</p> <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSLog(@"%i",indexPath.row);//get row number NSLog(@"%@", [threadID objectAtIndex:indexPath.row]);//thread id //forums.whirlpool.net.au/forum-replies.cfm?t= //NSString *urlString = [NSString stringWithFormat:@"forums.whirlpool.net.au/forum-replies.cfm?t=%@", [threadID objectAtIndex:indexPath.row]]; threadContent = [[ThreadContent alloc] init]; [self.navigationController pushViewController:threadContent animated:YES]; } </code></pre> <p>My WebView files.. well i'm not sure how to do that? I did make it a "UIWebView" subclass but if i try to push it on to the stack i get a crash saying it needs it to be a "UIViewController" subclass.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload