UISearchBar "scope"/UISegmentedControl has few customisation options

Originator:christophercjensen
Number:rdar://7667185 Date Originated:19-Feb-2010 04:37 PM
Status:open Resolved:
Product:iPhone SDK Product Version:3.1.3
Classification:Enhancement Reproducible:
 
Summary: I want my UISearchBar's scope bar items to contain images rather then text.

Steps to Reproduce:
n/a

Expected Results:
Several buttons containing images on the scope segments (see screenshot)

Actual Results:
n/a

Regression:
n/a

Notes:
I have managed to get it working by digging into the UISearchBar's subviews:
	// Find scope segmented control
	for (id subview in _searchBar.subviews) {
		if ([subview isMemberOfClass:[UISegmentedControl class]]) {
			UISegmentedControl *scope = (UISegmentedControl *)subview;
			
			[scope removeAllSegments];
			//add custom scope buttons (images)
		}
	}

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!