UIToolbar 썸네일형 리스트형 [iPhone] 코드로 UIToolbar에 UISegmentedControl 넣기 툴바에 세그먼트 컨트롤을 삽입하는데 IB에서는 그냥 드래그 해서 잘만 되더만 코드로는 어떻게 하는지 잘 모르겠더라... 아래와 같이 하면 되더라~^^ self는 UIToolbar 상속 받은 클래스다. #define TOOLBARBUTTON(TITLE, STYLE, SELECTOR) [[[UIBarButtonItem alloc] initWithTitle:TITLE style:STYLE target:self action:SELECTOR] autorelease] NSMutableArray *tbitems = [NSMutableArray array]; [tbitems addObject:TOOLBARBUTTON(@"아이템1", UIBarButtonItemStyleBordered, @selector(action)).. 이전 1 다음