zoukankan      html  css  js  c++  java
  • UISearchBar的使用

    1. searchBar = [[UISearchBar alloc] initWithFrame: CGRectMake(0.0, 0.0, self.view.bounds.size.width, 40)];  
    2.     searchBar.placeholder=@"Enter Name";  
    3.     searchBar.delegate = self;  
    4.     searchBar.showsCancelButton = YES;  
    5.     theTableView.tableHeaderView = searchBar;  
    6.     searchBar.keyboardType = UIKeyboardTypeDefault;  
    7.     //searchBar.autocorrectionType = UITextAutocorrectionTypeNo;  
    8.     //searchBar.autocapitalizationType = UITextAutocapitalizationTypeNone;  
    9.       
    10.     [self.view addSubview: searchBar];  
    11.   
    12. //search Button clicked....  
    13. - (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar                     // called when keyboard search button pressed  
    14. {  
    15.     NSLog( @"%s,%d" , __FUNCTION__ , __LINE__ );  
    16.     [searchBar resignFirstResponder];  
    17. }  
    18. //cancel button clicked...  
    19. - (void)searchBarCancelButtonClicked:(UISearchBar *) searchBar                    // called when cancel button pressed  
    20. {  
    21.     NSLog( @"%s,%d" , __FUNCTION__ , __LINE__ );  
    22.       
    23.     [searchBar resignFirstResponder];  
    24.       
    25. }  
  • 相关阅读:
    文件编码转换
    mysql密码的奇怪问题
    python文件读写
    python中JSON的使用
    mysql默认字符编码的修改
    烧写uboot与linux操作系统,安装Samba,jlink驱动安装
    Busybox是什么?
    ubuntu 搭建GTK+以及glade2集成开发环境的一些方法
    Ubuntu linux安装ssh server
    UBoot启动过程(国嵌)
  • 原文地址:https://www.cnblogs.com/yulang314/p/3790439.html
Copyright © 2011-2022 走看看