我想将谷歌日历嵌入到 iphone 应用程序中,我的 webview 很好,但我似乎无法获得无需登录即可查看移动版本所需的 URL。
我知道这是可能的,因为这是在 twit 应用程序中完成的(请参见下面的屏幕截图)。
我怎样才能做到这一点?
假设公共谷歌日历是链接文本,我想在 UIView 中查看此页面的移动版本。
移动视图在链接文本中可用,但您必须先登录到谷歌帐户。
帮助 Stackoverflow!
现在一切都在掌控之中。虽然我发现无法访问 gp 移动视图,但事实证明它只是普通视图的议程视图。
NSString *gcal = [NSString stringWithFormat:@"<html><meta name=\"viewport\" content=\"width=320\"/><iframe src=\"http://www.google.com/calendar/embed?showTitle=0&showNav=0&showTabs=0&showPrint=0&showCalendars=0&mode=AGENDA&height=600&wkst=2&hl=en_GB&src=northadelaidefitness@gmail.com&color=%23A32929&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