uisearchbar

iOS 11 UISearchBar background color

混江龙づ霸主 提交于 2019-12-18 20:05:08
问题 I understand that this question has been asked many, many times on SO. However, as Apple does best, with the release of iOS 11 , they seem to have made a seemingly unnecessary change to the UISearchBar , specifically it's view hierarchy. In further, the "text field" of a search bar is no longer accessible in the search bar's subviews, causing all of the previous solutions to "access" and change the background color of the text field, or any property of the text field for that matter. Does

UISearchController makes the controller black

纵饮孤独 提交于 2019-12-18 19:47:23
问题 I am using UISearchController in iOS 8 with the following intializaiton in viewDidLoad of a view controller embedded in a tab controller _searchController = [[UISearchController alloc] initWithSearchResultsController:nil]; _searchBar = _searchController.searchBar; [_searchController.searchBar sizeToFit]; _searchController.searchBar.delegate = self; _searchController.searchResultsUpdater = self; _searchController.dimsBackgroundDuringPresentation = NO; _searchController

New UISearhBar in ios 7

為{幸葍}努か 提交于 2019-12-18 17:26:54
问题 Hi, guys. I have some trouble with new uisearchbar in iOS 7 in my app a have tableview with search bar in tableHeaderView it is handmade(added programmatically) - tableviewcontroller in storyboard, in method viewDidLoad i add searchDisplayController with my custom searchbar inherited from UISearchBar. all things going in navigation controller. in logic of my app in some point i release this nav controller sending dismissViewController In ios 6 it works perfect. but in ios 7 i get crash when

Search Bar Cancel Button don´t work in ios 7 sometimes

断了今生、忘了曾经 提交于 2019-12-18 16:47:44
问题 Cancel button in search bar don´t work in iOS 7 when search bar is initially hidden. I follow this tutorial to create a search bar in tableview: raywenderlich tutorial There are a example project in this tutorial, is better use this project than my explanation :) In iOS 5 and 6 works fine. I have reviewed all delegates. There are two possibilities. The first is to press the button when the bar is hidden, the second is to press the button when the bar is displayed (moving the table down with a

UISearchBar custom corners

纵饮孤独 提交于 2019-12-18 15:13:34
问题 I'm trying to create a search bar like this: But I'm noticing that I'm probably going to have to replace the search bar with my own image because the search bar corners comes out wrong when I set: self.searchController.searchBar.layer.cornerRadius = 50 // I've tried other numbers besides this too with no luck self.searchController.searchBar.clipsToBounds = true If I set this: self.searchController.searchBar.layer.cornerRadius = self.searchController.searchBar.bounds.height/2 The search bar

IOS7 Status bar change to black after search is active

随声附和 提交于 2019-12-18 14:56:04
问题 I'm using UISearchBar as header of UITableView. UISearchBar style is UISearchBarStyleMinimal. And when search is active, status bar change to black. How to fix that? Before search is active Search is active 回答1: you just need to do this: self.navigationController.view.backgroundColor = [UIColor lightGrayColor]; 来源: https://stackoverflow.com/questions/19129540/ios7-status-bar-change-to-black-after-search-is-active

Customize UITextfield of the UISearchbar - iOS

冷暖自知 提交于 2019-12-18 11:11:12
问题 I'm trying to customize the textfield for the UISearchbar. The picture below shows my half done work. I have subclasses the UISearchbar and called it from my view controller. I'm trying to remove those dark gray lines from the textfield. Below is the implementation of the UISearchbar adding to subview of the viewcontroller. searchbar = [[SearchBar alloc] initWithFrame:CGRectMake(35,78, 250, 17)]; searchbar.backgroundColor = [UIColor clearColor]; searchbar.layer.borderColor = [[UIColor

UISearchBar CGContext ERROR

和自甴很熟 提交于 2019-12-18 10:37:28
问题 I have a UISearchBar inside a view, whenever I tap on it, after the keyboard comes up - after -(BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar it sends this to the console: <Error>: CGContextSetStrokeColorWithColor : invalid context 0x0 . This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will

iPad/iPhone uiSearchbar transparent background

旧时模样 提交于 2019-12-18 09:35:55
问题 I know this questions was asked(and solved) before, but this wont work for me. as a matter of fact, I had it already solved, but this issue came back out of nowhere and struck me on the head. I am not able to set the background of my UISearchBar transparent. I was always using: searchBar.backgroundColor = [UIColor clearColor]; [[searchBar.subviews objectAtIndex:0] removeFromSuperview]; and it worked nicely... but suddenly it stopped. could be since I upgraded my xcode-version but I am not

Styling Search View on Android (min21)

泄露秘密 提交于 2019-12-18 07:22:45
问题 I'm trying to customize my search bar on Android Studio for my application. The result I'd like to achieve is the one here: My Search bar and the Quora's one I'm trying to follow G's documentation (https://developer.android.com/guide/topics/search/search-dialog.html) without results. Here's my code: Styles.xml <style name="CustomSearchViewStyle" parent="Widget.AppCompat.SearchView"> <item name ="voiceIcon">@drawable/ic_flag</item> <item name="searchIcon">@drawable/ic_search</item> <item name=