Files
react-native-svg/apple/Text/RNSVGTopAlignedLabel.macos.mm
Wojciech Lewicki 98c14b4f45 chore: add CI for JS, iOS and Android formatting (#1782)
Added CI workflow and local pre-commit hook for formatting and linting the newly added JS, iOS and Android code.
2022-08-16 12:00:32 +02:00

56 lines
936 B
Plaintext

#import "RNSVGTopAlignedLabel.h"
@implementation RNSVGTopAlignedLabel
- (NSAttributedString *)attributedText
{
return self.attributedString;
}
- (NSLineBreakMode)lineBreakMode
{
return self.textContainer.lineBreakMode;
}
- (NSInteger)numberOfLines
{
return self.textContainer.maximumNumberOfLines;
}
- (NSString *)text
{
return self.string;
}
- (NSTextAlignment)textAlignment
{
return self.alignment;
}
- (void)setAttributedText:(NSAttributedString *)attributedString
{
[self.textStorage setAttributedString:attributedString];
}
- (void)setLineBreakMode:(NSLineBreakMode)lineBreakMode
{
self.textContainer.lineBreakMode = lineBreakMode;
}
- (void)setNumberOfLines:(NSInteger)numberOfLines
{
self.textContainer.maximumNumberOfLines = numberOfLines;
}
- (void)setText:(NSString *)text
{
self.string = text;
}
- (void)setTextAlignment:(NSTextAlignment)textAlignment
{
self.alignment = textAlignment;
}
@end