Post

Replies

Boosts

Views

Activity

Reply to How to start an animation without button Tap
It looks to me the example from Claude31 has an error with the parenthesis and you have compounded the error.I don't code in Swift but I would guess this line:posInMotion = CGPoint(x: 1 (ratio * fullWindowPosition.x/100, y: ratio * (fullWindowPosition.y/100)))should be:posInMotion = CGPoint(x: 1 (ratio * fullWindowPosition.x/100), y: ratio * (fullWindowPosition.y/100))
Jun ’20
Reply to Text along a curve
There is sample code from Apple called textLayoutDemo that shows how to layout text in a circle. I'm not sure if this will help but it might be worth exploring. It dates back to about 2007 (I think).
May ’20
Reply to iOS 13 NSKeyedUnarchiver EXC_BAD_ACCESS
unarchiveTopLevelObjectWithData is deprecated.https://developer.apple.com/documentation/foundation/nskeyedunarchiver?language=objcAlso, when you use the newer + (id)unarchivedObjectOfClass:(Class)cls fromData:(NSData *)data error:(NSError * _Nullable *)error;or+ (id)unarchivedObjectOfClasses:(NSSet<Class> *)classes fromData:(NSData *)data error:(NSError * _Nullable *)error;You need to specify every class in the object. So if you have an array that contains some dictionaries, for example, you need to indicate both the array and dictionary in classes.
May ’20
Reply to Objects, Allocation, Theory
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.
May ’20
Reply to Objects, Allocation, Theory
This is in macOS. Anyway, with your suggestion, then when scrolling the document, I have to keep track of where it is scrolled and load/unload strings. And what if it is scrolled so that portions of two pages are visible? And what if I edit text on page 12 (add or delete)--then I have to change the strings in the array for all the pages after page 12.
May ’20
Reply to Export using Drag & Drop to Finder?
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 another document, save it on a stack for later, etc. Once you figure out how to get your Blob on the pasteboard when your app is not running, it should be downhill thereafter. Register a service?
Apr ’20
Reply to How to set monospaced font for a NSTextView
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.
Apr ’20