All pastes #826592 Raw Edit

n1mda

public text v1 · immutable
#826592 ·published 2007-12-21 08:39 UTC
rendered paste body
- (void) navigationBar: (UINavigationBar*)bar buttonClicked:(int) button
{
	if(bar == mainNavBar)
	{
		if(button == 1)
		{
			NSLog(@"Add server");
			[self ShowAddServerMenu];
		}
		if(button == 0)
		{
			NSLog(@"Connect to server");
			/* do something*/
		}
	} 
	
}


	UINavigationBar *mainNavBar = [[UINavigationBar alloc] initWithFrame: CGRectMake(0.0f, 0.0f, 320.0f, 48.0f)];
	[mainNavBar setBarStyle: 1];
	[mainNavBar showButtonsWithLeftTitle:@"+" rightTitle:@"Connect" leftBack: FALSE];
	[mainNavBar setDelegate: self];