diff --git a/cocos2dx/platform/ios/EAGLView.h b/cocos2dx/platform/ios/EAGLView.h index 5f10b7795e..64c83233ab 100755 --- a/cocos2dx/platform/ios/EAGLView.h +++ b/cocos2dx/platform/ios/EAGLView.h @@ -109,7 +109,7 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved. @property(readwrite, copy) UITextRange *selectedTextRange; @property(nonatomic, readonly) id tokenizer; @property(nonatomic, readonly, getter = isKeyboardShown) BOOL isKeyboardShown; -@property(nonatomic, retain) NSNotification* keyboardShowNotification; +@property(nonatomic, copy) NSNotification* keyboardShowNotification; /** creates an initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer */ + (id) viewWithFrame:(CGRect)frame; /** creates an initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer */ diff --git a/cocos2dx/platform/ios/EAGLView.mm b/cocos2dx/platform/ios/EAGLView.mm index 693ad31fdf..52ddaac951 100755 --- a/cocos2dx/platform/ios/EAGLView.mm +++ b/cocos2dx/platform/ios/EAGLView.mm @@ -243,7 +243,7 @@ static EAGLView *view = 0; - (void) dealloc { [renderer_ release]; - [self.keyboardShowNotification release]; + self.keyboardShowNotification = NULL; // implicit release [super dealloc]; } @@ -825,7 +825,7 @@ static EAGLView *view = 0; cocos2d::CCIMEDispatcher* dispatcher = cocos2d::CCIMEDispatcher::sharedDispatcher(); if (UIKeyboardWillShowNotification == type) { - self.keyboardShowNotification = [notif copy]; + self.keyboardShowNotification = notif; // implicit copy dispatcher->dispatchKeyboardWillShow(notiInfo); } else if (UIKeyboardDidShowNotification == type)