Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UI when Camera access is denied. #133

Merged
merged 1 commit into from
Apr 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Source/CameraView/CameraView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ class CameraView: UIViewController, CLLocationManagerDelegate {
])

button.setAttributedTitle(title, forState: .Normal)
button.contentEdgeInsets = UIEdgeInsetsMake(5.0, 10.0, 5.0, 10.0)
button.sizeToFit()
button.layer.borderColor = Configuration.settingsColor.CGColor
button.layer.borderWidth = 1
button.layer.cornerRadius = 4
button.addTarget(self, action: #selector(settingsButtonDidTap), forControlEvents: .TouchUpInside)

return button
Expand Down Expand Up @@ -122,7 +126,7 @@ class CameraView: UIViewController, CLLocationManagerDelegate {
let centerX = view.bounds.width / 2

noCameraLabel.center = CGPoint(x: centerX,
y: view.bounds.height / 2 - 100)
y: view.bounds.height / 2 - 80)

noCameraButton.center = CGPoint(x: centerX,
y: noCameraLabel.frame.maxY + 20)
Expand Down
2 changes: 1 addition & 1 deletion Source/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public struct Configuration {
public static var flashButton = UIFont(name: "HelveticaNeue-Medium", size: 12)!
public static var noImagesFont = UIFont(name: "HelveticaNeue-Medium", size: 18)!
public static var noCameraFont = UIFont(name: "HelveticaNeue-Medium", size: 18)!
public static var settingsFont = UIFont(name: "HelveticaNeue-Medium", size: 18)!
public static var settingsFont = UIFont(name: "HelveticaNeue-Medium", size: 16)!

// MARK: Titles

Expand Down