Public feed #890344

Someone

public text v1 · immutable
Raw Edit
·published 2008-02-03 17:55 UTC
rendered paste body
	navigationBar = [ [UINavigationBar alloc] initWithFrame: CGRectMake(0, 0, 320, UI_NAVIGATION_BAR_HEIGHT) ];
	[ navigationBar setDelegate: self];
	[ navigationBar setBarStyle: 0 ];
	
	searchField = [ [ UISearchField alloc ] initWithFrame: CGRectMake(10.0f, ([UINavigationBar defaultSize].height - [UISearchField defaultHeight]) / 2., rect.size.width - 20., [UISearchField defaultHeight]) ];
	[ searchField setDisplayEnabled: YES ];
	[searchField setFont: GSFontCreateWithName("Helvetica", 0, 11.0f)];
	[[searchField textTraits] setReturnKeyType:6];
	[[searchField textTraits] setEditingDelegate:self];
	[searchField setPaddingTop:5];
	[searchField setDelegate: self];
	[searchField setPlaceholder:@"MxTube"];
	[ navigationBar addSubview: searchField ];
	
	[ self addSubview: navigationBar ];