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

posted @ 2012-01-13 19:11  cc_team  阅读(160)  评论(0编辑  收藏  举报