ios7 - IOS 7 Unable to change background image of search bar -


I am unable to customize the search bar in my iOS 7.

I was using the following code to change the search for Background IOS6

  (UIView in the searchbar subviews * v) {if ([v isKindOfClass: NSClassFromString (@ "UISearchBarTextField")]) {v.superview.alpha = 0; UIView * containerview = [[UIView alloc] initWithFrame: Searchbar.fr;); [View Container Adviewview: V]; [Self.view addSubview: container view]; [[Edit UITextField PresentsNow: [UISearchBar class], zero] setTextColor: [UIColor whiteColor]]; [[UISearchBar Presence] Set Search Fielded Background Image: [UIImage imageNamed: @ "Search"] forState: UIControlStateNormal]; }}   

On the other hand if I customize search controller to delete the default cancel button in the search bar, it was working fine in iOS 6, but the custom search controller Do not search with iOS 7. It would be better if you use a text field instead and change the background image because this sub- Is a square and handles the same property.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -