Commit 4f337036 authored by Jose Blaya's avatar Jose Blaya
Browse files

allow to open the PIAWelcome controller

parent fbc03e2d
......@@ -708,7 +708,7 @@ You will not be charged during this process.</string>
<!--Welcome View Controller-->
<scene sceneID="ufC-wZ-h7g">
<objects>
<viewController automaticallyAdjustsScrollViewInsets="NO" id="vXZ-lx-hvc" customClass="PIAWelcomeViewController" customModule="PIALibrary" customModuleProvider="target" sceneMemberID="viewController">
<viewController storyboardIdentifier="PIAWelcomeViewController" automaticallyAdjustsScrollViewInsets="NO" id="vXZ-lx-hvc" customClass="PIAWelcomeViewController" customModule="PIALibrary" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
......@@ -1162,6 +1162,6 @@ You will not be charged during this process.</string>
</resources>
<inferredMetricsTieBreakers>
<segue reference="L3M-2E-gAx"/>
<segue reference="Vqa-Fa-HWk"/>
<segue reference="eeI-Xa-Rq6"/>
</inferredMetricsTieBreakers>
</document>
......@@ -58,6 +58,19 @@ public class GetStartedViewController: AutolayoutViewController, ConfigurationAc
return nav
}
public static func withPurchase(preset: Preset? = nil, delegate: PIAWelcomeViewControllerDelegate? = nil) -> UIViewController {
if let vc = StoryboardScene.Welcome.storyboard.instantiateViewController(withIdentifier: "PIAWelcomeViewController") as? PIAWelcomeViewController {
if let customPreset = preset {
vc.preset = customPreset
}
vc.delegate = delegate
let navigationController = UINavigationController(rootViewController: vc)
navigationController.setNavigationBarHidden(false,
animated: false)
return navigationController
}
return UIViewController()
}
public override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment