你好,歡迎來到IOS教程網

 Ios教程網 >> IOS編程開發 >> IOS開發綜合 >> ios 鍵盤上顯示收回鍵盤button

ios 鍵盤上顯示收回鍵盤button

編輯:IOS開發綜合
UIToolbar * topView = [[UIToolbar alloc]initWithFrame:CGRectMake(0, 0, 320, 30)];       [topView setBarStyle:UIBarStyleBlack];            //UIBarButtonItem * helloButton = [[UIBarButtonItem alloc]initWithTitle:@"Hello" style:UIBarButtonItemStyleBordered target:self action:nil];            UIBarButtonItem * btnSpace = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil];            UIBarButtonItem * doneButton = [[UIBarButtonItem alloc]initWithTitle:@"收起鍵盤" style:UIBarButtonItemStyleDone target:self action:@selector(dismissKeyBoard)];                 NSArray * buttonsArray = [NSArray arrayWithObjects:btnSpace,doneButton,nil];       [doneButton release];  www.2cto.com     [btnSpace release];       //[helloButton release];            [topView setItems:buttonsArray];       [iReply setInputAccessoryView:topView];         -(void)dismissKeyBoard   {       [iReply resignFirstResponder];   }    
  1. 上一頁:
  2. 下一頁:
蘋果刷機越獄教程| IOS教程問題解答| IOS技巧綜合| IOS7技巧| IOS8教程
Copyright © Ios教程網 All Rights Reserved