本文整理汇总了C#中UITextField.RemoveFromSuperview方法的典型用法代码示例。如果您正苦于以下问题:C# UITextField.RemoveFromSuperview方法的具体用法?C# UITextField.RemoveFromSuperview怎么用?C# UITextField.RemoveFromSuperview使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UITextField
的用法示例。
在下文中一共展示了UITextField.RemoveFromSuperview方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DismissKeyboard
public static void DismissKeyboard(this UIView view)
{
var tv = new UITextField (new RectangleF(-100,-100,1,1));
view.AddSubview (tv);
tv.BecomeFirstResponder ();
tv.ResignFirstResponder ();
tv.RemoveFromSuperview ();
tv.Dispose ();
}
示例2: ShowPicker
public void ShowPicker()
{
if(PickerShown != null)
PickerShown(this,null);
LayoutSubviews ();
pickerView.BringSubviewToFront(closeBtn);
pickerVisible = true;
var parentView = ViewForPicker ?? this.Superview;
var parentFrame = parentView.Frame;
//closeView = new TapableView(parentView.Bounds);
//closeView.Tapped += delegate{
// HidePicker();
//};
pickerView.Frame = pickerView.Frame.SetLocation(new PointF(0,parentFrame.Height));
UIView.BeginAnimations("slidePickerIn");
UIView.SetAnimationDuration(0.3);
UIView.SetAnimationDelegate(this);
UIView.SetAnimationDidStopSelector (new Selector ("fadeInDidFinish"));
//parentView.AddSubview(closeView);
parentView.AddSubview(pickerView);
var tb = new UITextField(new RectangleF(0,-100,15,25));
//closeView.AddSubview(tb);
tb.BecomeFirstResponder();
tb.ResignFirstResponder();
tb.RemoveFromSuperview();
pickerView.Frame = pickerView.Frame.SetLocation(new PointF(0,parentFrame.Height - pickerView.Frame.Height));
UIView.CommitAnimations();
}