Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
22
iphone/Maps/UI/EditBookmark/BookmarkTitleCell.swift
Normal file
22
iphone/Maps/UI/EditBookmark/BookmarkTitleCell.swift
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import UIKit
|
||||
|
||||
protocol BookmarkTitleCellDelegate: AnyObject {
|
||||
func didFinishEditingTitle(_ title: String)
|
||||
}
|
||||
|
||||
final class BookmarkTitleCell: MWMTableViewCell {
|
||||
@IBOutlet var textField: UITextField!
|
||||
weak var delegate: BookmarkTitleCellDelegate?
|
||||
|
||||
func configure(name: String, delegate: BookmarkTitleCellDelegate, hint: String) {
|
||||
textField.text = name
|
||||
textField.placeholder = hint
|
||||
self.delegate = delegate
|
||||
}
|
||||
}
|
||||
|
||||
extension BookmarkTitleCell: UITextFieldDelegate {
|
||||
func textFieldDidEndEditing(_ textField: UITextField) {
|
||||
delegate?.didFinishEditingTitle(textField.text ?? "")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue