This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//iOS 7 스토리보드 대신 xib 방식으로 개발하기 | |
//solution 1 | |
1. empty application 생성 | |
2. new class file 생성 -> name : ViewController, UIViewController sub class, with XIB check | |
3. appdelegate 헤더 파일 수정 | |
@class ViewController; | |
@property (strong, nonatomic) ViewController *viewController; | |
4. appdelegate m 파일 수정 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewWillAppear:(BOOL)animated | |
{ | |
[super viewWillAppear:animated]; | |
//키보드 옵저버 | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidShow:) | |
name:UIKeyboardDidShowNotification object:self.view.window]; | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) | |
name:UIKeyboardWillHideNotification object:self.view.window]; |
NewerOlder