Skip to content

Commit

Permalink
Fixes #3
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaston Borba committed Apr 14, 2014
1 parent cd2101b commit a288abc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion XLForm/XL/Cell/XLFormImageSelectorCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,14 @@ -(void)formDescriptorCellDidSelectedWithFormController:(XLFormViewController *)c

-(void)addLayoutConstraints
{
NSDictionary *uiComponents = @{ @"image" : self.imageView };
NSDictionary *uiComponents = @{ @"image" : self.imageView,
@"text" : self.textLabel};

NSDictionary *metrics = @{@"margin":@5.0};

[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(margin)-[text]" options:0 metrics:metrics views:uiComponents]];
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(margin)-[text]" options:0 metrics:metrics views:uiComponents]];


[self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:self.imageView
attribute:NSLayoutAttributeTop
Expand Down

0 comments on commit a288abc

Please sign in to comment.