_searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0.0, 0.0,
self.view.bounds.size.width,
self.navigationController.navigationBar.bounds.size.height)];
_searchBar.tintColor = [UIColor blueColor];
forSearchBarIcon:UISearchBarIconBookmark state:UIControlStateNormal];
_searchBar.placeholder = @"Enter drug name";
_searchBar.barTintColor = [UIColor clearColor];
UITextField *txfSearchField = [_searchBar valueForKey:@"_searchField"];
txfSearchField.backgroundColor = [UIColor whiteColor];
txfSearchField.tintColor = [UIColor blackColor];
txfSearchField.textColor = [UIColor blackColor];
_searchBar.autoresizingMask = UIViewAutoresizingFlexibleWidth;
_searchBar.delegate = self;
_searchBar.showsCancelButton = NO;
[_searchBar becomeFirstResponder];
[self.navigationController.navigationBar addSubview : _searchBar];
TextField가 없으면? 검색하고 싶은 것을 어떻게 써야합니까? – Larme
난 그냥 디자인을하고있다. 기능이 아닙니다. 나는 당신에게 내가 복사하려고하는 링크를 주었다. 네, 텍스트 필드없이 –
thats UISearchbar –