xcode web browser help

Joined
Nov 20, 2008
Messages
9
Reaction score
0
Points
1
Location
United Kingdom
Your Mac's Specs
Macbook Pro 2.4 Ghz 2GB SDRAM 200GB HDD, Mac Mini Leopard Server, 2GHz 1GB SDRAM 80GB HDD
Hey there

I am programming a simple browser in xcode, there is no URL box or buttons, a simple application that would when launched would load up a specified URL that i chose. Kinda like the iTunes store, you can't see it and cant right click on anything.

But the problem is i have put the safari app in the window, and disabled resizing, but i cannot think how to specify a default URL.

My first time using xcode and its brill, o easy to use but just can't think of this one lol.

Also does anyone know how to chose an image for the app, lie when you download it from a webite usually the application has some image like quicktime has the Blue Q sign. that would be great to know.

Thanks for your help everyone.
 
OP
S
Joined
Nov 20, 2008
Messages
9
Reaction score
0
Points
1
Location
United Kingdom
Your Mac's Specs
Macbook Pro 2.4 Ghz 2GB SDRAM 200GB HDD, Mac Mini Leopard Server, 2GHz 1GB SDRAM 80GB HDD
Please

any help people ??
 
Joined
Mar 15, 2007
Messages
161
Reaction score
4
Points
18
Your Mac's Specs
17" MacBook Pro, 2.33GHz C2D, 2GB RAM
i cannot think how to specify a default URL.

I'm not sure I understand what you are doing since you are talking about the Safari app. But if by chance you are just displaying a WebView in your own application, then to display a particular URL you should only need to use your WebView's setMainFrameURL selector.

About the application icon, I only got around to trying this right now, and successfully got an icon into one of my applications by creating an .icns file using Icon Composer (included with Xcode), adding that file to my project and then specifying the filename as the "Icon File" value in the Properties pane of the Info window for the project build target (i.e., adding it to the Info.plist file). Didn't seem like too difficult of a process, but there may be other, better ways to do it. For document type icons the procedure would be similar (except for the location where the icon filename is specified, which should be pretty obvious when looking at the Properties pane).
 
OP
S
Joined
Nov 20, 2008
Messages
9
Reaction score
0
Points
1
Location
United Kingdom
Your Mac's Specs
Macbook Pro 2.4 Ghz 2GB SDRAM 200GB HDD, Mac Mini Leopard Server, 2GHz 1GB SDRAM 80GB HDD
Thanks

thanks very much, i believe that is what i am requiring to do,
All my application has is the webview put onto it, nothing else, and i would like to have a URL specified to load when my application is launched.
Would you possibly be able to guide me a little as to how i would do this.
I do not have any experience with Xcode and it would be really appreciated.
 
Joined
Mar 15, 2007
Messages
161
Reaction score
4
Points
18
Your Mac's Specs
17" MacBook Pro, 2.33GHz C2D, 2GB RAM
thanks very much, i believe that is what i am requiring to do,
All my application has is the webview put onto it, nothing else, and i would like to have a URL specified to load when my application is launched.
Would you possibly be able to guide me a little as to how i would do this.
I do not have any experience with Xcode and it would be really appreciated.

It should be literally one line of code. Just search for setMainFrameURL in the Xcode documentation, although you will also need to add the WebKit framework to your project if you haven't already done that.
 
OP
S
Joined
Nov 20, 2008
Messages
9
Reaction score
0
Points
1
Location
United Kingdom
Your Mac's Specs
Macbook Pro 2.4 Ghz 2GB SDRAM 200GB HDD, Mac Mini Leopard Server, 2GHz 1GB SDRAM 80GB HDD
Thanks

Thanks for that, i have looked up the documentation and it basically says this.

setMainFrameURL:
Sets the URL that the main frame loads.

- (void)setMainFrameURL: (NSString *)URLString

Discussion
Functionally equivalent to [[webView mainFrame] loadRequest:].


But i dont have any idea what i am supposed to do with this ?
i'm sorry to be a pest but i dont have an coding experience.

Thanks
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top