Skip to content

Commit

Permalink
Swift 4.2 Code update
Browse files Browse the repository at this point in the history
  • Loading branch information
PaoloCuscela committed Dec 2, 2018
1 parent a32dae6 commit b8117f8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cards/Sources/Card.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cards/Sources/CardHighlight.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Cards/Sources/CardPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)))
Expand Down

0 comments on commit b8117f8

Please sign in to comment.