Hacker News new | ask | show | jobs
by jrmg 5201 days ago
When using CGFloat you want to make sure to use 0.0 and 50.0.

Actually, on iOS, CGFloat is 32 bits, so you should use '0.0f' and '50.0f'.

On the Mac, in, 64-bit, it's a 64-bit value, so your advice would be correct there.

It is slightly annoying there's no easy way to write a CGFloat literal in a cross-platform way apart from the overly verbose '((CGFloat)50.0)'.

1 comments

You are - of course - correct. Did too much Mac development lately. :)