Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
GMRefresh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
GMRefresh
Commits
a5f497e3
Commit
a5f497e3
authored
Dec 25, 2018
by
井庆林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加不同时执行header、footer刷新
parent
7fd14162
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
GMRefreshFooter.m
GMRefresh/Classes/GMRefreshFooter.m
+16
-1
GMRefreshHeader.m
GMRefresh/Classes/GMRefreshHeader.m
+16
-1
No files found.
GMRefresh/Classes/GMRefreshFooter.m
View file @
a5f497e3
...
...
@@ -35,7 +35,22 @@
-
(
void
)
executeRefreshingCallback
{
[
super
executeRefreshingCallback
];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
MJRefreshHeader
*
header
=
_scrollView
.
mj_header
;
if
(
header
&&
[
header
isRefreshing
])
{
[
self
endRefreshing
];
}
else
{
if
(
self
.
refreshingBlock
)
{
self
.
refreshingBlock
();
}
if
([
self
.
refreshingTarget
respondsToSelector
:
self
.
refreshingAction
])
{
MJRefreshMsgSend
(
MJRefreshMsgTarget
(
self
.
refreshingTarget
),
self
.
refreshingAction
,
self
);
}
if
(
self
.
beginRefreshingCompletionBlock
)
{
self
.
beginRefreshingCompletionBlock
();
}
}
});
NSString
*
pageName
=
[
self
myViewController
].
pageName
?:
@""
;
[
Phobos
track
:
@"upload_page"
attributes
:@{
@"page_name"
:
pageName
}];
}
...
...
GMRefresh/Classes/GMRefreshHeader.m
View file @
a5f497e3
...
...
@@ -98,7 +98,22 @@
-
(
void
)
executeRefreshingCallback
{
[
super
executeRefreshingCallback
];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
MJRefreshFooter
*
footer
=
_scrollView
.
mj_footer
;
if
(
footer
&&
[
footer
isRefreshing
])
{
[
self
endRefreshing
];
}
else
{
if
(
self
.
refreshingBlock
)
{
self
.
refreshingBlock
();
}
if
([
self
.
refreshingTarget
respondsToSelector
:
self
.
refreshingAction
])
{
MJRefreshMsgSend
(
MJRefreshMsgTarget
(
self
.
refreshingTarget
),
self
.
refreshingAction
,
self
);
}
if
(
self
.
beginRefreshingCompletionBlock
)
{
self
.
beginRefreshingCompletionBlock
();
}
}
});
NSString
*
pageName
=
[
self
myViewController
].
pageName
?:
@""
;
[
Phobos
track
:
@"refresh_page"
attributes
:@{
@"page_name"
:
pageName
}];
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment