void ReleaseDesignerOutlets() { if (Backbutton != null) { Backbutton.Dispose(); Backbutton = null; } if (GonderButton != null) { GonderButton.Dispose(); GonderButton = null; } if (Headerview != null) { Headerview.Dispose(); Headerview = null; } if (MesajTextView != null) { MesajTextView.Dispose(); MesajTextView = null; } if (textField != null) { textField.Dispose(); textField = null; } }
public override void ViewDidLoad() { base.ViewDidLoad(); MesajTextView.Changed += MesajTextView_Changed; List <ContactDTO> KonuList = new List <ContactDTO> { new ContactDTO { topic = "Teknik Sorun" }, new ContactDTO { topic = "Şikayet" }, new ContactDTO { topic = "Öneri" }, new ContactDTO { topic = "Diğer" } }; for (int i = 0; i < KonuList.Count; i++) { KonuName.Add(KonuList[i].topic); } SetupPicker(textField, KonuName); GonderButton.TouchUpInside += GonderButton_TouchUpInside; #region DONE BUtton UIToolbar toolbar = new UIToolbar(); toolbar.BarStyle = UIBarStyle.Default; toolbar.Translucent = true; toolbar.SizeToFit(); var gradientLayer = new CAGradientLayer(); gradientLayer.Colors = new[] { UIColor.FromRGB(15, 0, 241).CGColor, UIColor.FromRGB(2, 0, 100).CGColor }; gradientLayer.Locations = new NSNumber[] { 0, 1 }; gradientLayer.StartPoint = new CoreGraphics.CGPoint(0, 1); gradientLayer.EndPoint = new CoreGraphics.CGPoint(1, 0); gradientLayer.Frame = toolbar.Bounds; toolbar.Layer.MasksToBounds = true; toolbar.Layer.InsertSublayer(gradientLayer, 0); UIBarButtonItem doneButton = new UIBarButtonItem("Tamam", UIBarButtonItemStyle.Done, (s, e) => { MesajTextView.ResignFirstResponder(); }); doneButton.TintColor = UIColor.White; toolbar.SetItems(new[] { new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace), doneButton }, true); MesajTextView.InputAccessoryView = toolbar; #endregion }