首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

UISearchBar 搜寻框

2012-10-23 
UISearchBar 搜索框UISearchBar *searchBar [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 320,

UISearchBar 搜索框
   UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 320, 50)];
        searchBar.placeholder=@"关键字";
        searchBar.showsCancelButton = YES;
        searchBar.barStyle = UIBarStyleBlack;
//        searchBar.keyboardType=UIKeyboardTypeDefault;
//        [searchBar resignFirstResponder]; //可以清空搜索框
        searchBar.delegate = self;
        [self addSubview:searchBar];

热点排行