本文整理汇总了C#中UIImageView.Above方法的典型用法代码示例。如果您正苦于以下问题:C# UIImageView.Above方法的具体用法?C# UIImageView.Above怎么用?C# UIImageView.Above使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIImageView
的用法示例。
在下文中一共展示了UIImageView.Above方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VisualEditorViewController
public VisualEditorViewController()
{
View.BackgroundColor = Styling.Colors.BackgroundColor;
View.AddGestureRecognizer(new UITapGestureRecognizer(ViewTap));
var discountLabel = new UILabel
{
BackgroundColor = Styling.Colors.Green,
Text = "25% OFF YOUR FIRST ORDER IF YOU SIGN UP BY 9/1",
Font = UIFont.FromName("Gotham-Medium", 11),
TextColor = UIColor.White,
TextAlignment = UITextAlignment.Center
};
var image = new UIImageView
{
Image = UIImage.FromBundle("Images/widgetCoLogo_red"),
};
var emailLabel = new UILabel
{
Text = "Email",
Font = UIFont.FromName("Gotham-Light", 10)
};
var emailField = new CustomTextField
{
Placeholder = "[email protected]"
};
var phoneLabel = new UILabel
{
Text = "Phone Number:",
Font = UIFont.FromName("Gotham-Light", 10)
};
var phoneField = new CustomTextField
{
Placeholder = "(555)-555-5555"
};
var passwordLabel = new UILabel
{
Text = "Password",
Font = UIFont.FromName("Gotham-Light", 10)
};
var passwordField = new CustomTextField
{
SecureTextEntry = true,
};
var button = new CustomButton
{
TitleText = "Take me to the widgets"
};
View.AddSubviews(emailLabel, emailField, phoneLabel, phoneField, passwordLabel, passwordField, button, discountLabel, image);
View.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();
View.AddConstraints(
discountLabel.WithSameTop(View),
discountLabel.WithSameLeft(View),
discountLabel.WithSameRight(View),
discountLabel.Height().EqualTo(30),
phoneLabel.WithSameLeft(phoneField),
phoneLabel.WithSameCenterY(View),
phoneField.WithSameCenterX(View),
phoneField.Height().EqualTo(30),
phoneField.Width().EqualTo(200),
phoneField.Below(phoneLabel).Plus(5),
emailField.WithSameLeft(phoneField),
emailField.WithSameWidth(phoneField),
emailField.WithSameHeight(phoneField),
emailField.Above(phoneLabel).Minus(15),
emailLabel.WithSameLeft(phoneField),
emailLabel.Above(emailField).Minus(5),
image.WithSameCenterX(View),
image.Above(emailLabel).Minus(15),
passwordLabel.WithSameLeft(phoneField),
passwordLabel.Below(phoneField).Plus(15),
passwordField.WithSameLeft(phoneField),
passwordField.WithSameWidth(phoneField),
passwordField.WithSameHeight(phoneField),
passwordField.Below(passwordLabel).Plus(5),
button.Below(passwordField).Plus(20),
button.WithSameCenterX(View),
button.WithSameWidth(phoneField),
button.Height().EqualTo(50)
);
}