ITabBarController 单击 再点击 双击
UITabBarController
//当选中项改变的时候会触发
- (void)tabBarController:(UITabBarController*)tabBarController didSelectViewController:(UIViewController*)viewController {
NSLog(@"disSelect");
//使每次点击tab都回到跟目录
// if ([viewController isKindOfClass:[UINavigationController class]]) {
// [(UINavigationController*)viewController popToRootViewControllerAnimated:YES];
// }
}
//每次点击当前tab的时候会触发
- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)vc {
NSLog(@"shouldSelect");
//当前选中的tab
UIViewController *selectTab = tabBarController.selectedViewController;
//vc: 将要选中的tab
//判断是不是选择了自己
if ([selectTab isEqual:vc]) { }
}
// 打印宏定义
#ifdef DEBUG
#define HHLog(...) NSLog(__VA_ARGS__)
#else
#define HHLog(...)
#endif
Xcode调试代码时,有时会遇到断点不停的问题。一般来说是你的改动和Xcode编译出来的调试信息不一致造成的。
解决方法
1、先cleanall,再构建(Build)一遍;
2、如果方案一没有解决问题,可以选中Xcode的项目,在Finder中打开内容,删除*.pbxuser和*.mode1v3文件,重新打开project下端点。
iPhone Portrait iOS 8-Retina HD 5.5 (1242×2208) @3x
iPhone Portrait iOS 8-Retina HD 4.7 (750×1334) @2x
iPhone Portrait iOS 7,8-2x (640×960) @2x
iPhone Portrait iOS 7,8-Retina 4 (640×1136) @2x
iPhone Portrait iOS 5,6-1x (320×480) @1x
iPhone Portrait iOS 5,6-2x (640×960) @2x
iPhone Portrait iOS 5,6-Retina4 (640×1136) @2x