Programing Language/iOS(Swift)
-
iOS ) Storyboard없이 레이아웃 꾸밀때 constraint 작업 편하게 해주는 메서드Programing Language/iOS(Swift) 2019. 11. 15. 14:33
1. 코드 extension UIView { func anchor(top: NSLayoutYAxisAnchor? = nil, left: NSLayoutXAxisAnchor? = nil, bottom: NSLayoutYAxisAnchor? = nil, right: NSLayoutXAxisAnchor? = nil, paddingTop: CGFloat? = 0, paddingLeft: CGFloat? = 0, paddingBottom: CGFloat? = 0, paddingRight: CGFloat? = 0, width: CGFloat? = nil, height: CGFloat? = nil) { translatesAutoresizingMaskIntoConstraints = false if let top = t..
-
iOS) Custom Camera에서 view 터치 할때 사각형 이미지 표시하기Programing Language/iOS(Swift) 2019. 11. 14. 15:05
1. CameraFocusSquare 클래스 생성 // // CameraFocusSquare.swift // customCameraView // // Created by Ik ju Song on 2019/11/14. // Copyright © 2019 Ik ju Song. All rights reserved. // import UIKit class CameraFocusSquare: UIView,CAAnimationDelegate { internal let kSelectionAnimation:String = "selectionAnimation" fileprivate var _selectionBlink: CABasicAnimation? convenience init(touchPoint: CGPoint) { ..
-
iOS) Custom Camera 화면 전환Programing Language/iOS(Swift) 2019. 11. 14. 01:01
https://stackoverflow.com/questions/20864372/switch-cameras-with-avcapturesession Switch cameras with avcapturesession Using this tutorial here: http://www.musicalgeometry.com/?p=1297 I have created a custom overlay and image capture with AVCaptureSession. I am attempting to allow the user to switch between the fr... stackoverflow.com
-
iOS ) Custom Camera에서 tap to Foucs 기능 구현하기Programing Language/iOS(Swift) 2019. 11. 13. 21:09
//스크린 화면을 터치시 포커스 잡아주는 메서드 override func touchesBegan(_ touches: Set, with event: UIEvent?) { let touchPoint = touches.first! as UITouch // view1 = > 카메라 스크린 view let screenSize = view1.bounds.size let focusPoint = CGPoint(x: touchPoint.location(in: view1).y / screenSize.height, y: 1.0 - touchPoint.location(in: view1).x / screenSize.width) if let device = AVCaptureDevice.default(for: AVMediaType..
-
-
-