39,632 questions
0
votes
1
answer
42
views
Appkit Cocoa - NSCoding decoding error - NSCocoaErrorDomain 4864
I'm having some trouble with NSCoding, I have this simple "Grade" class:
@interface Grade : NSObject<NSCoding>
@property (copy) NSString *name;
@property NSInteger grade;
@end
It ...
0
votes
0
answers
9
views
Appkit & Cocoa - How to support editing for a view-based NSTableView? [duplicate]
So I have a view-based NSTableView whose contents are stored in an NSMutableArray. Basically I created a table view in the storyboard and inserted a control of type "Image and Text Table CellView&...
0
votes
0
answers
20
views
How to make NSTableHeaderCell fully transparent?
Especially in NSTableHeaderCell, in drawInterior, I have set in func drawInterior to draw the background with "clear" color to make it transparent(with NSVisualEffect added to clipView)
but ...
0
votes
0
answers
19
views
How to kill a process from inside Cocoa Application? [duplicate]
I am trying to open PDF in Preview using NSWorkSpace. It opens my pdf in preview but when it doesn't terminate or close that preview when I click on close button.
Note: It does close the app when I ...
1
vote
1
answer
44
views
Cocoa - Block implicitly retains 'self' - Different solutions
So I have this snippet here which involves a block:
NSArray<Class> *acceptableClasses = @[[DesktopEntity class]];
__block NSInteger insertIdx = row;
[info ...
0
votes
0
answers
32
views
Programmatically check there a "disk image password" in KeyChain
On my macOS app I would like to know whether the user has defined a password in the KeyChain for a given encrypted Disk Image. I do not want to know the password itself. I just need to know whether ...
0
votes
1
answer
55
views
Can't change the font size of an NSTableView
I'm following this code here where
I have an NSTableView that displays the folder name as a group header and then the contents of the folder below, for this example these are all images.
So like, ...
0
votes
0
answers
25
views
How to Choose Good Values for minimum, maximum, and preferred in CAFrameRateRange?
I'm working with a CADisplayLink in iOS to synchronize my rendering with the screen refresh rate. On devices running iOS 15 or later, CADisplayLink allows us to specify a preferredFrameRateRange using ...
-3
votes
0
answers
50
views
How did developers implement Auto Layout in the old days?
These days, we implement Auto Layout using NSLayoutConstraint. However, this has been available only since iOS 6.0 and Mac OS X 10.7.
Before iOS 6.0, layouts had to be adapted to resolutions like ...
0
votes
1
answer
38
views
How can an application check if it has permission to control another application through AppleScript without blocking?
I'm writing an AppKit macOS application that will use AppleScript / Apple events to automate another application. I need to know ahead of time whether or not my app has permission to do this for the ...
0
votes
0
answers
42
views
Flutter package dependency is messed up
Getting this error, while start debugging my flutter project. Not sure where to start.
Launching lib/main.dart on Iphone in debug mode...
Automatically signing iOS for device deployment using ...
0
votes
0
answers
76
views
Downloading from Camera Roll
I am trying to download files from the camera roll of an attached iPhone using Swift, AppKit and the ImageCaptureCore framework.
It seems to work fairly well when the camera roll contains a relatively ...
-1
votes
0
answers
23
views
Prevent macOS window.level floating from showing on all screens in a multi monitor setup?
I am using the window.level set to .floating as described here:
https://developer.apple.com/documentation/appkit/nswindow/level
The setting itself works okay. However, in a multi monitor setup, the ...
0
votes
1
answer
36
views
Force Cocoa to update bound value on button click
By default Cocoa binding of NSTextFiled's value to a property only does model update when text field loses input focus.
Is there a way to force an update on, for example, form button click and not ...
0
votes
1
answer
37
views
NSWindow with SwiftUI content has zero frame on macOS 15
As title says. I create a window as such:
onboardWindow?.setFrame(.init(x: 0, y: 0, width: 600, height: 400), display: false)
Then, when it's time to show:
let contentView = WelcomeView()
let ...