Added orientation rotation for iOS.

This commit is contained in:
Ryan C. Gordon 2011-03-28 23:21:22 -04:00
parent 15b112e3a6
commit ab0fcbfbd2
7 changed files with 114 additions and 19 deletions

View file

@ -30,6 +30,16 @@
#define MAX_SIMULTANEOUS_TOUCHES 5
#endif
@interface SDL_uikitviewcontroller : UIViewController {
@private
SDL_Window *window;
}
- (id)initWithSDLWindow:(SDL_Window *)_window;
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orient;
- (void)loadView;
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration;
@end
/* *INDENT-OFF* */
#if SDL_IPHONE_KEYBOARD
@interface SDL_uikitview : UIView<UITextFieldDelegate> {
@ -48,7 +58,9 @@
UITextField *textField;
BOOL keyboardVisible;
#endif
@public
SDL_uikitviewcontroller *viewcontroller;
}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;