views:

221

answers:

1

Hi guys I want to embed a google calendar into an iphone app, my webview is fine, except I can't seem to get the URL I need to view the mobile version without having to logging in.

I know its possible as this is done in the twit app (See Screenshot below).

How can I do this?

Lets say the public google calendar is link text and I want to view the Mobile version of this page in a UIView.

The mobile view is available at link text, but you must first be logged into a google account.

Help Stackoverflow!

alt text

A: 

All under control now. Although I didn't find it possible to access the gp mobile view, it turned out infact to be just the agenda view of the normal view.

NSString *gcal = [NSString stringWithFormat:@"<html><meta name=\"viewport\" content=\"width=320\"/><iframe src=\"http://www.google.com/calendar/embed?showTitle=0&amp;amp;showNav=0&amp;amp;showTabs=0&amp;amp;showPrint=0&amp;amp;showCalendars=0&amp;amp;mode=AGENDA&amp;amp;height=600&amp;amp;wkst=2&amp;amp;hl=en_GB&amp;amp;[email protected]&amp;amp;color=%23A32929&amp;amp;ctz=Australia%2FAdelaide\" style=\"border-width: 0pt;\" mce_style=\" border-width:0 \" frameborder=\"0\" height=\"400\" width=\"300\"></iframe>"];

[webview loadHTMLString:gcal baseURL:nil];   //load above html string (notice the viewport=320 for iphone resizing
webview.delegate = self; //add delegate for activity access
webview.scalesPageToFit =YES; //scale nicely
norskben