Skip to content

Instantly share code, notes, and snippets.

@SunXiaoShan
Created December 14, 2018 06:12
Show Gist options
  • Select an option

  • Save SunXiaoShan/d56d9b28503d5a4fff33dc8fdb43b456 to your computer and use it in GitHub Desktop.

Select an option

Save SunXiaoShan/d56d9b28503d5a4fff33dc8fdb43b456 to your computer and use it in GitHub Desktop.
import ReplayKit
class ViewController: UIViewController {
@IBOutlet weak var mainView: UIView!
let controller = RPBroadcastController()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
DispatchTimer(timeInterval: 1) { [weak self] timer in
self?.mainView.backgroundColor = self?.randomColor()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment