Skip to content

Commit

Permalink
uilabel取消自动使用属性文本
Browse files Browse the repository at this point in the history
  • Loading branch information
郑立宝 committed Sep 11, 2024
1 parent d26c4fc commit 67f332f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion FlexLib.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'FlexLib'
s.version = '3.4.0'
s.version = '3.4.1'
s.summary = 'An obj-c flex layout framework for IOS & mac'

# This description is used to generate tags and improve search results.
Expand Down
2 changes: 2 additions & 0 deletions FlexLib/Classes/Flexlib/ViewExt/UILabel+Flex.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

@interface UILabel (Flex)

-(NSMutableParagraphStyle*)paraStyle;

/*
* 设置Attributed string,仅针对UILabel中包含子元素的情况下有效
* 调用完后需要调用updateAttributeText方法来更新attributedText
Expand Down
4 changes: 0 additions & 4 deletions FlexLib/Classes/Flexlib/ViewExt/UILabel+Flex.m
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ -(BOOL)buildChildElements:(NSArray<FlexNode*>*)childElems
FLEXSET(text)
{
self.text = sValue;
[self updateAttributeText];
}
FLEXSET(fontSize)
{
Expand All @@ -327,7 +326,6 @@ -(BOOL)buildChildElements:(NSArray<FlexNode*>*)childElems

NSMutableParagraphStyle* style=[self paraStyle];
style.lineBreakMode = n;
[self updateAttributeText];
}
FLEXSET(linesNum)
{
Expand Down Expand Up @@ -364,7 +362,6 @@ -(BOOL)buildChildElements:(NSArray<FlexNode*>*)childElems

NSMutableParagraphStyle* style=[self paraStyle];
style.alignment = self.textAlignment;
[self updateAttributeText];
}
FLEXSET(interactEnable)
{
Expand All @@ -379,7 +376,6 @@ -(BOOL)buildChildElements:(NSArray<FlexNode*>*)childElems
FLEXSET(value)
{
self.text = sValue;
[self updateAttributeText];
}

-(NSMutableParagraphStyle*)paraStyle
Expand Down

0 comments on commit 67f332f

Please sign in to comment.