- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController
{
//NSLog(@"goodto 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'sstack, the usual viewWillAppear / viewDidAppear methods aren't called. If youwant to ensure they're always called, just add theUINavigationControllerDelegate protocol to your root view controller:
Then implement these two methods:
Be sure to set the root view controller as the delegate for the navcontroller. Now viewWillAppear / viewDidAppear will be called whenever acontroller is pushed/popped from the stack.
If you want to call the viewWillDisappear/viewDidDisappear methods, your viewcontroller still has to do that manually before popping itself off the navstack.
@implementation UINavigationBar (CustomHeight)- (void)layoutSubviews {
[super layoutSubviews];
CGRect barFrame = self.frame;
barFrame.size.height = height;
self.frame = barFrame;
}
@end
http://stackoverflow.com/questions/2133257/iphone-how-set-uinavigationbar-height
http://blog.sina.com.cn/s/blog_93f39bc20100wa8d.html
下拉刷新http://stackoverflow.com/questions/6355918/updating-table-with-egotableviewpullrefresh
支持上拉和下拉刷新http://hi.baidu.com/watsy/blog/item/16e04708829d6e880b7b82ff.html