Post

Replies

Boosts

Views

Activity

Reply to Taking user input in MapKit
Your solution can be the extra work. Google, search GitHub or reach the Apple Documentation, look at the sample code. Begin the base knowledge here: https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/LocationAwarenessPG/AnnotatingMaps/AnnotatingMaps.html#//apple_ref/doc/uid/TP40009497-CH6-SW1 Converting MKView touch to coordinates: https://gist.github.com/a1phanumeric/2249553
Dec ’21
Reply to Why is superview returning nil?
See the Apple document excerpt below. If calling animation didMove(toParent:) is called after the transition not inside of the animation block, no animation the immediately after the addChild. With animation @objc func buttonAction(sender: UIButton!) { guard let theButton = sender as? MyButton else { return} UIView.transition(with: self.view, duration: 0.5, options: .transitionCurlDown, animations: { [self] in self.addChild(setController) self.view.addSubview(setController.view) }, completion: { setController.didMove(toParent: self) }) } No animation @objc func buttonAction(sender: UIButton!) { guard let theButton = sender as? MyButton else { return} self.view.addSubview(setController.view) self.addChild(setController) setController.didMove(toParent: self) } Discussion Your view controller can override this method when it wants to react to being added to a container. If you are implementing your own container view controller, it must call the didMove(toParent:) method of the child view controller after the transition to the new controller is complete or, if there is no transition, immediately after calling the addChild(_:) method. The removeFromParent() method automatically calls the didMove(toParent:) method of the child view controller after it removes the child. Sundel: https://www.swiftbysundell.com/basics/child-view-controllers/
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’21
Reply to My app update is rejected
You're supposed to do exactly what #1 & #2 outline. Before just prompting the user with the Contacts permission request, show a screen to the user explaining to them why your app needs access to their private contacts data, what you're going to do with the data (Their entire address book) before calling the API for access to their Contacts. If all you need is an email or phone number, just create a screen and ask them to provide the email or phone number as part of your onboarding flow. Don't have a website? get one so you can provide a link to the privacy policy that governs your data usage policies.
Dec ’21
Reply to Cannot convert value of type 'ChooseModel.Angle' to expected argument type 'Angle'
struct ChooseModel: Codable { var id = UUID()     var decision: String     var choices: [String]     var startAngle: ChooseModel.Angle // Qualify Your type Angle by the `ChooseModel` namespace     var endAngle: ChooseModel.Angle // Qualify Your type Angle by the `ChooseModel` namespace     @CodableColor var color: UIColor     struct Angle: Codable, Equatable {         var degrees: Double     } } // Do this `-90 + chooseMV.model.[startAngle|endAngle].degrees` instead of `ChooseModel.Angle(degrees: -90.0).degrees` since the instance of `ChooseModel.Angle` is not used beyond these two lines. path.addArc(                         center: center,                         radius: width * 0.5,                         startAngle: -90.0 + chooseMV.model.startAngle.degrees, // startAngle are CGFloat types and not Angle types so you will to use the `degrees` properties of the Angle objects for the computation to CGFloat                         endAngle: -90.0 + chooseMV.model.endAngle.degrees, // endAngle are CGFloat types and not Angle types so you will to use the `degrees` properties of the Angle objects for the computation to CGFloat                         clockwise: false)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’21
Reply to polygon count vs. triangle count?
Triangles are used internally to construct polygons and your polygons shouldn't go past 4 sides and if they do then you should try to break into down into a smaller polygon.
Topic: Spatial Computing SubTopic: ARKit Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Taking user input in MapKit
Your solution can be the extra work. Google, search GitHub or reach the Apple Documentation, look at the sample code. Begin the base knowledge here: https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/LocationAwarenessPG/AnnotatingMaps/AnnotatingMaps.html#//apple_ref/doc/uid/TP40009497-CH6-SW1 Converting MKView touch to coordinates: https://gist.github.com/a1phanumeric/2249553
Replies
Boosts
Views
Activity
Dec ’21
Reply to My MapView crashes when I start filling out the address form
The crash log from Xcode is more important.
Replies
Boosts
Views
Activity
Dec ’21
Reply to iOS Simulator Download
Please upgrade to Xcode 13.1 via the mac AppStore
Replies
Boosts
Views
Activity
Dec ’21
Reply to Why is superview returning nil?
See the Apple document excerpt below. If calling animation didMove(toParent:) is called after the transition not inside of the animation block, no animation the immediately after the addChild. With animation @objc func buttonAction(sender: UIButton!) { guard let theButton = sender as? MyButton else { return} UIView.transition(with: self.view, duration: 0.5, options: .transitionCurlDown, animations: { [self] in self.addChild(setController) self.view.addSubview(setController.view) }, completion: { setController.didMove(toParent: self) }) } No animation @objc func buttonAction(sender: UIButton!) { guard let theButton = sender as? MyButton else { return} self.view.addSubview(setController.view) self.addChild(setController) setController.didMove(toParent: self) } Discussion Your view controller can override this method when it wants to react to being added to a container. If you are implementing your own container view controller, it must call the didMove(toParent:) method of the child view controller after the transition to the new controller is complete or, if there is no transition, immediately after calling the addChild(_:) method. The removeFromParent() method automatically calls the didMove(toParent:) method of the child view controller after it removes the child. Sundel: https://www.swiftbysundell.com/basics/child-view-controllers/
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Udid
Device Settings, about. Finder
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to When will the iOS 15 Safari Google Captcha Glitch get resolved?
That is as real as it will be. Captcha is session-based.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to HELPP
I have had the same thing happen in the past where these bogus apple emails don't deliver to the actual mailbox.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Hiding keyboard when VoiceOver is active
For the particular UI containing the keyboard, resign the current first responder control when UIAccessibility.isVoiceOverRunning is true.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Developing IOS apps for third parties
Read here: https://developer.apple.com/business/distribute/
Replies
Boosts
Views
Activity
Dec ’21
Reply to Code C in VS Code Error(ld: symbol(s) not found for architecture arm64)
The wrong forum, please the Microsoft support forums for Visual Studio Code.
Replies
Boosts
Views
Activity
Dec ’21
Reply to How to tell Xcode13 to use GCC for building C++ projects?
GCC is no longer supported by Xcode.
Replies
Boosts
Views
Activity
Dec ’21
Reply to My app update is rejected
You're supposed to do exactly what #1 & #2 outline. Before just prompting the user with the Contacts permission request, show a screen to the user explaining to them why your app needs access to their private contacts data, what you're going to do with the data (Their entire address book) before calling the API for access to their Contacts. If all you need is an email or phone number, just create a screen and ask them to provide the email or phone number as part of your onboarding flow. Don't have a website? get one so you can provide a link to the privacy policy that governs your data usage policies.
Replies
Boosts
Views
Activity
Dec ’21
Reply to Cannot convert value of type 'ChooseModel.Angle' to expected argument type 'Angle'
struct ChooseModel: Codable { var id = UUID()     var decision: String     var choices: [String]     var startAngle: ChooseModel.Angle // Qualify Your type Angle by the `ChooseModel` namespace     var endAngle: ChooseModel.Angle // Qualify Your type Angle by the `ChooseModel` namespace     @CodableColor var color: UIColor     struct Angle: Codable, Equatable {         var degrees: Double     } } // Do this `-90 + chooseMV.model.[startAngle|endAngle].degrees` instead of `ChooseModel.Angle(degrees: -90.0).degrees` since the instance of `ChooseModel.Angle` is not used beyond these two lines. path.addArc(                         center: center,                         radius: width * 0.5,                         startAngle: -90.0 + chooseMV.model.startAngle.degrees, // startAngle are CGFloat types and not Angle types so you will to use the `degrees` properties of the Angle objects for the computation to CGFloat                         endAngle: -90.0 + chooseMV.model.endAngle.degrees, // endAngle are CGFloat types and not Angle types so you will to use the `degrees` properties of the Angle objects for the computation to CGFloat                         clockwise: false)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to SiriExtension.entitlements error once Localization is enabled
Select the Xcode project from the navigator, then under targets select the SiriExtenstion Target, under the Signing & Capability tab ensure you have Automatically manage signing and the team selected.
Replies
Boosts
Views
Activity
Dec ’21