Reading the HIG on buttons, it says:
As a general rule, a button needs a hit region of at least 44x44 pt — in visionOS, 60x60 pt — to ensure that people can select it easily, whether they use a fingertip, a pointer, their eyes, or a remote.
However, I don't see anything similar for a macOS application. I know that in older versions of the HIG, Apple did include this information.
If I create a simple application, with a SwiftUI button like:
Button("" ) {
print( "hello" )
}
and measure the size in pixels, it works out to be ~22x22 pixels or ~17x17 pt.
So, I am assuming for now that is the minimum size for buttons.
Post
Replies
Boosts
Views
Activity
DocC is a documentation compiler. Being a compiler, it would make sense that when moving from the Markdown representation to a HTML representation there would be some intermediate output -- an AST, etc.
I am wondering if and how one could get access to the AST, for example, representation of the documentation...?
I need launchd to execute a script when a certain kind of usb device is connected. Specifically, an iOS device.is this possible? If so, what should the launchd plist look like?
I can create an unsigned .xcarchive easily enough with the following command:xcodebuild archive -project myproj.xcodeproj -scheme 'the scheme' -archivePath unsigned.xcarchive -configuration Release CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NOHowever, the exportOptionsPlist requires a 'method' and each method it accepts appears to sign the actual ipa.I can manually remove the signature from the IPA after it is exported, but I was hoping there was a feature in xcodebuild that would all me to do this out-of-the-box.Is this possible? If so, how?
If I connect my phone to my computer, I can select the phone in the finder (Catalina) or in iTunes (pre-Catalina). Once selected, I can copy files from my Mac to the document folder of an app I have installed on my phone.My question is whether or not there are APIs that allow me to do this programmatically...?
After doing a lot of searching, as best as I can determine, the SwiftUI TextField does not support multiline editing.Everything I have found suggests that one must wrap a NSTextView inside of a NSViewRepresentable. However, I have yet to find a working solution. What little progress I have made in getting this to work has at least few problems:1. When resizing the window vertically, the text jumps from the top of the view to the bottom of the view and back again.2. If I edit the text and then resize the view, the altered text reverts back to the initial string. It is unclear how to get the variable binding to update when the text is changed.3. if I change the background of the multiline text view to red and resize the window vertically, there is a lot of flicker as stuff is redrawn.If the SwiftUI TextField does support multiline editing, understanding how to configure it properly would resolve this issue as well.I have some test code at:https://github.com/ericg-xcode-questions/multiline_text_view