IOS
-
SwiftLint 코드 규칙 도구 라이브러리 GitHub - realm/SwiftLint: A tool to enforce Swift style and conventions. A tool to enforce Swift style and conventions. Contribute to realm/SwiftLint development by creating an account on GitHub. github.com 1. PodFile에 추가, pod install pod 'SwiftLint' 2. [Project] Target → [Build Phases] → [New Run Script Phases] ${PODS_ROOT}/SwiftLint/swiftlint 3. 결과
[iOS] SwiftLintSwiftLint 코드 규칙 도구 라이브러리 GitHub - realm/SwiftLint: A tool to enforce Swift style and conventions. A tool to enforce Swift style and conventions. Contribute to realm/SwiftLint development by creating an account on GitHub. github.com 1. PodFile에 추가, pod install pod 'SwiftLint' 2. [Project] Target → [Build Phases] → [New Run Script Phases] ${PODS_ROOT}/SwiftLint/swiftlint 3. 결과
2024.01.14 -
이전 포스팅 [Swift] Dispatch (1) Dispatch (Framework) 시스템에서 관리하는 Dispatch 대기열에 작업을 제출하여 Multi Core 하드웨어에서 코드를 동시에 실행 GCD(Grand Central Dispatch)라고 알려진 Dispatch에서는 macOS, iOS, watchOS 및 tvOS의 멀티코 kimkhuna99.tistory.com sync(동기) vs async(비동기) → 작업을 보내는 시점에서 기다릴지 말지 serial(직렬) vs concurrent(동시) → Queue로 보내진 작업들을 여러 개의 Thread로 보낼지, 한 개의 Thread로 보낼 것 인지 DispatchQueue main queue - 오직 한개만 존재 - Serial 특성을 가진..
[Swift] Dispatch (2)이전 포스팅 [Swift] Dispatch (1) Dispatch (Framework) 시스템에서 관리하는 Dispatch 대기열에 작업을 제출하여 Multi Core 하드웨어에서 코드를 동시에 실행 GCD(Grand Central Dispatch)라고 알려진 Dispatch에서는 macOS, iOS, watchOS 및 tvOS의 멀티코 kimkhuna99.tistory.com sync(동기) vs async(비동기) → 작업을 보내는 시점에서 기다릴지 말지 serial(직렬) vs concurrent(동시) → Queue로 보내진 작업들을 여러 개의 Thread로 보낼지, 한 개의 Thread로 보낼 것 인지 DispatchQueue main queue - 오직 한개만 존재 - Serial 특성을 가진..
2024.01.07 -
class CustomView: UIView{ @IBInspectable var borderWidth: CGFloat { get{ return layer.borderWidth } set{ layer.borderWidth = newValue } } @IBInspectable var borderColor: UIColor?{ get{ return UIColor(cgColor: layer.borderColor!) } set{ layer.borderColor = newValue?.cgColor } } } Storyboard로 이동해서 UIView 생성 합니다. 출처 iOS ) 왕초보를 위한 IBInspectable / IBDesignable 사용해보기 안녕하세요 :) Zedd입니다.쓰려고 한 글들은 많지만...저..
[iOS] @IBInspectableclass CustomView: UIView{ @IBInspectable var borderWidth: CGFloat { get{ return layer.borderWidth } set{ layer.borderWidth = newValue } } @IBInspectable var borderColor: UIColor?{ get{ return UIColor(cgColor: layer.borderColor!) } set{ layer.borderColor = newValue?.cgColor } } } Storyboard로 이동해서 UIView 생성 합니다. 출처 iOS ) 왕초보를 위한 IBInspectable / IBDesignable 사용해보기 안녕하세요 :) Zedd입니다.쓰려고 한 글들은 많지만...저..
2024.01.06 -
LocalAuthentication 생체인식이나 이미 알고 있는 암호를 사용하여 사용자 인증 LocalAuthentication을 import 하고, LAcontext를 선언 import LocalAuthentication private var context = LAContext() 인증 시도 함수 var error: NSError? if context.canEvaluatePolicy(.deviceOwnerAuthentication, error: &error) { let reason = "Log in to your account" context.evaluatePolicy(.deviceOwnerAuthentication, localizedReason: reason) { [weak self] isSucces..
[iOS] LocalAuthenticationLocalAuthentication 생체인식이나 이미 알고 있는 암호를 사용하여 사용자 인증 LocalAuthentication을 import 하고, LAcontext를 선언 import LocalAuthentication private var context = LAContext() 인증 시도 함수 var error: NSError? if context.canEvaluatePolicy(.deviceOwnerAuthentication, error: &error) { let reason = "Log in to your account" context.evaluatePolicy(.deviceOwnerAuthentication, localizedReason: reason) { [weak self] isSucces..
2024.01.06 -
번역기에서 앱을 사용할 때 글자를 읽어주는 기능을 구현하였다. 다행하게도 Swift에서 구현을 할 수 있었다. AVSpeechSynthesizer | Apple Developer Documentation An object that produces synthesized speech from text utterances and enables monitoring or controlling of ongoing speech. developer.apple.com AVSpeechSynthesizer 공식 문서를 참고하면 텍스트를 읽게 하려면 AVSpeechUtterance 인스턴스를 생성하고 speaking(_:) 함수에 전달하면 된다고 되어 있다. 문서와 다른 블로그 포스팅 참고하여 작성한 코드이다. let syn..
TripMate (3) - AVSpeechSynthesizer번역기에서 앱을 사용할 때 글자를 읽어주는 기능을 구현하였다. 다행하게도 Swift에서 구현을 할 수 있었다. AVSpeechSynthesizer | Apple Developer Documentation An object that produces synthesized speech from text utterances and enables monitoring or controlling of ongoing speech. developer.apple.com AVSpeechSynthesizer 공식 문서를 참고하면 텍스트를 읽게 하려면 AVSpeechUtterance 인스턴스를 생성하고 speaking(_:) 함수에 전달하면 된다고 되어 있다. 문서와 다른 블로그 포스팅 참고하여 작성한 코드이다. let syn..
2023.12.10 -
이전 포스팅 TripMate (1) - openweatherAPI와 CLLocationManager 사용하기 새로 시작하는 프로젝트에서 날씨를 가져오는 API를 사용하게 되었다. 예전 패스트캠퍼스 강의에서 날씨 앱을 만들 때 사용했던 openweather API를 사용했다. Сurrent weather and forecast - OpenWeatherMap Access kimkhuna99.tistory.com 이전에 사용하던 GoogleMap API를 사용하려다가 주변 지역을 검색해 주는 PlacesAPI가 더욱 앱의 취지에 맞는 것 같아 바꿨다. 주변 지역 검색 | Places API | Google for Developers 이제 Places API (신규)가 출시되면서 차세대 Places API를 사..
TripMate (2) - 주변 지역 검색 API이전 포스팅 TripMate (1) - openweatherAPI와 CLLocationManager 사용하기 새로 시작하는 프로젝트에서 날씨를 가져오는 API를 사용하게 되었다. 예전 패스트캠퍼스 강의에서 날씨 앱을 만들 때 사용했던 openweather API를 사용했다. Сurrent weather and forecast - OpenWeatherMap Access kimkhuna99.tistory.com 이전에 사용하던 GoogleMap API를 사용하려다가 주변 지역을 검색해 주는 PlacesAPI가 더욱 앱의 취지에 맞는 것 같아 바꿨다. 주변 지역 검색 | Places API | Google for Developers 이제 Places API (신규)가 출시되면서 차세대 Places API를 사..
2023.12.06