Post

Replies

Boosts

Views

Activity

HIG recommended size for buttons in a macOS application?
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.
1
0
1.6k
Oct ’23
Intermediate compiler docc results
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...?
1
0
788
Jun ’23
multiline text view in a SwiftUI App
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
2
0
7.6k
Dec ’19
How can I export an unsigned ipa?
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?
2
0
7.7k
Sep ’18