liebus
UIToolBar Customize 본문
UIToolbar *toolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 320, 40) ];
UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, 220, 40) ];
UIBarButtonItem *btnSear = [[UIBarButtonItem alloc] initWithCustomView:textField];
UIBarButtonItem *btnHomePage = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemReply target:self action:@selector(touchHome:)];
UIBarButtonItem *btnURLPage = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemPlay target:self action:@selector(touchURLPage:)];
btnURLPage.width = 50;
btnHomePage.width = 50;
[toolBar setItems:[NSArray arrayWithObjects:btnHomePage, btnSear, btnURLPage, nil]];
[toolBar setTintColor:[UIColor blackColor]];
[self.view addSubview:toolBar];
[btnHomePage release];
[btnURLPage release];
[btnSear release];
[textField release];
[toolBar release];
'예전꺼(2014년이전꺼) > iOS' 카테고리의 다른 글
NSMutableDictionary (0) | 2011.10.15 |
---|---|
Xcode 삭제 (0) | 2011.09.29 |
Xcode 4.x 에서 Resources 파일 추가 (0) | 2011.08.25 |
viewDidLoad 와 viewWillAppear (0) | 2011.08.11 |
애플 Certificate등록, Devices, App ID, Provisioning 등록 과정 (0) | 2011.08.03 |