iOS 모달 화면에 네이게이션 바 붙이기.

Dev/iOS 2011. 9. 30. 16:53


맞는지 정확히 확인 안됨.
추후 글 수정 요함. 


새로운 개체를 추가 하기 위한 모달 상자에 "저장"과 "취소" 버튼이 있는 네비게이션 바가 필요했다. 툴바인가 했는데 툴바는 아닌것 같다.
그래서 네비게이션 바를 붙여봤다.

id addViewDialog = [[[AddObjectViewController alloc] init] autorelease];
UINavigationController * nav = [[[UINavigationController alloc] initWithRootViewController:addViewDialog] autorelease];
[self presentModalViewController:nav animated:YES];

NewViewController * picker = [[NewViewController alloc] init];

UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController:picker];
[self presentModalViewController:nav animated:YES];

[picker release];
[nav release];

버튼이나 해당 액션 관련 코드를 덧붙여 준다. 

'Dev > iOS' 카테고리의 다른 글

UIImageView 터치 이벤트  (0) 2011.10.06
커스텀 액션 시트  (0) 2011.09.30
둥근 모서리 UIImageView 만들기  (0) 2011.09.30
iOS 모달뷰  (0) 2011.09.29
아이폰 사진 관련.  (0) 2011.09.29
: