iPad/iPhone uiSearchbar transparent background -


i know questions asked(and solved) before, wont work me. matter of fact, had solved, issue came out of , struck me on head.

i not able set background of uisearchbar transparent. using:

searchbar.backgroundcolor = [uicolor clearcolor];    [[searchbar.subviews objectatindex:0] removefromsuperview]; 

and worked nicely... stopped. since upgraded xcode-version not sure. spent couple of hours investigating this.. out there this? please point me in right direction. heaps!!!

best regards t

try looping through subviews , right class:

for (uiview *subview in searchbar.subviews) {     if ([subview iskindofclass:nsclassfromstring(@"uisearchbarbackground")]) {         [subview removefromsuperview];         break;     } } 

i'm not sure dont think can assume index 0 background view. example above works me.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -