분류 전체보기(864)
-
Apple Music API 연동
아이폰앱이 Apple Music API와 연동을 구현 하려면 애플 개발자 프로그램을 구입해야 하고 물론 Apple Music도 구독해야 한다. 다음은 A부터 Z까지 구현하는 방법에 대해 정리된 문서이다. 좀더 이해가 쉽게 작성했으면 하는 아쉬움은 있지만 기본 가이드라고 할 수 있다. https://crunchybagel.com/integrating-apple-music-into-your-ios-app/ Integrating Apple Music Into Your iOS App We recently released a major update to Streaks Workout, with one of the new features automatic playback from Apple Music. While t..
2020.05.22 -
Swift 개발 팁
커스텀 View에서 이미지 출력시 뒤집어질 경우 처리 방법 extension CGContext { /// Draw `image` flipped vertically, positioned and scaled inside `rect`. public func drawFlipped(_ image: CGImage, in rect: CGRect) { self.saveGState() self.translateBy(x: 0, y: rect.origin.y + rect.height) self.scaleBy(x: 1.0, y: -1.0) self.draw(image, in: CGRect(origin: CGPoint(x: rect.origin.x, y: 0), size: rect.size)) self.restoreGState..
2020.05.20 -
오디오 플레이어 앱 샘플
https://abc1211.tistory.com/411 16 ios 스위프트 오디오&녹음 어플 구현 // // ViewController.swift // Audio // // Created by MacBookPro on 2017. 11. 28.. // Copyright © 2017년 MacBookPro. All rights reserved. // //오디오를 재생하려면 헤더 파일과 델리게이트가 필요하.. abc1211.tistory.com https://moonibot.tistory.com/41 [iOS/swift] AVAudioPlayer 음악(오디오) 재생 및 녹음 앱 만들기 Xcode(버전11.3)를 AVAudioPlayer 음악(오디오) 재생 및 녹음 앱을 만든다:) AVAudioPlayer을 ..
2020.05.20 -
iOS 백그라운드 오디오 플레이 컨트롤 예제
완벽하지는 않지만, 일반적인 iOS용 뮤직 플레이 앱들처럼 싱크 컨트롤 센터와 연동하도록 만드는 예제이다. https://medium.com/@quangtqag/background-audio-player-sync-control-center-516243c2cdd1 Background Audio Player Sync Control Center In this tutorial, you will create a player with capability of play audio in background mode and synchronize with music controls in Control… medium.com 다음 예제는 iOS 오디오 플레이어 컨트롤 센터와 연동이 되는 것은 아니지만, 간단하게 백그라운드로 ..
2020.05.17 -
iOS 13 Fullscreen 화면 전환, Custom Segue Transition Animation
iOS 13부터는 화면 전환시, 기본적으로 뷰컨트롤러가 카드처럼 쌓이는 방식으로 present가 구동된다. 전체 화면으로 화면 전환을 하고 싶으면 다음과 같이 풀스크린 옵션을 주면 된다. let vc = UIViewController() vc.modalPresentationStyle = .fullScreen //or .overFullScreen for transparency self.present(vc, animated: true, completion: nil) https://stackoverflow.com/questions/56435510/presenting-modal-in-ios-13-fullscreen Presenting modal in iOS 13 fullscreen In iOS 13 there ..
2020.05.14 -
Swift와 SQLite 연동
외부에서 만들어진 SQLite 파일을 사용하기 위해서는 일단 번들 내에 있는 SQLite 파일을 도규먼트 폴더로 복사를 해야 한다. 안드로이드/iOS 앱을 동시 개발할 때, 기본적으로 저장되어야 하는 데이터를 SQLite 파일어 저장을 하면 양쪽 앱에서 같이 사용할 수 있는 장점이 된다. func copyDatabaseIfNeeded() { // Move database file from bundle to documents folder let fileManager = FileManager.default let documentsUrl = fileManager.urls(for: .documentDirectory, in: .userDomainMask) guard documentsUrl.count != 0 el..
2020.05.12