-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Feature/#107
- Loading branch information
Showing
6 changed files
with
266 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
// CALayer+Extensions.swift | ||
// BeMe | ||
// | ||
// Created by ์ด์ฌ์ฉ on 2021/01/15. | ||
// | ||
|
||
import UIKit | ||
|
||
|
||
extension CALayer { | ||
func addBorder(_ arr_edge: [UIRectEdge], color: UIColor, width: CGFloat) { | ||
for edge in arr_edge { | ||
let border = CALayer() | ||
switch edge { | ||
case UIRectEdge.top: | ||
border.frame = CGRect.init(x: 0, y: 0, width: frame.width, height: width) | ||
break | ||
case UIRectEdge.bottom: | ||
border.frame = CGRect.init(x: 0, y: frame.height - width, width: frame.width, height: width) | ||
break | ||
case UIRectEdge.left: | ||
border.frame = CGRect.init(x: 0, y: 0, width: width, height: frame.height) | ||
break | ||
case UIRectEdge.right: | ||
border.frame = CGRect.init(x: frame.width - width, y: 0, width: width, height: frame.height) | ||
break | ||
default: | ||
break | ||
} | ||
border.backgroundColor = color.cgColor; | ||
self.addSublayer(border) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,4 +37,4 @@ SPEC CHECKSUMS: | |
|
||
PODFILE CHECKSUM: e92005c7e2a5150ca84ffcc2935827fc104eb626 | ||
|
||
COCOAPODS: 1.10.0 | ||
COCOAPODS: 1.9.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,242 @@ | ||
# BeMeiOS | ||
|
||
<img src="https://user-images.githubusercontent.com/56102421/104687678-04ce8200-5743-11eb-8a17-ef279aa8f47f.png" width="40%" /> | ||
|
||
### BeMe | ||
> ๋์ ๋ํด ์์๊ฐ๋ ์ง๋ฌธ ๋ค์ด์ด๋ฆฌ , BeMe. | ||
## ๐ ํ๋ก์ ํธ ์๊ฐ | ||
|
||
- SOPT 27th ์ฅ๊ธฐ ํด์ปคํค APPJAM | ||
- ๊ธฐ๊ฐ: 2020.12.26 ~ 2021.1.16 | ||
|
||
> ๋งค์ผ ์ง๋ฌธ์ ๋ต์ ํ๋ฉฐ ๋๋ฅผ ์์๊ฐ๋ ์ง๋ฌธ๋ค์ด์ด๋ฆฌ BeMe ์ ๋๋ค. | ||
> | ||
> 24์๊ฐ๋ง๋ค ์๋ก์ด ์ง๋ฌธ ์ ๊ณต, ์๋ก์ด ์ง๋ฌธ ๋ฐ๊ธฐ๋ฅผ ํตํด ์ง๋ฌธ์ ๋ต์ ํ ์ ์์ต๋๋ค. | ||
> ์์ ์ ๊ธ์ ์ ์ฒด ๊ณต๊ฐํ์ฌ ์ฌ๋๋ค๊ณผ ์ํตํ ์ ์์ต๋๋ค. | ||
> ๋ง์ง๋ง์ผ๋ก ๋ง์ดํ์ด์ง์์ ๋ด๊ฐ ์ง๊ธ๊น์ง ๋ตํ ์ง๋ฌธ์ ์ฝ๊ฒ ๋ณผ ์ ์์ผ๋ฉฐ, ๋ด ์๊ฐ์ด ์ด๋ป๊ฒ ๋ณํ๋์ง ํ์ธํ ์ ์์ต๋๋ค. | ||
### Notion Link | ||
|
||
- [Notion](https://www.notion.so/iOS-688f11e27af9495faac336794ccac4fa) | ||
|
||
## ๐ ๊ฐ๋ฐ ํ๊ฒฝ ๋ฐ ๋ผ์ด๋ธ๋ฌ๋ฆฌ | ||
|
||
### ๋ชฉ์ฐจ | ||
### ๊ฐ๋ฐ ํ๊ฒฝ | ||
|
||
[![Swift 4](https://img.shields.io/badge/BeMe-iOS-black.svg?style=flat)](https://swift.org) ![Xcode](https://img.shields.io/badge/Xcode-12.3-blue) ![swift](https://img.shields.io/badge/swift-5.0-green) ![iOS](https://img.shields.io/badge/iOS-13.5-yellow) ![COCOAPODS](https://img.shields.io/badge/COCOAPODS-1.9.1-blue) | ||
|
||
### ๋ผ์ด๋ธ๋ฌ๋ฆฌ | ||
|
||
| ๋ผ์ด๋ธ๋ฌ๋ฆฌ(Library) | ๋ชฉ์ (Purpose) | ๋ฒ์ (VersionA | | ||
| ------------------- | ------------------------ | ------------------------------------------------------------ | | ||
| Alamofire | ์๋ฒ ํต์ | ![Alamofire](https://img.shields.io/badge/Alamofire-5.4.1-orange) | | ||
| Kingfisher | ์ด๋ฏธ์ง ์ฒ๋ฆฌ | ![Kingfisher](https://img.shields.io/badge/Kingfisher-6.0.1-yellow) | | ||
| SnapKit | ์คํ ๋ ์ด์์ | ![Kingfisher](https://img.shields.io/badge/SnapKit-5.0.1-black) | | ||
| Then | ์งง์ ์ฝ๋ ์ฒ๋ฆฌ | ![Kingfisher](https://img.shields.io/badge/Then-2.7.0-white) | | ||
| lottie-ios | ๋กํฐ ์ ๋๋ฉ์ด์ ์ฒ๋ฆฌ | ![lottie-ios](https://img.shields.io/badge/lottieios-3.1.9-green) | | ||
| Firebase/Messaging | Firebase Cloud Messaging | ![Kingfisher](https://img.shields.io/badge/Firebase/Messaging-yellow) | | ||
| SwiftLint | ๊น๋ํ ์ฝ๋ฉ ์ปจ๋ฒค์ | ![Kingfisher](https://img.shields.io/badge/SwiftLint-red) | | ||
|
||
### AutoLayout ์ ์ฉ ์ฌ๋ถ | ||
|
||
**1. iPhone 12 Pro ์ ์ฉ** | ||
|
||
**2. iPhone 12 mini ์ ์ฉ** | ||
|
||
**3. iPhone SE2 ์ ์ฉ** | ||
|
||
|
||
|
||
## ๐ ์๋น์ค workflow | ||
|
||
<img src="https://user-images.githubusercontent.com/56102421/104720646-69ec9c80-5770-11eb-9504-a90ff517bb9c.png" width="50%" height="50%"/> | ||
|
||
|
||
|
||
## ๐ ํ์ ๋ฐฉ์ | ||
|
||
- [Coding-Convention](https://www.notion.so/Naming-Rule-d1ad0ee6a8754d3d98d48a605139b4b2) | ||
|
||
- [Git-Management](/GitManage.md) | ||
|
||
- [Kanban Board](https://github.com/TeamBeMe/BeMeiOS/projects/1) | ||
- [Foldering](https://github.com/TeamBeMe/BeMeiOS/wiki/Foldering) | ||
|
||
### ํ์ฌ ์งํ์ฌํญ | ||
|
||
#### ์ค์ฌ | ||
- ํ,ํ๋ก์,์์ด๋ ๊ฒ์ ํ ํ๋ก์, ํ์๊ฐ์ , ๋ก๊ทธ์ธ ๋ทฐ ์์ฑ | ||
- ํ์๊ฐ์ , ๋ก๊ทธ์ธ ์๋ฒ์๋ฃ | ||
|
||
#### ์ฌ์ฉ | ||
- ํ์ ๋ทฐ ๊ตฌํ ์๋ฃ, ๋๊ธ ๋ทฐ ๊ตฌํ์ค | ||
## ๐ ๊ธฐ๋ฅ๋ณ ๊ฐ๋ฐ ์ฌ๋ถ | ||
|
||
| Category | ๊ธฐ๋ฅ | ๊ฐ๋ฐ | ๋ด๋น์ | | ||
| ---------------- | -------------------------------------------------- | ---- | -------- | | ||
| ์คํ๋์ | | ๐ พ๏ธ | [์ค์ฌ]() | | ||
| Auth | ๋ก๊ทธ์ธ | โญ๏ธ | [์ค์ฌ]() | | ||
| | ํ์๊ฐ์ | โญ๏ธ | [์ค์ฌ]() | | ||
| ๋ฉ์ธ ํ๋ฉด | ์ค๋์ ์ง๋ฌธ ์์ฑํ๊ธฐ ๋ฐ ์์ ํ๊ธฐ | โญ๏ธ | [์ค์ฌ]() | | ||
| | ๊ณผ๊ฑฐ์ ์ง๋ฌธ ์์ ํ๊ธฐ | โญ๏ธ | [์ค์ฌ]() | | ||
| | ๊ณต๊ฐ๋ฒ์ ์ค์ ํ๊ธฐ | โญ๏ธ | [์ค์ฌ]() | | ||
| | ๋๊ธ ๊ธฐ๋ฅ ํด์ ํ๊ธฐ | โญ๏ธ | [์ค์ฌ]() | | ||
| | ์๋ก์ด ์ง๋ฌธ ๋ฐ๊ธฐ | โญ๏ธ | [์ค์ฌ]() | | ||
| | ์ง๋ฌธ์ ๋ํ ์ ๋๋ฉ์ด์ ๊ตฌํ | โญ๏ธ | [์ค์ฌ]() | | ||
| ํ์ ํ๋ฉด | ๋์ ๋ค๋ฅธ ์๊ฐ๋ค ๋ต๋ณ ๊ฐ์ ธ์ค๊ธฐ | โญ๏ธ | [์ฌ์ฉ]() | | ||
| | ๋ค๋ฅธ ๊ธ ๋๋ฌ๋ณด๊ธฐ ๋ต๋ณ ๊ฐ์ ธ์ค๊ธฐ | โญ๏ธ | [์ฌ์ฉ]() | | ||
| | ์นดํ ๊ณ ๋ฆฌ ํํฐ ๊ธฐ๋ฅ (์ต์ / ํฅ๋ฏธ) | โญ๏ธ | [์ฌ์ฉ]() | | ||
| | ์นดํ ๊ณ ๋ฆฌ ํํฐ ๊ธฐ๋ฅ (์ง๋ฌธ ์ข ๋ฅ) | โญ๏ธ | [์ฌ์ฉ]() | | ||
| | ๋ฆฌ์คํธ ์ ๋๋ฉ์ด์ ๊ตฌํ | โญ๏ธ | [์ฌ์ฉ]() | | ||
| | ๋ต๋ณ ์คํฌ๋ฉํ๊ธฐ | โญ๏ธ | [์ฌ์ฉ]() | | ||
| | ์ค๋ ์ง๋ฌธ ๋ต๋ณ ํ๋ฌ๊ฐ๊ธฐ | โญ๏ธ | [์ฌ์ฉ]() | | ||
| ํ๋ก์ฐ ํ๋ฉด | ํ๋ก์ ํ๋ก์ ํํฐ ๊ธฐ๋ฅ | โญ๏ธ | [์ค์ฌ]() | | ||
| | ํ๋ก์์ ๋ํ ๋ต๋ณ ๊ฐ์ ธ์ค๊ธฐ | โญ๏ธ | [์ค์ฌ]() | | ||
| | ๋ต๋ณ ์ ํ ๋ต๋ณ ํ๋ฌ๊ฐ๊ธฐ | โญ๏ธ | [์ค์ฌ]() | | ||
| | ํ๋ก์ ํ๋ก์ ๊ฒ์ํ๊ธฐ | โญ๏ธ | [์ค์ฌ]() | | ||
| | ํ๋ก์ ํ๋ก์ ํด์ | โญ๏ธ | [์ค์ฌ]() | | ||
| ๋๊ธ ํ๋ฉด | ํน์ ๋ต๋ณ ๊ฐ์ ธ์ค๊ธฐ | โญ๏ธ | [์ฌ์ฉ]() | | ||
| | ๋๊ธ, ๋๋๊ธ ์์ฑ, ์์ , ์ญ์ ํ๊ธฐ | โญ๏ธ | [์ฌ์ฉ]() | | ||
| | ๋ต๋ณ ๋ฐ ๋๊ธ ์ ๊ณ ํ๊ธฐ | โญ๏ธ | [์ฌ์ฉ]() | | ||
| | ๋๊ธ, ๋๋๊ธ ๊ณต๊ฐ๋ฒ์ ์ค์ ํ๊ธฐ | โญ๏ธ | [์ฌ์ฉ]() | | ||
| ๋ง์ดํ์ด์ง ํ๋ฉด | ๋ด ํ๋กํ์ ๋ํ ์ ๋ณด ๊ฐ์ ธ์ค๊ธฐ | โญ๏ธ | [์ธ๋]() | | ||
| | ์ง๋ฌธ์ ๋ํ ๋ต๋ณ ๊ฐ์ ธ์ค๊ธฐ | โญ๏ธ | [์ธ๋]() | | ||
| | ์คํฌ๋ฉํ ๋ต๋ณ ๊ฐ์ ธ์ค๊ธฐ | โญ๏ธ | [์ธ๋]() | | ||
| | ๋ตํ ์ง๋ฌธ์ ๋ํ ๊ธ ๊ณต๊ฐ๋ฒ์ ์ค์ ํ๊ธฐ | โญ๏ธ | [์ธ๋]() | | ||
| | ํ๋กํ ํธ์งํ๊ธฐ | โญ๏ธ | [์ธ๋]() | | ||
| | ๋ด ๋ต๋ณ๋ค ํํฐ(๊ณต๊ฐ๋ฒ์, ์นดํ ๊ณ ๋ฆฌ)๋ฅผ ํตํด ๊ฒ์ํ๊ธฐ | โญ๏ธ | [์ธ๋]() | | ||
| ํ์ธ ํ๋กํ ํ๋ฉด | ํ์ธ ํ๋กํ์ ๋ํ ์ ๋ณด ๊ฐ์ ธ์ค๊ธฐ | โญ๏ธ | [์ธ๋]() | | ||
| | ํ์ธ์ด ๋ตํ ๋ต๋ณ ๊ฐ์ ธ์ค๊ธฐ | โญ๏ธ | [์ธ๋]() | | ||
| | ํ๋ก์ฐํ๊ธฐ ๋ฐ ์ทจ์ํ๊ธฐ | โญ๏ธ | [์ธ๋]() | | ||
| | ํ์ธ์ ๋ต๋ณ ์คํฌ๋ฉํ๊ธฐ | โญ๏ธ | [์ธ๋]() | | ||
| ๊ธ์ฐ๊ธฐ | | | | | ||
|
||
๐ API ๋จ์๋ก ์์ ์์ | ||
|
||
|
||
|
||
## ๐ ํต์ฌ ๊ธฐ๋ฅ ๊ตฌํ ๋ฐฉ๋ฒ | ||
|
||
- ๊ธ์ฐ๊ธฐ | ||
|
||
```swift | ||
|
||
``` | ||
|
||
- ํ์ธ์ด ์ด ๊ธ ๋ณด๊ธฐ | ||
|
||
```swift | ||
|
||
``` | ||
|
||
|
||
|
||
## ๐ Extension์ ํตํ ๋ฉ์๋ ์ค๋ช | ||
|
||
<img src="https://user-images.githubusercontent.com/56102421/104726128-6b20c800-5776-11eb-9f2b-a9191bcce21d.png" width="30%"/> | ||
|
||
- UIView Extension | ||
|
||
```swift | ||
extension UIView { | ||
// Set Rounded View | ||
func makeRounded(cornerRadius : CGFloat?){ | ||
|
||
// UIView ์ ๋ชจ์๋ฆฌ๊ฐ ๋ฅ๊ทผ ์ ๋๋ฅผ ์ค์ | ||
if let cornerRadius_ = cornerRadius { | ||
self.layer.cornerRadius = cornerRadius_ | ||
} else { | ||
// cornerRadius ๊ฐ nil ์ผ ๊ฒฝ์ฐ์ default | ||
self.layer.cornerRadius = self.layer.frame.height / 2 | ||
} | ||
|
||
self.layer.masksToBounds = true | ||
} | ||
|
||
// Set UIView's Shadow | ||
func dropShadow(color: UIColor, offSet: CGSize, opacity: Float, radius: CGFloat) { | ||
|
||
// ๊ทธ๋ฆผ์ ์์ ์ค์ | ||
layer.shadowColor = color.cgColor | ||
// ๊ทธ๋ฆผ์ ํฌ๊ธฐ ์ค์ | ||
layer.shadowOffset = offSet | ||
// ๊ทธ๋ฆผ์ ํฌ๋ช ๋ ์ค์ | ||
layer.shadowOpacity = opacity | ||
// ๊ทธ๋ฆผ์์ blur ์ค์ | ||
layer.shadowRadius = radius | ||
// ๊ตฌ๊ธ๋ง ํด๋ณด์ธ์! | ||
layer.masksToBounds = false | ||
|
||
} | ||
|
||
// Set UIView's Border | ||
func setBorder(borderColor : UIColor?, borderWidth : CGFloat?) { | ||
|
||
// UIView ์ ํ ๋๋ฆฌ ์์ ์ค์ | ||
if let borderColor_ = borderColor { | ||
self.layer.borderColor = borderColor_.cgColor | ||
} else { | ||
// borderColor ๋ณ์๊ฐ nil ์ผ ๊ฒฝ์ฐ์ default | ||
self.layer.borderColor = UIColor(red: 205/255, green: 209/255, blue: 208/255, alpha: 1.0).cgColor | ||
} | ||
|
||
// UIView ์ ํ ๋๋ฆฌ ๋๊ป ์ค์ | ||
if let borderWidth_ = borderWidth { | ||
self.layer.borderWidth = borderWidth_ | ||
} else { | ||
// borderWidth ๋ณ์๊ฐ nil ์ผ ๊ฒฝ์ฐ์ default | ||
self.layer.borderWidth = 1.0 | ||
} | ||
} | ||
} | ||
``` | ||
|
||
- UIViewController | ||
|
||
```swift | ||
extension UIViewController { | ||
// ํ ์คํธ ๋ฉ์ธ์ง | ||
func showToast(text: String, completion: @escaping ()->()) { | ||
let toast = ToastView(frame: CGRect(x: 0, y: 0, width: 343, height: 84)) | ||
toast.setLabel(text: text) | ||
toast.alpha = 0 | ||
self.view.addSubview(toast) | ||
toast.snp.makeConstraints { | ||
$0.leading.equalToSuperview().offset(16) | ||
$0.trailing.equalToSuperview().offset(-16) | ||
$0.bottom.equalToSuperview().offset(-101) | ||
} | ||
UIView.animate(withDuration: 0.3, animations: { | ||
toast.alpha = 1 | ||
|
||
},completion: { finish in | ||
UIView.animate(withDuration: 0.3, delay: 0.7, animations: { | ||
toast.alpha = 0 | ||
|
||
}, completion: { finish in | ||
if finish { | ||
toast.removeFromSuperview() | ||
completion() | ||
} | ||
}) | ||
}) | ||
} | ||
} | ||
``` | ||
|
||
- UIImageView | ||
|
||
```swift | ||
// Kingfisher๋ฅผ ์ด์ฉํ์ฌ url๋ก๋ถํฐ ์ด๋ฏธ์ง๋ฅผ ๊ฐ์ ธ์ค๋ extension | ||
extension UIImageView { | ||
|
||
public func imageFromUrl(_ urlString: String?) { | ||
if let url = urlString { | ||
self.kf.setImage(with: URL(string: url), options: [.transition(ImageTransition.fade(0.5))]) | ||
} | ||
} | ||
} | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
## ๐ ํ์ ์๊ฐ | ||
|
||
| **์ค์ฌ** | **์ธ๋** | **์ฌ์ฉ** | | ||
| :----------------------------------------------------------: | :------------------------: | :----------------------------------------------------------: | | ||
| <img src="https://user-images.githubusercontent.com/56102421/104729189-6f031900-577b-11eb-84f6-fa082870caf6.jpeg" width="60%"/> | <img src="" width="50% "/> | <img src="https://user-images.githubusercontent.com/56102421/104729197-70ccdc80-577b-11eb-98fc-aa5902113cd6.jpeg" width="60%"/> | | ||
| ๋ค์ด์ค | | | | ||
|
||
|
||
### ๋ชฉ์ฐจ | ||
|
||
#### ์ธ๋ | ||
- ๊ธ์ฐ๊ธฐ ๋ทฐ ๊ตฌํ ์๋ฃ | ||
- ๋ง์ดํ์ด์ง ๋ทฐ ๊ตฌํ์ค |