Skip to content

Commit

Permalink
public text color property.
Browse files Browse the repository at this point in the history
  • Loading branch information
iwufan committed Feb 19, 2019
1 parent 7410647 commit 438522e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions DJEmptyViewDemo/DJEmptyViewDemo/DJEmptyView/DJEmptyView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ public class DJEmptyView: UIView {
bgView.frame = frame
}
}
/// tip text color
public var tipColor: UIColor! {
didSet {
messageLabel.textColor = tipColor
}
}
/// closure for click refresh button
public var clickClosure: (() -> Void)!
/// title for refresh button
Expand Down
4 changes: 3 additions & 1 deletion DJEmptyViewDemo/DJEmptyViewDemo/NoDataViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class NoDataViewController: UIViewController {

view.backgroundColor = UIColor.white

view.dj_showEmptyView(DJEmptyView(tipInfo:"No Related Data", imageName: "dj_img_no_data"))
let emptyView = DJEmptyView(tipInfo:"No Related Data", imageName: "dj_img_no_data")
emptyView.tipColor = UIColor.red
view.dj_showEmptyView(emptyView)
}

}

0 comments on commit 438522e

Please sign in to comment.