1.找到CCEAGLView.mm
2.在- (void)onUIKeyboardNotification:(NSNotification *)notif;方法后面添加
UIInterfaceOrientation getFixedOrientation(UIInterfaceOrientation statusBarOrientation)
{
if ( systemVersion] floatValue] >= 8.0)
{
statusBarOrientation = UIInterfaceOrientationPortrait;
}
return statusBarOrientation;
}
判断当前操作系用。。。
3.-(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)dis方法中修改 switch
变成
switch (getFixedOrientation( statusBarOrientation]))
4.- (void)onUIKeyboardNotification:(NSNotification *)notif;方法中修改switch
改成
switch (getFixedOrientation( statusBarOrientation]))