StyleShare/swift-style-guide
파일명
스토리보드이름
ViewController
Cell 이름
- CollectionViewCell 이름 : CVCell
- TableViewCell 이름 : TVCell
코드레이아웃
최대 줄길이
줄바꿈
- 최대 길이를 초과하는 경우 다음과 같이
- 함수 정의
func animationController(
forPresented presented: UIViewController,
presenting: UIViewController,
source: UIViewController
) -> UIViewControllerAnimatedTransitioning? {
// doSomething()
}
let actionSheet = UIActionSheet(
title: "정말 계정을 삭제하실 건가요?",
delegate: self,
cancelButtonTitle: "취소",
destructiveButtonTitle: "삭제해주세요"
)
- 클로저 2개 이상 존재하는 경우 무조건 내려쓰기
UIView.animate(
withDuration: 0.25,
animations: {
// doSomething()
},
completion: { finished in
// doSomething()
}
)