Re: CABasicAnimation does not animate bounds.origin of a layer

2019-09-14 Thread Steve Christensen via Cocoa-dev
First guess would be not to explicitly set -anchorPosition. It defaults to (0.5, 0.5), which refers to the middle of the bounds, and transforms (like scaling) are applied relative to that position. > On Sep 14, 2019, at 6:25 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > Maybe, I haven't

Swift -> Obj-C: return __kindof Something

2019-11-11 Thread Steve Christensen via Cocoa-dev
I’m working on an Obj-C app that got started a bunch of years ago and thought that I would start migrating some of the smaller pieces over to Swift. Some existing Obj-C methods are of the form: + (nullable __kindof NSManagedObject) someFooThing; Right now I have class var

Re: Swift -> Obj-C: return __kindof Something

2019-11-11 Thread Steve Christensen via Cocoa-dev
;> On Nov 11, 2019, at 15:07 , Steve Christensen via Cocoa-dev >> mailto:cocoa-dev@lists.apple.com>> wrote: >> >> Some existing Obj-C methods are of the form: >> >> + (nullable __kindof NSManagedObject) someFooThing; >> >> Right now I have

Re: Is CGImage... thread-safe?

2020-05-27 Thread Steve Christensen via Cocoa-dev
> On May 27, 2020, at 3:03 PM, Steve Mills via Cocoa-dev > wrote: > >> I can't recall/reproduce, but it was definitely *inside* >> CGImageSourceCreateThumbnailAtIndex(). >> >> If there is no image a tinder 0, shouldn't it just return NULL gracefully? > > We don’t know that. There are many

Re: Relieving memory pressure

2020-06-07 Thread Steve Christensen via Cocoa-dev
For slide shows that I’ve seen, they typically display each image for several seconds at a time. If that’s the case, why can’t you just load the next image from disk on a background queue while the current image is being displayed and not have to worry about memory usage needed to cache

Re: Points vs pixels in a bash script

2020-06-08 Thread Steve Christensen via Cocoa-dev
I don’t have an answer for your question, and I know that this doesn’t actually answer it below, but it may still provide some info to help you move forward. The windowing system is always working in points from a coordinates point of view. So window.frame and view.frame are in points, not

Re: Retrieving the EXIF date/time from 250k images

2022-08-16 Thread Steve Christensen via Cocoa-dev
You mentioned creating and managing threads on your own, but that’s what NSOperationQueue —and the lower-level DispatchQueue— does. It also will be more efficient with thread management since it has an intimate understanding of the capabilities of the processor, etc., and will work to do the

Re: Retrieving the EXIF date/time from 250k images

2022-08-16 Thread Steve Christensen via Cocoa-dev
One way to speed it up is to do as much work as possible in parallel. One way —and this is just off the top of my head— is: 1. Create a NSOperationQueue, and add a single operation on that queue to manage the entire process. (This is because some parts of the process are synchronous and might

Re: Auto-layout, Forcing a top-level view to hug its contents

2022-11-04 Thread Steve Christensen via Cocoa-dev
The view hierarchy doesn’t go through a layout pass until after it is added to a live view or window. At awakeFromNib time it’s still essentially a snapshot of the layout in the nib since it hasn’t yet been inserted into the “context” that will allow the layout engine to determine how big all

Re: Auto-layout, Forcing a top-level view to hug its contents

2022-11-05 Thread Steve Christensen via Cocoa-dev
t;> On Nov 4, 2022, at 23:05, Steve Christensen via Cocoa-dev >> wrote: >> >> The view hierarchy doesn’t go through a layout pass until after it is added >> to a live view or window. At awakeFromNib time it’s still essentially a >> snapshot of the layout