- sonjh1217.github.io
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ChromecastExpandedViewController: UIViewController { | |
private var dismissInteractiveTransition = InteracitveTransition() | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
addPanGestureRecognizer() | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension ChromecastExpandedViewController: UIViewControllerTransitioningDelegate { | |
public func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { | |
return VerticalStackDismissAnimatedTransitioning() | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class InteracitveTransition: UIPercentDrivenInteractiveTransition { | |
var hasStarted = false | |
var shouldFinish = false | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class IAPManager { | |
func receipt() -> NSData? { | |
if let receiptURL = Bundle.main.appStoreReceiptURL, | |
FileManager.default.fileExists(atPath: receiptURL.path) { | |
return NSData(contentsOf: receiptURL) | |
} | |
return nil | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SKPaymentQueue.default().restoreCompletedTransactions() |