TIL_221012

애드·2022년 10월 27일

TIL

목록 보기
22/26

UITableViewCell 생성할 때 nib파일로 ui구성하지 않고 코드로 한다면 awakeFromNib이 아니라 init(style:,reuseIdentifier)를 오버라이드 해서 생성해야.

tableViewCell 선택 못하게
cell.selectionStyle = .none

tableViewCell에 오토레이아웃을 줄 때 아래와 같이 contentView에 뷰를 추가하고 거기에 제약을 적용

contentView.addSubview(AView)
AView.snp.makeConstraints { make in
	make.top.equalTo(contentView).inset(30)
}

https://developer.apple.com/documentation/uikit/uitableviewcell/1623229-contentview

UIButton 이미지 오른쪽으로
https://sarunw.com/posts/how-to-position-uibutton-image-to-th-right-side-of-text.md/

부분적 corner radius 주기
https://medium.com/@kimseakphon/how-to-set-cornerradius-for-only-top-left-and-top-right-corner-of-a-uiview-8b0c25ec94fe

footer 추가
https://stackoverflow.com/questions/5740518/uitableview-footer-stop-from-floating-over-content

scrollview bounce 없애기
https://stackoverflow.com/questions/7003261/cant-disable-bounce-with-uiscrollview-and-pagingenabled-yes

addsubview 됐는데 뷰에 안보임
https://stackoverflow.com/questions/29471946/view-shows-up-in-debug-view-hierarchy-but-not-on-device-sim

Xib vs. Nib vs. Storyboard
https://dalgonakit.tistory.com/82

required init?(coder: NSCoder)
https://medium.com/@b9d9/required-init-coder-nscoder-에-대해서-b67ddfc628

tableview cell prepareForReuse
https://varyeun.tistory.com/entry/prepareForReuse-의-사용법-쓰는-이유?category=885431

maksToBounds vs. clipsToBounds
https://zeddios.tistory.com/37

viewWillLayoutSubviews
vs. layoutSubviews
vs. viewDidLayoutSubviews
https://ios-development.tistory.com/195

tableView deleteRows 시 indexPath 업데이트 해결 안되는 문제
https://stackoverflow.com/questions/63416452/update-indexpath-value-after-deleting-a-row

figma의 shadow속성 편하게 적용할 수 있는 Extension
https://baechukim.tistory.com/112

UITabBar, NavigationBar 등이 있을 때 풀스크린을 채우고 싶다면 그냥 VC의 view 위에 올리면 안되고 Tabbar 위에 풀스크린으로 하고자 하는 뷰를 올리고 제약을 걸어야.

UITableViewCell 내의 UITextView의 입력과 그 줄 수에 따른 셀 높이 자동 조절
https://fomaios.tistory.com/entry/iOS-테이블뷰-안에-있는-텍스트뷰-높이-글에-따라-조정하기Dynamic-tableviewcell-height-by-textview-text

profile
2차전직 개발자가 되자

0개의 댓글