1
我想我的UISearchbar應該看起來像這樣。iOS 6和7中的UISearchbar自定義
我已經試過這樣:
[[UITextField appearanceWhenContainedIn:[UISearchBar class], nil] setFont:[UIFont fontWithName:@"Helvetica Neue" size:20]];
[self.seachBar setSearchFieldBackgroundImage:[UIImage imageNamed:@"background"] forState:UIControlStateNormal];
[self.seachBar setImage:[UIImage imageNamed:@"SearchIcon"] forSearchBarIcon:UISearchBarIconSearch state:UIControlStateNormal];
[self.seachBar setBackgroundImage:[UIImage imageNamed:@"background"]];
[self.seachBar setText:@"Search"];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
請指導或任何教程。
感謝
你使用searchbar displaycontroller還是你的添加你的搜索欄在導航欄中 – codercat
Hi iDev,我使用了searchbar displaycontroller –