Posts

Post marked as solved
17 Replies
Set the priority of the constraints lower--750 should do it.
Post marked as solved
17 Replies
https://www.tutorialspoint.com/swift/swift_basic_syntax.htm
Post marked as solved
17 Replies
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))
Post marked as solved
4 Replies
set the width wider than any width you might reasonably expect, taking into account differences in localization if you are localizing, and ignore the warning.
Post marked as solved
7 Replies
As I said, it may be a starting point. A simple search in sample code:https://developer.apple.com/library/archive/samplecode/TextLayoutDemo/Introduction/Intro.html#//apple_ref/doc/uid/DTS10004341
Post marked as solved
7 Replies
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).
Post not yet marked as solved
1 Replies
You may want to explore the GlobalDomain of the defaults. Do a search on how to dump all the defaults in terminal to see what is available--maybe there is something for scrolling behavior you can change.
Post not yet marked as solved
7 Replies
In line 19, why are you using two not operators? Why not just return the bool, accessibilityEnabled, as is?
Post not yet marked as solved
2 Replies
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.
Post not yet marked as solved
6 Replies
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.
Post not yet marked as solved
6 Replies
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.
Post not yet marked as solved
5 Replies
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?
Post not yet marked as solved
5 Replies
You will want to do this in the menu validation or else it might not "stick."https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/MenuList/Articles/EnablingMenuItems.html
Post not yet marked as solved
3 Replies
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.
Post not yet marked as solved
3 Replies
Set it through setTypingAttributes: and possibly setDefaultParagraphStyle: if you want to fiddle with those as well (line spacing, etc.).