Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(viewRotated)
- {
- subView.hidden = YES;
- }
- viewRotated = NO;
- - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
- {
- if(UIInterfaceOrientationIsPortrait(interfaceOrientation))
- {
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(keyboardWillShow:)
- name:UIKeyboardWillShowNotification
- object:nil];
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(keyboardWillHide:)
- name:UIKeyboardWillShowNotification
- object:nil];
- }
- else
- {
- [[NSNotificationCenter defaultCenter] removeObserver:self
- name:UIKeyboardWillShowNotification
- object:nil];
- [[NSNotificationCenter defaultCenter] removeObserver:self
- name:UIKeyboardWillShowNotification
- object:nil];
- }
- return YES;
- }
- - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
Add Comment
Please, Sign In to add comment