오늘은 롱 프레스 메뉴를 만들어보겠습니다. 버튼을 하나 만들고요. @IBOutlet var myButton: UIButton! viewDidLoad 에 인터렉션을 만들고 버튼에 추가해주세요. let btnInteraction = UIContextMenuInteraction(delegate: self) myButton.addInteraction(btnInteraction) 그러면 이런식으로 델리게이트 상속 받으라고 나옵니다. 빨간원 누르고 Fix 눌러서 델리게이트와 함수를 추가해주세요. 이 함수가 추가되셨을텐데 여기 안에다가 메뉴를 만들어서 넣으면 됩니다. func contextMenuInteraction(_ interaction: UIContextMenuInteraction, configurationFo..
UITableView 를 Swipe 했을 때 나오는 삭제 버튼명을 변경해보겠습니다. 기본은 Delete 로 나옵니다. UITableViewDelegate 를 상속 받으신 후에 진행해야합니다. func tableView(_ tableView: UITableView, titleForDeleteConfirmationButtonForRowAt indexPath: IndexPath) -> String? { return "삭제" } 이 코드를 작성하면 됩니다. 잘 변경됐네요. 전체 코드입니다. import UIKit class ViewController3: UIViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet var myTableView:..
UITableView 를 Swipe 해서 cell 을 remove 해보겠습니다. 코드로 작성해야합니다. func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { dataArray.remove(at: indexPath.row) tableView.deleteRows(at: [indexPath], with: .fade) } else if editingStyle == .insert { } } 이렇게 작성하면 끝입니다. 잘 나오네요. 전체 코드입니다. import UIKit class ViewCon..
- Total
- Today
- Yesterday
- 리젝
- TabView
- picker
- 엑스코드
- SWIFT
- SKPayment
- Authorization
- 로컬라이징
- 인디케이터
- 심사
- custom segment
- Xcode
- 테이블뷰
- TabBar
- swiftUI
- Infinite Carousel
- localizing
- permission
- ios
- localizable
- Reject
- presentationcompactadaptation
- 아이오에스
- 현지화
- 다국어
- 프로그레스
- 스위프트
- Language
- indicator
- AppStore
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 29 | 30 | 31 |