void ReleaseDesignerOutlets() { if (ScrollViewClients != null) { ScrollViewClients.Dispose(); ScrollViewClients = null; } if (UILabelClientsTitle != null) { UILabelClientsTitle.Dispose(); UILabelClientsTitle = null; } if (UIViewClientsCall != null) { UIViewClientsCall.Dispose(); UIViewClientsCall = null; } if (UIViewClientsContactUs != null) { UIViewClientsContactUs.Dispose(); UIViewClientsContactUs = null; } if (UIViewClientsPactiacom != null) { UIViewClientsPactiacom.Dispose(); UIViewClientsPactiacom = null; } }
public override void ViewDidLoad() { base.ViewDidLoad(); LoadUILabelText(UILabelClientsTitle, "CLIENTE PACTIA"); #region Gestures UITapGestureRecognizer UIImageViewTap1 = new UITapGestureRecognizer(() => { try { iOSFunctions.OpenUrl(@"http://pactia.com"); } catch (Exception) { SimpleAlert("Alerta", "Ha ocurrido un error al intentar abrir el enlace"); } }); UIViewClientsPactiacom.UserInteractionEnabled = true; UIViewClientsPactiacom.AddGestureRecognizer(UIImageViewTap1); UITapGestureRecognizer UIImageViewTap2 = new UITapGestureRecognizer(() => { Service service = new Service(); Constants constants = new Constants(); try { Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=06"); iOSFunctions.CallPhone("tel:" + lineas.Telefono); } catch (Exception) { SimpleAlert("Alerta", "Ha ocurrido un error al intentar realizar la llamada"); } }); UIViewClientsCall.UserInteractionEnabled = true; UIViewClientsCall.AddGestureRecognizer(UIImageViewTap2); UITapGestureRecognizer UIImageViewTap3 = new UITapGestureRecognizer(() => { try { ContactViewController viewController = this.Storyboard.InstantiateViewController("ContactViewControllerId") as ContactViewController; viewController.BusinessLine = "Portafolio"; viewController.SubBusinessLine = "Portafolio"; this.NavigationController.PushViewController(viewController, true); } catch (Exception) { SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción"); } }); UIViewClientsContactUs.UserInteractionEnabled = true; UIViewClientsContactUs.AddGestureRecognizer(UIImageViewTap3); #endregion }