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

  • Home
  • SEARCH
  • 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 8021753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:04:46+00:00 2026-06-04T22:04:46+00:00

I apologize in advance for the n00b question. I am just getting started w/

  • 0

I apologize in advance for the n00b question. I am just getting started w/ iOS!

I am trying to push a webViewController onto a navigation controller.

mudWebViewController *webViewController = [[mudWebViewController alloc] initWithNibName:nil bundle:nil];
[[webViewController webView] setDelegate:webViewController];
[[self navigationController] pushViewController:webViewController animated:YES];

But this doesn’t seem to work, as I don’t see any of the logs in the delegate messages.

If I set the delegate in the viewDidLoad: method, it works fine.

I guess the webView doesn’t actually exist at that point, but why? If I initialize the controller, shouldn’t the webView be initialized too?

Is viewDidLoad: the right place to be setting up this stuff?

  • 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-04T22:04:48+00:00Added an answer on June 4, 2026 at 10:04 pm

    initWithNibName should be not nil, since you obviously are using a nib file to build the view, else you have to create the view in code, which you don’t

    mudWebViewController *webViewController = [[mudWebViewController alloc] initWithNibName:@"webViewController" bundle:nil];
    [[self navigationController] pushViewController:webViewController animated:YES];
    

    Also any delegates should be set either from the Interface builder or from the view itself in the viewDidLoad delegate and not from the previous class, as the object might not been yet initialized in the code so it can fail to set the delegate properly.

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

Sidebar

Related Questions

I apologize in advance because this is somehow a silly question, but I just
I apologize in advance if this is really a Super User question... I just
I apologize in advance if this question seems confused. The behaviour I am seeing
I apologize in advance; this is a long question. I've tried to simplify as
I am new to Ext so I apologize in advance if my question is
This is a very noobish question, so I apologize in advance! I have two
I am just beginning to learn VHDL in modelsim, so i apologize in advance
I apologize in advance if I am asking asking question with impossible answer. But
I apologize in advance for the open-ended question. I tried searching, but wasn't sure
I apologize in advance for the newbie nature of this question. Here is my

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.