Skip to content

Instantly share code, notes, and snippets.

@HassanElDesouky
Created January 18, 2019 15:09
Show Gist options
  • Save HassanElDesouky/bbef3ec2584f061023ff7776c263bb39 to your computer and use it in GitHub Desktop.
Save HassanElDesouky/bbef3ec2584f061023ff7776c263bb39 to your computer and use it in GitHub Desktop.
03_medium_article_AppleVoiceMemosClone
var recordButton = RecordButton()
fileprivate func setupRecordingButton() {
recordButton.isRecording = false
recordButton.addTarget(self, action: #selector(handleRecording(_:)), for: .touchUpInside)
view.addSubview(recordButton)
recordButton.translatesAutoresizingMaskIntoConstraints = false
recordButton.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -32).isActive = true
recordButton.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
recordButton.widthAnchor.constraint(equalToConstant: 65).isActive = true
recordButton.heightAnchor.constraint(equalToConstant: 65 ).isActive = true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment