Programming
-
Library] Lottie 로 json 애니메이션 넣기Programming/iOS 2020. 3. 15. 22:32
Lottie 는 json 애니메이션 파일을 여러 플랫폼으로(iOS, Android, Web etc) 제공해 준다. LottieFiles 에서 무료 json 파일을 검색해서 사용할 수 있다. https://github.com/airbnb/lottie airbnb/lottie Lottie documentation for http://airbnb.io/lottie. Contribute to airbnb/lottie development by creating an account on GitHub. github.com https://lottiefiles.com/ LottieFiles - Free animation files built for Lottie LottieFiles is a collection of an..
-
AutoLayout] 우선순위 설정 1Programming/iOS 2020. 3. 12. 16:24
iOS 프로젝트를 시작하면서, 헷갈렸던 우선순위에 대한 내용을 다시 살펴보고 정리해 보았다. UI 마스터가 되기위해 우선순위도 마스터 해보자 😎 기본적으로, 우선순위 값이 높을 수록, 그 제약조건은 우선적용 된다. (Max 1000) Content Hugging Priority 오브젝트가 가지고 있는 컨텐츠 크기값을 그대로 유지할 수 있을지에 대한 우선순위 Label 두개를 선택해, top, leading, trailing 값을 20 으로 동일하게 주면, 위와 같은 에러를 확인 할 수 있다. 에러 메시지를 보면, 둘 모두 우선순위가 같으니 어느 한쪽에 hugging priority 값을 251 보다 높은 252 로 높여 달라고 한다. Label A 에 Hugging priority 값을 252 로 변경해..
-
CSS] 중앙정렬하는 5가지 방법Programming/Web 2020. 3. 11. 22:24
5가지 모두 Element 구조는 모두 동일하다. 4,5 번은 구버전 브라우저에서 동작이 제대로 안될 수 있으므로, 체크가 필요하다. 1. absolute 사용 See the Pen GRJQmLo by jin (@tomatomat) on CodePen. 2. margin: 0 auto 사용 See the Pen zYGRzve by jin (@tomatomat) on CodePen. 3. margin, position 사용 See the Pen NWqyggy by jin (@tomatomat) on CodePen. 4. translate, position 사용 See the Pen yLNvXzR by jin (@tomatomat) on CodePen. 5. display: flex 사용 See the Pe..
-
SnapKit 으로 UI 만들기Programming/iOS 2020. 3. 11. 12:37
http://snapkit.io/ SnapKit snapkit.io 코드로 UI 잡을때 너무 긴 코드를 작성 해야했다. view.addSubview(vc.view) vc.view.translatesAutoresizingMaskIntoConstraints = false vc.view.topAnchor.constraint(equalTo: view.topAnchor).isActive = true vc.view.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true vc.view.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true vc.view.bottomAnchor..
-
iOS] ChainAnimationProgramming/iOS 2020. 3. 7. 16:39
View 를 탭했을때, UILabel 에 Chain Animation 적용해보자. viewDidLoad 에서 UILabel의 레이아웃을 잡고, 현재 view 에 탭제스쳐를 붙인다. override func viewDidLoad() { super.viewDidLoad() setupLabels() setupStackView() //animations view.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(handleTapAnimation))) } handleTapAnimation 코드 // Animation - titleLabel UIView.animate(withDuration: 0.5, delay: 0, usingS..
-
iOS_13] present 로 뷰를 넘겼을때, 카드형태로 나오는 현상Programming/iOS 2020. 3. 6. 14:54
let vc = UIViewController() self.present(vc, animated: true, completion: nil) 문제해결 present 했을때, 기본 옵션이 card presentation 이 됬으므로, 전체화면으로 뷰를 보여주고자 한다면 presentation style 을 변경해주어야 한다. let vc = UIViewController() vc.modalPresentationStyle = .fullScreen self.present(vc, animated: true, completion: nil) 참고자료 https://stackoverflow.com/questions/56435510/presenting-modal-in-ios-13-fullscreen Presenting ..
-
Firebase-smallProject] 2. 회원가입Programming/iOS 2020. 3. 6. 09:12
회원가입 ViewController 생성 : 이름, 이메일, 전화번호, 회원가입버튼 Authentication, database 문서를 참고하여 회원가입 버튼을 눌렀을때, 동작 정의 firebase console 에서 Authentication, database 탭에 보낸 데이터가 들어왔는지 확인 https://firebase.google.com/docs/database/ios/start?authuser=0 iOS에서 설치 및 설정 | Firebase 실시간 데이터베이스 Firebase 실시간 데이터베이스는 클라우드 호스팅 데이터베이스입니다. 데이터는 JSON으로 저장되며 연결된 모든 클라이언트에 실시간으로 동기화됩니다. Android, iOS 및 자바스크립트 SDK로 교차 플랫폼 앱을 개발하면 모든 클..
-
Firebase-smallProject] 1. 프로젝트 생성하기Programming/iOS 2020. 3. 5. 17:13
Xcode 프로젝트 생성 pod init 설치할 라이브러리 Podfile 에 추가 pod install open 프로젝트.xcworkspace - 빌드 해보고, 에러 난다면 pod update 혹은 pod 재설치 firebase 프로젝트 생성 firebase - iOS Project 연결 firebase console - remoteConfig 설정 (firebase 에서 값을 쏴서, 앱의 상태를 변화시킬수 있다) firebase console - Authentication 설정 : 로그인방법 - 이메일/비밀번호 - 사용설정true firebase console - database 설정 https://console.firebase.google.com 로그인 - Google 계정 하나의 계정으로 모든 Go..