Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
Not open for further replies.

mack255

macrumors member
Original poster
Jul 4, 2008
33
0
Hey can anyone please tell me how i can tell webkit to load a webpage like www.macrumors.com or something like any help would be apprecaited but please dont do stuff like let me googled that for you i have googled it
 
hey, pretty simple

this following code ASSUMES "webView" is of type "WebView".
I've linked mine as an IBOutlet.

This is a convenience function for me, where the url is a NSString not a NSUrl. Hope it helps.
Code:
- (void)gotoURL:(NSString*)url {
	[[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:
									  [NSURL URLWithString:url]]];
}
 
What am i doing wrong here

We don't know: you haven't shown us any code or told us what you are doing. We are not mind readers. If you mean download as in retrieve the HTML source for the page then you can just use a NSURLConnection instead.
 
I'm sorry i forgot to show the picture

I'm sorry i forgot to show the picture
 

Attachments

  • Picture 1.png
    Picture 1.png
    153.2 KB · Views: 70
1) WebView is a classname. Not an instance of that class. You need to send that message to a valid instance. If you don't understand what that means stop. Go a learn the basics of OOP then C then Objective-C the Cocoa

2) urlwww.facebook.com is a meaningless token. If you are trying to define the URL as a string you need something like @"http://www.facebook.com".

From what you've posted I suggest you need to go off and learn the basics before you try writing anything.
 
I tryed your idea

I tryed your idea it worked but now it wont load no errors
 

Attachments

  • Picture 3.png
    Picture 3.png
    161.1 KB · Views: 72
Dude im only 12 settle the freak dowm

I am perfectly calm. I am trying to help you and do you a favour. I will not bother in future as clearly you are unable to show gratitude or take advise from a professional programmer.

My last word: learn to walk before you try to run.
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.