1
func taskViewController(_ taskViewController: ORKTaskViewController, stepViewControllerWillAppear stepViewController: ORKStepViewController) {
    let backgroundImage = UIImage(named: "setting_background_new")
    let imageView = UIImageView(image: backgroundImage)
    imageView.frame = CGRect(x: 0, y: 0, width: 100, height: 200)
    UIView.appearance(whenContainedInInstancesOf: [ORKTaskViewController.self]).addsubview(imageview)
}

its crash because of 'Can't add self as subview' and i also try other methods and see some links but cant get to set background image answer,there is only answer of set background colors but i want to add background image in taskviewController.

Milan Varasada
  • 300
  • 1
  • 11

0 Answers0