一直在努力
分类: LINUX
2012-03-06 13:46:18
- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController
{
// NSLog(@"good to see it");
if (self.selectedViewController == viewController ) {
if ([((UINavigationController*)viewController).visibleViewController respondsToSelector:@selector(showCategoryBtns)]) {
[ (TableViewController*)(((UINavigationController*)viewController).visibleViewController) showCategoryBtns];
}
}
return YES;
}
When you push or pop a view controller on/off a navigaction controller's stack, the usual viewWillAppear / viewDidAppear methods aren't called. If you want to ensure they're always called, just add the UINavigationControllerDelegate protocol to your root view controller:
Then implement these two methods:
Be sure to set the root view controller as the delegate for the nav controller. Now viewWillAppear / viewDidAppear will be called whenever a controller is pushed/popped from the stack.
If you want to call the viewWillDisappear/viewDidDisappear methods, your view controller still has to do that manually before popping itself off the nav stack.
@implementation UINavigationBar (CustomHeight)http://blog.sina.com.cn/s/blog_93f39bc20100wa8d.html
下拉刷新
支持上拉和下拉刷新http://hi.baidu.com/watsy/blog/item/16e04708829d6e880b7b82ff.html