Latest 0.0.2
Homepage https://github.com/jidibingren/JKSearchBar
License MIT
Platforms ios 5.0, requires ARC
Authors

JKSearchBar,Custom Easy to use SearchBar like UISearchBar with UIView and UITextField

Demo

Usage

by code

 JKSearchBar *searchBarCode = [[JKSearchBar alloc]initWithFrame:CGRectMake(0, 50, 320, 44)];
searchBarCode.inputView = picker;
searchBarCode.placeholder = @"this is a placeholder";
searchBarCode.placeholderColor = [UIColor purpleColor];

searchBarCode.backgroundColor = [UIColor yellowColor];
//searchBarCode.inputAccessoryView =view;
//searchBarCode.inputView = picker;
[searchBarCode.cancelButton setTitle:@"取消" forState:UIControlStateNormal];
[self.view addSubview:searchBarCode];

by XIB

drag a UIView and modify Custom Class to JKSearchBar in IB Panel

@property (weak, nonatomic) IBOutlet JKSearchBar *searchBar;
self.searchBar.placeholder = @"please input a word";
self.searchBar.textColor = [UIColor blackColor];
self.searchBar.delegate = self;
self.searchBar.iconImage = [UIImage imageNamed:@"JKSearchBar_ICON"];
//self.searchBar.textBorderStyle = UITextBorderStyleNone;
//self.searchBar.keyboardType = UIKeyboardTypeDecimalPad;
//elf.searchBar.placeholderColor = [UIColor redColor];

License

JKSearchBar is available under the MIT license.

Latest podspec

{
    "name": "JKSearchBar",
    "version": "0.0.2",
    "summary": "A easy custom SearchBar.",
    "description": "A longer description of JKSearchBar in Markdown format.n* Think: Why did you write this? What is the focus? What does it do?n* CocoaPods will be using this to generate tags, and improve search results.n* Try to keep it short, snappy and to the point.n* Finally, don't worry about the indent, CocoaPods strips it!",
    "homepage": "https://github.com/jidibingren/JKSearchBar",
    "license": "MIT",
    "authors": {
        "fanhuibo": "[email protected]"
    },
    "platforms": {
        "ios": "5.0"
    },
    "source": {
        "git": "https://github.com/jidibingren/JKSearchBar.git",
        "tag": "0.0.2"
    },
    "source_files": [
        "JKSearchBar/JKSearchBar",
        "JKSearchBar/JKSearchBar/*.{h,m}"
    ],
    "resources": "JKSearchBar/JKSearchBar/*.png",
    "requires_arc": true
}

Pin It on Pinterest

Share This