iOS:fix default gravity to be center
This commit is contained in:
parent
8db686b89b
commit
931c06393e
@ -49,7 +49,6 @@ @interface DoricTextNode ()
|
||||
@implementation DoricTextNode
|
||||
- (UILabel *)build {
|
||||
return [[[DoricTextView alloc] init] also:^(DoricTextView *it) {
|
||||
it.textAlignment = NSTextAlignmentCenter;
|
||||
[self ensureParagraphStyle];
|
||||
}];
|
||||
}
|
||||
@ -163,7 +162,7 @@ - (void)blendView:(UILabel *)view forPropName:(NSString *)name propValue:(id)pro
|
||||
- (NSMutableParagraphStyle *)ensureParagraphStyle {
|
||||
if (self.paragraphStyle == nil) {
|
||||
self.paragraphStyle = [NSMutableParagraphStyle new];
|
||||
self.paragraphStyle.alignment = self.view.textAlignment;
|
||||
self.paragraphStyle.alignment = NSTextAlignmentCenter;
|
||||
self.paragraphStyle.lineBreakMode = NSLineBreakByTruncatingTail;
|
||||
}
|
||||
return self.paragraphStyle;
|
||||
|
Reference in New Issue
Block a user