Skip to content

Commit

Permalink
修改时间处罚机制
Browse files Browse the repository at this point in the history
  • Loading branch information
xhzengAIB committed Jul 2, 2014
1 parent 0558061 commit 7822563
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
15 changes: 8 additions & 7 deletions RefreshControl/XHRefreshControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ typedef NS_ENUM(NSInteger, XHPullDownRefreshViewType) {
*/
- (void)beginLoadMoreRefreshing;

/**
* 3、最后更新数据的时间
*
* @return 返回缓存最后更新某个页面的时间
*/
- (NSString *)lastUpdateTimeString;

@optional
/**
* 1、是否支持下拉刷新
Expand Down Expand Up @@ -116,6 +109,14 @@ typedef NS_ENUM(NSInteger, XHPullDownRefreshViewType) {
*/
- (UIButton *)customLoadMoreButton;

/**
* 11、最后更新数据的时间
*
* @return 返回缓存最后更新某个页面的时间
*/
- (NSString *)lastUpdateTimeString;


@end

@interface XHRefreshControl : NSObject
Expand Down
8 changes: 5 additions & 3 deletions RefreshControl/XHRefreshControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,11 @@ - (void)endMoreOverWithMessage:(NSString *)message {
#pragma mark - Refresh Time Helper Method

- (void)setupRefreshTime {
NSString *dateString = [self.delegate lastUpdateTimeString];
if ([dateString isKindOfClass:[NSString class]] || dateString) {
self.refreshCircleContainerView.timeLabel.text = dateString;
if ([self.delegate respondsToSelector:@selector(lastUpdateTimeString)]) {
NSString *dateString = [self.delegate lastUpdateTimeString];
if ([dateString isKindOfClass:[NSString class]] || dateString) {
self.refreshCircleContainerView.timeLabel.text = dateString;
}
}
}

Expand Down

0 comments on commit 7822563

Please sign in to comment.