Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两个 UIViewControllers 作为子视图控制器添加到容器视图控制器中。现在我想将 UIToolbar 添加到容器视图控制器中。任何人都可以建议我如何添加 UIToolbar。
使用 Interface Builder 非常简单。并以编程方式进行:
UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 44)]; [self.view addSubview:toolbar]; // Add it to your parent view controller. [toolbar release];