Skip to content

Commit

Permalink
copy observers before enumerate
Browse files Browse the repository at this point in the history
  • Loading branch information
ibireme committed Mar 15, 2016
1 parent c696ed0 commit a64f0e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion YYText/Component/YYTextKeyboardManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ - (void)_notifyAllObservers {
}

if (!CGRectEqualToRect(trans.toFrame, _fromFrame)) {
for (id<YYTextKeyboardObserver> observer in _observers) {
for (id<YYTextKeyboardObserver> observer in _observers.copy) {
if ([observer respondsToSelector:@selector(keyboardChangedWithTransition:)]) {
[observer keyboardChangedWithTransition:trans];
}
Expand Down

0 comments on commit a64f0e6

Please sign in to comment.