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

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -