UITabBar有代理方法可以监听:
1. 遵守代理协议:
```
@interface InspectorManagerViewController () <UITabBarDelegate>
```
2. 实现代理方法:
```
- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
{
LJLog(@"item name = %@", item.title);
}
```
UITabBar有代理方法可以监听:
1. 遵守代理协议:
```
@interface InspectorManagerViewController () <UITabBarDelegate>
```
2. 实现代理方法:
```
- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
{
LJLog(@"item name = %@", item.title);
}
```
本文标题:iOS小记 -- iOS监听UITabBar的Tab点击事件
本文链接:https://www.haomeiwen.com/subject/nhmfuqtx.html
网友评论