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. }  
  • 相关阅读:
    zuul prefix
    zuul忽略表达式
    zuul 自定义路由映射规则
    ribbon重试机制
    feign容断忽略某些异常
    cloud turbine
    hystrix 给方法加断路器
    go语言常用函数:cap
    windows 安装 go语言
    mysql win源码比较大 不需要的文件删除 记录下来
  • 原文地址:https://www.cnblogs.com/yulang314/p/3790439.html
Copyright © 2011-2022 走看看