![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/CGPN9/btqT910crHv/nGDx6DTJ35UuVwFUqAeamk/img.gif)
오늘은 롱 프레스 메뉴를 만들어보겠습니다. 버튼을 하나 만들고요. @IBOutlet var myButton: UIButton! viewDidLoad 에 인터렉션을 만들고 버튼에 추가해주세요. let btnInteraction = UIContextMenuInteraction(delegate: self) myButton.addInteraction(btnInteraction) 그러면 이런식으로 델리게이트 상속 받으라고 나옵니다. 빨간원 누르고 Fix 눌러서 델리게이트와 함수를 추가해주세요. 이 함수가 추가되셨을텐데 여기 안에다가 메뉴를 만들어서 넣으면 됩니다. func contextMenuInteraction(_ interaction: UIContextMenuInteraction, configurationFo..
![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/k4C7y/btqTV7Z7Y8E/WFgKoPPKf6yhOfXsCoPpkK/img.gif)
땡겨서 나오는 버튼을 만들어보겠습니다. 왼쪽, 오른쪽 가능 UITableViewDelegate 을 상속 받으신 후에 만들고 싶은 방향 매서드를 써주세요. func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? { // 오른쪽에 만들기 } func tableView(_ tableView: UITableView, leadingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? { // 왼쪽에 만들기 } UIContex..
![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/bBatWq/btqTPyKF0BG/UpDvRPKTxgspPWbR9MyX7K/img.png)
UITableView 를 Swipe 했을 때 나오는 삭제 버튼명을 변경해보겠습니다. 기본은 Delete 로 나옵니다. UITableViewDelegate 를 상속 받으신 후에 진행해야합니다. func tableView(_ tableView: UITableView, titleForDeleteConfirmationButtonForRowAt indexPath: IndexPath) -> String? { return "삭제" } 이 코드를 작성하면 됩니다. 잘 변경됐네요. 전체 코드입니다. import UIKit class ViewController3: UIViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet var myTableView:..
- Total
- Today
- Yesterday
- Xcode
- SWIFT
- TabBar
- permission
- 심사
- 리젝
- 프로그레스
- SKPayment
- localizing
- 아이오에스
- 스위프트
- 로컬라이징
- AppStore
- Authorization
- indicator
- 엑스코드
- ios
- presentationcompactadaptation
- SKProductsRequestDelegate
- 다국어
- Localizations
- 테이블뷰
- TabView
- swiftUI
- Reject
- 인디케이터
- SKPaymentTransactionObserver
- Localized
- Language
- custom segment
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |