May I add toolbar manually in UIWindows?
I added UIWindow and its toolbar like:
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; NSArray * arr = [NSArray arrayWithObjects:@"test1", @"test2", nil]; [[self.window rootViewController] setToolbarItems:arr animated:NO];
No toolbar showing up.
Is it doable? Thanks.
你应该在窗口初始化之后将你的viewController(带有一个工具栏)添加到窗口中。
链接地址: http://www.djcxy.com/p/84300.html