diff --git a/Cards/Sources/Card.swift b/Cards/Sources/Card.swift index 3a10513..dc9c545 100644 --- a/Cards/Sources/Card.swift +++ b/Cards/Sources/Card.swift @@ -98,7 +98,7 @@ import UIKit public func shouldPresent( _ contentViewController: UIViewController?, from superVC: UIViewController?, fullscreen: Bool = false) { if let content = contentViewController { self.superVC = superVC - detailVC.addChild(content) + detailVC.addChildViewController(content) detailVC.detailView = content.view detailVC.card = self detailVC.delegate = self.delegate diff --git a/Cards/Sources/CardHighlight.swift b/Cards/Sources/CardHighlight.swift index 8104da7..d5e967f 100644 --- a/Cards/Sources/CardHighlight.swift +++ b/Cards/Sources/CardHighlight.swift @@ -131,7 +131,7 @@ import UIKit titleLbl.minimumScaleFactor = 0.1 titleLbl.lineBreakMode = .byTruncatingTail titleLbl.numberOfLines = 3 - backgroundIV.bringSubviewToFront(titleLbl) + backgroundIV.bringSubview(toFront: titleLbl) itemTitleLbl.textColor = textColor itemTitleLbl.text = itemTitle diff --git a/Cards/Sources/CardPlayer.swift b/Cards/Sources/CardPlayer.swift index b82a183..7a0c14a 100644 --- a/Cards/Sources/CardPlayer.swift +++ b/Cards/Sources/CardPlayer.swift @@ -89,7 +89,7 @@ import Player Required. View controller that should display the player. */ public func shouldDisplayPlayer( from vc: UIViewController ) { - vc.addChild(player) + vc.addChildViewController(player) } private var player = Player() // Player provided by Patrik Piemonte @@ -130,7 +130,7 @@ import Player backgroundIV.addSubview(self.player.view) playPauseV.contentView.addSubview(playIV) - playPauseV.contentView.bringSubviewToFront(playIV) + playPauseV.contentView.bringSubview(toFront: playIV) // Gestures player.view.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(playerTapped)))