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

Similar Threads
thread Thread Starter Forum Replies Last Post
Resizing a Chatbox in Web View? logicpro7 iPhone/iPad Programming 0 Oct 29, 2013 12:32 PM
View URL in app banner before proceeding? mlink iPhone Tips, Help and Troubleshooting 1 May 19, 2013 07:15 AM
How do you view the web view of twitter on the iPhone? Tsunam Apple, Industry and Internet Discussion 3 May 1, 2013 08:36 PM
Pages '09/iWork '09: Web View mode / view all pages as one page in Pages boyscoutslayer Mac Applications and Mac App Store 0 May 1, 2013 07:48 AM
Need serious help [90% of the pages I view give a URL not found error] markodave iMac 4 Mar 21, 2013 06:07 AM

Forum Jump

All times are GMT -5. The time now is 11:28 AM.

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

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