-
-
Save Pasanpr/b9ca7a34353e2a189bebd60b268b33cf to your computer and use it in GitHub Desktop.
Code for Intermediate Core Data: Stage 1 - Video 2
This file contains 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
// Camera Button Customization | |
button.setTitle("Camera", forState: .Normal) | |
button.tintColor = .whiteColor() | |
button.backgroundColor = UIColor(red: 254/255.0, green: 123/255.0, blue: 135/255.0, alpha: 1.0) | |
button.addTarget(self, action: #selector(PhotoListController.presentImagePickerController), forControlEvents: .TouchUpInside) | |
// Camera Button Layout | |
view.addSubview(cameraButton) | |
cameraButton.translatesAutoresizingMaskIntoConstraints = false | |
NSLayoutConstraint.activateConstraints([ | |
cameraButton.leftAnchor.constraintEqualToAnchor(view.leftAnchor), | |
cameraButton.bottomAnchor.constraintEqualToAnchor(view.bottomAnchor), | |
cameraButton.rightAnchor.constraintEqualToAnchor(view.rightAnchor), | |
cameraButton.heightAnchor.constraintEqualToConstant(56.0) | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated for Swift 3: