설 연수
하하호홓
설 연수
전체 방문자
오늘
어제
  • 분류 전체보기 (231)
    • Back-End (2)
      • Java (20)
      • JSP (13)
      • Spring (18)
      • Kotlin (0)
      • node.js (0)
    • Front-End (68)
      • JavaScript (19)
      • jQuery (39)
      • Angular (4)
      • HTML (5)
    • Dev-Ops (12)
      • Linux, Cloud (5)
      • docker, k8s (5)
      • ElasticSeach (2)
    • Other (33)
      • OOP (3)
      • 알고리즘 (2)
      • DB (12)
      • Git (1)
      • Swift (4)
    • Backup (65)

블로그 메뉴

    공지사항

    인기 글

    태그

    • Redis
    • flex
    • angular 콜백
    • page not found
    • CORS
    • jOOQ
    • 404 error
    • angular4
    • angular callback
    • jquery invalid
    • 크로스도메인
    • 패스트캠퍼스
    • Angular
    • RESTful
    • INVALID
    • angular2
    • MYSQL
    • mongodb
    • Kafka
    • docker

    최근 댓글

    최근 글

    티스토리

    hELLO · Designed By 정상우.
    설 연수

    하하호홓

    Other/Swift

    테이블셀을 스와이프(swipe)해도 수정모드가 되지 않을때

    2019. 5. 3. 12:54

    allowsSelectionDuringEditing을 true로 해도 스와이프가 안먹을때!!!!

    self.tableView.allowsSelectionDuringEditing = true

    editingStyleForRowAt을 구현했음에도!!!! 스와이프가 안먹을때!!!!!!!!

    override func tableView(_ tableView: UITableView, editingStyleForRowAt indexPath: IndexPath) -> UITableViewCell.EditingStyle {
    	return .delete
    }​

     

    commit을 구현하니까 되네....중간에 확인해보려다가 안되서... 전부 구현하고 확인하면 이런일은 없을것이다

    override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
            if editingStyle == .delete {
                tableView.deleteRows(at: [indexPath], with: .fade)
            } else if editingStyle == .insert {
                // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
            }
        }

    'Other > Swift' 카테고리의 다른 글

    집단자료형(배열/집합/튜플/딕셔너리) - 작성필요  (0) 2019.05.03
    테이블뷰 하단에 빈셀 표시 막기(tableFooterView)  (0) 2019.05.03
    UITextField 커서 안깜빡이게 하기  (0) 2019.04.29
      'Other/Swift' 카테고리의 다른 글
      • 집단자료형(배열/집합/튜플/딕셔너리) - 작성필요
      • 테이블뷰 하단에 빈셀 표시 막기(tableFooterView)
      • UITextField 커서 안깜빡이게 하기
      설 연수
      설 연수

      티스토리툴바