Skip to content

Commit

Permalink
Reduce max width allowable to new iPhone 6S+ limit (identified in #118).
Browse files Browse the repository at this point in the history
  • Loading branch information
cbpowell committed Nov 1, 2015
1 parent 510815c commit 2e6f92c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MarqueeLabel.m
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,8 @@ - (CGSize)subLabelSize {

// Get size of subLabel
expectedLabelSize = [self.subLabel sizeThatFits:maximumLabelSize];
// Sanitize width to 8192 (largest width a UILabel will draw)
expectedLabelSize.width = ceil(MIN(expectedLabelSize.width, 8192.0f));
// Sanitize width to 5461.0f (largest width a UILabel will draw on an iPhone 6S Plus)
expectedLabelSize.width = ceil(MIN(expectedLabelSize.width, 5461.0f));
// Adjust to own height (make text baseline match normal label)
expectedLabelSize.height = self.bounds.size.height;

Expand Down

0 comments on commit 2e6f92c

Please sign in to comment.