Post

Replies

Boosts

Views

Activity

Reply to Constraints don't work (UIKit)
before adding a constraint you must set the translatesAutoresizingMaskIntoConstraints=false on the given view. import UIKit class ViewController: UIViewController {     var myView = UIView()     override func viewDidLoad() {         super.viewDidLoad()         myView.frame.size.width = 100         myView.frame.size.height = 100         myView.backgroundColor = .green         view.addSubview(myView)         let margins = view.layoutMarginsGuide /** set translatesAutoresizingMaskIntoConstraints=false for every view a constraint is being applied to*/ myView.translatesAutoresizingMaskIntoConstraints=false          myView.trailingAnchor.constraint(equalTo: margins.trailingAnchor).isActive = true     } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’22
Reply to Question about formatting of Measurement<...> items
import Foundation let times = [1,10,100,1000,10103,2354,83674,182549].map {     Measurement<UnitDuration>(value: $0, unit: .microseconds) } // convert times from microseconds to milliseconds let milliseconds = times.map { $0.converted(to: .milliseconds)} milliseconds.forEach { print($0.value) } // output 0.001 0.009999999999999998 0.09999999999999999 1.0 10.103 2.3539999999999996 83.67399999999999 182.54899999999998 Or to mutate a measurement inplace var micro = Measurement<UnitDuration>(value: 1000000, unit: .microseconds) micro.convert(to: .milliseconds) print(micro.value) // output 1000.00
Topic: App & System Services SubTopic: General Tags:
Mar ’22
Reply to App got rejected
More functionality. Add more beef in terms of the feature set not minimal fluff just to show that you can load a JSON feed. What benefits will your application offer the end user. Will it allow the end user to submit their recipes, will it allow the end user to share recipes, will it allow them to rate other recipes or plan meals. Sit down and ask yourself as an end user of this application what will compel me to want to download this app and build your new design and work flows from those questions. Involve family & friends get their feedback.
Topic: Design SubTopic: General Tags:
Mar ’22
Reply to SwiftUI List Separator within NavigationView Problem
Now check the view hierarchy and see how many navbar titles and bar items you might have compared to the first example where they're just added once outside of the list. Use Swift Application playgrounds for SwiftUI and not the original playgrounds
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to Constraints don't work (UIKit)
before adding a constraint you must set the translatesAutoresizingMaskIntoConstraints=false on the given view. import UIKit class ViewController: UIViewController {     var myView = UIView()     override func viewDidLoad() {         super.viewDidLoad()         myView.frame.size.width = 100         myView.frame.size.height = 100         myView.backgroundColor = .green         view.addSubview(myView)         let margins = view.layoutMarginsGuide /** set translatesAutoresizingMaskIntoConstraints=false for every view a constraint is being applied to*/ myView.translatesAutoresizingMaskIntoConstraints=false          myView.trailingAnchor.constraint(equalTo: margins.trailingAnchor).isActive = true     } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to Undocumented 'NSViewActuallyUpdateFromLayoutEngine' call adds width when light/dark mode changes
FIle a bug report https://feedbackassistant.apple.com/welcome with a code example.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to IOUSBHostDevice fails and throws error in sandboxed app
Checkbox USB on App Sandbox under Signing & Capabilities Just realized you have the entitlement on.
Topic: App & System Services SubTopic: Drivers Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to Question about formatting of Measurement<...> items
Please re-add the unreadable code above in the Your Answer box using the code block feature.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to Question about formatting of Measurement<...> items
import Foundation let times = [1,10,100,1000,10103,2354,83674,182549].map {     Measurement<UnitDuration>(value: $0, unit: .microseconds) } // convert times from microseconds to milliseconds let milliseconds = times.map { $0.converted(to: .milliseconds)} milliseconds.forEach { print($0.value) } // output 0.001 0.009999999999999998 0.09999999999999999 1.0 10.103 2.3539999999999996 83.67399999999999 182.54899999999998 Or to mutate a measurement inplace var micro = Measurement<UnitDuration>(value: 1000000, unit: .microseconds) micro.convert(to: .milliseconds) print(micro.value) // output 1000.00
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to App got rejected
More functionality. Add more beef in terms of the feature set not minimal fluff just to show that you can load a JSON feed. What benefits will your application offer the end user. Will it allow the end user to submit their recipes, will it allow the end user to share recipes, will it allow them to rate other recipes or plan meals. Sit down and ask yourself as an end user of this application what will compel me to want to download this app and build your new design and work flows from those questions. Involve family & friends get their feedback.
Topic: Design SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to Why does PKToolPicker disappear when blur and doesn't come back
Refer to the sample code DrawingViewController for something you might have missed in setting to the toolPicker: https://developer.apple.com/documentation/pencilkit/drawing_with_pencilkit updateLayout(for:)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to Generate JWT token using RS256 algorithm
See here IBM codebase: https://github.com/Kitura/Swift-JWT JWT.io: https://jwt.io/libraries?language=Swift
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to Lack of Paper Size options for AirPrint with Pantum P2506w
Contact the manufacturer for the Pantum P2506w device or post your question on the retail non-developer community apple support forum.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to UIRequiredDeviceCapabilities and Xcode 13 - cannot run on iPhone 5s and my builds are rejected by Apple reviewer
Try turning off or on Auto generate plist in build settings depending on which state is causing the rejection.
Replies
Boosts
Views
Activity
Mar ’22
Reply to Unable to prepare iPhone for development
More details: Xcode version, iOS version
Replies
Boosts
Views
Activity
Mar ’22
Reply to NWPathMonitor
??🧐
Replies
Boosts
Views
Activity
Mar ’22
Reply to Submitting our first app - what constitutes a "reader" app for Guideline 3.1.3(a)? Required to use IAP.
Rules are rules, selling products or services via your app IAP is needed if said content is available via the app. Netflix sells memberships not movies.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to Are macOS apps not required to ask permission to track?
desktops seldomly move around from point a to point b and are not fitted with GPS. The location derived from the other devices are more accurate than the location associated with an IP address maintained by an ISP.
Replies
Boosts
Views
Activity
Mar ’22