티스토리 뷰
TableView에서 선택된 cell을 최상위 layer로 가져오는 방법입니다.
우선 cell을 정의할때, selectedIndex(전역변수)로 cell을 구분해줬습니다.
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == selectedIndex {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
cell.layer.zPosition = 1
return cell
} else {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
return cell
}
그리고
cell.layer.zPosition = 1
코드를 사용하여 최상위 layer로 가져올 수 있음
참고로
tableView.bringToFront(cell)
코드도 써봤는데 적용되지 않더라구요
감사합니다~
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- swift queryitem encode
- swift network 공통화
- swift filemanager excel
- 엔디소프트 레이세이
- 레디세이 어플
- swift urlsession module
- 레디세이
- readysay
- rag 기반 llm
- swift excel read
- swift urlcomponent encode
- llm pdf rag
- filemanager excel read
- focus timer 어플
- swift get excel
- swift urlsession 공통화
- swift 네트워크 모듈화
- rag llm pdf
- llm csv
- swift network module
- swift 자간
- swift urlsession network module
- chatgpt rag llm
- swift filemanager get excel
- rag 기반 llm 챗봇
- swift 엑셀 가져오기
- swift network refactoring
- swift urlsession refactoring
- 공부 타이머 어플
- swift 엑셀 읽기
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함