Programming/Swift(17)
-
[Swift] RXSwift Refactoring in iOS
🕺 오늘 구현한 것 hotfix로 JWT 토큰 만료 시, refresh하는 로직을 구현했습니다. https://github.com/GDSC-Wetox/Wetox-iOS/pull/16 [HOTFIX] Token Refresh 구현 by SohyeonKim-dev · Pull Request #16 · GDSC-Wetox/Wetox-iOS Summary & Issues Closes #15 Contents Token이 만료되어 네트워크 error가 발생할 경우 호출될 handleTokenError func 구현 메인 화면 및 토큰을 기반으로 API를 호출하는 모든 함수들의 error 처리 부분에 해당 함수 github.com 제가 회원가입 및 로그인 과정을 Escaping Closure를 기반으로 구현했었는데요..
2024.02.13 -
[Swift] Alamofire vs Moya & URLSession에 대하여
URLSession The URLSession class and related classes provide an API for downloading data from and uploading data to endpoints indicated by URLs. Your app can also use this API to perform background downloads when your app isn’t running or, in iOS, while your app is suspended. You can use the related URLSessionDelegate and URLSessionTaskDelegate to support authentication and receive events like re..
2023.01.27 -
[Swift] XCode Project File (.xcodeproj, .pbxproj) & Conflict에 대하여
Xcode Project An Xcode project is a repository for all the files, resources, and information required to build one or more software products. A project contains all the elements used to build your products and maintains the relationships between those elements. It contains one or more targets, which specify how to build products. A project defines default build settings for all the targets in th..
2023.01.27 -
[Swift] SnapKit vs AutoLayout & Pros and cons of using 3rd-Party
SnapKit vs AutoLayout - 코드 Base로 Programmatically하게 UI를 구현할 때 마주치는 고민 SnapKit is a powerful auto layout library with a minimal amount of code to minimize developer work in managing constraints. SnapKit doesn't really solve any problems inherent with IB. It all boils down to user preference, though my personal recommendation is to stick to IB because that is the standard layout tool and it's very..
2023.01.26 -
[Swift] CocoaPod vs Swift Package Manager
1. CocoaPod vs Swift Package Manager Podfile을 통해 패키지 설치를 하는 것과, XCode 내부에서 패키지 매니저를 통해 설치하는 것 둘의 차이(장단점)가 궁금했다. 무작정 패키지 매니저가 더 좋지! 보다는, 왜 좋은지 궁금해서 찾아봤습니다 :) 1) CocoaPod ✳️ Advantages You can search for a dependency on the official CocoaPods website. Supports both Dynamic Frameworks and Static Libraries (since version 1.5.0). Automatically manage a dependency’s dependencies. If a dependency relie..
2023.01.26 -
[Swift] tap gesture
[ 공식 문서 읽기 ] https://developer.apple.com/documentation/uikit/uiview/1622496-addgesturerecognizer https://developer.apple.com/documentation/uikit/uitapgesturerecognizer // // UniverseSearchViewController.swift // Tars // // Created by 김소현 on 2022/11/02. // import UIKit import SceneKit import ARKit enum Mode { case explore case search(planet: String) var titleText: String { switch self { case .exp..
2022.11.21 -
[UI-Kit] CollectionView Cell Selection / Deselection
# shouldSelecItemAt func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool { guard let cell = collectionView.cellForItem(at: indexPath) as? SelectPlanetCollectionViewCell else { return true } if cell.isSelected { // TODO: 탐색 모드로 변환 cell.planetNameLabel.textColor = .white cell.backgroundView = nil self.navigationController?.topViewController?.titl..
2022.11.15 -
[Swift] CollectionView Cell _ Lingo Feedback
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: SelectPlanetCollectionViewCell.identifier, for: indexPath) as? SelectPlanetCollectionViewCell else { return UICollectionViewCell() } let selectedPlanetName = planetList[indexPath.row].planetName let selected..
2022.11.01 -
[Swift] 다른 file (viewController) 간의 조작
private var isKorean: Bool = false func setISKorean(isKoreanBool: Bool) { self.isKorean = isKoreanBool } : Set method @objc private func englishSettingButtonTapped() { let englishTextViewController = EnglishTextViewController() englishTextViewController.setISKorean(isKoreanBool: false) self.navigationController?.pushViewController(englishTextViewController, animated: true) } viewController에 met..
2022.08.31 -
📑 firestore database 접근 및 삭제 code, firestore Queries 🍎
https://hello-developer.tistory.com/52 https://hello-developer.tistory.com/53?category=951601 https://velog.io/@leesangsu200/Firestore에서-데이터-가져오기 https://github.com/DeveloperAcademy-POSTECH/MC3-Team3-Puhaha GitHub - DeveloperAcademy-POSTECH/MC3-Team3-Puhaha: 밥 먹언? : 부모와 자녀 간 식사사진을 공유할 수 있는 앱 밥 먹언? : 부모와 자녀 간 식사사진을 공유할 수 있는 앱 . Contribute to DeveloperAcademy-POSTECH/MC3-Team3-Puhaha development b..
2022.08.28