Skip to content

Commit

Permalink
MOD: MJRefreshBackStateFooter添加获取指定状态下title的方法
Browse files Browse the repository at this point in the history
  • Loading branch information
Wu Yikai committed Sep 10, 2015
1 parent 8adbb37 commit 521ae12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@
@property (weak, nonatomic, readonly) UILabel *stateLabel;
/** 设置state状态下的文字 */
- (void)setTitle:(NSString *)title forState:(MJRefreshState)state;

/** 获取state状态下的title */
- (NSString *)titleForState:(MJRefreshState)state;
@end
4 changes: 4 additions & 0 deletions MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ - (void)setTitle:(NSString *)title forState:(MJRefreshState)state
self.stateLabel.text = self.stateTitles[@(self.state)];
}

- (NSString *)titleForState:(MJRefreshState)state {
return self.stateTitles[@(state)];
}

#pragma mark - 重写父类的方法
- (void)prepare
{
Expand Down

0 comments on commit 521ae12

Please sign in to comment.