本文整理汇总了C#中UITableView.Height方法的典型用法代码示例。如果您正苦于以下问题:C# UITableView.Height方法的具体用法?C# UITableView.Height怎么用?C# UITableView.Height使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UITableView
的用法示例。
在下文中一共展示了UITableView.Height方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadView
public override void LoadView ()
{
base.LoadView ();
isUserLogged = UserDefaults.BoolForKey (IsUserLoggedKey);
isAppActive = UserDefaults.BoolForKey (AppActiveEntryKey);
isAppOnBackground = UserDefaults.BoolForKey (AppBackgroundEntryKey);
marginTop = (isUserLogged && isAppActive) ? 10f : 1f;
height = (isUserLogged && isAppActive) ? 250f : 62f; // 4 x 60f(cells),
var v = new UIView {
BackgroundColor = UIColor.Clear,
Frame = new CGRect (0,0, UIScreen.MainScreen.Bounds.Width, height),
};
v.Add (tableView = new UITableView {
TranslatesAutoresizingMaskIntoConstraints = false,
BackgroundColor = UIColor.Clear,
TableFooterView = new UIView(),
ScrollEnabled = false,
RowHeight = cellHeight,
});
v.Add (openAppView = new UIView {
TranslatesAutoresizingMaskIntoConstraints = false,
Hidden = true,
});
UIView bg;
openAppView.Add (bg = new UIView {
TranslatesAutoresizingMaskIntoConstraints = false,
BackgroundColor = UIColor.Black,
Alpha = 0.1f,
});
UILabel textView;
openAppView.Add (textView = new UILabel {
TranslatesAutoresizingMaskIntoConstraints = false,
Font = UIFont.FromName ("Helvetica", 13f),
Text = isAppActive ? "NoLoggedUser".Tr() : "NoActiveApp".Tr(),
TextColor = UIColor.White,
BackgroundColor = UIColor.Clear,
});
openAppView.Add (openAppBtn = new StartStopBtn {
TranslatesAutoresizingMaskIntoConstraints = false,
IsActive = true,
});
openAppView.AddConstraints (
bg.AtTopOf (openAppView),
bg.AtLeftOf (openAppView),
bg.AtRightOf (openAppView),
bg.AtBottomOf (openAppView),
textView.WithSameCenterY (openAppView),
textView.AtLeftOf (openAppView, 50f),
textView.WithSameHeight (openAppView),
textView.AtRightOf (openAppView),
openAppBtn.Width().EqualTo (35f),
openAppBtn.Height().EqualTo (35f),
openAppBtn.AtRightOf (openAppView, 15f),
openAppBtn.WithSameCenterY (openAppView),
null
);
v.AddConstraints (
tableView.AtTopOf (v),
tableView.WithSameWidth (v),
tableView.Height().EqualTo (height - marginTop).SetPriority (UILayoutPriority.DefaultLow),
tableView.AtBottomOf (v),
openAppView.AtTopOf (v),
openAppView.WithSameWidth (v),
openAppView.Height().EqualTo (cellHeight),
null
);
View = v;
}