void TapImageAction1(UITapGestureRecognizer tap) { if (Reachability.IsHostReachable(Settings._baseDomain)) { LoadingOverlay loadingOverlay = new LoadingOverlay(View.Frame); var webView = new UIWebView(View.Frame); webView.LoadFinished += (sender, e) => { loadingOverlay.Hide(); }; var banManProHREF = Settings.BanManProURL.Replace("Task=Get", "Task=Click"); ; webView.LoadRequest(new NSUrlRequest(new NSUrl(banManProHREF))); UIView.BeginAnimations("fadeflag"); UIView.Animate(1, () => { tap.View.Alpha = .5f; }, () => { View.AddSubview(webView); View.AddSubview(loadingOverlay); UIButton closeButton = new UIButton(new CGRect(View.Bounds.Width - 75, 0, 75, 50)); closeButton.SetImage(UIImage.FromBundle("close"), UIControlState.Normal); closeButton.BackgroundColor = UIColor.White.ColorWithAlpha(.5f); closeButton.TouchUpInside += (sender, e) => { try { webView.RemoveFromSuperview(); closeButton.RemoveFromSuperview(); } finally { webView.Dispose(); } }; UIImageView imageView = new UIImageView(new CGRect(View.Bounds.Width - 75, View.Bounds.Height / 2, 75, 50)); imageView.Image = UIImage.FromBundle("swipe_left"); imageView.Alpha = .5f; webView.AddSubview(closeButton); webView.AddSubview(imageView); tap.View.Alpha = 1f; }); UIView.CommitAnimations(); } else { HelperMethods.SendBasicAlert("Connect to a Network", "Please connect to a network to view this ad"); } }
public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { var webViewController = new UIViewController (); var button = new UIBarButtonItem ("Back", UIBarButtonItemStyle.Plain, null); var custom = new UIButton (new RectangleF (0, 0, 26, 15)); custom.SetBackgroundImage(UIImage.FromFile("./Assets/back.png"), UIControlState.Normal); custom.TouchUpInside += (sender, e) => webViewController.NavigationController.PopViewControllerAnimated (true); button.CustomView = custom; webViewController.NavigationItem.LeftBarButtonItem = button; var spinner = new UIActivityIndicatorView (UIActivityIndicatorViewStyle.WhiteLarge); spinner.Center = new PointF (160, 160); spinner.HidesWhenStopped = true; var webView = new UIWebView (tableView.Bounds); webView.Opaque = false; webView.BackgroundColor = UIColor.Black; webView.AddSubview (spinner); spinner.StartAnimating (); webView.LoadRequest (new NSUrlRequest (new NSUrl (string.Format(RequestConfig.Video, items[indexPath.Row].Id)))); webViewController.View = webView; webViewController.Title = items[indexPath.Row].Category; webView.LoadFinished += (object sender, EventArgs e) => { spinner.StopAnimating(); }; ((MainTabController)UIApplication.SharedApplication.Delegate.Window.RootViewController). Video.InternalTopNavigation.PushViewController (webViewController,true); tableView.DeselectRow (indexPath, true); }
private void loadPDF(string pdfFileName) { UIWebView pdfView = new UIWebView(UIScreen.MainScreen.Bounds); pdfView.LoadRequest(new NSUrlRequest(NSUrl.FromFilename(pdfFileName))); pdfView.ScalesPageToFit = true; UIViewController popover = new UIViewController(); popover.View = pdfView; popover.ModalPresentationStyle = UIModalPresentationStyle.Popover; // Grab Image var image = UIImage.FromFile("close.png"); // Add a close button var closeButton = new ImageButton(new CGRect(340, 30, image.Size.Width, image.Size.Height)); closeButton.UserInteractionEnabled = true; closeButton.Image = image; pdfView.AddSubview(closeButton); // Wireup the close button closeButton.Touched += (button) => { popover.DismissViewController(true, null); }; // Present the popover owner.PresentViewController(popover, true, null); }
public async override void ViewDidLoad () { base.ViewDidLoad (); if (!CrossConnectivity.Current.IsConnected) { await DialogUtil.ShowAlert ("Network Unavailable", "This application requires internet access to function. Please check your connection and try again.", "OK"); return; } if (AppCache.Instance.CanChangePassword) this.Title = "PIN"; else this.Title = "Password (PIN)"; #region Navigation var Cancel = new UIBarButtonItem("Cancel" , UIBarButtonItemStyle.Plain , (sender, args) => { this.NavigationController.PopViewController(true); }); Cancel.TintColor = UIColor.Clear.FromHexString(RSColors.MM_BLUE); Cancel.Enabled = true; this.NavigationItem.SetLeftBarButtonItem(Cancel, true); #endregion this.View.BackgroundColor = UIColor.Clear.FromHexString(RSColors.RS_LIGHT_GRAY_4); nfloat ScreenWidth = UIScreen.MainScreen.Bounds.Width; nfloat ScreenHeight = UIScreen.MainScreen.Bounds.Height; ChangePinScrollview = new UIScrollView(new CGRect(0, 63, ScreenWidth, ScreenHeight + 700)); ChangePinView = new UIView(new CGRect(0, -63, ScreenWidth, ScreenHeight - 63)); ChangePinScrollview.ContentSize = new Size((int)ScreenWidth, (int)ScreenHeight + 700); ChangePinScrollview.ScrollEnabled = true; ChangePinScrollview.UserInteractionEnabled = true; ChangePinScrollview.AddSubview(ChangePinView); this.View.Add(ChangePinScrollview); var EnterLabel = new UILabel(new CGRect(0, 28, 100, 18)) { Font = UIFont.FromName("HelveticaNeue", 12f), TextAlignment = UITextAlignment.Left, Text = " ENTER", TextColor = UIColor.Clear.FromHexString(RSColors.RS_DARK_GRAY) }; //ChangePinView.AddSubview(EnterLabel); var EnterView = new UIView(new CGRect(-1, 0, ScreenWidth + 2, 55)) { BackgroundColor = UIColor.Clear.FromHexString(RSColors.RS_LIGHT_GRAY_4), }; EnterView.AddSubview(EnterLabel); ChangePinView.Add(EnterView); #region Validation Text var MainPINView = new UIView(new CGRect(0, EnterView.Frame.Height + EnterView.Frame.Y, ScreenWidth, 153)) { BackgroundColor = UIColor.White }; // View.AddSubview(MainPINView); ChangePinView.AddSubview(MainPINView); MainPINView.Layer.BorderWidth = 1; MainPINView.Layer.BorderColor = UIColor.Clear.FromHexString(RSColors.RS_LIGHT_GRAY_5).CGColor; var CurrentPinTextField = new UITextField(new CGRect(15, 0, ScreenWidth - 15, 50)) { Font = UIFont.FromName("HelveticaNeue", 15f), TintColor = UIColor.Black, Placeholder = "Current PIN", KeyboardType = UIKeyboardType.NumberPad, SecureTextEntry = true }; MainPINView.Add(CurrentPinTextField); var PinView = new UIView(new CGRect(15, CurrentPinTextField.Frame.Height + CurrentPinTextField.Frame.Y, ScreenWidth - 15, 1)) { BackgroundColor = UIColor.Clear.FromHexString(RSColors.RS_LIGHT_GRAY_6) }; MainPINView.Add(PinView); var NewPinTextField = new UITextField(new CGRect(15, CurrentPinTextField.Frame.Height + CurrentPinTextField.Frame.Y + 1, ScreenWidth - 15, 50)) { Font = UIFont.FromName("HelveticaNeue", 15f), BackgroundColor = UIColor.Clear.FromHexString(RSColors.RS_WHITE), Placeholder = "New PIN", KeyboardType = UIKeyboardType.NumberPad, SecureTextEntry = true }; MainPINView.Add(NewPinTextField); var PasswordView = new UIView(new CGRect(15, NewPinTextField.Frame.Height + NewPinTextField.Frame.Y, ScreenWidth - 15, 1)) { BackgroundColor = UIColor.Clear.FromHexString(RSColors.RS_LIGHT_GRAY_6) }; MainPINView.Add(PasswordView); var RetypePinTextField = new UITextField(new CGRect(15, NewPinTextField.Frame.Height + NewPinTextField.Frame.Y + 1, ScreenWidth - 15, 50)) { Font = UIFont.FromName("HelveticaNeue", 15f), BackgroundColor = UIColor.Clear.FromHexString(RSColors.RS_WHITE), Placeholder = "Retype New PIN", KeyboardType = UIKeyboardType.NumberPad, SecureTextEntry = true }; MainPINView.Add(RetypePinTextField); var IDView = new UIView(new CGRect(15, RetypePinTextField.Frame.Height + RetypePinTextField.Frame.Y, ScreenWidth - 15, 1)) { BackgroundColor = UIColor.Clear.FromHexString(RSColors.RS_LIGHT_GRAY_6) }; MainPINView.Add(IDView); //WebView var ChangePinwebView = new UIWebView(new CGRect(0, MainPINView.Frame.Height + MainPINView.Frame.Y + 20, ScreenWidth, 120)); ChangePinwebView.Layer.BorderWidth = 1; ChangePinwebView.Layer.BorderColor = UIColor.Clear.FromHexString(RSColors.RS_LIGHT_GRAY_5).CGColor; loadingOverlay = new LoadingOverlay(ChangePinwebView.Bounds); ChangePinwebView.AddSubview(loadingOverlay); ChangePinView.AddSubview(ChangePinwebView); ChangePinwebView.UserInteractionEnabled = false; ChangePinwebView.LoadRequest(new NSUrlRequest(new NSUrl(UrlConsts.URL_CHANGE_LOGIN_PIN_RULES))); ChangePinwebView.LoadFinished += (sender, e) => { if (loadingOverlay != null) { loadingOverlay.Hide(); loadingOverlay = null; } }; #endregion var Save = new UIBarButtonItem("Save" , UIBarButtonItemStyle.Plain , async(sender, args) => { if (App.authManager.TicketExpired()) { await DialogUtil.ShowAlert("Session Expired", "Your session has expired. Returning to Login Screen", "OK"); InvalidateSession(); return; } if (!CrossConnectivity.Current.IsConnected) { await DialogUtil.ShowAlert("Network Unavailable", "This application requires internet access to function. Please check your connection and try again.", "OK"); return; } if (string.IsNullOrEmpty(NewPinTextField.Text) || string.IsNullOrEmpty(RetypePinTextField.Text) || string.IsNullOrEmpty(CurrentPinTextField.Text)) { UIAlertView alert = new UIAlertView("PIN should not be empty, try again.", " ", null, "OK"); alert.Show(); NewPinTextField.Text = string.Empty; RetypePinTextField.Text = string.Empty; CurrentPinTextField.Text = string.Empty; return; } else if (!NewPinTextField.Text.Equals(RetypePinTextField.Text)) { UIAlertView alert = new UIAlertView("PIN's do not match, try again.", " ", null, "OK"); alert.Show(); NewPinTextField.Text = string.Empty; RetypePinTextField.Text = string.Empty; CurrentPinTextField.Text = string.Empty; return; } InvokeOnMainThread(() => { loadingOverlay = new LoadingOverlay(this.View.Bounds); this.View.AddSubview(loadingOverlay); }); try{ var repo = new RSContentRepository(); var deviceId = UIKit.UIDevice.CurrentDevice.IdentifierForVendor.AsString(); var acct = AppCache.Instance.GetCacheItem<AccountInfo>(AppCache.AppCacheKey.CURRENTACCOUNT); var pinRequest = RequestObjectFactory.GetChangePinRequestObject(acct, deviceId, CurrentPinTextField.Text, NewPinTextField.Text, RetypePinTextField.Text); var changePin = await repo.ChangePin(pinRequest); if (loadingOverlay != null) { loadingOverlay.Hide(); loadingOverlay = null; } if (changePin.success) { UIAlertView alert = new UIAlertView("Your PIN has been changed successfully.", " ", null, "OK"); alert.Clicked += delegate (object _sender, UIButtonEventArgs btnArgs) { this.NavigationController.PopViewController (false); }; alert.Show (); DeleteCredentials(); return; } else if (changePin.errorList != null && changePin.errorList.Count > 0) { ErrorList errorList = changePin.errorList[0]; UIAlertView alert = new UIAlertView("PIN change was unsuccessful, try again.",errorList.errorDescription, null, "OK"); alert.Show(); CurrentPinTextField.Text = string.Empty; NewPinTextField.Text = string.Empty; RetypePinTextField.Text = string.Empty; CurrentPinTextField.ResignFirstResponder(); NewPinTextField.ResignFirstResponder(); RetypePinTextField.ResignFirstResponder(); return; } else { UIAlertView alert = new UIAlertView("PIN change was unsuccessful, try again.", "Please try again", null, "OK"); alert.Show(); CurrentPinTextField.Text = string.Empty; NewPinTextField.Text = string.Empty; RetypePinTextField.Text = string.Empty; CurrentPinTextField.ResignFirstResponder(); NewPinTextField.ResignFirstResponder(); RetypePinTextField.ResignFirstResponder(); return; } }catch(Exception e){ UIAlertView alert = new UIAlertView("Unable to process your request.", "Please try again later", null, "OK"); alert.Show(); if (loadingOverlay != null) { loadingOverlay.Hide(); loadingOverlay = null; } NewPinTextField.Text = string.Empty; RetypePinTextField.Text = string.Empty; CurrentPinTextField.Text = string.Empty; return; } }); Save.TintColor = UIColor.Clear.FromHexString(RSColors.MM_BLUE); Save.Enabled = true; this.NavigationItem.SetRightBarButtonItem(Save, true); }
public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { // ignore the first row because an event handler is attached // to the featured article view if (indexPath.Row == 0) { return; } // the non webview article version //UIStoryboard board = UIStoryboard.FromName ("MainStoryboard", null); //NewsDetailController article = (NewsDetailController)board.InstantiateViewController ("newsdetail"); //article.Data = items[indexPath.Row - 1]; // the webview article version var webViewController = new UIViewController (); var button = new UIBarButtonItem ("Back", UIBarButtonItemStyle.Plain, null); var custom = new UIButton (new RectangleF (0, 0, 26, 15)); custom.SetBackgroundImage(UIImage.FromFile("./Assets/back.png"), UIControlState.Normal); custom.TouchUpInside += (sender, e) => webViewController.NavigationController.PopViewControllerAnimated (true); button.CustomView = custom; webViewController.NavigationItem.LeftBarButtonItem = button; var spinner = new UIActivityIndicatorView (UIActivityIndicatorViewStyle.WhiteLarge); spinner.Center = new PointF (160, 160); spinner.HidesWhenStopped = true; var webView = new UIWebView (tableView.Bounds); webView.Opaque = false; webView.BackgroundColor = UIColor.Black; webView.AddSubview (spinner); spinner.StartAnimating (); webView.LoadRequest (new NSUrlRequest (new NSUrl (string.Format(RequestConfig.Article, items[indexPath.Row - 1].SmallId)))); webViewController.View = webView; webViewController.Title = items[indexPath.Row - 1].Category; webView.LoadFinished += (object sender, EventArgs e) => { spinner.StopAnimating(); }; ((MainTabController)UIApplication.SharedApplication.Delegate.Window.RootViewController). News.InternalTopNavigation.PushViewController (webViewController,true); tableView.DeselectRow (indexPath, true); }
public static void LoadWebViewWithAd(UITapGestureRecognizer tap, Ad ad, UIView mainView) { if (Reachability.IsHostReachable(Settings._baseDomain)) { LoadingOverlay loadingOverlay = new LoadingOverlay(mainView.Frame); var frame = new CGRect(0, 0, mainView.Bounds.Width, mainView.Bounds.Height); var webView = new UIWebView(frame); webView.LoadFinished += (sender, e) => { loadingOverlay.Hide(); }; var url = ad.AircraftForSaleURL; //commenting to test banmanpro //var url = "https://www.globalair.com/banmanpro/ad.aspx?ZoneID=94&Task=Get&Mode=HTML&SiteID=1&PageID=78751"; webView.LoadRequest(new NSUrlRequest(new NSUrl(url))); UIView.BeginAnimations("fadeflag"); UIView.Animate(1, () => { tap.View.Alpha = .5f; }, () => { mainView.AddSubview(webView); mainView.AddSubview(loadingOverlay); UIButton closeButton = new UIButton(new CGRect(mainView.Bounds.Width - 75, 0, 75, 50)); closeButton.SetImage(UIImage.FromBundle("close"), UIControlState.Normal); closeButton.BackgroundColor = UIColor.Black; closeButton.TouchUpInside += (sender, e) => { try { webView.RemoveFromSuperview(); closeButton.RemoveFromSuperview(); } finally { webView.Dispose(); } }; int width, height; if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad) { width = 110; height = 75; } else { width = 60; height = 40; } UIImageView imageView = new UIImageView(new CGRect(mainView.Bounds.Width - width, mainView.Bounds.Height / 2, width, height)); imageView.Image = UIImage.FromBundle("swipe_left"); imageView.Alpha = .5f; imageView.UserInteractionEnabled = true; imageView.BackgroundColor = UIColor.Gray; imageView.ContentMode = UIViewContentMode.ScaleAspectFit; imageView.Layer.CornerRadius = 20; //imageView.MultipleTouchEnabled = true; webView.AddSubview(imageView); webView.AddSubview(closeButton); tap.View.Alpha = 1f; }); UIView.CommitAnimations(); } else { SendBasicAlert("Connect to a Network", "Please connect to a network to view this ad"); } }
public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { var cell = tableView.CellAt(indexPath); if (Reachability.IsHostReachable(Settings._baseDomain)) { var ad = Owner.FavoritesAdList[indexPath.Row]; var statusBarHeight = UIApplication.SharedApplication.StatusBarFrame.Height; var tabBarHeight = Owner.TabBarController.TabBar.Bounds.Height; var frame = new CGRect(0, statusBarHeight, Owner.View.Bounds.Width, Owner.View.Bounds.Height - (statusBarHeight + tabBarHeight)); var webView = new UIWebView(frame); LoadingOverlay loadingOverlay = new LoadingOverlay(Owner.View.Frame); webView.LoadFinished += (sender, e) => { loadingOverlay.Hide(); }; var url = ad.AircraftForSaleURL; webView.LoadRequest(new NSUrlRequest(new NSUrl(url))); UIView.BeginAnimations("fadeflag"); UIView.Animate(1, () => { cell.Alpha = .5f; }, () => { Owner.View.AddSubview(webView); Owner.View.AddSubview(loadingOverlay); UIButton closeButton = new UIButton(new CGRect(Owner.View.Bounds.Width - 50, 0, 50, 50)); closeButton.SetImage(UIImage.FromBundle("close"), UIControlState.Normal); closeButton.BackgroundColor = UIColor.Black; closeButton.TouchUpInside += (sender, e) => { try { webView.RemoveFromSuperview(); closeButton.RemoveFromSuperview(); } finally { webView.Dispose(); } }; //Owner.View.AddSubview(closeButton); webView.AddSubview(closeButton); cell.Alpha = 1f; }); UIView.CommitAnimations(); //} } else { HelperMethods.SendBasicAlert("Connect to a Network", "Please connect to a network to view this ad"); } tableView.DeselectRow(indexPath, true); }
public override void ViewDidLoad() { base.ViewDidLoad(); this.Title = "More"; var navBar = NavigationController.NavigationBar; navBar.BarTintColor = UIColor.White; nfloat ScreenWidth = UIScreen.MainScreen.Bounds.Width; nfloat ScreenHeight = UIScreen.MainScreen.Bounds.Height; navBar.ShadowImage = new UIImage(); var ContactView = new UIView(new CGRect(0, 0, ScreenWidth, 300)) { BackgroundColor = UIColor.White }; var ContactUsView = new UIViewWithBorders(new CGRect(0, 0, ScreenWidth, 55)) { BackgroundColor = UIColor.Clear.FromHexString(RSColors.RS_LIGHT_GRAY_4) }; ContactUsView.BorderWidth = new UIEdgeInsets(1, 1, 1, 1); ContactUsView.BorderColorBottom = UIColor.Clear.FromHexString(RSColors.RS_LIGHT_GRAY_5); var ContactUsLabel = new UILabel(new CGRect(16, 15, ScreenWidth - 32, 39)) { Font = UIFont.FromName("HelveticaNeue", 12f), TextAlignment = UITextAlignment.Left, Text = "CONTACT US", TextColor = UIColor.Clear.FromHexString (RSColors.RS_DARK_GRAY), BackgroundColor = UIColor.Clear.FromHexString(RSColors.RS_LIGHT_GRAY_4) }; ContactUsView.Add(ContactUsLabel); ContactView.AddSubview(ContactUsView); //WebView var settingWebView = new UIWebView(new CGRect(0, ContactUsView.Frame.Height + ContactUsView.Frame.Y + 10, ContactUsView.Frame.Width, ContactView.Frame.Height - 120)); loadingOverlay = new LoadingOverlay(settingWebView.Bounds); settingWebView.ScrollView.ScrollEnabled = false; settingWebView.AddSubview(loadingOverlay); ContactView.AddSubview(settingWebView); settingWebView.LoadRequest(new NSUrlRequest(new NSUrl(UrlConsts.URL_MORE_CONTACT_INFO))); settingWebView.LoadFinished += (sender, e) => { if (loadingOverlay != null) { loadingOverlay.Hide(); loadingOverlay = null; } }; settingWebView.BackgroundColor = UIColor.White; var MoreView = new UIView(new CGRect(-1, settingWebView.Frame.Height + settingWebView.Frame.Y + 1, ScreenWidth + 2, 55)) { BackgroundColor = UIColor.Clear.FromHexString(RSColors.RS_LIGHT_GRAY_4), }; var MoreLabel = new UILabel(new CGRect(8, 15, 60, 39)) { Font = UIFont.FromName("HelveticaNeue", 12f), TextAlignment = UITextAlignment.Left, Text = " MORE", TextColor = UIColor.Clear.FromHexString (RSColors.RS_DARK_GRAY) }; MoreView.Layer.BorderWidth = 1; MoreView.Layer.BorderColor = UIColor.Clear.FromHexString(RSColors.RS_LIGHT_GRAY_5).CGColor; MoreView.AddSubview(MoreLabel); ContactView.AddSubview(MoreView); var SettingsTableData = new List<SettingsItem>(); var profileItem = new SettingsItem { EntryData = new TableData { Title = "Personal Information" }, OnClickAction = "PushProfile" }; SettingsTableData.Add(profileItem); var changeLogInItem = new SettingsItem { EntryData = new TableData { Title = "Change Log In" }, OnClickAction = "PushChangeLogIn" }; SettingsTableData.Add(changeLogInItem); var retireLinkItem = new SettingsItem { EntryData = new TableData { Title = "Go to www.TextShield.com" }, OnClickAction = "LaunchTextShieldWeb" }; SettingsTableData.Add(retireLinkItem); var policyItem = new SettingsItem { EntryData = new TableData { Title = "Privacy Policy" }, OnClickAction = "PushPrivatePolicy" }; SettingsTableData.Add(policyItem); var legalItem = new SettingsItem { EntryData = new TableData { Title = "Legal" }, OnClickAction = "PushLegal" }; SettingsTableData.Add(legalItem); var termsItem = new SettingsItem { EntryData = new TableData { Title = "Terms of Use" }, OnClickAction = "PushTermsConditions" }; SettingsTableData.Add(termsItem); var versionItem = new SettingsItem { EntryData = new TableData { Title = "About" }, OnClickAction = "About" }; SettingsTableData.Add(versionItem); var TableViewSource = new SettingsTableViewSource(this, SettingsTableData); CGRect SettingsTableViewFrame; CGRect LogoutButtonFrame; var statusNavHeight = NavigationController.NavigationBar.Frame.Height + UIApplication.SharedApplication.StatusBarFrame.Height; SettingsTableViewFrame = new CGRect(0, statusNavHeight, View.Frame.Width, View.Frame.Height - TabBarController.TabBar.Frame.Height - statusNavHeight); LogoutButtonFrame = new CoreGraphics.CGRect(-10, 15f, View.Frame.Width + 10, 55f); UITableView SettingsTableView = new UITableView(SettingsTableViewFrame); var LogoutButton = new UIButton(LogoutButtonFrame); var LogoutView = new UIViewWithBorders(new CGRect(0, 0, View.Frame.Width, 90f)); LogoutView.BackgroundColor = UIColor.Clear.FromHexString(RSColors.RS_LIGHT_GRAY_4); LogoutButton.SetTitle("LOG OUT", UIControlState.Normal); LogoutButton.HorizontalAlignment = UIControlContentHorizontalAlignment.Center; LogoutButton.Font = UIFont.FromName("HelveticaNeue-Medium", 14f); LogoutButton.SetTitleColor(UIColor.FromRGB(255, 54, 54), UIControlState.Normal); LogoutButton.BackgroundColor = UIColor.White; LogoutButton.Layer.BorderWidth = 1; LogoutButton.Layer.BorderColor = UIColor.Clear.FromHexString(RSColors.RS_LIGHT_GRAY_5).CGColor; SettingsTableView.SeparatorInset = new UIEdgeInsets(0, 16, 0, 0); if (!UIDevice.CurrentDevice.CheckSystemVersion(9, 0)) { SettingsTableView.ContentInset = new UIEdgeInsets(statusNavHeight * -1, 0, 0, 0); } LogoutView.Add(LogoutButton); SettingsTableView.BackgroundColor = UIColor.Clear.FromHexString(RSColors.RS_LIGHT_GRAY_4); SettingsTableView.TableHeaderView = ContactView; SettingsTableView.TableFooterView = LogoutView; LogoutView.BorderWidth = new UIEdgeInsets(1, 1, 1, 1); LogoutView.BorderColorTop = UIColor.Clear.FromHexString(RSColors.RS_LIGHT_GRAY_5); SettingsTableView.Source = TableViewSource; SettingsTableView.ReloadData(); SettingsTableView.ScrollIndicatorInsets = new UIEdgeInsets(0, 0, 0, 0); View.AddSubview(SettingsTableView); View.BackgroundColor = UIColor.Clear.FromHexString(RSColors.RS_LIGHT_GRAY_4); LogoutButton.TouchUpInside += (object sender, EventArgs e) => { NSUserDefaults.StandardUserDefaults.SetBool(true, TouchIDUtil.TouchIDSettings.UserLogout.ToString()); base.InvalidateSession(); }; }