diff --git a/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h b/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h index f90cd6c7..2d02b2e6 100644 --- a/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h +++ b/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h @@ -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 diff --git a/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.m b/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.m index e43e9c8f..d75460e8 100644 --- a/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.m +++ b/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.m @@ -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 {