Skip to content

Commit 52c201e

Browse files
author
ignacio
committed
Removes the required intrinsicContentSize from SLKTypingIndicatorProtocol. No really needed since we're using systemLayoutSizeFittingSize: internally.
1 parent 94857d8 commit 52c201e

File tree

3 files changed

+10
-17
lines changed

3 files changed

+10
-17
lines changed

Examples/Messenger-Shared/TypingIndicatorView.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ - (void)configureSubviews
4747

4848
#pragma mark - SLKTypingIndicatorProtocol
4949

50-
- (CGSize)intrinsicContentSize
51-
{
52-
return CGSizeMake(UIViewNoIntrinsicMetric, [self height]);
53-
}
54-
5550
- (void)dismissIndicator
5651
{
5752
if (self.isVisible) {
@@ -120,6 +115,11 @@ - (CAGradientLayer *)backgroundGradient
120115
return _backgroundGradient;
121116
}
122117

118+
- (CGSize)intrinsicContentSize
119+
{
120+
return CGSizeMake(UIViewNoIntrinsicMetric, [self height]);
121+
}
122+
123123
- (CGFloat)height
124124
{
125125
CGFloat height = 13.0;

Source/Classes/SLKTypingIndicatorProtocol.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@
2727
*/
2828
@property (nonatomic, getter = isVisible) BOOL visible;
2929

30-
/**
31-
Returns the natural size for the receiving view, considering only properties of the view itself.
32-
SLKTextViewController uses Auto-Layout internally, so this API is the most appropriate way to update the view dimensions dynamically.
33-
You can return UIViewNoIntrinsicMetric for any intrinsic size of a given dimension.
34-
*/
35-
- (CGSize)intrinsicContentSize;
36-
3730
@optional
3831

3932
/**

Source/Classes/SLKTypingIndicatorView.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,6 @@ - (void)slk_commonInit
7777

7878
#pragma mark - SLKTypingIndicatorProtocol
7979

80-
- (CGSize)intrinsicContentSize
81-
{
82-
return CGSizeMake(UIViewNoIntrinsicMetric, [self height]);
83-
}
84-
8580
- (void)setVisible:(BOOL)visible
8681
{
8782
// Skip when updating the same value, specially to avoid inovking KVO unnecessary
@@ -165,6 +160,11 @@ - (NSAttributedString *)attributedString
165160
return attributedString;
166161
}
167162

163+
- (CGSize)intrinsicContentSize
164+
{
165+
return CGSizeMake(UIViewNoIntrinsicMetric, [self height]);
166+
}
167+
168168
- (CGFloat)height
169169
{
170170
CGFloat height = self.textFont.lineHeight;

0 commit comments

Comments
 (0)