Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 19, 2010, 07:44 PM   #1
DeviledMoon
macrumors newbie
 
Join Date: Oct 2010
Web View and URL?

Hey Guys,

Im working on a web app for my mac's that i might release out to everyone when i finish up what im doing with it.

but heres my issue, i cant seem to find a way to load a url into the Web View Component...

Could anyone give me an example of how i can do this?

Thanks,
DeviledMoon
DeviledMoon is offline   0 Reply With Quote
Old Oct 20, 2010, 03:44 AM   #2
Toreddo
macrumors member
 
Join Date: Jul 2009
Quote:
Originally Posted by DeviledMoon View Post
Hey Guys,

Im working on a web app for my mac's that i might release out to everyone when i finish up what im doing with it.

but heres my issue, i cant seem to find a way to load a url into the Web View Component...

Could anyone give me an example of how i can do this?

Thanks,
DeviledMoon
Connect the UIWebView from your IB to your controller by making a property.

Then use this:

Code:
NSURL *url = [[NSURL alloc] initWithString:@"http://myurl"];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
[[webBrowser mainFrame] loadRequest:request];
Toreddo is offline   0 Reply With Quote
Old Oct 21, 2010, 03:29 AM   #3
DeviledMoon
Thread Starter
macrumors newbie
 
Join Date: Oct 2010
Quote:
Originally Posted by Toreddo View Post
Connect the UIWebView from your IB to your controller by making a property.

Then use this:

Code:
NSURL *url = [[NSURL alloc] initWithString:@"http://myurl"];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
[[webBrowser mainFrame] loadRequest:request];

Thanks Man, Worked Wonders
DeviledMoon is offline   0 Reply With Quote
Old Oct 21, 2010, 08:31 PM   #4
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
and don't forget to release those objects, or you'll have memory leaks.
kainjow is offline   0 Reply With Quote
Old Oct 22, 2010, 02:24 AM   #5
DeviledMoon
Thread Starter
macrumors newbie
 
Join Date: Oct 2010
Quote:
Originally Posted by kainjow View Post
and don't forget to release those objects, or you'll have memory leaks.
of course... me and my team just started on the whole apple developer system, we got a lot of apps coming to the mac and iphone/ipod/ipad

i have a basic knowledge of how to develop for the platform, i know enough to get by and kill all the leaks and what not, just some of the stuff in Xcode/cocoa throws me off lol


Thanks for reminding though!

Oh.
Unrelated question, Key commands... lets say i want to use the menu command (OpenApple+Fn+1), how would i detect that? ive look it up on the developer resources from apple, but unfortunately they arent that helpful.
DeviledMoon is offline   0 Reply With Quote
Old Oct 22, 2010, 10:44 AM   #6
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
Quote:
Originally Posted by DeviledMoon View Post
Oh.
Unrelated question, Key commands... lets say i want to use the menu command (OpenApple+Fn+1), how would i detect that? ive look it up on the developer resources from apple, but unfortunately they arent that helpful.
I'd suggest a new thread for this since it's quite off-topic.
__________________
dejo is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Handling image data downloaded from URL. Cropping, viewing, and moving it antago iPhone/iPad Programming 4 Nov 3, 2010 01:32 PM
Displaying web pages over web views in collection view using cooca bindings Monaj Mac Programming 0 Jun 8, 2010 10:14 AM
XCode Web Browser - URL Updating? alexpja Mac Programming 0 Apr 25, 2010 08:17 PM
FileMaker Pro 8.5 tempting for Mactel speed boost, web viewe... MacBytes MacBytes.com News Discussion 2 Aug 1, 2006 02:44 PM
encoding video for universal web viewing and web video display help jelloshotsrule Web Design and Development (archive) 8 May 17, 2005 11:47 PM


All times are GMT -5. The time now is 04:46 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC