-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
The Input element does not seem to follow the .childAlignment(.Stretch) property. I have attached a screenshot (I'm bad at designing but these colors are used for clarity of the issue 😉) and the example view code. I believe my code is right as the "Welcome!" Label and the bottom border views are stretched. BUT please let me know if it is something with just my code 😇
Screenshot (duh)
Code (even more duh)
return View(backgroundColor: UIColor.lightGrayColor())
.justification(.FlexStart)
.childAlignment(.Center)
.direction(.Column)
.children([
View(backgroundColor: UIColor.orangeColor())
.childAlignment(.Stretch)
.direction(.Column)
.width(300)
.margin(Edges(left: 0, right: 0, bottom: 0, top: 80))
.padding(Edges(left: 20, right: 20, bottom: 20, top: 20))
.children([
// Label
{ () -> Label in
let l = Label("Welcome!",
textColor: UIColor.darkGrayColor(),
font: UIFont.boldSystemFontOfSize(26))
.margin(Edges(left: 0, right: 0, bottom: 20, top: 0))
l.selfAlignment(.Center)
return l
}(),
// Input - Email
Input(textColor: UIColor.blackColor(),
placeholder: "Email",
keyboardType: UIKeyboardType.EmailAddress,
returnKeyType: UIReturnKeyType.Next,
borderStyle: UITextBorderStyle.RoundedRect)
.margin(Edges(left: 0, right: 0, bottom: 0, top: 0)),
// Border View
View(backgroundColor: UIColor.darkGrayColor())
.height(1)
.margin(Edges(left: 0, right: 0, bottom: 20, top: 2)),
// Input - Password
Input(textColor: UIColor.blackColor(),
placeholder: "Password",
returnKeyType: UIReturnKeyType.Done,
secure: true),
// Border View
View(backgroundColor: UIColor.darkGrayColor())
.height(1)
.margin(Edges(left: 0, right: 0, bottom: 10, top: 2))
])Metadata
Metadata
Assignees
Labels
No labels
