티스토리 뷰
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
- rag 생성형 ai
- swift 엑셀 가져오기
- rag 챗봇
- rag 기반 llm
- 비동기 리스트 swift
- rag ai
- swift 엑셀 읽기
- swift get excel
- concurrency pagination
- readysay
- llm rag
- 레디세이
- filemanager excel read
- rag기반 챗봇
- chatgpt rag llm
- 공부 타이머 어플
- swift filemanager excel
- rag기반 ai
- llm pdf rag
- llm csv
- 비동기 페이징 swift
- swift filemanager get excel
- rag llm pdf
- 엔디소프트 레이세이
- rag 예제
- swift git ignore
- swift excel read
- ios gitignore
- 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 |
글 보관함