iOS simulator version 18.0+
I have a demo like this:
Menu {
Button {
} label: {
Text("Option 1")
Image(systemName: "star")
}
Button {
} label: {
Text("Option 2")
Image(systemName: "star")
}
} label: {
Text("Menu")
}
And I used the tool Accessibility Inspector to modify the text size.
Case 1:
We could see the option title and the star icon.
Case 2:
But we could not see the icon, only the option title here
Is this by design from Apple? Or does this need to be fixed? Does anyone know about my question?
Preference Panes
RSS for tagIntegrate your app's custom preferences into the System Preferences app using Preference Panes.
Posts under Preference Panes tag
2 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Is it not possible to dynamically change or constrain an NSPreferencePane's mainView size? I have looked all over and this doesn't seem to be mentioned anywhere. The most I can seemingly do is set the frame and hope the user doesn't resize the window.
class scor: NSPreferencePane {
override func mainViewDidLoad() {
mainView = NSHostingView(rootView: ContentView())
mainView.frame = NSMakeRect(0, 0, 668, 1048)
}
}
Here is a screenshot, just with a simple webview as a test, note the scrollbar:
My storyboard is just from the default prefpane Xcode template, nothing special. I looked at the header file for NSPreferencePane and came up with nothing. All I can think of is that this is impossible due to the way they are implemented? The only thing we seemingly have access to is mainView, so I can't like constrain the size of mainView to its parent, for example.
Additionally, if I make a new preference pane, and make a button or other view that I choose to resize to fill horizontally and vertically, it does that, but not really? Here is what that looks like:
The behaviour is similar to the previous preference pane, the width does adapt correctly, the height stays the same, forever.
Not that it really matters but I am using macOS 14.7.6 on an M2 air