Skip to content

Commit

Permalink
Merge pull request hyperoslo#133 from hyperoslo/bug/frame
Browse files Browse the repository at this point in the history
Fix UI when Camera access is denied.
  • Loading branch information
RamonGilabert committed Apr 6, 2016
2 parents 07a0004 + 7602b83 commit 2f2dd1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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

0 comments on commit 2f2dd1f

Please sign in to comment.