Thursday, October 29, 2026
HomeiOS Developmentios - Display turns to black when I attempt to run Udemy...

ios – Display turns to black when I attempt to run Udemy Instaclone app on Xcode

[ad_1]

I have been taking “The entire iOS 15/ iOS 14 Developer Course – and SwiftUI” on Udemy. I’ve reached part 13 the place we make an instagram clone with Firebase. At any time when I attempt to run the udaemy Instaclone app on the simulator, it will present a clean white display screen at first earlier than turning right into a clean black display screen.

It does not appear to do that when I attempt to run different apps on the simulator, solely this one. The issue solely occurred after implementing modifications from video 150. I’ve tried reseting the contents and settings, restarting Xcode, restarting the pc and going over the movies to guarantee that there is no code that I missed. However I have never discovered something.

code I’ve added from video 150:

//

@IBOutlet weak var imageView: UIImageView!

@IBOutlet weak var commentView: UITextField!

@IBOutlet weak var UploadButton: UIButton!

override func viewDidLoad() {
    tremendous.viewDidLoad()
    
    imageView.isUserInteractionEnabled = true
    let gestureRecognizer = UITapGestureRecognizer(goal: self, motion: #selector(chooseImage))
    imageView.addGestureRecognizer(gestureRecognizer)
     
}


@objc func chooseImage(){
    let pickerController = UIImagePickerController()
    pickerController.delegate = self
    pickerController.sourceType = .photoLibrary
    current(pickerController, animated: true, completion: nil)
}

func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo information: [UIImagePickerController.InfoKey : Any]) {
    imageView.picture = information[.originalImage] as? UIImage
    self.dismiss(animated: true, completion: nil)
}


@IBAction func UploadButtonClicked(_ sender: Any) {
}

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments