Post

Replies

Boosts

Views

Activity

Reply to How to submit IPhone8 Required screens on Apple M1 Pro
Hello! There is actually a way to run an iPhone 8 simulator (or other models) using Xcode 14 and iOS 16. To do this you just have to open Xcode > Window > Devices and Simulator. When the window appears you can just tap on the "Simulator" tab and on the "+" button. From here you can choose "iPhone 8" as for the Device type and also the OS version. Here is some screenshots that might help:
Jan ’23
Reply to MapKit Help
Hello! This is definitely something possible with the MapKit Framework. Probably it's not straightforward but possible! A couple of documentation you might find useful: MKDirections: You can use this class to get turn-by-turn directions from point A to point B. E.g. you can call let directions: MKDirections = .init(request: request) directions.calculate { handler in ... } MKLocalSearch: You can use this class to search for locations. Maybe the user search destinations through a search bar, you can use MKLocalSearch to get all the places like a city or a shop. MKMapView: You can use the MKMapView UIKit view to display the map itself and add annotations or turn-by-turn directions in it. Hope this answer your question!
Jan ’23
Reply to (ForEach-Error)SwiftUI, Firestore getting one collection and matching with another
Hello. I'll try to address the error reported by the compiler first. As stated on Apple List documentation the List type should conform to Identifiable. This is done as SwiftUI needs to know how to identify each and every cell in our list in order to optimize it and perform any operation like displaying, removing cells. That being said it seems by the error you reported that multiple cells have the same id. This is not acceptable since by design the id needs to be different for each cell. This is so SwiftUI can understand which cell is which. I would advise to double-check that the id is different in each Artwork type. In the example below we assign a new unique UUID so that it's almost fully guaranteed that each cell have a different id: struct Artwork: Identifiable { let id = UUID() }
Jan ’23
Reply to How to connect AVCaptureVideoDataOutput to AVCaptureVideoPreviewLayer
Hello, you can find an example of the implementation on the Apple Developer Documentation here: https://developer.apple.com/documentation/avfoundation/capture_setup/setting_up_a_capture_session/. If you scroll down you should be able to find the Display A Camera Preview section. Here is the example code: class PreviewView: UIView { override class var layerClass: AnyClass { return AVCaptureVideoPreviewLayer.self } /// Convenience wrapper to get layer as its statically known type. var videoPreviewLayer: AVCaptureVideoPreviewLayer { return layer as! AVCaptureVideoPreviewLayer } } self.previewView.videoPreviewLayer.session = self.captureSession
Jul ’22
Reply to Observe ALL UITextView text changes in realtime
Hello, first of all have you tried with the delegate textViewDidChange? https://developer.apple.com/documentation/uikit/uitextviewdelegate/1618599-textviewdidchange Probably this is going to act the same as your Notification, but worth a try. Otherwise the only thing I would see is to use the shouldChangeTextIn and fixing the problem it has doing so: func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { 	 	 let	char = string.cString(using: String.Encoding.utf8)! 	 	 let isBackSpace = strcmp(char, "\\b") 	 	 var currentText = "" 	 	 if (isBackSpace == -92) { 			currentText = textField.text!.substring(to: textField.text!.index(before: textField.text!.endIndex)) 	 } 	 else { 			 currentText = textField.text! + string 	 } return true } This removes the backspaced string from your currentText as well as adds it if you have typed it in.
Jun ’20