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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:47:50+00:00 2026-05-28T13:47:50+00:00

This is the a button which when clicked will open up Safari. -(IBAction)loginClicked:(id)sender{ NSLog(@loginClicked);

  • 0

This is the a button which when clicked will open up Safari.

-(IBAction)loginClicked:(id)sender{
NSLog(@"loginClicked");

NSLog(@"currentSelectedRow = %i", currentSelectedRow );

loginObj = [appDelegate.loginArray objectAtIndex:currentSelectedRow];
NSLog(@"URL = %@", loginObj.loginURL);

Error-->[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"%@", loginObj.loginURL]];

}

Error: Too many arguments to method call, expected 1, have 27

If I replace [[UIApplication sharedApplication] with

[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"www.google.com"]];

Safari can be launched and will go to Google and my debugger shows the following

2012-01-26 16:04:15.546 Login2[197:707] loginClicked
2012-01-26 16:04:15.550 Login2[197:707] currentSelectedRow = 0
2012-01-26 16:04:15.555 Login2[197:707] URL = www.amazon.com

It seems that I have pulled the URL from my array correctly but I can’t implement it to the code to open the URL in Safari.

  • 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-28T13:47:51+00:00Added an answer on May 28, 2026 at 1:47 pm
    Error-->[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"%@", loginObj.loginURL]];  //Edit this line as
    Correct-->[[UIApplication sharedApplication] openURL:[NSURL URLWithString:loginObj.loginURL]];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Typical jQuery over-use: $('button').click(function() { alert('Button clicked: ' + $(this).attr('id')); }); Which can be
I have a form which will open a new form when one button (form1button)
So I have this button that when clicked on will send you to the
I have this button which is not working correctly for hold button for a
I have a button which when toggled displays/hides a div ('.reportOptions'), this works perfectly
I have to click on the button which has id . But this id
This is my code, which occurs 48 times (one for each button in a
I have a button in my application which is bound to a command. This
I desined a button in Blend, which gave me this xaml in after the
I've got a button which when clicked copies and appends the text from a

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.