0

I want to create an icon to enter in my website. ( when the user click on it ).

sample: i have in my website "mobile version". i want to put icon in ( iphone, ipad, ipod, .. ) to enter in the website.

Thank you

user674152
  • 3
  • 1
  • 3
  • 1
    Are you stuck on anything in particular? If you're expecting that someone will write a ready to use app for you, SO is not the site for that; "plz send teh codes" is frowned upon in these parts. – Seva Alekseyev Apr 23 '11 at 17:35
  • Could u please rephrase the question – Ahmad Kayyali Apr 23 '11 at 17:42
  • There is example with the question, Thx – user674152 Apr 23 '11 at 17:49
  • Create a button with icon as the image and in the button handler open URL for your site. Now what is the problem actually? You can't create a button? You can't set image to a button? Or you don't know how to open an URL? – taskinoor Apr 23 '11 at 17:50
  • yes, I don't know how to open an URL. because i dont use apple – user674152 Apr 23 '11 at 17:51
  • @user674152, please be more specific in the question in future. You should have said that the actual problem is that you don't know how to open the URL. This will help you to get better answers from SO. – taskinoor Apr 23 '11 at 18:00

1 Answers1

1

From the comment in the question, the problem is how to open an URL.

[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://www.example.com"]];

This will open http://www.example.com in Safari. So you need to put this code in your button handler and replace the URL with the URL of mobile version of your site.

taskinoor
  • 45,586
  • 12
  • 116
  • 142
  • thank you for help, but can i know how to set image to a button. because i dont have apple laptop. can i use my PC to do it ? – user674152 Apr 23 '11 at 18:22
  • Just wondering how you are compiling and running the above code. Most of the times I will prefer to setup a button like this via Interface Builder. As far as I know, that is available only in Mac. – taskinoor Apr 23 '11 at 18:33
  • Just in case you want to know about developing iPhone apps on windows, then there is huge discussion here: http://stackoverflow.com/questions/113547/iphone-development-on-windows – taskinoor Apr 23 '11 at 18:39