Questions tagged [appkit]
The Application Kit is a collection of classes provided by OpenStep operating systems such as OPENSTEP, GNUstep, and Mac OS X.
appkit
1,543
questions
0
votes
0
answers
14
views
NSApplicationPresentationDisableHideApplication is not disabling the "Hide" option from the dock menu
I am trying to use the following code to disable the Hide option for my application :
NSApplicationPresentationOptions options = [NSApp presentationOptions];
options |= ...
0
votes
0
answers
31
views
NSScrollView with large content is creating a huge number of tiles upon redraw - in some cases
The main view of my application is an NSScrollView. When the document size is large, say 24k x 17k pixels (approximately 30 x 30 landscape pages), when the magnification of that view changes from ...
0
votes
0
answers
23
views
Why initializing an UIImage or NSImage with ImageRessource is not a failable initializer?
This question covers UIImage as well as NSImage. Both types have some failable initializer, like this one:
init?(named name: String)
And this makes perfectly sense, since the resource could not be ...
0
votes
0
answers
33
views
Can't achieve NSButton behavior like in macOS Quicklook
Quicklook contain this button:
Idle:
Hover:
Active:
Can't achieve it with any settings, closest look I've got is having Idle and Active states, but on hover nothing is happening:
let button = ...
-1
votes
0
answers
26
views
Using multiple NSDocumentController instances managing different recent files list
I'm working in a native MacOS application that uses the shared instance of NSDocumentController to manage file openings and the "Open Recent" submenu.
I'm trying to implement a new logic for ...
-1
votes
0
answers
43
views
How to Get the Available Status Bar Width (Or Frontmost App's Menu Bar Width Equivalently)?
Swift is needed, and I can't use Objective-C.
I'm developing a menu bar management software and I'm struggling with getting informed of the available width of the status bar, as I'm showing some width ...
0
votes
1
answer
58
views
How to Create a Slide-in Animation on macOS Using AppKit
I'm attempting to create a slide-in animation for a window on macOS using AppKit, but I'm encountering some issues with the animation behaviors.
Animating by Changing the X Coordinate: When I animate ...
0
votes
0
answers
40
views
How can I resolve this issue where my makeView call on NSTableView is always nil?
Can’t Make NSTableCellView in Programmatic UI NSTableView When calling makeView(identifier:owner:)
Hello all. I’m trying to put together a basic example of a NSTableView using programmatic UI instead ...
0
votes
1
answer
62
views
How does the NSWindow isReleasedWhenClosed property work when using ARC?
In Objective-C with ARC or Swift (which always uses ARC), what difference does it make whether isReleasedWhenClosed is true or not? Won't a window be kept alive as long as my code has strong ...
1
vote
1
answer
30
views
`NSTask.run()` fails with `The operation couldn’t be completed. Permission denied`
I am trying to open a text document from within my SwiftUI app on macOS.
Unfortunately, I get the error The operation couldn’t be completed. Permission denied. How can I work around this?
I tried with ...
0
votes
0
answers
26
views
SwiftUI Window not draggable
I made a custom AppDelegate which should remove the window toolbar and add a corner radius of 10px which all works very well hoeever now, you can't drag the window around.
I am also very new to AppKit ...
0
votes
0
answers
26
views
`NSWorkspace.open` fails with error `The application “TextEdit.app” could not be launched because a miscellaneous error occurred.`
I am trying to use NSWorkspace.open(_:withApplicationAt:configuration:completionHandler:) to open the currently open document in my document based SwiftUI app.
Clicking on the button shown in the ...
0
votes
0
answers
15
views
Crash in AVPlayerView.setPlaybackControlsViewController
A user of my app, which shows subtitles loaded from a text file on top of a video loaded from another file, reported that it crashes within minutes of launching it. The user confirmed that the crash ...
0
votes
0
answers
32
views
Content hugging priority for the NSTableColumn in the view-based NSTableView
I have a simple view-based NSTableView with two columns: Name and Value (each cell contains a NSTextField-s)
I want to use the the screen space as much as possible to be able to display the long ...
0
votes
0
answers
26
views
How to properly replace NSTextView's string when used with bindings
I have issues with string replacement when there are newlines.
How to properly replace string or part of a string so that bindings are triggered.
I have used open func replaceCharacters(in range: ...