Skip to content

Commit

Permalink
Remove no-longer-used showUIWithName call
Browse files Browse the repository at this point in the history
  • Loading branch information
rsattar committed Apr 11, 2016
1 parent 215cf67 commit c8a40ed
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions DevSwift/LaunchKitSampleSwift/RootViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,38 +41,13 @@ class RootViewController: UIViewController {
print("App review card finished with flow result: \(NSStringFromViewControllerFlowResult(flowResult))")
}
}

}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}

func showUIWithName(uiName:String) {
LaunchKit.sharedInstance().uiManager.loadRemoteUIWithId(uiName, completion: { [unowned self] (viewController, error) -> Void in
if let viewController = viewController {
LaunchKit.sharedInstance().presentRemoteUIViewController(viewController, fromViewController: self, animated: true, dismissalHandler: nil);
} else {
let message: String
if let error = error {
let reason: String
if let errorMessage = error.userInfo["message"] as? String {
reason = errorMessage
} else {
reason = ""
}
message = "Could not load UI named '\(uiName)'.\n\nError \(error.code) - \(reason)"
} else {
message = "Could not load UI named '\(uiName)'."
}
let alertController = UIAlertController(title: "UI not found", message: message, preferredStyle: .Alert);
alertController.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil))
self.presentViewController(alertController, animated: true, completion: nil)
}
})
}

@IBAction func onShowAppReleaseNotesButtonTriggered(sender: UIButton) {
LaunchKit.sharedInstance().forcePresentationOfAppReleaseNotesFromViewController(self) { (success) -> Void in
print("Release notes shown on demand, finished with success: \(success)")
Expand Down

0 comments on commit c8a40ed

Please sign in to comment.