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

geoldr

macrumors newbie
Original poster
Apr 1, 2011
17
0
Hi guys, I wrote a program that loads a couple web pages, but I need them to display in the iphone style. if you go to news.google.com on your mac, as compared with you iPhone it displays a different page. I really need this page to be displayed in the iPhone version in my program. How is this possible using the WebKit ?
 
Quote from WebView docs.

- (void)setCustomUserAgent:(NSString *)userAgentString

Parameters
userAgentString
The custom user-agent string. The user-agent string is used by websites to identify the client browser. The custom user-agent string is used for all URLs. If nil, then the receiver constructs a user-agent string that produces the best rendering results for each URL.
 
Thank you for the information, but I am having trouble implementing it. How do I link this to my webview instance?

Never mind I have figured it out! :)
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.