From 521ae1295238848fca5c3a626f1cf405c8a1861c Mon Sep 17 00:00:00 2001 From: Wu Yikai Date: Thu, 10 Sep 2015 21:23:45 +0800 Subject: [PATCH] =?UTF-8?q?MOD:=20`MJRefreshBackStateFooter`=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=8E=B7=E5=8F=96=E6=8C=87=E5=AE=9A=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=B8=8Btitle=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h | 3 +++ MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.m | 4 ++++ 2 files changed, 7 insertions(+) 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 {