1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- //
- // SBTEmptyView.swift
- // SolarBT
- //
- // Created by weclouds on 2019/1/25.
- // Copyright © 2019 weclouds. All rights reserved.
- //
- import UIKit
- class SBTEmptyView: UIView {
-
- @IBOutlet weak var messageLabel: UILabel!
- @IBOutlet weak var addButton: UIButton!
-
- var buttonStr : String?
- var messageStr :String?
- override func awakeFromNib() {
- super.awakeFromNib()
-
- addButton.layer.masksToBounds = true
- self.addButton.layer.cornerRadius = 20
- //fillCode
- let bgLayer1 = CAGradientLayer()
- bgLayer1.colors = [UIColor(red: 1, green: 0.52, blue: 0.07, alpha: 1).cgColor, UIColor(red: 1, green: 0.67, blue: 0, alpha: 1).cgColor]
- bgLayer1.locations = [0,1]
- bgLayer1.frame = addButton.bounds
- bgLayer1.startPoint = CGPoint(x: 1, y: 1)
- bgLayer1.endPoint = CGPoint(x: 0, y: 0)
- // addButton.layer.addSublayer(bgLayer1)
- // LocalizationManager.shareInstance().callback = {
- // self.addButton.setTitle("Add_it_now".da_localizedStr(), for: .normal)
- // self.messageLabel.text = "No_devices_are_currently_added".da_localizedStr()
- // }
- }
- func reloadView() {
- self.addButton.setTitle(self.buttonStr, for: .normal)
- self.messageLabel.text = self.messageStr
- }
-
- }
|