아이폰 개발(129)
-
Apple MapKit 사용하기
iOS앱에서 애플맵을 사용하여 개발할때 참고할 만한 레퍼런스: www.raywenderlich.com/7738344-mapkit-tutorial-getting-started#toc-anchor-004 MapKit Tutorial: Getting Started Learn to use the powerful MapKit framework to build an interactive map, displaying location details and launching Maps for driving directions. www.raywenderlich.com medium.com/swlh/add-a-map-to-your-app-with-mapkit-and-core-location-ios-swift-guide-8ea9..
2021.04.16 -
Swift 알파값 적용하여 텍스트 출력
let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.alignment = .left let attributes: [NSAttributedString.Key : Any] = [ .paragraphStyle: paragraphStyle, .font: UIFont.systemFont(ofSize: 8.0), .foregroundColor: UIColor.black.withAlphaComponent(0.4) ] let attributedString = NSAttributedString(string: place.getName(), attributes: attributes) let stringRect = CGRect(x: x+7, y: y-6, width:..
2021.01.05 -
Swift 개발 팁
커스텀 클래스 객체 파일 입출력 기본이 되는 중요한 기능 중에 하나인데 이렇게 쓸만한 레퍼런스가 없음에 놀랍다. // Save object in document directory func saveObject(fileName: String, object: Any) -> Bool { let filePath = self.getDirectoryPath().appendingPathComponent(fileName)//1 do { let data = try NSKeyedArchiver.archivedData(withRootObject: object, requiringSecureCoding: false)//2 try data.write(to: filePath)//3 return true } catch { print(..
2020.08.31 -
ScrollView를 이용한 이미지 확대/축소 및 스크롤 처리
다음은 "Image Cropper" 예제이지만, 이것을 바탕으로 바탕에 이미지 지도를 깔고 그 위에 지도 정보를 출력하는 커스텀 지도를 구현하는 용도로 사용했다. 기본적으로 ScrollView는 확대/축소, 상하좌우 스크롤를 쉽게 처리할 수 있기 때문에 유용하다. https://medium.com/modernnerd-code/how-to-make-a-custom-image-cropper-with-swift-3-c0ec8c9c7884 How to make a Image Cropper with Swift 3 I recently had a project where i had to crop an image in specific aspect ratio but I cannot find any complete tut..
2020.05.31 -
iPhone/iPad 및 Portrait/Landscape 대응 방법
이미 2016년 WWDC에서 "Making Apps Adaptive" 데모를 통해서 자세히 설명을 한 것이다. iPhone Portrait/Landscape에 따라서 동적 레이아웃을 디자인하는 것 뿐만 아니라, iPad에 맞게 커스터마이징 하는 것도 생각보다 쉽게 처리가 가능하다. https://developer.apple.com/videos/play/wwdc2016/222 Making Apps Adaptive, Part 1 - WWDC 2016 - Videos - Apple Developer In this first part of a two part series, explore the motivation and concepts necessary to take advantage of trait colle..
2020.05.31 -
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