Help with UIWebview

Discussion in 'iOS Development' started by abotsch31, Jul 14, 2009.

  1. abotsch31

    abotsch31 Banned

    Joined:
    Feb 9, 2009
    Messages:
    31
    Likes Received:
    0
    Hi,
    I am having some problems with putting a UIWebview in one of my views. Any tutorial that I look at tells me that I have to use the app delegate, but is there a way to not use the app delegate because I am wanting to create the webview in a nib other than the mainwindow.xib. Does anyone know how I would go about this?

    Thanks
    Andy
  2. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    [OBJC][view addSubview:webView]
    webView.delegate = anyObjectYouLike; [/OBJC]
  3. abotsch31

    abotsch31 Banned

    Joined:
    Feb 9, 2009
    Messages:
    31
    Likes Received:
    0
    Ok, that helps,
    now I am also wanting to do the same thing with a scrollview though. I cannot use the delegate and I am wanting to have the scrollview have simply the scroll, and zoom qualities. How would I do this?
  4. Chicken

    Chicken Retired Moderator

    Joined:
    Feb 17, 2008
    Messages:
    2,494
    Likes Received:
    7
    Device:
    iPhone 5S
    Code:
    [view addSubview:scrollView] scrollView.delegate = anyObjectYouLike
    
    
    Now was that so hard?
  5. abotsch31

    abotsch31 Banned

    Joined:
    Feb 9, 2009
    Messages:
    31
    Likes Received:
    0
    Where do you implement this and what would be an example of "anyobjectyoulike" Do you mean I put an image there?
  6. Cyanidepoison

    Cyanidepoison Active Member

    Joined:
    Jan 18, 2008
    Messages:
    1,076
    Likes Received:
    2
    I would suggest purchasing a book on Objective-C and MVC because these are questions about delegates and code organization patterns... i.e. chapter 1.

Share This Page