public override void ViewDidLoad () { base.ViewDidLoad (); navBar = new UIToolbar(); navBar.Frame = new CGRect (0, View.Frame.Height-40, View.Frame.Width, 40); navBar.TintColor = UIColor.Gray; items = new [] { new UIBarButtonItem (UIBarButtonSystemItem.Stop, (o, e) => { webView.StopLoading (); DismissViewController (true, null); }), new UIBarButtonItem (UIBarButtonSystemItem.FlexibleSpace, null), new UIBarButtonItem (UIBarButtonSystemItem.Refresh, (o, e) => webView.Reload ()) }; navBar.Items = items; webView = new UIWebView (); webView.Frame = new CGRect (0, 0, View.Frame.Width, View.Frame.Height-40); webView.ScalesPageToFit = true; webView.SizeToFit (); webView.LoadRequest (url); navBar.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleTopMargin; webView.AutoresizingMask = UIViewAutoresizing.FlexibleDimensions; View.AddSubviews (new UIView[] { webView, navBar }); }
public override void ViewDidLoad() { base.ViewDidLoad (); navBar = new UIToolbar (); navBar.Frame = new RectangleF (0, this.View.Frame.Height-130, this.View.Frame.Width, 40); items = new UIBarButtonItem [] { new UIBarButtonItem ("Back", UIBarButtonItemStyle.Bordered, (o, e) => { webView.GoBack (); }), new UIBarButtonItem ("Forward", UIBarButtonItemStyle.Bordered, (o, e) => { webView.GoForward (); }), new UIBarButtonItem (UIBarButtonSystemItem.FlexibleSpace, null), new UIBarButtonItem (UIBarButtonSystemItem.Refresh, (o, e) => { webView.Reload (); }), new UIBarButtonItem (UIBarButtonSystemItem.Stop, (o, e) => { webView.StopLoading (); }) }; navBar.Items = items; SetNavBarColor(); webView = new UIWebView (); webView.Frame = new RectangleF (0, 0, this.View.Frame.Width, this.View.Frame.Height-130); webView.LoadStarted += delegate { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true; }; webView.LoadFinished += delegate { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false; }; webView.ScalesPageToFit = true; webView.SizeToFit (); webView.LoadRequest (url); this.View.AddSubview (webView); this.View.AddSubview (navBar); }
public override void ViewDidLoad() { base.ViewDidLoad(); navBar = new UIToolbar(); navBar.Frame = new RectangleF(0, this.View.Frame.Height - 130, this.View.Frame.Width, 40); items = new UIBarButtonItem [] { new UIBarButtonItem("Back", UIBarButtonItemStyle.Bordered, (o, e) => { webView.GoBack(); }), new UIBarButtonItem("Forward", UIBarButtonItemStyle.Bordered, (o, e) => { webView.GoForward(); }), new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace, null), new UIBarButtonItem(UIBarButtonSystemItem.Refresh, (o, e) => { webView.Reload(); }), new UIBarButtonItem(UIBarButtonSystemItem.Stop, (o, e) => { webView.StopLoading(); }) }; navBar.Items = items; webView = new UIWebView(); webView.Frame = new RectangleF(0, 0, View.Frame.Width, View.Frame.Height - 130); webView.LoadStarted += delegate { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true; }; webView.LoadFinished += delegate { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false; }; webView.ScalesPageToFit = true; webView.SizeToFit(); webView.LoadRequest(url); View.AddSubview(webView); View.AddSubview(navBar); }
public override void ViewDidLoad() { base.ViewDidLoad(); navBar = new UIToolbar(); navBar.Frame = new CGRect(0, View.Frame.Height - 40, View.Frame.Width, 40); navBar.TintColor = UIColor.Gray; items = new [] { new UIBarButtonItem(UIBarButtonSystemItem.Stop, (o, e) => { webView.StopLoading(); DismissViewController(true, null); }), new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace, null), new UIBarButtonItem(UIBarButtonSystemItem.Refresh, (o, e) => webView.Reload()) }; navBar.Items = items; webView = new UIWebView(); webView.Frame = new CGRect(0, 0, View.Frame.Width, View.Frame.Height - 40); webView.ScalesPageToFit = true; webView.SizeToFit(); webView.LoadRequest(url); navBar.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleTopMargin; webView.AutoresizingMask = UIViewAutoresizing.FlexibleDimensions; View.AddSubviews(new UIView[] { webView, navBar }); }
protected void AddWebView() { // Font = UIFont.FromName ("OpenSans", 14), // TextColor = UIColor.FromRGB (67, 67, 67), // TextAlignment = UITextAlignment.Left, // BackgroundColor = UIColor.Clear, // Text = '<a href="http://mydiem.com/index.cfm?event=main.faq">Help</a><br/><a href="mailto:[email protected]">Email Support</a>', // LineBreakMode = UILineBreakMode.WordWrap, // Lines = 0 var style = "<style type='text/css'>body { color: #000000; background-color: transparent; font-family: 'HelveticaNeue-Light', Helvetica, Arial, sans-serif; padding: 20px; } h1, h2, h3, h4, h5, h6 { padding: 0px; margin: 0px; font-style: normal; font-weight: normal; } h2 { font-family: 'HelveticaNeue-Light', Helvetica, Arial, sans-serif; font-size: 24px; font-weight: normal; } h4 { font-size: 16px; } p { font-family: Helvetica, Verdana, Arial, sans-serif; line-height:1.5; font-size: 16px; } .esv-text { padding: 0 0 10px 0; }</style>"; var html = style + "<body><h2>Contact</h2><a href='http://mydiem.com/index.cfm?event=main.faq'>Help</a><br/><a href='mailto:[email protected]'>Email Support</a><br/><br/>"; html += "<h2>Our Story</h2><p>If you've ever sent your child empty-handed to a class party, attended parent/teacher conferences on the wrong day or arrived an hour early for a game, you're not alone. It's not bad parenting, it's bad scheduling and trust us, we've been there too.</p><p>Year after year we would receive paper calendars from our children's schools, get several emails a week, or would be encouraged to visit websites to view upcoming events (sports teams, Boy Scouts/ Girl Scouts, ballet, band and track club all had different sites!). Sometimes we would enter the information into a paper agenda, which couldn't be shared. Or we would type everything into our computer's calendar hoping the information wouldn't change. And, as the school year progressed, updates would take the form of crumpled notes, skimmed over emails and hurried messages from coaches and teachers that didn't always make it to the master calendar. We'd often ask ourselves, \"Why can't school events appear on our smart phones or computer calendar programs?\" or \"If there is a change, couldn't someone update the calendar for us so we don't have to keep track of emails, notes, etc? Then, one day, we stopped wishing and got to work.</p><p>We are parents to three school-age (and very busy) children and now we\'re also the proud parents of MyDiem.com. We're so happy to share this much-needed tool with other busy parents. Hopefully you will find this tool helpful in keeping track of your child's activities.</p>"; html += "</body>"; webViewTest = new UIWebView(new RectangleF(0, 0, 320, WhitePaperBible.iOS.UI.Environment.DeviceScreenHeight)); webViewTest.SizeToFit(); View.AddSubview(webViewTest); webViewTest.Opaque = false; webViewTest.BackgroundColor = UIColor.Clear; webViewTest.LoadHtmlString(html, NSUrl.FromString("http://localhost")); // DescriptionLabel.ShouldStartLoad = myHandler; }
public override void ViewDidLoad () { base.ViewDidLoad (); navBar = new UIToolbar (); if (AppDelegate.IsPhone) navBar.Frame = new CGRect (0, View.Frame.Height-40, View.Frame.Width, 40); else navBar.Frame = new CGRect (0, View.Frame.Height-40, View.Frame.Width, 40); navBar.TintColor = UIColor.DarkGray; items = new UIBarButtonItem [] { new UIBarButtonItem ("Back", UIBarButtonItemStyle.Bordered, (o, e) => { webView.GoBack (); }), new UIBarButtonItem ("Forward", UIBarButtonItemStyle.Bordered, (o, e) => { webView.GoForward (); }), new UIBarButtonItem (UIBarButtonSystemItem.FlexibleSpace, null), new UIBarButtonItem (UIBarButtonSystemItem.Refresh, (o, e) => { webView.Reload (); }), new UIBarButtonItem (UIBarButtonSystemItem.Stop, (o, e) => { webView.StopLoading (); // Phone: NavigationController, Pad: Modal if (NavigationController == null) DismissViewController (true, ()=> {}); else NavigationController.PopViewController (true); }) }; navBar.Items = items; webView = new UIWebView (); if (AppDelegate.IsPhone) webView.Frame = new CGRect (0, 0, View.Frame.Width, View.Frame.Height-40); else webView.Frame = new CGRect (0, 0, View.Frame.Width, View.Frame.Height-40); webView.LoadStarted += delegate { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true; navBar.Items[0].Enabled = webView.CanGoBack; navBar.Items[1].Enabled = webView.CanGoForward; }; webView.LoadFinished += delegate { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false; navBar.Items[0].Enabled = webView.CanGoBack; navBar.Items[1].Enabled = webView.CanGoForward; }; webView.ScalesPageToFit = true; webView.SizeToFit (); webView.LoadRequest (url); navBar.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleTopMargin; webView.AutoresizingMask = UIViewAutoresizing.FlexibleDimensions; View.AddSubview (webView); View.AddSubview (navBar); }
public override void ViewDidLoad() { base.ViewDidLoad(); basedir = Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); basedir = basedir.Replace("Documents", "Monospace11.app"); // no XIB ! webView = new UIWebView() { ScalesPageToFit = false, }; LoadHtmlString(FormatText()); webView.SizeToFit(); webView.Frame = new RectangleF(0, 0, this.View.Frame.Width, this.View.Frame.Height - 93); // Add the table view as a subview this.View.AddSubview(webView); }
public override void ViewDidLoad() { base.ViewDidLoad(); basedir = Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); basedir = System.IO.Path.Combine(basedir, "..", "iOS.app"); // HACK: bad bad bad Console.WriteLine("~~~" + System.Environment.CurrentDirectory); // no XIB ! webView = new UIWebView() { ScalesPageToFit = false, }; LoadHtmlString(FormatText()); webView.SizeToFit(); webView.Frame = new RectangleF(0, topPosition, this.View.Frame.Width, this.View.Frame.Height - 44); // Add the table view as a subview this.View.AddSubview(webView); }
public override void ViewDidLoad() { base.ViewDidLoad (); basedir = Environment.GetFolderPath (System.Environment.SpecialFolder.Personal); basedir = System.IO.Path.Combine(basedir, "..", "iOS.app"); // HACK: bad bad bad Console.WriteLine ("~~~"+System.Environment.CurrentDirectory); // no XIB ! webView = new UIWebView() { ScalesPageToFit = false, }; LoadHtmlString(FormatText()); webView.SizeToFit(); webView.Frame = new RectangleF (0, topPosition, this.View.Frame.Width, this.View.Frame.Height-44); // Add the table view as a subview this.View.AddSubview(webView); }
public override void ViewDidLoad() { base.ViewDidLoad (); _web = new UIWebView { ScalesPageToFit = false, Opaque = false, BackgroundColor = UIColor.White, MultipleTouchEnabled = true, Frame = new RectangleF(0, 0, this.View.Frame.Width, this.View.Frame.Height-80), }; _web.Delegate = new WebViewDelegate(); _web.SizeToFit(); this.View.AddSubview(_web); }
public override void ViewDidLoad() { base.ViewDidLoad(); webView = new UIWebView { ScalesPageToFit = true }; webView.LoadStarted += delegate { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true; }; webView.LoadFinished += delegate { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false; }; webView.LoadHtmlString(FormatText(), new NSUrl()); webView.SizeToFit(); webView.Frame = new RectangleF (0, 0, this.View.Frame.Width, this.View.Frame.Height - 44); this.View.AddSubview(webView); }
public override void ViewDidLoad() { base.ViewDidLoad(); _web = new UIWebView { ScalesPageToFit = false, Opaque = false, BackgroundColor = UIColor.White, MultipleTouchEnabled = true, Frame = new RectangleF(0, 0, this.View.Frame.Width, this.View.Frame.Height - 80), }; _web.Delegate = new WebViewDelegate(); _web.SizeToFit(); this.View.AddSubview(_web); }
public override void ViewDidLoad() { base.ViewDidLoad (); // no XIB ! webView = new UIWebView() { ScalesPageToFit = false }; webView.LoadHtmlString(FormatText(), new NSUrl()); // Set the web view to fit the width of the app. webView.SizeToFit(); // Reposition and resize the receiver webView.Frame = new RectangleF (0, 0, this.View.Bounds.Width, this.View.Bounds.Height); // Add the table view as a subview this.View.AddSubview(webView); }
public override void ViewDidLoad() { base.ViewDidLoad(); // no XIB ! webView = new UIWebView() { ScalesPageToFit = false }; webView.LoadHtmlString(FormatText(), new NSUrl()); // Set the web view to fit the width of the app. webView.SizeToFit(); // Reposition and resize the receiver webView.Frame = new RectangleF( 0, 0, this.View.Frame.Width, this.View.Frame.Height); // Add the table view as a subview this.View.AddSubview(webView); }
public override void ViewDidLoad() { base.ViewDidLoad (); _view = new UIView(); _view.BackgroundColor = UIColor.GroupTableViewBackgroundColor; UILabel label = new UILabel(); label.Text = _stopInfo.StopName; label.BackgroundColor = UIColor.GroupTableViewBackgroundColor; label.SizeToFit(); label.Frame = new RectangleF(10,0, 300, 40); _view.Add(label); UIButton button = UIButton.FromType(UIButtonType.RoundedRect); button.SetTitle("Legg til i favoritter", UIControlState.Normal);; button.Frame = new RectangleF(10, 120, 150, 50); _view.Add(button); _view.SizeToFit(); button.TouchUpInside += delegate { _busStopRepository.AddFavorite(_stopInfo); }; webView = new UIWebView { ScalesPageToFit = false }; webView.LoadHtmlString (FormatText (), new NSUrl ()); // Set the web view to fit the width of the app. webView.SizeToFit (); // Reposition and resize the receiver _view.Frame = new RectangleF (0, 0, this.View.Bounds.Width, this.View.Bounds.Height); // Add the table view as a subview this.View.AddSubview (_view); }
public override void ViewDidLoad() { base.ViewDidLoad (); // no XIB ! webView = new UIWebView() { ScalesPageToFit = false }; basedir = Environment.GetFolderPath (System.Environment.SpecialFolder.Personal); basedir = basedir.Replace("Documents", "PDC09.app"); webView.LoadHtmlString(FormatText(), null);//new NSUrl(basedir+"/Sponsors/", true)); // Set the web view to fit the width of the app. webView.SizeToFit(); // Reposition and resize the receiver webView.Frame = new RectangleF (0, 0, this.View.Frame.Width, this.View.Frame.Height-90); // Add the table view as a subview this.View.AddSubview(webView); }
public override void ViewDidLoad() { base.ViewDidLoad(); // no XIB ! webView = new UIWebView() { ScalesPageToFit = false }; basedir = Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); basedir = basedir.Replace("Documents", "Monospace2.app"); webView.LoadHtmlString(FormatText(), new NSUrl(basedir + "/Sponsors/", true)); // Set the web view to fit the width of the app. webView.SizeToFit(); // Reposition and resize the receiver webView.Frame = new RectangleF(0, 0, this.View.Frame.Width, this.View.Frame.Height - 90); // Add the table view as a subview this.View.AddSubview(webView); }
public override void ViewDidLoad() { base.ViewDidLoad (); basedir = Environment.GetFolderPath (System.Environment.SpecialFolder.Personal); basedir = basedir.Replace("Documents", "Monospace11.app"); // no XIB ! webView = new UIWebView() { ScalesPageToFit = false, }; LoadHtmlString(FormatText()); webView.SizeToFit(); webView.Frame = new RectangleF (0, 0, this.View.Frame.Width, this.View.Frame.Height-93); // Add the table view as a subview this.View.AddSubview(webView); }
public override void ViewDidLoad() { base.ViewDidLoad(); navBar = new UIToolbar(); if (AppDelegate.IsPhone) { navBar.Frame = new RectangleF(0, View.Frame.Height - 40, View.Frame.Width, 40); } else { navBar.Frame = new RectangleF(0, View.Frame.Height - 40, View.Frame.Width, 40); } navBar.TintColor = UIColor.DarkGray; items = new UIBarButtonItem [] { new UIBarButtonItem("Back", UIBarButtonItemStyle.Bordered, (o, e) => { webView.GoBack(); }), new UIBarButtonItem("Forward", UIBarButtonItemStyle.Bordered, (o, e) => { webView.GoForward(); }), new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace, null), new UIBarButtonItem(UIBarButtonSystemItem.Refresh, (o, e) => { webView.Reload(); }), new UIBarButtonItem(UIBarButtonSystemItem.Stop, (o, e) => { webView.StopLoading(); // Phone: NavigationController, Pad: Modal if (NavigationController == null) { DismissViewController(true, () => {}); } else { NavigationController.PopViewControllerAnimated(true); } }) }; navBar.Items = items; webView = new UIWebView(); if (AppDelegate.IsPhone) { webView.Frame = new RectangleF(0, 0, View.Frame.Width, View.Frame.Height - 40); } else { webView.Frame = new RectangleF(0, 0, View.Frame.Width, View.Frame.Height - 40); } webView.LoadStarted += delegate { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true; navBar.Items[0].Enabled = webView.CanGoBack; navBar.Items[1].Enabled = webView.CanGoForward; }; webView.LoadFinished += delegate { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false; navBar.Items[0].Enabled = webView.CanGoBack; navBar.Items[1].Enabled = webView.CanGoForward; }; webView.ScalesPageToFit = true; webView.SizeToFit(); webView.LoadRequest(url); navBar.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleTopMargin; webView.AutoresizingMask = UIViewAutoresizing.FlexibleDimensions; View.AddSubview(webView); View.AddSubview(navBar); }
protected void AddWebView() { // Font = UIFont.FromName ("OpenSans", 14), // TextColor = UIColor.FromRGB (67, 67, 67), // TextAlignment = UITextAlignment.Left, // BackgroundColor = UIColor.Clear, // Text = '<a href="http://mydiem.com/index.cfm?event=main.faq">Help</a><br/><a href="mailto:[email protected]">Email Support</a>', // LineBreakMode = UILineBreakMode.WordWrap, // Lines = 0 var style = "<style type='text/css'>body { color: #000000; background-color: transparent; font-family: 'HelveticaNeue-Light', Helvetica, Arial, sans-serif; padding: 20px; } h1, h2, h3, h4, h5, h6 { padding: 0px; margin: 0px; font-style: normal; font-weight: normal; } h2 { font-family: 'HelveticaNeue-Light', Helvetica, Arial, sans-serif; font-size: 24px; font-weight: normal; } h4 { font-size: 16px; } p { font-family: Helvetica, Verdana, Arial, sans-serif; line-height:1.5; font-size: 16px; } .esv-text { padding: 0 0 10px 0; }</style>"; var html = style + "<body><h2>Contact</h2><a href='http://mydiem.com/index.cfm?event=main.faq'>Help</a><br/><a href='mailto:[email protected]'>Email Support</a><br/><br/>"; html += "<h2>Our Story</h2><p>If you've ever sent your child empty-handed to a class party, attended parent/teacher conferences on the wrong day or arrived an hour early for a game, you're not alone. It's not bad parenting, it's bad scheduling and trust us, we've been there too.</p><p>Year after year we would receive paper calendars from our children's schools, get several emails a week, or would be encouraged to visit websites to view upcoming events (sports teams, Boy Scouts/ Girl Scouts, ballet, band and track club all had different sites!). Sometimes we would enter the information into a paper agenda, which couldn't be shared. Or we would type everything into our computer's calendar hoping the information wouldn't change. And, as the school year progressed, updates would take the form of crumpled notes, skimmed over emails and hurried messages from coaches and teachers that didn't always make it to the master calendar. We'd often ask ourselves, \"Why can't school events appear on our smart phones or computer calendar programs?\" or \"If there is a change, couldn't someone update the calendar for us so we don't have to keep track of emails, notes, etc? Then, one day, we stopped wishing and got to work.</p><p>We are parents to three school-age (and very busy) children and now we\'re also the proud parents of MyDiem.com. We're so happy to share this much-needed tool with other busy parents. Hopefully you will find this tool helpful in keeping track of your child's activities.</p>"; html += "</body>"; webViewTest = new UIWebView (new RectangleF (0, 0, 320, WhitePaperBible.iOS.UI.Environment.DeviceScreenHeight)); webViewTest.SizeToFit (); View.AddSubview (webViewTest); webViewTest.Opaque = false; webViewTest.BackgroundColor = UIColor.Clear; webViewTest.LoadHtmlString (html, NSUrl.FromString ("http://localhost")); // DescriptionLabel.ShouldStartLoad = myHandler; }
void SetMapSource(MapSource ms) { switch (ms) { case MapSource.GoogleMaps: mapView.MapType = MapViewType.Normal; webLegacy.LoadHtmlString("", new NSUrl("")); osmLayer.Map = null; ocmLayer.Map = null; break; case MapSource.GoogleSatellite: mapView.MapType = MapViewType.Satellite; webLegacy.LoadHtmlString("", new NSUrl("")); osmLayer.Map = null; ocmLayer.Map = null; break; case MapSource.GoogleTerrain: mapView.MapType = MapViewType.Terrain; webLegacy.LoadHtmlString("", null); osmLayer.Map = null; ocmLayer.Map = null; break; case MapSource.GoogleHybrid: mapView.MapType = MapViewType.Hybrid; webLegacy.LoadHtmlString("", null); osmLayer.Map = null; ocmLayer.Map = null; break; case MapSource.OpenStreetMap: // OpenStreetMap mapView.MapType = MapViewType.None; webLegacy.LoadHtmlString("<html><head></head><body style=\"font-family:sans-serif; margin:0 auto;text-align:left;background-color: transparent; color:#808080 \"><hfill>Data, imagery and map information provided by<br>MapQuest, <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a> and contributors, <a href=\"http://wiki.openstreetmap.org/wiki/Legal_FAQ#I_would_like_to_use_OpenStreetMap_maps._How_should_I_credit_you.#\">ODbL</a></body></html>", new NSUrl("")); webLegacy.SizeToFit(); osmLayer.Map = mapView; ocmLayer.Map = null; break; case MapSource.OpenCycleMap: // OpenCycleMap mapView.MapType = MapViewType.None; webLegacy.LoadHtmlString("<html><head></head><body style=\"font-family:sans-serif; margin:0 auto;text-align:left;background-color: transparent; color:#808080 \"><hfill>Data, imagery and map information provided by<br>MapQuest, <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a> and contributors, <a href=\"http://wiki.openstreetmap.org/wiki/Legal_FAQ#I_would_like_to_use_OpenStreetMap_maps._How_should_I_credit_you.#\">ODbL</a></body></html>", new NSUrl("")); webLegacy.SizeToFit(); osmLayer.Map = null; ocmLayer.Map = mapView; break; case MapSource.None: mapView.MapType = MapViewType.None; webLegacy.LoadHtmlString("", new NSUrl("")); osmLayer.Map = null; ocmLayer.Map = null; break; } // Save map source NSUserDefaults.StandardUserDefaults.SetInt((int)ms, "MapSource"); }