Skip to content

Commit

Permalink
Refactor: tableview 스크롤되는 현상 수정
Browse files Browse the repository at this point in the history
- datasource의 변경 애니메이션 막음. => 이유는 모르겠음
- gradView 내부 제약조건 수정
  • Loading branch information
Minny27 committed Mar 11, 2024
1 parent 334aa18 commit bee5bf4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ final class MyPageTableViewCell: UITableViewCell {
titleLabel.text = item.title
if let count = item.count {
countLabel.text = "\(count)"
}
} else { countLabel.text = nil }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -167,22 +167,21 @@ final class MyPageViewController: NagazaBaseViewController {
}

gradeView.snp.makeConstraints { make in
make.top.equalTo(contentsLabel.snp.bottom).offset(13)
make.top.equalTo(profileImageView.snp.bottom).offset(24)
make.directionalHorizontalEdges.equalToSuperview().inset(25)
make.height.equalTo(56)
}

gradeImageView.snp.makeConstraints { make in
make.size.equalTo(40)
make.width.equalTo(40)
make.leading.equalToSuperview().inset(15)
make.trailing.equalTo(gradeInfoLabel.snp.leading).offset(-10)
make.centerY.equalToSuperview()
make.top.equalToSuperview().inset(10)
}

gradeInfoLabel.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.leading.equalTo(gradeImageView.snp.trailing).offset(10)
make.trailing.equalTo(gradeInfoImageView.snp.leading).offset(-10)
make.centerY.equalToSuperview()
}

gradeInfoImageView.snp.makeConstraints { make in
Expand Down Expand Up @@ -222,7 +221,7 @@ final class MyPageViewController: NagazaBaseViewController {
}
}

this.dataSource.apply(snapshot)
this.dataSource.apply(snapshot, animatingDifferences: false)
}
.disposed(by: disposeBag)
}
Expand Down

0 comments on commit bee5bf4

Please sign in to comment.