feat:add maxLines
This commit is contained in:
parent
3d403d5178
commit
f8a420b427
@ -428,7 +428,7 @@ - (void)layoutSelf:(CGSize)targetSize {
|
|||||||
if (!childConfig) {
|
if (!childConfig) {
|
||||||
childConfig = [DoricLayoutConfig new];
|
childConfig = [DoricLayoutConfig new];
|
||||||
}
|
}
|
||||||
|
|
||||||
CGSize size = [child measureSize:CGSizeMake(
|
CGSize size = [child measureSize:CGSizeMake(
|
||||||
targetSize.width - xStart - padding.right,
|
targetSize.width - xStart - padding.right,
|
||||||
targetSize.height - padding.top - padding.bottom)];
|
targetSize.height - padding.top - padding.bottom)];
|
||||||
|
@ -86,6 +86,7 @@ - (UITableView *)build {
|
|||||||
it.dataSource = self;
|
it.dataSource = self;
|
||||||
it.delegate = self;
|
it.delegate = self;
|
||||||
it.separatorStyle = UITableViewCellSeparatorStyleNone;
|
it.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||||
|
it.allowsSelection = NO;
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +48,8 @@ - (void)blendView:(UILabel *)view forPropName:(NSString *)name propValue:(id)pro
|
|||||||
alignment = NSTextAlignmentRight;
|
alignment = NSTextAlignmentRight;
|
||||||
}
|
}
|
||||||
view.textAlignment = alignment;
|
view.textAlignment = alignment;
|
||||||
|
} else if ([name isEqualToString:@"maxLines"]) {
|
||||||
|
view.numberOfLines = [prop integerValue];
|
||||||
} else {
|
} else {
|
||||||
[super blendView:view forPropName:name propValue:prop];
|
[super blendView:view forPropName:name propValue:prop];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user