public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { MIX10Xml.Session s = _svc.Sessions[indexPath.Row]; if (sessVC == null) { sessVC = new SessionViewController(s); } else { sessVC.Update(s); } sessVC.Title = s.Title; _svc.NavigationController.PushViewController(sessVC, true); tableView.DeselectRow(indexPath, true); }
public override bool ShouldStartLoad(UIWebView webView, NSUrlRequest request, UIWebViewNavigationType navigationType) { if (navigationType == UIWebViewNavigationType.LinkClicked) { string path = request.Url.Path.Substring(1); if (sessVC == null) { sessVC = new SessionViewController(path); } else { sessVC.Update(path); } _c.NavigationController.PushViewController(sessVC, true); } return(true); }
public override bool ShouldStartLoad(UIWebView webView, NSUrlRequest request, UIWebViewNavigationType navigationType) { if (navigationType == UIWebViewNavigationType.LinkClicked) { string path = request.Url.Path.Substring(1); string host = request.Url.Host.ToLower(); if (host == "tweet.mix10.app") { var tweet = new TWTweetComposeViewController(); tweet.SetInitialText("@" + path + " #monkeyspace"); viewController.PresentModalViewController(tweet, true); } else if (host == "twitter.mix10.app") { var nsurl = new NSUrl("twitter://user?screen_name=" + viewController.speaker.TwitterHandle); UIApplication.SharedApplication.OpenUrl(nsurl); } else if (host == "session.mix10.app") { if (sessVC == null) { sessVC = new SessionViewController(path); } else { sessVC.Update(path); } viewController.NavigationController.PushViewController(sessVC, true); } else { viewController.NavigationController.PushViewController(new WebViewController(request), true); return(false); } } return(true); }