Commit 4610a310 by Daniel Dahan

updated CaptureView example

parent 8174c729
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
"images" : [ "images" : [
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "ic_photo_camera_white.png", "filename" : "ic_photo_camera_white_36pt.png",
"scale" : "1x" "scale" : "1x"
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "ic_photo_camera_white@2x.png", "filename" : "ic_photo_camera_white_36pt@2x.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "ic_photo_camera_white@3x.png", "filename" : "ic_photo_camera_white_36pt@3x.png",
"scale" : "3x" "scale" : "3x"
} }
], ],
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
"images" : [ "images" : [
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "ic_photo_camera_white_48pt.png", "filename" : "ic_videocam_white_36pt.png",
"scale" : "1x" "scale" : "1x"
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "ic_photo_camera_white_48pt@2x.png", "filename" : "ic_videocam_white_36pt@2x.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "ic_photo_camera_white_48pt@3x.png", "filename" : "ic_videocam_white_36pt@3x.png",
"scale" : "3x" "scale" : "3x"
} }
], ],
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_videocam_white_48pt.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_videocam_white_48pt@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_videocam_white_48pt@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
...@@ -71,7 +71,7 @@ class ViewController: UIViewController, CaptureSessionDelegate { ...@@ -71,7 +71,7 @@ class ViewController: UIViewController, CaptureSessionDelegate {
btn3.setImage(img3, forState: .Normal) btn3.setImage(img3, forState: .Normal)
btn3.setImage(img3, forState: .Highlighted) btn3.setImage(img3, forState: .Highlighted)
let img4: UIImage? = UIImage(named: "ic_photo_camera_white_48pt") let img4: UIImage? = UIImage(named: "ic_photo_camera_white_36pt")
cameraButton.pulseColor = nil cameraButton.pulseColor = nil
cameraButton.setImage(img4, forState: .Normal) cameraButton.setImage(img4, forState: .Normal)
cameraButton.setImage(img4, forState: .Highlighted) cameraButton.setImage(img4, forState: .Highlighted)
...@@ -85,7 +85,7 @@ class ViewController: UIViewController, CaptureSessionDelegate { ...@@ -85,7 +85,7 @@ class ViewController: UIViewController, CaptureSessionDelegate {
captureButton.shadowDepth = .None captureButton.shadowDepth = .None
captureButton.addTarget(self, action: "handleCaptureButton:", forControlEvents: .TouchUpInside) captureButton.addTarget(self, action: "handleCaptureButton:", forControlEvents: .TouchUpInside)
let img5: UIImage? = UIImage(named: "ic_videocam_white_48pt") let img5: UIImage? = UIImage(named: "ic_videocam_white_36pt")
videoButton.pulseColor = nil videoButton.pulseColor = nil
videoButton.setImage(img5, forState: .Normal) videoButton.setImage(img5, forState: .Normal)
videoButton.setImage(img5, forState: .Highlighted) videoButton.setImage(img5, forState: .Highlighted)
...@@ -103,7 +103,6 @@ class ViewController: UIViewController, CaptureSessionDelegate { ...@@ -103,7 +103,6 @@ class ViewController: UIViewController, CaptureSessionDelegate {
view.addSubview(cameraButton) view.addSubview(cameraButton)
cameraButton.translatesAutoresizingMaskIntoConstraints = false cameraButton.translatesAutoresizingMaskIntoConstraints = false
MaterialLayout.alignFromBottomLeft(view, child: cameraButton, bottom: 24, left: 24) MaterialLayout.alignFromBottomLeft(view, child: cameraButton, bottom: 24, left: 24)
// MaterialLayout.size(view, child: cameraButton, width: 48, height: 48)
view.addSubview(captureButton) view.addSubview(captureButton)
captureButton.translatesAutoresizingMaskIntoConstraints = false captureButton.translatesAutoresizingMaskIntoConstraints = false
...@@ -113,7 +112,6 @@ class ViewController: UIViewController, CaptureSessionDelegate { ...@@ -113,7 +112,6 @@ class ViewController: UIViewController, CaptureSessionDelegate {
view.addSubview(videoButton) view.addSubview(videoButton)
videoButton.translatesAutoresizingMaskIntoConstraints = false videoButton.translatesAutoresizingMaskIntoConstraints = false
MaterialLayout.alignFromBottomRight(view, child: videoButton, bottom: 24, right: 24) MaterialLayout.alignFromBottomRight(view, child: videoButton, bottom: 24, right: 24)
// MaterialLayout.size(view, child: videoButton, width: 48, height: 48)
view.addSubview(navigationBarView) view.addSubview(navigationBarView)
navigationBarView.leftButtons = [btn3] navigationBarView.leftButtons = [btn3]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment