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 8366485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:55:53+00:00 2026-06-09T12:55:53+00:00

Update Fixed the loading issue. As I was using a custom cell class I

  • 0

Update

Fixed the loading issue. As I was using a custom cell class I had only set the identifier of the tableview cell in storyboard to the name of the customcell, not the actual class itself! Rookie mistake, sorry!

This fixes the lack of loading the webpage in the viewDidLoad method. Now I just need to sort it so it’ll load the correct webpage depending on the table row choice. Is PrepareForSegue ideal for this? Thanks

Original Post

In my app I have FirstViewController with a tableview which lists objects that then load webviews in the secondviewcontroller when opened.

So in my didSelectRowAtIndexPath method I currently have:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{   [self performSegueWithIdentifier:@"Detail" sender:self];
    NSIndexPath *selectedRowIndex = [self.tableView indexPathForSelectedRow];
    DetailViewController *detailViewController = [DetailViewController alloc];    
    detailViewController.urlToGet = @"www.google.com"
}

Now DetailViewController of course has its viewcontroller object in Storyboard where the delegate and webView outlet are set.

In the DetailViewController class itself I even tried this in viewDidLoad just to get some website showing:

       NSString *fullURL = @"http://www.google.com"; 
NSURL *url = [NSURL URLWithString:fullURL];
 NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; 
[webView loadRequest:requestObj];

But all I get is a blank webview.

I tried a tutorial with a new project which worked fine and then copied it – sadly it does not work here at the moment.

I also tried prepareForSegue (as that would get the information across) but this did not work.

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {

    /*
     When a row is selected, the segue creates the detail view controller as the destination.
     Set the detail view controller's detail item to the item associated with the selected row.
     */
    if ([[segue identifier] isEqualToString:@"Detail"]) {

        DetailViewController *detailViewController = [segue destinationViewController];
    detailViewController.urlToGet = @"www.google.com";
}

}

With the segue between the two ViewControllers having an identifier of Detail.

Any idea why I can’t get the object to even load the website specified in its viewDidLoad?

thanks

  • 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-06-09T12:55:54+00:00Added an answer on June 9, 2026 at 12:55 pm

    Fixed it! I was using a custom cell class I had only set the identifier of the tableview cell in storyboard to the name of the customcell, not the actual class itself! Rookie mistake, sorry!

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

Sidebar

Related Questions

Update: I've fixed up my referencing below, and my problem is now more specific.
UPDATE - I have fixed some mistakes in the code below and the images
Update: I reported this as a bug to Apple and they fixed it! All
Update: Switching to IIS Express instead of the Visual Studio Development Server fixed the
UPDATE It looks like this problem has been quietly fixed in iOS 4.3. Up
Update : This is no longer an issue from C# 6, which has introduced
I'm trying to display a QLabel (without parent) at a fixed position using PyQt.
Update: I found why it was loading the same view the whole time. I
I have an Applet which is loading images over a http connection using URLConnection.
I am loading multiple images into a class instance and I would like to

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.