Skip to content

Commit

Permalink
修改细节
Browse files Browse the repository at this point in the history
1.过期方法的描述错误
2.layoutSubviews在autolayout中的错误
  • Loading branch information
MJ Lee authored and MJ Lee committed Jul 23, 2016
1 parent 42f6ad7 commit c1a3650
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion MJRefresh.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'MJRefresh'
s.version = '3.1.11'
s.version = '3.1.12'
s.summary = 'An easy way to use pull-to-refresh'
s.homepage = 'https://github.com/CoderMJLee/MJRefresh'
s.license = 'MIT'
Expand Down
2 changes: 1 addition & 1 deletion MJRefresh/Base/MJRefreshAutoFooter.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@property (assign, nonatomic, getter=isAutomaticallyRefresh) BOOL automaticallyRefresh;

/** 当底部控件出现多少时就自动刷新(默认为1.0,也就是底部控件完全出现时,才会自动刷新) */
@property (assign, nonatomic) CGFloat appearencePercentTriggerAutoRefresh MJRefreshDeprecated("请使用automaticallyChangeAlpha属性");
@property (assign, nonatomic) CGFloat appearencePercentTriggerAutoRefresh MJRefreshDeprecated("请使用triggerAutomaticallyRefreshPercent属性");

/** 当底部控件出现多少时就自动刷新(默认为1.0,也就是底部控件完全出现时,才会自动刷新) */
@property (assign, nonatomic) CGFloat triggerAutomaticallyRefreshPercent;
Expand Down
7 changes: 4 additions & 3 deletions MJRefresh/Base/MJRefreshComponent.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ - (void)prepare

- (void)layoutSubviews
{
[super layoutSubviews];

[self placeSubviews];

[super layoutSubviews];
}

- (void)placeSubviews{}
Expand Down Expand Up @@ -135,6 +135,7 @@ - (void)setState:(MJRefreshState)state
{
_state = state;

// 加入主队列的目的是等setState:方法调用完毕、设置完文字后再去布局子控件
dispatch_async(dispatch_get_main_queue(), ^{
[self setNeedsLayout];
});
Expand All @@ -151,7 +152,7 @@ - (void)beginRefreshing
if (self.window) {
self.state = MJRefreshStateRefreshing;
} else {
// 预发当前正在刷新中时调用本方法使得header insert回置失败
// 预防正在刷新中时,调用本方法使得header inset回置失败
if (self.state != MJRefreshStateRefreshing) {
self.state = MJRefreshStateWillRefresh;
// 刷新(预防从另一个控制器回到这个控制器的情况,回来要重新刷新一下)
Expand Down

0 comments on commit c1a3650

Please sign in to comment.