Okay...
I am not having any technical trouble so there is no code to post, but I have not been able to find documentation on a given task I want to perform
I want the user to press a button in my iphone app which will in turn close my app and open safari and direct it too a specified URL.
How would I go about doing this? Any direction would be good,
Also does the iphone GUI support .png alpha transparency?
Sorry to hijack this thread...but I want to do something similar like yours, except I want my app to go to a specific address, such as myfile.php?id=1&valid=none and I want to do it without opening the browser. Does anyone know how to do this?
Again, sorry to hijack but my other thread wasn't getting any responses...I've been trying to figure this out for the last 3 days straight without any success. Any help would be appreciated!
Sorry to hijack this thread...but I want to do something similar like yours, except I want my app to go to a specific address, such as myfile.php?id=1&valid=none and I want to do it without opening the browser. Does anyone know how to do this?
Again, sorry to hijack but my other thread wasn't getting any responses...I've been trying to figure this out for the last 3 days straight without any success. Any help would be appreciated!
What does it mean to go to a specific address without opening the browser? Does that link return a file? Does it return HTML content that you want to display in your application?
If you want to go to a web page but display it inside your app, you need to create a UIWebView.
If you want to fetch data from a remote file that you will use in your program, you will need to write some code to submit an HTTP get. Look at the NSURLConnection class. You would need to create an NSURLConnection and set up a delegate to handle the incoming data from the URL request.
Sorry to hijack this thread...but I want to do something similar like yours, except I want my app to go to a specific address, such as myfile.php?id=1&valid=none and I want to do it without opening the browser. Does anyone know how to do this?
Again, sorry to hijack but my other thread wasn't getting any responses...I've been trying to figure this out for the last 3 days straight without any success. Any help would be appreciated!
Ardvarkm87,
You can have a UIWebView open your URL that has query string variables and that could be launched from a button, but that button would have to call a modal view controller or push a view controller onto the stack and pass in that URL in order for the webview to display, unless your webview is already in the view and you have some type of button in that view that changes the target of the webview.
Back to the original question, if you are going to close your app and open the Safari browser, I would recommend using an AlertView to let the user decide if they want to close the app and proceed or cancel and return to your app. Apple is pretty clear about making sure the user knows that is going on with the app at all times and that any action that could drastically change the app, such as closing it, first presents the user with the option to say no.
I am having the same problem. Cannot get my button to access my website.
The code that you have specified us to try, which header does that go into is it ViewController.h or ViewController.m
I have written the same exact thing, and Im completely new to all this, going from being a iPhone UI designer, to learning the xCode side of everything. But My link won't open Safari, and close my app. I have no errors showing up, and everything is looking like the other forums and videos ive seen. The simulator shows that there is a button, and shows the tapped state, but nothing happens.
Suggestions? Thoughts?
The ONLY thing I dont know, and if this is a issue, please let me know, is that I am teaching myself by continuing to work off of the Hello World. app thats the "start" app for learning. Im just building off of it, and started with a "Window-based application", the one video I saw that showed me the code first, used a "view based application". What is the difference?