Created
December 14, 2018 05:36
-
-
Save SunXiaoShan/78f314e3c8ba280f6c7ee2a0e4f0c028 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ReplayKit | |
class ViewController: UIViewController { | |
@IBOutlet weak var mainView: UIView! | |
let recorder = RPScreenRecorder.shared() | |
private var isRecording = false | |
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