final class PlacePageDescriptionViewController: WebViewController { override func configuredHtml(withText htmlText: String) -> String { let scale = UIScreen.main.scale let styleTags = """ """ var html = htmlText.replacingOccurrences(of: "", with: styleTags) html = html.replacingOccurrences(of: "", with: "

wikipedia.org

") return html } override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { super.traitCollectionDidChange(previousTraitCollection) if previousTraitCollection?.userInterfaceStyle != traitCollection.userInterfaceStyle { guard let m_htmlText else { return } webView.loadHTMLString(configuredHtml(withText: m_htmlText), baseURL: nil) } } private func isOnBottom(_ scrollView: UIScrollView) -> Bool { let bottom = scrollView.contentSize.height + scrollView.contentInset.bottom - scrollView.bounds.height return scrollView.contentOffset.y >= bottom } }