`
java-mans
  • 浏览: 11457610 次
文章分类
社区版块
存档分类
最新评论

iphone-common-codes-ccteam源代码 CCUITableView.m

 
阅读更多
//
//  CCUITableView.m
//  CCFC
//
//  Created by xichen on 11-12-28.
//  Copyright 2011 ccteam. All rights reserved.
//


#import "CCUITableView.h"
#import "CCUIView.h"


@implementation UITableView(cc)


- (void)scrollToBottom:(BOOL)animated
{
        NSUInteger lastSection = [self numberOfSections] - 1;
        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:[self numberOfRowsInSection:lastSection] 
                                                                                                inSection:lastSection];
        [self scrollToRowAtIndexPath:indexPath
                                atScrollPosition:UITableViewScrollPositionBottom
                                                animated:animated];
}


// get the vertical scroll indicator
- (UIView *)getVerticalScrollIndicator
{
        id verticalIndicatorImgView = nil; 
        object_getInstanceVariable(self, "_verticalScrollIndicator", (void **)&verticalIndicatorImgView);
        
        return (UIView *)verticalIndicatorImgView;
}


// hide the vertical scroll indicator
- (BOOL)hideVerticalScrollIndicator
{
        UIView *indicatorView = [self getVerticalScrollIndicator];
        indicatorView.hidden = YES;
        return indicatorView != nil;
}


@end
可能有更新:

googlecode链接地址:http://code.google.com/p/iphone-common-codes-ccteam/source/browse/trunk/CCFC/files/CCUITableView.m


github地址: https://github.com/cxsjabc/iphone-common-codes-ccteam/tree/master/CCFC/files/CCUITableView.m


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics