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.
如下所示,我的图像正在被裁剪,但似乎有足够的空间来渲染它。同样,图像似乎位于顶部。
我没有设置标题,所以不希望有任何文字。如何使按钮居中并适合图像?
你不能。要么重新考虑将文本放在那里(图像几乎从不完全自我解释,它们大多用作视觉助记符)。或者你必须自己实现标签栏。
这在 iOS 7.1 中已修复。例如
((UIViewController *)self.viewControllers[0]).tabBarItem = [[UITabBarItem alloc] initWithTitle:@"" image:[UIImage imageNamed:@"tab_1"] tag:0];