[iOS/Swift] 카메라로 동영상 촬영하기
·
iOS/Swift
먼저 영상 촬영과 저장을 위해 권한 설정을 해야한다. import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } @IBAction func videoButton(_ sender: UIButton) { let camera = UIImagePickerController() camera.delegate = self camera.sourceType = .camera camera.mediaTypes = UIImagePickerController.availableMediaTypes(for: .ca..
[iOS] Charts 라이브러리 설치방법 및 사용방법
·
iOS/Swift
라이브러리 설치 라이브러리를 사용할 프로젝트로 가서 pod file을 생성해준다. pod init 2. pod file을 열어준다. open -e podfile 3. 사용할 pod code를 입력해준다. 4. pod를 설치해준다. pod install 5. xcworkspace 실행해준다. 프로젝트 파일로 가면. xcworkspace 파일이 생겼다. 이걸 실행시켜주면 된다. Charts 사용방법 저는 LineChartView를 사용했습니다. 먼저 Charts를 import해줍니다. import Charts LineChartView도 만들어주고 var lineChart = LineChartView() 데이터들을 입력해줍니다. override func viewDidLoad() { super.viewDidLo..
[iOS] Swift 라이브러리 typing animation
·
iOS/Swift
첫번째 방법 단순 코드로 구현하는 방법이다. import UIKit class WelcomeViewController: UIViewController { @IBOutlet weak var titleLabel: UILabel! override func viewDidLoad() { super.viewDidLoad() titleLabel.text = "" var charIndex = 0.0 let titleText = "⚡️FlashChat" for letter in titleText { Timer.scheduledTimer(withTimeInterval: 0.1 * charIndex, repeats: false) { timer in self.titleLabel.text?.append(letter) } cha..
[iOS/Swift] Xcode Simulator 키보드 안보일때
·
iOS/Swift
Simulator -> I/O -> Keyboard -> Connect Hardwarw Keyboard를 꺼주면 된다.