/
githubmirror
/
omim
Обзор
Документация
Войти
/
githubmirror
/
omim
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
iphone/Maps/UI/PlacePage/Components/HotelDescriptionViewController.swift
30 строк
962 B
Alexander Boriskov
[iOS] Place page of outdoor track
25 фев 2020, 20:15
25 фев 2020, 20:15
ee5e36b
Код
Авторство
О чём код?
protocol HotelDescriptionViewControllerDelegate: AnyObject { func hotelDescriptionDidPressMore() } class HotelDescriptionViewController: UIViewController { @IBOutlet var descriptionExpandableLabel: ExpandableLabel! @IBOutlet var moreButton: UIButton! var hotelDescription: String? { didSet { descriptionExpandableLabel.text = hotelDescription } } weak var delegate: HotelDescriptionViewControllerDelegate? override func viewDidLoad() { super.viewDidLoad() descriptionExpandableLabel.numberOfLines = 3 descriptionExpandableLabel.text = hotelDescription descriptionExpandableLabel.font = UIFont.regular16() descriptionExpandableLabel.textColor = UIColor.blackPrimaryText() descriptionExpandableLabel.expandColor = UIColor.linkBlue() descriptionExpandableLabel.expandText = L("booking_show_more") } @IBAction func onMoreButton(_ sender: UIButton) { delegate?.hotelDescriptionDidPressMore() } }