ios - 在标签栏应用程序中更改 "more"图标

标签 ios objective-c xcode uitabbarcontroller tabbar

当您在标签栏应用程序中创建超过 5 个标签时,它会自动创建一个带有 3 个点的自定义图标的“更多”标签。有没有办法将该图标更改为箭头或我想要的任何其他图标?我已经尝试了几件事,包括..

UITabBarItem *more = [tabBar.items objectAtIndex:4]; or
UITabBarItem *more = (UITabBarItem *)tabBarController.moreNavigationController;  or
UITabBarItem *more = (UITabBarItem *)[tabBar.items objectAtIndex:4];  or

[tabBarItem3 setFinishedSelectedImage:[UIImage imageNamed:@"arrowSelexted.png"] withFinishedUnselectedImage:[UIImage imageNamed:@"arrow.png"]];

没有任何效果..我也尝试分配 tabBarItem 但仍然没有..

UITabBarItem *more = [[UITabBarItem alloc] initWithTitle:@"not" image:nil tag:0];
tabBarController.moreNavigationController.tabBarItem = more;

有什么想法吗?

最佳答案

可以使用tabBarController的moreNavigationController:

tabBarController.moreNavigationController.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"More" image:[UIImage imageNamed:@"arrow.png"] tag:0];

关于ios - 在标签栏应用程序中更改 "more"图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17102958/

相关文章:

ios - fatal error : to change segue

ios - 初始化前使用的常量 'error'

ios - 从 'NSHTTPURLResponse *' 分配给 'NSURLResponse *' 的不兼容指针类型

ios - 从 Photos.app 获取最后一张图片?

objective-c - Youtube 和模态视图

iphone - 右侧按钮未出现在模态视图 Controller 上

iphone - 如何实现全局 iPhone 异常处理?

XCode 源代码控制 : view changes for one file

ios - Xcode Workspace - 未从框架开发容器中找到导入

xcode - 在 Swift 中禁用应用程序小睡