Search code examples
ipaduisplitviewcontroller

iPad SplitView detailView default load


I have an iPad split-view app. The detailview is a webview. In which method, can I get a default page loaded when the app launch before the user clicks on an item in the table view?


Solution

  • IN detailviewcotroller.h , create outlet as follows,

    IBOutlet UIWebView *WEBVIEW;
    

    connect outlet in xib by drag n droping uiwebview control.

    In your detailviewcontroller.m's viewdidload method u can write as follows-

        NSString *str=@"yr default webpage link here";
    NSURL *url=[NSURL URLWithString:str];
        NSURLRequest *req=[NSURLRequest requestWithURL:url];
        [WEBVIEW loadRequest:req];