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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:42:28+00:00 2026-05-26T18:42:28+00:00

I have application with 6 buttons on start screen. My problem is that I

  • 0

I have application with 6 buttons on start screen. My problem is that I want to open web page clicking on those buttons. I have a code like this:

  - (IBAction) accomodation: (id) sender
{
    NSString *webPage1 = [NSString stringWithFormat:@"http://www.google.com"];
    NSURL *url = [NSURL URLWithString:webPage1];
//    [[UIApplication sharedApplication] openURL:url];
        [self beginNavigationWith:2 andTitle:NSLocalizedStringFromTable(@"icn_txt_accomodations", LANGID, nil) andMap:nil andHtml:nil withIdTagsAroundMe: 1 withWeb:url];
}

This is method for initializing one of buttons. After that I have method:

 - (void) beginNavigationWith: (int) navID andTitle:(NSString*) aTitle andMap:(NSString*) map andHtml:(NSString*) html withIdTagsAroundMe:(int)id_tags withWeb: (NSURL*) webPage
{
    // DIRECT LINK

    if (html != nil) {
        if ([html hasPrefix:@"{ID}"]) {
            NSError *error;

            int res_id = [[html substringFromIndex:4] intValue];
            NSLog(@"DIRECT ID From start>> %d", res_id);

            NSFetchRequest* reqForRestaurant = [[NSFetchRequest alloc] init];
            NSEntityDescription *resEntity2 = [NSEntityDescription entityForName:@"Restaurant" inManagedObjectContext:managedObjectContext];
            [reqForRestaurant setEntity:resEntity2];

            NSString *stringRes = [NSString stringWithFormat:@"res_id.intValue == %d", res_id];
            NSPredicate *resPredicate2 = [NSPredicate predicateWithFormat:stringRes];
            [reqForRestaurant setPredicate:resPredicate2];

            NSArray *array3 = [managedObjectContext executeFetchRequest:reqForRestaurant error:&error];


            //NSLog(@">>>> Gallery:%d", [managedObject.res_gallery intValue]);

            if (array3 != nil) {
                //NSLog(@"Restaurants count=%d", [array2 count]);
                if ([array3 count] == 1) {

                    Restaurant *managedObjectRes = (Restaurant*) [array3 objectAtIndex:0];

                    RestaurantDetails *details = [[RestaurantDetails alloc] initWithStyle:UITableViewStylePlain];
                    details.managedObjectContext = self.managedObjectContext;
                    details.parentID = navID;
                    details.title = managedObjectRes.res_title;
                    [details initItemsWithData:managedObjectRes];   
                    [self.navigationController pushViewController:details animated:YES];
                                }
            }

            return;
        }
    }

    // STANDARD NAV o puro HTML



    NavTableView *navTable = [[NavTableView alloc] initWithStyle:UITableViewStylePlain];
    navTable.title = aTitle;
    navTable.managedObjectContext = self.managedObjectContext;
    navTable.selectQuery = [NSPredicate predicateWithFormat:@"nav_parent_id.intValue == %d", navID]; // parent id == 0 is ROOT
    //added for use around me
    navTable.id_tags_arroundme = id_tags;

    [self.navigationController pushViewController:navTable animated:YES];

    if (html != nil) [navTable addHtmlHeader:html];
    if (map != nil) [navTable addActiveMap:map];

    //WEB PAGE

    if ( webPage != nil ) {

        NSString *webPage1 = [NSString stringWithFormat:@"http://www.google.com"];
        NSURL *url = [NSURL URLWithString:webPage1];
        NSLog(@"url = %@",url);
        [[UIApplication sharedApplication] openURL:url];

    }



}

This way I manage to open web page but in Saffari and I want it inside application.
Can someone give me a way to do it.

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-05-26T18:42:29+00:00Added an answer on May 26, 2026 at 6:42 pm

    You need to use a UIWebView which you can add as a subview to any other view and then call ‘loadRequest’ on with your URL.

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

Sidebar

Related Questions

In my application I have several activities, the main screen has 4 buttons that
For an Intranet application I have a web page save function that can lead
A small - little question. I have seen many application having buttons like following.
I have an application that has a list of buttons and has customized tooltips.
I have a swing application that includes radio buttons on a form. I have
I have a group of radio buttons in my Swing application that have a
I have a couple of UI elements such as buttons in my web application.
in my web application I have a button when I click I want to
I have a web-app that is a sort of calendar application and there are
I would like to have the following screen in my application: button at the

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.