- SOPT 27th μ₯κΈ° ν΄μ»€ν€ APPJAM
- κΈ°κ°: 2020.12.26 ~ 2021.1.16
λ§€μΌ μ§λ¬Έμ λ΅μ νλ©° λλ₯Ό μμκ°λ μ§λ¬Έλ€μ΄μ΄λ¦¬ BeMe μ λλ€.
24μκ°λ§λ€ μλ‘μ΄ μ§λ¬Έ μ 곡, μλ‘μ΄ μ§λ¬Έ λ°κΈ°λ₯Ό ν΅ν΄ μ§λ¬Έμ λ΅μ ν μ μμ΅λλ€. μμ μ κΈμ μ 체 곡κ°νμ¬ μ¬λλ€κ³Ό μν΅ν μ μμ΅λλ€. λ§μ§λ§μΌλ‘ λ§μ΄νμ΄μ§μμ λ΄κ° μ§κΈκΉμ§ λ΅ν μ§λ¬Έμ μ½κ² λ³Ό μ μμΌλ©°, λ΄ μκ°μ΄ μ΄λ»κ² λ³νλμ§ νμΈν μ μμ΅λλ€.
1. iPhone 12 Pro μ μ©
2. iPhone 12 mini μ μ©
3. iPhone SE2 μ μ©
νλ©΄ | κΈ°λ₯ | μμΈ κΈ°λ₯ | κ°λ° |
---|---|---|---|
μ€νλμ | μ€μ¬π | ||
μ¨λ³΄λ© | μ€μ¬π | ||
νμκ°μ | μ€μ¬π | ||
λ‘κ·ΈμΈ | λ‘κ·ΈμΈ | μ€μ¬π | |
μλλ‘κ·ΈμΈ | μ€μ¬π | ||
ν | μ€λμ μ§λ¬Έ λ° λ΅λ³ μ΄λ | μ€μ¬π | |
κ³Όκ±°μ μ§λ¬Έ λ° λ΅λ³ μ΄λ | μ€μ¬π | ||
μΆκ° μ§λ¬Έ μ΄λ | μ€μ¬π | ||
λ΅λ³ κ³΅κ° λ²μ μ€μ | μ€μ¬π | ||
λ΅λ³ μμ λ° μμ | μ€μ¬π | ||
νμ | λμ λ€λ₯Έ λ΅λ³λ€ μ΄λ | μ¬μ©πΆ | |
λ€λ₯Έ λ΅λ³λ€ λλ¬λ³΄κΈ° | μ΅μ , ν₯λ―Έ ν λ° ν€μλ νν° κ²μ | μ¬μ©πΆ | |
μ€ν¬λ©/ μΈμ€ν¬λ© | μ¬μ©πΆ | ||
μ κ³ νκΈ° | μ¬μ©πΆ | ||
νλ‘μ | νλ‘μ/ νλ‘μμ λ΅λ³ μ΄λ | μ€μ¬π | |
νλ‘μ/ νλ‘μ μ΄λ | μ€μ¬π | ||
νλ‘μ/ νλ‘μ κ²μ | μ¬μ©μ κ²μ | μ€μ¬π | |
νλ‘μ°/ μΈνλ‘μ° | μ€μ¬π | ||
νλ‘μ μμ | μ€μ¬π | ||
μ κ³ νκΈ° | μ€μ¬π | ||
λ§μ΄νμ΄μ§ | νλ‘ν νΈμ§ | μ€μ¬π | |
λ΄ κΈ, μ€ν¬λ© μ΄λ | μΈλπΏ | ||
ν€μλ λ° νν° κ²μ | μΈλπΏ | ||
λ΅λ³ κ³΅κ° λ²μ μ€μ | μΈλπΏ | ||
μ€ν¬λ©/ μΈμ€ν¬λ© | μΈλπΏ | ||
κΈ μμΈ | λ΅λ³ | λ΅λ³ μμΈ μ΄λ | μ¬μ©πΆ |
λ΅λ³ μμ λ° μμ | μ¬μ©πΆ | ||
μ€ν¬λ©/μΈμ€ν¬λ© | μ¬μ©πΆ | ||
μ κ³ νκΈ° | μ¬μ©πΆ | ||
λκΈ | λκΈ μμ± | μ¬μ©πΆ | |
λκΈμ λ΅κΈ μμ± | μ¬μ©πΆ | ||
λκΈ κ³΅κ°λ²μ μ€μ | μ¬μ©πΆ | ||
λκΈ μμ λ° μμ | μ¬μ©πΆ | ||
κΈ μ°κΈ° | 곡κ°λ²μ λ° λκΈ κΈ°λ₯ μ€μ | μ€μ¬π, μΈλπΏ | |
μμμ μ₯ | μΈλπΏ | ||
λ΅λ³νκΈ° | μΈλπΏ | ||
νμΈνμ΄μ§ | νλ‘μ°/ μΈνλ‘μ° | μΈλπΏ | |
μ€ν¬λ©/ μΈμ€ν¬λ© | μΈλπΏ | ||
μ κ³ νκΈ° | μΈλπΏ | ||
μ΅κ·Ό νλ | λκΈ λ° λ΅κΈ μλ¦Ό | ||
νλ‘μ μλ¦Ό | |||
μ₯κΈ° νΈμ¬ μλ¦Ό | μ€λμ μ§λ¬Έ λ°κΈ° | μ€μ¬π |
- κΈμ°κΈ°
answer dataλ₯Ό λ£μ΄μ κΈμ λ±λ‘νλ μ½λ
AnswerRegistService.shared.regist(answerID: answerData!.id!, content: answerData!.answer!, commentBlocked: commentSwitch.isOn, isPublic: answerSwitch.isOn) {(networkResult) -> (Void) in
switch networkResult{
case .success(let data) :
print(self.isFromFollowingTab)
if self.isFromFollowingTab {
self.followScrapButtonDelegate?.fromAnswerVC(indexInVC: self.indexInFollowingVC!)
}
case .requestErr(let msg):
if let message = msg as? String {
print(message)
}
case .pathErr :
print("pathErr")
case .serverErr :
print("serverErr")
case .networkFail:
print("networkFail")
}
}
- νμΈμ΄ μ΄ κΈ λ³΄κΈ°
λ€λ₯Έ νμ΄μ§λ₯Ό λ€λ μμ λ€λ₯Έ μ¬λμ κΈμ λ³λμ΄ μκΈΈ κ²½μ° μλ‘ ν΅μ μ ν΄μ Reloadν΄μ€μΌν¨ νμ΄μ§ ν΄μ μ 보λ₯Ό λ°κΈ° λλ¬Έμ 1νμ΄μ§λΆν° μλμ νμ΄μ§κΉμ§ λ€μ λ°μμμΌ ν¨ μ΄ κ³Όμ μμ μ²μμλ forλ¬Έμ μ΄μ©ν΄μ μ΄λ €μμ κ²ͺμμΌλ, ν΅μ μμμ μ¬κ·ν¨μ νΈμΆμ ν΅ν΄ ν΄κ²°
func getUpdateAnswers(){
let loadingFrame = CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height)
LoadingHUD.show(loadingFrame: loadingFrame,color: .white)
curPage = 0
answers = []
updateDataOnePage()
}
func updateDataOnePage(){
curPage += 1
let loadingFrame = CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height)
FollowingGetAnswersService.shared.getAnswerData(page: curPage){(networkResult) -> (Void) in
switch networkResult{
case .success(let data) :
if let answerDatas = data as? FollowingAnswersData {
self.pageLen = answerDatas.pageLen
for answerData in answerDatas.answers{
self.answers.append(answerData)
}
}
if self.curPage < self.answerPage {
self.updateDataOnePage()
}
else{
DispatchQueue.global(qos: .background).sync {
self.wholeCollectionView.reloadData()
self.wholeCollectionView.setContentOffset(CGPoint(x: 0, y: self.lastY), animated: false)
}
LoadingHUD.hide()
if self.answers.count == 0{
self.customEmptyView.setItems(text: "μμ΄μΏ ..! μμ§ νλ‘μ°νλ μ¬λμ΄ μκ΅°μ\nνλ‘μμ νκ³ λ€λ₯Έ μ¬λλ€μ κΈμ λλ¬λ³΄μΈμ")
self.wholeCollectionView.addSubview(self.customEmptyView)
print(self.customEmptyView.superview?.bounds.minX)
self.customEmptyView.snp.makeConstraints{
$0.centerX.equalToSuperview()
$0.top.equalToSuperview().offset(362)
$0.height.equalTo(80)
}
}
else{
self.customEmptyView.removeFromSuperview()
}
}
print("success")
case .requestErr(let msg):
if let message = msg as? String {
print(message)
}
case .pathErr :
print("pathErr")
case .serverErr :
print("serverErr")
case .networkFail:
print("networkFail")
}
}
}
-
UIView Extension
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
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
// 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))]) } } }
μ€μ¬ | μΈλ | μ¬μ© |
---|---|---|
λ€μ΄μ€ |