UITabBar有代理方法可以監(jiān)聽:
1. 遵守代理協(xié)議:
```
@interface InspectorManagerViewController () <UITabBarDelegate>
```
2. 實現(xiàn)代理方法:
```
- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
{
LJLog(@"item name = %@", item.title);
}
```
UITabBar有代理方法可以監(jiān)聽:
1. 遵守代理協(xié)議:
```
@interface InspectorManagerViewController () <UITabBarDelegate>
```
2. 實現(xiàn)代理方法:
```
- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
{
LJLog(@"item name = %@", item.title);
}
```