Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
GMBase
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
GMBase
Commits
04fe3824
Commit
04fe3824
authored
May 11, 2017
by
乔金柱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改emptyView 筛选器被覆盖情况
parent
b9ada965
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
12 deletions
+28
-12
Podfile.lock
Example/Podfile.lock
+2
-2
WMBaseListViewController.m
GMBase/Classes/WMBaseListViewController.m
+26
-10
No files found.
Example/Podfile.lock
View file @
04fe3824
...
...
@@ -15,7 +15,7 @@ PODS:
- AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession
- Base64nl (1.2)
- GMBase (0.
0.25
):
- GMBase (0.
1.0
):
- GMHud
- GMKit
- GMNetService
...
...
@@ -89,7 +89,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
Base64nl: a497bdcd1c01ea793d36b399016195a8713c0e95
GMBase:
05e9455c6f41f34462d2d2091427bbdb214779ca
GMBase:
2e52cee3cab338dc00361b11bf12375c5284de56
GMCache: 73855b613b9d7e34f4f37ad425e8b8153b760c04
GMFoundation: 395f1083c40aa38e9fb031726991dbc20247e2f9
GMHud: 67c24abb83777c61e43741d4a803f7b6d8ad4e1e
...
...
GMBase/Classes/WMBaseListViewController.m
View file @
04fe3824
...
...
@@ -42,12 +42,12 @@
_table
.
rowHeight
=
_cellHeight
;
_table
.
delegate
=
self
;
_table
.
dataSource
=
self
;
// 如果_cellIdentifier 能转成一个UITableViewCell class,才去注册,否则会有crash发生
if
([
NSClassFromString
(
_cellIdentifier
)
isSubclassOfClass
:[
UITableViewCell
class
]])
{
[
_table
registerClass
:
NSClassFromString
(
_cellIdentifier
)
forCellReuseIdentifier
:
_cellIdentifier
];
}
_table
.
backgroundColor
=
[
UIColor
clearColor
];
[
self
.
view
addSubview
:
_table
];
[
_table
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
...
...
@@ -56,7 +56,7 @@
make
.
top
.
mas_equalTo
(
64
);
make
.
bottom
.
mas_equalTo
(
0
);
}];
__weak
__typeof
(
self
)
weakSelf
=
self
;
if
(
_needHeaderRefresh
)
{
_table
.
mj_header
=
[
GMRefreshHeader
headerWithRefreshingBlock
:
^
{
...
...
@@ -68,7 +68,7 @@
[
weakSelf
footerRereshing
];
}];
}
//获取数据
if
(
_immediateLoad
)
{
[
self
loadRemoteData
];
...
...
@@ -83,7 +83,7 @@
[
self
.
viewModel
setStartNum
:
0
];
[[
self
.
viewModel
dataArray
]
removeAllObjects
];
[
_table
reloadData
];
[
self
loadRemoteData
];
}
...
...
@@ -117,7 +117,7 @@
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
tableView
.
rowHeight
>
0
)
{
return
tableView
.
rowHeight
;
}
else
{
...
...
@@ -138,7 +138,7 @@
}
-
(
void
)
configDataForCell
:
(
id
)
cell
atIndexPath
:
(
NSIndexPath
*
)
indexPath
{
}
#pragma mark - MJRefresh Delegate
...
...
@@ -180,14 +180,14 @@
}
else
{
[
self
showEmptyView
:
GMEmptyViewTypeException
];
}
if
(
_table
!=
nil
)
{
[
_table
reloadData
];
[
_table
.
mj_header
endRefreshing
];
[
_table
.
mj_footer
endRefreshing
];
}
[
self
updateOtherUIData
];
}
}
...
...
@@ -200,6 +200,22 @@
}
}
-
(
void
)
showEmptyView
:
(
GMEmptyViewType
)
type
{
[
super
showEmptyView
:
type
];
if
(
self
.
emptyView
.
superview
!=
nil
)
{
[
self
.
emptyView
mas_remakeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
mas_equalTo
(
0
);
make
.
right
.
mas_equalTo
(
0
);
if
(
_table
!=
nil
)
{
make
.
top
.
equalTo
(
_table
.
mas_top
);
}
else
{
make
.
top
.
mas_equalTo
(
0
);
}
make
.
bottom
.
mas_equalTo
(
0
);
}];
}
}
#pragma mark - GMEmptyView
-
(
void
)
emptyViewDidClickReload
{
[
self
loadRemoteData
];
...
...
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