iPhone SDK warning: class MyAppViewController does not implement the 'UITabbarDelegate' protocol
问题 Im working on an iPhone app, not using IB, and programmatically created a UITabbar with three items in a UIViewController in a view based application, I used one delegate method, that wont work without the last line in the snippet below( setDelegate method). I dont have a tabbarviewcontroller. UITabBar *tabbar = [[UITabBar alloc] initWithFrame:CGRectMake(0, YMAX-60, XMAX, 40)]; NSMutableArray *items = [[NSMutableArray alloc] initWithCapacity:3]; [items addObject:[[[UITabBarItem alloc]