skip to Main Content

Can't add a UIImage? to an array – Ios swift

When selecting the photos to display in the user's profile, while doing a .onTapGesture to append a UIImage into an array of them, Xcode throws No exact matches in call to instance method 'append' .onTapGesture { isShowingPhotoPickerForPersonImage.toggle() Person.personImages.append([UIImage?]) } struct…

VIEW QUESTION

CLLocationManagerDelegate functions not called – Ios swift

I have a separate class named LocationService class LocationService: NSObject, CLLocationManagerDelegate { private var locationManager = CLLocationManager() private var locationCallback: ((CLLocation?) -> Void)! override init(){ super.init() self.locationManager.delegate = self } public func getCurrentLocation (_ completion: @escaping(CLLocation?) -> Void) { if…

VIEW QUESTION

Xcode – How can i use notification & alert in swift?

@IBAction func tapDeleteButton(_ sender: UIButton) { let alert = UIAlertController(title:"Are you sure?",message: "Do you really want to delete?",preferredStyle: UIAlertController.Style.alert) let cancle = UIAlertAction(title: "Cancel", style: .default, handler: nil) alert.addAction(cancle) present(alert, animated: true, completion: nil) let delete = UIAlertAction(title: "Delete", style:…

VIEW QUESTION
Back To Top
Search