macOS, Swift, storyboards I have a label with minutes and seconds of a countdown. 00:00 I want it horizontally centered in the container and at a certain distance from the top. When I put those constraints, all the label moves when there is a new second as it tries to center: 00:01, 00:02... it creates and strange effect. I suppose that the… Show more
I would like to draw text along a complex bezier curve. I've seen several examples on the web using CGPathApply to do this. But those examples seem to be wrong. CGPathApply does not supply you with a series of points along the curve. I just get back the points, and control points, I just used to specify the Bezier curve. I want actual pixel… Show more
I would like to be able to modify scrolling behavior in all applicable apps on my system via an installable app or extension. I am wondering where to start. It appears an action extension would be appropriate, but I could be overlooking something. I would also want to create some kind of pref pane or menu bar control panel to allow altering the… Show more
I have Cocoa application where I need to ask for recording and accessibility permission. I am seeing that only first feature asking for permissions shows its popup. E.g If I put first code to ask for recording screen permission I dont see accessibility and in the Security and Privacy my app appears as I had rejected permission Same happens on… Show more
Hi all, I've spent the better part of a day and half now trying to debug this issue I'm seeing when trying to unarchive a Data blob stored locally (this issue also appears when retrieving it via iCloud, but since they run through the same codepath, I assume they're related). Background I originally built this app four years ago, and for… Show more
unarchiveTopLevelObjectWithData is deprecated. https://developer.apple.com/documentation/foundation/nskeyedunarchiver?language=objc Also, when you use the newer + (id)unarchivedObjectOfClass:(Class)cls fromData:(NSData *)data error:(NSError * _Nullable *)error; or + (id)unarchivedObjectOfClasses:(NSSet<Class> *)classes …
Background: An NSDocument text editing based app. Each page of the document has its own textView for the main document and a textView for the header and the footer for a total of three textViews (and associated objects such as textContainers) for each page. Currently I have it optimized to the point of being able to load a 336 page, 102K word… Show more
38 meg of memory with a one page document. 66 meg of memory with the 336 page document. I think that aspect stays as is--it works quite well. I don't have memory or timing problems. I am looking to optimize an app that already performs well and want to take it to an even higher level of performance.
I have this idea for my document-based app that I'm not sure is possible, so I'm hoping someone with experience can shed some light on this for me. Imagine I've got an NSDocument but it's actually represented as a package, a folder on disk. Let's call this folder-based document a Project document. Inside the Project document's package folder… Show more
This should be possible. You will most likely want to do this through the pasteboard by creating a custom pasteboard type. In one of my apps, I have a custom "Blob" that is a dictionary containing various objects. I have that "Blob" as a custom readable and writable pasteboard type that allows me to copy and paste it from from one document to…
Hi, I've implemented mutually exclusives buttons using NSSegmentedControl for a NSToolbar. Is there such a thing for Menu Items in AppKit, or do I have to do it by hand? UPDATE: By mutually exclusives menu items I mean items that are can't both be enabled, or that can't both be in the same state at the same time. Thanks!
Hi, I'm trying to set a textview to use a monospaced font, the default monospace font and while it's working, I'm getting this warning. The code I'm using is the one from Apple's docs: textView.font = NSFont.monospacedSystemFont(ofSize: 12, weight: .regular) but when I run my app the warning below shows up: 2020-04-04… Show more
Things get curiouser--I had this error pop up. I put a button on a window--the button had the default font from what ever IB decided to give it--a system font if I recall. Well, that same error popped up. I went in and changed the font for the button and the error went away. I am wondering if this is a bug.
I have an application that needs to use filePromiseProvider for drag-and-drop operations to other applications. The problem I'm having is that the receiving applicaion (in this case, Pages) provides a desired destination in /private/var: [MSWUtility64 filePromiseProvider:writePromiseToURL:completionHandler:]… Show more
Load more items
MacOS 10.15.3 Has any progress been made on these new archivers to make them actually work for non-secure archiving? i'm still using the deprecated methods because the new NSKeyedUnarchiver using "NO" for secure coding doesn't work. This is in a core data managed object awakeFromFetch. I've put in a compiler switch to flip between these types of… Show more