Re: Recommendations for cross platform library/framework

2019-08-28 Thread Pier Bover via Cocoa-dev
Another option I've found is using Kotlin Native. https://kotlinlang.org/docs/reference/native-overview.html It compiles Kotlin code directly to Apple frameworks for perfect interoperability without the need of a JVM. On Mon, Aug 26, 2019 at 6:41 PM Pier Bover wrote: > Hi all > > In a couple o

boundingRectWithSize gives wrong size

2019-08-28 Thread Gabriel Zachmann via Cocoa-dev
I am trying to determine the size of a piece of text using boundingRectWithSize. The problem is that this method does not return the correct width. (The height seems to be about right.) Sometimes, the width is only a little bit too wide, sometimes it is much too wide. And I could not find a patte

Re: boundingRectWithSize gives wrong size

2019-08-28 Thread Richard Charles via Cocoa-dev
> On Aug 28, 2019, at 1:33 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > I am trying to determine the size of a piece of text using > boundingRectWithSize. > > The problem is that this method does not return the correct width. (The > height seems to be about right.) Sometimes, the width i

Re: Cocoa-dev Digest, Vol 16, Issue 72

2019-08-28 Thread Jens Alfke via Cocoa-dev
> On Aug 27, 2019, at 7:21 PM, Turtle Creek Software > wrote: > > What I can't find is where the __bridge cast should go. The compiler > complains at all locations. > The app runs the same, but will ARC be OK without it? You shouldn't need to use __bridge at all, since you're no longer casti

Re: boundingRectWithSize gives wrong size

2019-08-28 Thread Jens Alfke via Cocoa-dev
> On Aug 28, 2019, at 12:33 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > NSRect string_rect = CGRectIntegral( [mesg_string boundingRectWithSize: > drawRect_.size What is drawRect_ set to when this is called? It's been a while since I used this, but IIRC the output width will be the sam