ios - Show an alert that looks like SKStoreReviewController -


how can show alert thats similar skstorereviewcontroller?

i how looks , want use similar ui on app.

make new view controller

let vc = uiviewcontroller() vc.preferredcontentsize = cgsize(width: 250,height: 300) 

create want on view, example picker view

let pickerview = uipickerview(frame: cgrect(x: 0, y: 0, width: 250, height: 300)) pickerview.delegate = self pickerview.datasource = self 

then add view controller

vc.view.addsubview(pickerview) 

with can create alert view , set view controller key contentviewcontroller

let customalert = uialertcontroller(title: "title", message: "", preferredstyle: uialertcontrollerstyle.alert) customalert.setvalue(vc, forkey: "contentviewcontroller")  let okaction = uialertaction(title: "ok", style: .default) {     uialertaction in          // should happen when click ok      }   customalert.addaction(okaction) customalert.addaction(uialertaction(title: "abort", style: .cancel, handler: nil)) self.present(customalert, animated: true) 

instead of adding picker vc, can build stuff need review (images, labels, slider, etc.)

hope helps.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -