We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 620b14f commit 1bedeedCopy full SHA for 1bedeed
1 file changed
Coding_iOS/Util/OC_Category/UIButton+Common.m
@@ -63,7 +63,7 @@ - (void)setUserTitle:(NSString *)aUserName{
63
- (void)setUserTitle:(NSString *)aUserName font:(UIFont *)font maxWidth:(CGFloat)maxWidth{
64
[self setTitle:aUserName forState:UIControlStateNormal];
65
CGRect frame = self.frame;
66
- CGFloat titleWidth = [self.titleLabel.text getWidthWithFont:font constrainedToSize:CGSizeMake(kScreen_Width, frame.size.height)];
+ CGFloat titleWidth = [self.titleLabel.text getWidthWithFont:font constrainedToSize:CGSizeMake(CGFLOAT_MAX, frame.size.height)];
67
if (titleWidth > maxWidth) {
68
titleWidth = maxWidth;
69
// self.titleLabel.minimumScaleFactor = 0.5;
0 commit comments