Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.03 KB | None | 0 0
  1. //
  2. // VenueVC.swift
  3. // SelectSociety
  4. //
  5. // Created by Kseniya on 6/12/19.
  6. // Copyright © 2019 maddevs. All rights reserved.
  7. //
  8.  
  9.  
  10. import UIKit
  11. import SnapKit
  12. import SafariServices
  13.  
  14. class VenueVC: BaseVC {
  15. let appDelegate = UIApplication.shared.delegate as! AppDelegate
  16. let viewModel = VenueVM()
  17. var idVenue = ""
  18. var selectedTabIndex: Int = 0
  19. var newTabForReload:Int = 0
  20.  
  21. private var isBlurNavBarActive = false
  22. private var heightForInterestsCells: CGFloat = 0.0
  23.  
  24. static func newInstance(idVenue:String) -> VenueVC {
  25. let vc = VenueVC()
  26. vc.hidesBottomBarWhenPushed = true
  27. vc.idVenue = idVenue
  28. return vc
  29. }
  30.  
  31. var trendingEventVC = TrendingEventVC()
  32.  
  33. lazy var visualBLurffectView: UIVisualEffectView = {
  34. let bounds = CGRect(x: 0, y: -50, width: view.frame.width, height: (self.navigationController?.navigationBar.bounds.height ?? 22) + 50)
  35. let visualBLurffectView = UIVisualEffectView(effect: UIBlurEffect(style: .dark))
  36. visualBLurffectView.frame = bounds
  37. visualBLurffectView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
  38. return visualBLurffectView
  39. }()
  40.  
  41. lazy var collectionView: UICollectionView = {
  42. let layout = UICollectionViewFlowLayout()
  43. let collectionView = UICollectionView(frame: view.bounds, collectionViewLayout: layout)
  44. collectionView.delegate = self
  45. collectionView.dataSource = self
  46. collectionView.register(VenueHeaderCell.self, forCellWithReuseIdentifier: VenueHeaderCell.identity)
  47. collectionView.register(ProfileInterestCell.self, forCellWithReuseIdentifier: ProfileInterestCell.identity)
  48. collectionView.register(PromotersCell.self, forCellWithReuseIdentifier: PromotersCell.identity)
  49. collectionView.register(TabsCell.self, forCellWithReuseIdentifier: TabsCell.identity)
  50. collectionView.register(ImageUserPostCell.self, forCellWithReuseIdentifier: ImageUserPostCell.identity)
  51. collectionView.register(TrendingEventCell.self, forCellWithReuseIdentifier: TrendingEventCell.identity)
  52. collectionView.register(UserEventsCell.self, forCellWithReuseIdentifier: UserEventsCell.identity)
  53. collectionView.register(UserPhotosCell.self, forCellWithReuseIdentifier: UserPhotosCell.identity)
  54. collectionView.register(RatingViewCell.self, forCellWithReuseIdentifier: RatingViewCell.identity)
  55. collectionView.register(VenueLabelInfoCell.self, forCellWithReuseIdentifier: VenueLabelInfoCell.identity)
  56. collectionView.register(LessButtonCell.self, forCellWithReuseIdentifier: LessButtonCell.identity)
  57. collectionView.register(CommentViewCell.self, forCellWithReuseIdentifier: CommentViewCell.identity)
  58. collectionView.register(SocialMediaLinksCell.self, forCellWithReuseIdentifier: SocialMediaLinksCell.identity)
  59. collectionView.register(HeaderView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "headerView")
  60. collectionView.register(RatingHeaderView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "ratingHeaderView")
  61.  
  62.  
  63. return collectionView
  64. }()
  65.  
  66. lazy var heightEventCell: CGFloat = {
  67. // let heightTrendingVenuesCell = collectionView.frame.size.height / 3
  68. let heightTrendingVenuesCell = Const.HeightCell.heightTrendingVenues
  69. return heightTrendingVenuesCell
  70. }()
  71.  
  72. lazy var widthEventCell: CGFloat = {
  73. let widthTrendingVenuesCell = collectionView.frame.size.width / 2 - 25
  74. return widthTrendingVenuesCell
  75. }()
  76.  
  77. override func viewDidLoad() {
  78. super.viewDidLoad()
  79. viewModel.bind(self)
  80. viewModel.getVenueProfile(idVenue: idVenue)
  81. viewModel.getVenuePost()
  82. add(trendingEventVC)
  83. }
  84.  
  85.  
  86. override func viewWillAppear(_ animated: Bool) {
  87. super.viewWillAppear(animated)
  88. setUpUI()
  89. }
  90.  
  91. override func viewWillDisappear(_ animated: Bool) {
  92. super.viewWillDisappear(animated)
  93. navigationController?.navigationBar.backgroundColor = DefaultPresentationPalette.backgroundColorItems
  94. navigationController?.navigationBar.barTintColor = DefaultPresentationPalette.backgroundColorItems
  95. navigationController?.navigationBar.isTranslucent = false
  96. if #available(iOS 11.0, *) {
  97. if isBlurNavBarActive {
  98. visualBLurffectView.removeFromSuperview()
  99. }
  100. }
  101. }
  102.  
  103. func setUpUI(){
  104. self.view.backgroundColor = DefaultPresentationPalette.backgroundColor
  105. self.navigationController?.navigationBar.topItem?.backBarButtonItem = UIBarButtonItem(title:"", style:.plain, target:nil, action:nil)
  106. DispatchQueue.main.async {
  107. UIApplication.shared.statusBarView?.backgroundColor = .clear
  108.  
  109. self.navigationController?.navigationBar.isTranslucent = true
  110. self.navigationController?.navigationBar.backgroundColor = .clear
  111. self.navigationController?.navigationBar.tintColor = .white
  112.  
  113. self.navigationController?.navigationBar.barStyle = UIBarStyle.blackTranslucent
  114. self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
  115. }
  116. navigationItem.rightBarButtonItems = [UIBarButtonItem(image: UIImage(named: "menu_option_round"),
  117. style: .plain,
  118. target: self,
  119. action: nil)]
  120.  
  121. if isBlurNavBarActive {
  122. let bounds = CGRect(x: 0, y: -50, width: view.frame.width, height: (self.navigationController?.navigationBar.bounds.height ?? 22) + 50)
  123.  
  124. visualBLurffectView.frame = bounds
  125. self.navigationController?.navigationBar.insertSubview(visualBLurffectView, at: 0)
  126. }
  127. }
  128.  
  129. override func setupConstraint() {
  130.  
  131. view.addSubview(collectionView)
  132.  
  133. collectionView.snp.makeConstraints { make in
  134. make.top.left.right.equalToSuperview()
  135. make.bottom.equalToSuperview()
  136. make.width.equalToSuperview()
  137. make.centerX.equalToSuperview()
  138. }
  139. }
  140.  
  141. override func setupUI() {
  142. super.setupUI()
  143.  
  144. view.backgroundColor = DefaultPresentationPalette.backgroundColor
  145. collectionView.backgroundColor = DefaultPresentationPalette.backgroundColor
  146. }
  147.  
  148.  
  149. @objc func updateVenuePost(_ notification: Notification) {
  150. collectionView.reloadData()
  151. }
  152.  
  153. @objc func showMenuOption(idVenue:String) {
  154. let alert = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
  155. let deletePost = UIAlertAction(title: "Some Option", style: .default) { (alerAction) in
  156.  
  157. }
  158. let cancel = UIAlertAction(title: "Cancel", style: .cancel, handler: nil)
  159. cancel.setValue(UIColor.red, forKey: "titleTextColor")
  160. alert.addAction(deletePost)
  161. alert.addAction(cancel)
  162. present(alert, animated: true, completion: nil)
  163. }
  164.  
  165. func scrollViewDidScroll(_ scrollView: UIScrollView) {
  166. print(scrollView.contentOffset.y)
  167. let heightNavBar = 0.0 - ( (self.navigationController?.navigationBar.bounds.height ?? 22))
  168. if scrollView.contentOffset.y > heightNavBar && !isBlurNavBarActive {
  169. isBlurNavBarActive = true
  170. self.navigationController?.navigationBar.insertSubview(visualBLurffectView, at: 0)
  171. }
  172. if scrollView.contentOffset.y <= heightNavBar {
  173. visualBLurffectView.removeFromSuperview()
  174. isBlurNavBarActive = false
  175. }
  176. }
  177. }
  178.  
  179. extension VenueVC: UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout {
  180.  
  181. func numberOfSections(in collectionView: UICollectionView) -> Int {
  182. return viewModel.getSectionCount(viewModel.stateVC)
  183. }
  184.  
  185. func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
  186. switch viewModel.getVenueSection(viewModel.stateVC)[section] {
  187. case .socialLinks:
  188. return 4
  189. case .selectedTab:
  190. switch selectedTabIndex {
  191. case 0:
  192. return viewModel.venuePostList.count
  193. case 1:
  194. return 1
  195. case 2:
  196. return 10
  197. case 3:
  198. return 10
  199. default : return 0
  200.  
  201. }
  202. case .eventsCell:
  203. return viewModel.venueEvents.count
  204. default:
  205. return 1
  206. }
  207. }
  208.  
  209. func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout,
  210.  
  211. indexPath: IndexPath) -> CGSize {
  212.  
  213. switch viewModel.getVenueSection(viewModel.stateVC)[indexPath.section] {
  214. case .venueHeaderCell:
  215. return getTotalHeightOfVenueHeaderCell()
  216. case .socialLinks:
  217. return CGSize(width: 44, height: 44)
  218. case .interestCell:
  219. switch viewModel.stateVC {
  220. case .defaultState:
  221. return CGSize(width:collectionView.frame.width - 20, height: Const.HeightCell.minHeightInterests)
  222. case .expandedState:
  223. return CGSize(width: collectionView.frame.width - 20, height: heightForInterestsCells)
  224. }
  225. case .venueInfoCell:
  226. return CGSize(width:collectionView.frame.width , height: 44)
  227. case .tabsCell:
  228. return CGSize(width: collectionView.frame.width, height: 44)
  229. case .selectedTab:
  230. switch selectedTabIndex {
  231. case 0:
  232. return getTotalHeightOfPostCell(indexPath: indexPath)
  233. case 1:
  234. return CGSize(width: collectionView.frame.width, height: Const.HeightCell.trendingEvent)
  235. case 2:
  236. return CGSize(width: collectionView.frame.width / 3, height: Const.HeightCell.photos)
  237. case 3:
  238. return getTotalHeightOfRatingCell()
  239. default :
  240. return CGSize(width: UIScreen.main.bounds.size.width, height: 100)
  241. }
  242. case .lessButton:
  243. return CGSize(width: collectionView.frame.width, height: Const.HeightCell.minHeightInterests)
  244. case .promotersCell:
  245. return getTotalHeightOfPromotersCell()
  246. case .eventsCell:
  247. switch selectedTabIndex {
  248. case 1:
  249. return CGSize(width: widthEventCell,height: heightEventCell)
  250. default:
  251. return CGSize.zero
  252. }
  253. case .commentCell:
  254. switch selectedTabIndex {
  255. case 0:
  256. return CGSize(width: collectionView.frame.width ,height: Const.HeightSectionHeader.venueCommentView)
  257. default:
  258. return CGSize.zero
  259. }
  260. }
  261. }
  262.  
  263. func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize {
  264. switch viewModel.getVenueSection(viewModel.stateVC)[section] {
  265. case .promotersCell:
  266. return CGSize(width: collectionView.frame.width, height: Const.HeightSectionHeader.venuePromoter)
  267. case .selectedTab:
  268. switch selectedTabIndex {
  269. case 1: return CGSize(width: collectionView.frame.width, height: Const.HeightSectionHeader.discover)
  270. case 3: return CGSize(width: collectionView.frame.width, height: Const.HeightSectionHeader.venueRatingView)
  271. default:return CGSize.zero
  272. }
  273. case .eventsCell:
  274. switch selectedTabIndex {
  275. case 1: return CGSize(width: collectionView.frame.width, height: Const.HeightSectionHeader.discover)
  276. default:return CGSize.zero
  277. }
  278.  
  279. default: return CGSize.zero
  280. }
  281. }
  282.  
  283. func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
  284.  
  285. switch viewModel.getVenueSection(viewModel.stateVC)[indexPath.section] {
  286.  
  287. case .promotersCell:
  288. let headerView = collectionView.dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "headerView", for: indexPath) as! HeaderView
  289. headerView.setTopPromotersHeader()
  290. return headerView
  291. case .selectedTab:
  292. switch selectedTabIndex {
  293. case 1:
  294. let headerView = collectionView.dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "headerView", for: indexPath) as! HeaderView
  295. headerView.setVenueFeaturedEventsHeader()
  296. return headerView
  297. case 3:
  298. let ratingView = collectionView.dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "ratingHeaderView", for: indexPath) as! RatingHeaderView
  299. return ratingView
  300.  
  301. default : return UICollectionReusableView()
  302. }
  303.  
  304. case .eventsCell:
  305. let headerView = collectionView.dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "headerView", for: indexPath) as! HeaderView
  306. headerView.setVenueThisWeekEventsHeader()
  307. return headerView
  308. default : return UICollectionReusableView()
  309. }
  310. }
  311.  
  312. func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
  313. switch viewModel.getVenueSection(viewModel.stateVC)[indexPath.section] {
  314. case .venueHeaderCell:
  315. let cell = collectionView.dequeueReusableCell(withReuseIdentifier: VenueHeaderCell.identity, for:indexPath ) as! VenueHeaderCell
  316. self.navigationItem.title = "@\(viewModel.venueProfileResponse?.username ?? "")"
  317. cell.setUserData(venue: viewModel.venueProfileResponse ?? Venue_GetVenueProfileResponse() )
  318. return cell
  319. case .socialLinks:
  320. let cell = collectionView.dequeueReusableCell(withReuseIdentifier: SocialMediaLinksCell.identity, for: indexPath) as! SocialMediaLinksCell
  321. cell.setupSocialLink(index: indexPath.row)
  322. cell.delegate = self
  323. return cell
  324. case .interestCell:
  325. let cell = collectionView.dequeueReusableCell(withReuseIdentifier: ProfileInterestCell.identity, for:indexPath ) as! ProfileInterestCell
  326. cell.setupConstrainVenue(state: viewModel.stateVC)
  327. cell.setInterrestProfile(interest: viewModel.venueProfileResponse?.interestOptions ?? [])
  328. cell.backgroundColor = .clear
  329. cell.delegate = self
  330. if cell.getContentSize() > 0 && heightForInterestsCells == 0.0 {
  331. heightForInterestsCells = cell.getContentSize()
  332. }
  333. return cell
  334. case .venueInfoCell:
  335. let cell = collectionView.dequeueReusableCell(withReuseIdentifier: VenueLabelInfoCell.identity, for: indexPath) as! VenueLabelInfoCell
  336. cell.setVenueData(venue: viewModel.venueProfileResponse, index: indexPath.section)
  337. return cell
  338. case .tabsCell:
  339. let cell = collectionView.dequeueReusableCell(withReuseIdentifier: TabsCell.identity, for: indexPath) as! TabsCell
  340. self.reloadTabsSection(cell: cell,collectionView: collectionView)
  341. return cell
  342. case .promotersCell:
  343. let cell = collectionView.dequeueReusableCell(withReuseIdentifier: PromotersCell.identity, for: indexPath) as! PromotersCell
  344. cell.fillPromoters(promoters:viewModel.venueProfileResponse?.promoters ?? [])
  345. return cell
  346. case .lessButton:
  347. let cell = collectionView.dequeueReusableCell(withReuseIdentifier: LessButtonCell.identity, for: indexPath) as! LessButtonCell
  348. cell.delegate = self
  349. return cell
  350. case .eventsCell:
  351. let cell = collectionView.dequeueReusableCell(withReuseIdentifier: UserEventsCell.identity, for: indexPath) as! UserEventsCell
  352. cell.eventView.fillEvent(event: viewModel.venueEvents[indexPath.row])
  353. return cell
  354. case .commentCell:
  355. let cell = collectionView.dequeueReusableCell(withReuseIdentifier: CommentViewCell.identity, for: indexPath) as! CommentViewCell
  356. return cell
  357. case .selectedTab:
  358. switch selectedTabIndex {
  359. case 1:
  360. let cell = collectionView.dequeueReusableCell(withReuseIdentifier: TrendingEventCell.identity, for: indexPath) as! TrendingEventCell
  361. cell.configure(trendingEventVC.view)
  362. return cell
  363. case 2:
  364. let cell = collectionView.dequeueReusableCell(withReuseIdentifier: UserPhotosCell.identity, for: indexPath) as! UserPhotosCell
  365. return cell
  366. case 3:
  367. let cell = collectionView.dequeueReusableCell(withReuseIdentifier: RatingViewCell.identity, for: indexPath) as! RatingViewCell
  368. return cell
  369. default : let cell = collectionView.dequeueReusableCell(withReuseIdentifier: ImageUserPostCell.identity, for: indexPath) as! ImageUserPostCell
  370. cell.imagePostView.fillPost(post: viewModel.venuePostList[indexPath.row])
  371. return cell
  372. }
  373. }
  374. }
  375.  
  376. func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
  377. // open Event Page
  378. // print("user event \(viewModel.venueEvents[indexPath.row])")
  379. }
  380.  
  381. func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
  382. switch viewModel.getVenueSection(viewModel.stateVC)[section] {
  383. case .tabsCell:
  384. return UIEdgeInsets (top: 15, left: 0, bottom: 0, right: 0)
  385. case .interestCell:
  386. switch viewModel.stateVC {
  387. case .defaultState:
  388. return UIEdgeInsets (top: 5, left: 0, bottom: 0, right: 0)
  389. case .expandedState:
  390. return UIEdgeInsets.zero
  391. }
  392. case .socialLinks:
  393. let totalCellWidth = 44 * collectionView.numberOfItems(inSection: 1)
  394. let totalSpacingWidth = 10 * (collectionView.numberOfItems(inSection: 1))
  395.  
  396. let leftInset = (collectionView.layer.frame.size.width - CGFloat(totalCellWidth + totalSpacingWidth)) / 2
  397. let rightInset = leftInset
  398.  
  399. return UIEdgeInsets(top: 5, left: leftInset, bottom: 0, right: rightInset)
  400. case .promotersCell:
  401. return UIEdgeInsets (top: 10, left: 0, bottom: 10, right: 0)
  402. case .eventsCell:
  403. switch selectedTabIndex {
  404. case 1 :
  405. return UIEdgeInsets (top: 0, left: 20, bottom: 40, right: 20)
  406. default:
  407. return UIEdgeInsets.zero
  408. }
  409. case .commentCell:
  410. switch selectedTabIndex {
  411. case 0 :
  412. return UIEdgeInsets (top: 10, left: 0, bottom: 10, right: 0)
  413. default:
  414. return UIEdgeInsets.zero
  415. }
  416. default:
  417. return UIEdgeInsets.zero
  418. }
  419. }
  420.  
  421. func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
  422. switch selectedTabIndex {
  423. case 2 :
  424. return 0.0
  425. default:
  426. return 10.0
  427. }
  428. }
  429. func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
  430. switch selectedTabIndex {
  431. case 2 :
  432. return 0.0
  433. default:
  434. return 10.0
  435. }
  436. }
  437.  
  438. func reloadTabsSection(cell : TabsCell, collectionView: UICollectionView) {
  439. cell.tabs = Const.Tabs.venueTabs
  440. cell.selectedTabIndex = selectedTabIndex
  441. cell.tabChangeEvent = { [weak self] tab in
  442. guard let `self` = self else { return }
  443.  
  444. if let newIndex = tab {
  445. self.selectedTabIndex = newIndex
  446. if self.newTabForReload != self.selectedTabIndex {
  447. let sectionForReload = IndexSet(integer: self.viewModel.getVenueSection(self.viewModel.stateVC).firstIndex(of: .selectedTab) ?? 0 )
  448. UIView.performWithoutAnimation {
  449. collectionView.performBatchUpdates({
  450. collectionView.reloadSections(sectionForReload)
  451. }, completion: nil)
  452.  
  453. }
  454. self.newTabForReload = newIndex
  455. }
  456. }
  457. }
  458. }
  459.  
  460. func getTotalHeightOfVenueHeaderCell() -> CGSize {
  461. return CGSize(width: UIScreen.main.bounds.size.width , height: Const.VenueHeaderView.aboutVenueTextHeight
  462. + Const.VenueHeaderView.venueImageHeight
  463. + Const.VenueHeaderView.venueNameHeight
  464. + Const.VenueHeaderView.venueWriteReviewButtonHeight
  465. + Const.VenueHeaderView.topOfset * 9)
  466. }
  467.  
  468. func getTotalHeightOfPromotersCell() -> CGSize {
  469. return CGSize(width: collectionView.frame.width , height: Const.VenuePromotersView.promoterProfileImageHeight
  470. + Const.VenuePromotersView.fullNameHeight
  471. + Const.VenuePromotersView.userNameHeight)
  472. }
  473.  
  474. func getTotalHeightOfPostCell(indexPath: IndexPath) -> CGSize {
  475. return CGSize(width: collectionView.frame.width, height:Const.ImagePostView.postTextHeight[indexPath.row]
  476. + Const.ImagePostView.postImageHeight
  477. + Const.ImagePostView.profileImageHeight
  478. + Const.ImagePostView.timeViewHeight + (Const.ImagePostView.topOfset * 5))
  479. }
  480.  
  481. func getTotalHeightOfRatingCell() -> CGSize {
  482. return CGSize(width: collectionView.frame.width, height: 150)
  483. }
  484. }
  485.  
  486. extension VenueVC: VenueDelegate {
  487.  
  488. func checkConnectedToNetwork() {
  489. appDelegate.checkForNetwork()
  490. }
  491.  
  492. func showAlertView(title: String, message: String) {
  493. showAlert(title: title, message: message)
  494. }
  495.  
  496. func showHud(_ message:String) {
  497. showHudView(message)
  498. }
  499.  
  500. func reloadData() {
  501. DispatchQueue.main.async {
  502. self.collectionView.reloadData()
  503. }
  504. }
  505.  
  506. func hideHud() {
  507. hideHudView()
  508. }
  509.  
  510. func showTokenAlert() {
  511. }
  512. }
  513.  
  514. extension VenueVC: MoreAndLessButtonDelegate {
  515. func moreOrLessButtonPressed() {
  516. viewModel.stateVC.changeState()
  517. collectionView.reloadData()
  518. }
  519. }
  520.  
  521. extension VenueVC: OpenSocialMediaLinkDelegate {
  522. func openURL(_ link: URL) {
  523. let vc = SFSafariViewController(url: link, entersReaderIfAvailable: false)
  524. vc.preferredBarTintColor = DefaultPresentationPalette.backgroundColor
  525. present(vc, animated: true)
  526. }
  527. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement