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

Thelle93

macrumors newbie
Original poster
Hi!
Im developing an iphone app in Xcode 4.5 and im wondering if it is possible to force a website url that is embedded with UIWebView to load into classic mode instead of mobile view? (it's a Facebook page that doesn't work well in mobile mode).

Thanks in advance! 🙂
 
Thanks it worked! 😀

here's the code:

Code:
+ (void)initialize {
    NSDictionary *dictionnary = [[NSDictionary alloc] initWithObjectsAndKeys:@"Classic", @"UserAgent", nil];
    [[NSUserDefaults standardUserDefaults] registerDefaults:dictionnary];
}
 
Last edited by a moderator:
I was always sure you should do it with "User-Agent" header on the request. It's not that I ever tried to do it, but now I did a google search and found this:

Stack Overflow - Change User Agent in UIWebView (iPhone SDK)

I can see several issues, one of them being Note that you need to use @"User-Agent" to read the property, but @"User_Agent" to set it.

Oh, well.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.