반응형
storyboard.
TMainViewController.h
- changeText 메소드는 TSubViewControllerDelegate에 지정한 메소드임.
TMainViewController.m
- TSubViewControllerDelegate에서 호출 됨.
- storyboard 뷰 전환될때 TSubViewController delegate를 self로 지정.
TSubViewController.h
- @protocol 설정,
- @required, @optional,
- delegate @property에 지정.
TSubViewController.m
- @synthesize delegate;
- delegate changeText메소드 호출.
반응형
'ios' 카테고리의 다른 글
UIViewControllerLifecycle (0) | 2013.05.21 |
---|---|
UIImage resize (0) | 2013.05.07 |
storyboard initWithNibName NSInternalInconsistencyException (0) | 2013.05.03 |
iphone - keyboard next, done event, 키보드 내리기 (0) | 2013.05.03 |
iphone - UIView touch event 키보드 내리기 (0) | 2013.05.03 |