Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4020254
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:12:20+00:00 2026-05-20T10:12:20+00:00

Almost all the examples I see are done with IB but I don’t want

  • 0

Almost all the examples I see are done with IB but I don’t want to use IB.

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.

So I’ve been able to push other viewcontrollers but pushing a UIWebView with the same method doesn’t work.

Here is what I have so far..

This is the Threads.h file

#import "ThreadContent.h"
#import <UIKit/UIKit.h>


@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

Part of my Threads.m file where I am trying to push the UIWebView

- (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];
}

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:12:20+00:00Added an answer on May 20, 2026 at 10:12 am

    UIWebView is a subclass of UIView not UIViewController.

    You need to subclass UIViewController (call it for example WebViewController)

    And in the viewDidLoad method create a UIWebView and add it to the view, using addSubview:
    You can pass the URL to load in the webView as a property of the WebViewController

    -(void)viewDidLoad {
        UIWebView *webView = [[UIWebView alloc] initWithFrame:self.view.bounds];
        [self.view addSubView:webView];
        [webView loadRequest:[NSURLRequest requestWithURL:self.urlToLoad]];
        [webView release];
    }
    

    and in Threads

    - (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];
        threadContent.urlToLoad = [NSURL URLWithString:urlString];
        [self.navigationController pushViewController:threadContent animated:YES];
    }
    

    (or make the webView a property and call the load method in just before or after you push the WebViewController in Threads, I’m not 100% sure if this way would work)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can see many examples of getting location. But in almost all the cases
Almost all of the examples in the jQuery tutorials that I've read, usually use
I noticed that almost all email messages I get do not embed images, but
I have tried almost all the solutions from SO but no success :(. I
I've been using px for almost all the measurement related styling, but I wanted
In almost all of the books I read and examples I go through I
All the examples i find that use plot.im or similar, use matrices that are
Almost all the activities in my application need to interact with a web server
Almost all of my JUnit tests are written with the following signature: public void
In almost all of my projects I have few files that are project wide

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.