1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-02 09:27:55 +01:00
Telegram/Telegraph/TGModernConversationControllerView.m
2015-10-01 19:19:52 +03:00

42 lines
847 B
Objective-C

#import "TGModernConversationControllerView.h"
@interface TGModernConversationControllerView () {
CGSize _validSize;
}
@end
@implementation TGModernConversationControllerView
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self != nil) {
_validSize = frame.size;
}
return self;
}
- (void)setFrame:(CGRect)frame {
[super setFrame:frame];
if (!CGSizeEqualToSize(_validSize, frame.size)) {
_validSize = frame.size;
if (_layoutForSize) {
_layoutForSize(frame.size);
}
}
}
- (void)setBounds:(CGRect)bounds {
[super setBounds:bounds];
if (!CGSizeEqualToSize(_validSize, bounds.size)) {
_validSize = bounds.size;
if (_layoutForSize) {
_layoutForSize(bounds.size);
}
}
}
@end