本文整理汇总了C#中UIView.IsAlive方法的典型用法代码示例。如果您正苦于以下问题:C# UIView.IsAlive方法的具体用法?C# UIView.IsAlive怎么用?C# UIView.IsAlive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIView
的用法示例。
在下文中一共展示了UIView.IsAlive方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Raise
public static void Raise(UIView view, bool recursively)
{
if (view.IsAlive())
GetOrAdd(view).Raise(recursively);
}
示例2: UpdateWindowOrientation
private void UpdateWindowOrientation(UIView view)
{
if (!view.IsAlive())
return;
float num = 0f;
if (!PlatformExtensions.IsOS8)
{
switch (UIApplication.SharedApplication.StatusBarOrientation)
{
case UIInterfaceOrientation.PortraitUpsideDown:
num = 180f;
break;
case UIInterfaceOrientation.LandscapeRight:
num = 90f;
break;
case UIInterfaceOrientation.LandscapeLeft:
num = -90f;
break;
}
}
if (num == 0f)
{
view.Transform = CGAffineTransform.MakeIdentity();
view.Center = GetCenterPoint(view);
}
else
{
view.Transform = CGAffineTransform.MakeRotation((float)(num / 180f * Math.PI));
view.Center = GetCenterPointRotated(view, num);
}
}
示例3: GetParent
private static object GetParent(UIView view)
{
if (!view.IsAlive())
return null;
var controller = view.NextResponder as UIViewController;
if (controller != null && controller.View == view)
return controller;
return view.Superview;
}
示例4: Raise
private void Raise(out UIView view)
{
view = GetSource();
if (!view.IsAlive())
{
view = null;
return;
}
if (_isAttached)
return;
object parent = GetParent(view);
if (ReferenceEquals(parent, _parent.Target))
return;
_parent = ToolkitExtensions.GetWeakReferenceOrDefault(parent, Empty.WeakReference, false);
Raise(view, EventArgs.Empty);
}