Home 3월 13일 Today I Learned
Post
Cancel

3월 13일 Today I Learned

오늘한 일

  • 프로젝트를 진행했다
  • 알고리즘 문제를 풀었다
  • 블로그 TIL을 작성하였다
  • 1일 1커밋을 하였다

느낌 점

이번에 프로젝트를 진행하면서 Swift로 TableView를 구현하는게 미숙하다는 걸 알게 되었다 이번 프로젝트가 끝나고 해당 부분에 대해 더 공부 해봐야겠다

배운 점

Swift 슬라이드 하여 뒤로가기

나는 아직 iOS를 사용하는 아이폰을 쓰지 않아서 모르고 있었지만 사용하는 형에게 물어보니 네비게이션바로 나가기는 불편해서 슬라이드로 나가는 기능을 주로 쓰는데 해당 기능을 지원하지 않으면 사용성 측면에서 불편하다는 것을 알게 되었다

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
func swipeRecognizer() {
    let swipeRight = UISwipeGestureRecognizer(target: self, action: #selector(self.respondToSwipeGesture(_:)))
    swipeRight.direction = UISwipeGestureRecognizer.Direction.right
    self.view.addGestureRecognizer(swipeRight)
    
}

@objc func respondToSwipeGesture(_ gesture: UIGestureRecognizer){
    if let swipeGesture = gesture as? UISwipeGestureRecognizer {
        switch swipeGesture.direction{
        case UISwipeGestureRecognizer.Direction.right:
            self.dismiss(animated: true, completion: nil)
        default: break
        }
    }
}

해당 내용은 블로그에서 참고하였다

내일 계획

내일은 마저 프로젝트를 진행해야겠다

This post is licensed under CC BY 4.0 by the author.

3월 12일 Today I Learned

iOS AutoLayout 오류 메시지 팁