mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-11 13:56:10 +10:00
footer view; seperater line inset
This commit is contained in:
@@ -15,10 +15,16 @@ class FeedsViewController: UIViewController {
|
||||
|
||||
let feedCellID = "FeedCell"
|
||||
|
||||
lazy var noFeedsFooterView: InfoView = InfoView(NSLocalizedString("No Feeds.", comment: ""))
|
||||
|
||||
var feeds = [DiscoveredFeed]() {
|
||||
didSet {
|
||||
dispatch_async(dispatch_get_main_queue()) { [weak self] in
|
||||
self?.feedsTableView.reloadData()
|
||||
|
||||
if let strongSelf = self {
|
||||
strongSelf.feedsTableView.tableFooterView = strongSelf.feeds.isEmpty ? strongSelf.noFeedsFooterView : UIView()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,6 +50,7 @@ class FeedsViewController: UIViewController {
|
||||
|
||||
feedsTableView.backgroundColor = UIColor.whiteColor()
|
||||
feedsTableView.registerNib(UINib(nibName: feedCellID, bundle: nil), forCellReuseIdentifier: feedCellID)
|
||||
feedsTableView.tableFooterView = UIView()
|
||||
|
||||
discoverFeedsWithSortStyle(.Time, pageIndex: 1, perPage: 100, failureHandler: { reason, errorMessage in
|
||||
defaultFailureHandler(reason, errorMessage: errorMessage)
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
<constraint firstItem="uir-A9-aaJ" firstAttribute="centerY" secondItem="d97-mK-bJE" secondAttribute="centerY" id="vTi-1C-OoG"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<inset key="separatorInset" minX="60" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
<connections>
|
||||
<outlet property="avatarImageView" destination="GRs-kP-Ugk" id="Rch-2A-tIe"/>
|
||||
<outlet property="distanceLabel" destination="uir-A9-aaJ" id="asK-JQ-ew5"/>
|
||||
|
||||
Reference in New Issue
Block a user