From b35d4cd8ecdfe018a64d9e7d4386c0b31da4a410 Mon Sep 17 00:00:00 2001 From: isaced Date: Fri, 6 Nov 2015 12:07:01 +0800 Subject: [PATCH] simple fix scrren rotation --- ISEmojiView/ISEmojiView.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ISEmojiView/ISEmojiView.m b/ISEmojiView/ISEmojiView.m index 004f115..003085c 100644 --- a/ISEmojiView/ISEmojiView.m +++ b/ISEmojiView/ISEmojiView.m @@ -112,6 +112,8 @@ static const CGFloat EmojiFontSize = 32; // default allow animation self.popAnimationEnable = YES; + + self.scrollView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; } return self; } @@ -144,7 +146,7 @@ static const CGFloat EmojiFontSize = 32; // Animation emojibutton UIButton *animationEmojiButton = [UIButton buttonWithType:UIButtonTypeCustom];; [animationEmojiButton setTitle: [button titleForState:UIControlStateNormal] forState:UIControlStateNormal]; - animationEmojiButton.titleLabel.font = [UIFont fontWithName:@"Apple color emoji" size:EmojiFontSize];\ + animationEmojiButton.titleLabel.font = [UIFont fontWithName:@"Apple color emoji" size:EmojiFontSize]; // Conver frame from scrollview to self and add to self animationEmojiButton.frame = [button.superview convertRect:button.frame toView:self];