public void listViewControllerHandleObject(ListViewController lvc, object obj) { // Make sure that we are getting the right object if (obj.GetType() != typeof(RSSChannel)) return; channel = obj as RSSChannel; this.NavigationItem.Title = "Channel Info"; this.TableView.ReloadData(); }
public void listViewControllerHandleObject(ListViewController lvc, object obj) { // Make sure that we are getting the right object if (obj.GetType() != typeof(RSSChannel)) { return; } channel = obj as RSSChannel; this.NavigationItem.Title = "Channel Info"; this.TableView.ReloadData(); }
public void listViewControllerHandleObject(ListViewController lvc, object obj) { // Cast the passed object to RSSItem RSSItem entry = obj as RSSItem; // Make sure that we are really getting an RSSItem if (entry.GetType() != typeof(RSSItem)) return; // Grab the info from the item and push it into the appropriate views this.webView.LoadRequest(new NSUrlRequest(new NSUrl(entry.link))); this.NavigationItem.Title = entry.title + " - " + entry.subForum; }
public void listViewControllerHandleObject(ListViewController lvc, object obj) { // Cast the passed object to RSSItem RSSItem entry = obj as RSSItem; // Make sure that we are really getting an RSSItem if (entry.GetType() != typeof(RSSItem)) { return; } // Grab the info from the item and push it into the appropriate views this.webView.LoadRequest(new NSUrlRequest(new NSUrl(entry.link))); this.NavigationItem.Title = entry.title + " - " + entry.subForum; }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { // create a new window instance based on the screen size window = new UIWindow(UIScreen.MainScreen.Bounds); ListViewController lvc = new ListViewController(UITableViewStyle.Plain); UINavigationController masterNav = new UINavigationController(lvc); WebViewController wvc = new WebViewController(); lvc.webViewController = wvc; // Check to make sure we're on an iPad if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad) { // WebViewController must be in navigaiton controller, you'll see why later UINavigationController detailNav = new UINavigationController(wvc); UIViewController[] vcs = new UIViewController[] { masterNav, detailNav }; UISplitViewController svc = new MySplitViewController(); // Set the delegate of the split view controller to the detail VC // We'll need this later - ignore warning for now svc.WeakDelegate = wvc; svc.ViewControllers = vcs; // Set the root view controller of the window to the split view controller window.RootViewController = svc; } else { // On noniPad devidces, go with the old version and just add the // single nav view controller window.RootViewController = masterNav; } // make the window visible window.MakeKeyAndVisible(); return(true); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { // create a new window instance based on the screen size window = new UIWindow(UIScreen.MainScreen.Bounds); ListViewController lvc = new ListViewController(UITableViewStyle.Plain); UINavigationController masterNav = new UINavigationController(lvc); WebViewController wvc = new WebViewController(); lvc.webViewController = wvc; // Check to make sure we're on an iPad if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad) { // WebViewController must be in navigaiton controller, you'll see why later UINavigationController detailNav = new UINavigationController(wvc); UIViewController[] vcs = new UIViewController[]{masterNav, detailNav}; UISplitViewController svc = new MySplitViewController(); // Set the delegate of the split view controller to the detail VC // We'll need this later - ignore warning for now svc.WeakDelegate = wvc; svc.ViewControllers = vcs; // Set the root view controller of the window to the split view controller window.RootViewController = svc; } else { // On noniPad devidces, go with the old version and just add the // single nav view controller window.RootViewController = masterNav; } // make the window visible window.MakeKeyAndVisible(); return true; }