3
내 앱에서 사용자 정의 UIView
에 UISearchBar
을 사용하고 있습니다.iOS 7.1에서 UISearchBar barTintColor가 숨어 있지 않습니다.
다음은 UISearchBar
을 표시하는 코드입니다.
searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(50, 135, 230, 32)];
searchBar.barTintColor = [UIColor clearColor];
searchBar.placeholder = @"Search";
[self addSubview:searchBar];
아이폰 OS 7.0.3에서 bartint 색상
그러나 아이폰 OS 7.1 에 표시되지는 bartint 색상이 숨어되지 않습니다.
무엇을합니까 ['backGroundImage'] (https://developer.apple.com/library/ios/documentation/uikit/reference /UISearchBar_Class/Reference.html#//apple_ref/occ/instp/UISearchBar/backgroundImage)? 아니면 [this] (http://stackoverflow.com/a/12598711/1971013) 도움이됩니까? –
예. [searchBar setBackgroundImage : [UIImage new]]; 속임수를한다! !!! –