IOS tabbar 点击刷新页面
来源:互联网 发布:windows.old删除不了 编辑:程序博客网 时间:2024/04/29 17:33
参考网上资料
.h文件
#import <UIKit/UIKit.h>@interface TabbarRootViewController : UITabBarController<UITabBarControllerDelegate>@end
.m文件
#import "TabbarRootViewController.h"#import "NoticeTableViewController.h"@implementation TabbarRootViewController-(void)viewDidLoad{ [super viewDidLoad]; self.delegate=self;}-(void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController{ if (viewController.tabBarItem.tag==2) { UINavigationController *navigation =(UINavigationController *)viewController; NoticeTableViewController *notice=(NoticeTableViewController *)navigation.topViewController; [notice refreshData]; }}//禁止tab多次点击-(BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController{ UIViewController *tbselect=tabBarController.selectedViewController; if([tbselect isEqual:viewController]){ return NO; } return YES;}@end
在NoticeTableViewController 中写好刷新方法。即可点击tab刷新页面
1 0
- IOS tabbar 点击刷新页面
- 点击tabbar刷新页面
- LeveyTabBar点击Tabbar刷新页面
- 微信小程序点击tabBar刷新页面
- IOS点击tabbar更新页面数据
- tabbar点击刷新
- iOS中tabBar按钮再次点击实现界面刷新
- 监听TabBar点击事件 使系统tabar的item 点击刷新页面 swift版
- ios点击隐藏tabBar 返回tabBar
- iOS 点击一个页面上的按钮跳转到tabBar的另一个页面
- 自定义TabBar如何实现连续点击刷新
- 仿闲鱼tabbar加二次点击刷新
- (iOS开发)点击tabbar中的按钮显示首页,再如何跳转页面
- IOS TabBar 点击不显示图标
- IOS点击底部tabbar的事件
- iOS 点击tabBar弹出登录窗口
- iOS 自定义Tabbar 改变点击背景颜色
- iOS tabbar点击动画效果实现
- Eclipse构建Maven的SpringMVC项目
- The meaning of "argc" and "argv" in programming
- dpkg
- Mina、Netty、Twisted一起学(五):整合protobuf
- Yii2 数据操作Query Builder
- IOS tabbar 点击刷新页面
- js移动端滑动一个屏幕再加载新的数据以及ajax同步请求
- zypper
- NLP学习笔记1 text processing
- lua学习总结——C API
- 移植alsa-lib与alsa-utils
- iOS 彻底学会使用delegate
- 从“==”变量与值位置这点小事想到的
- LengthFieldPrepender和LengthFieldBasedFrameDecoder