Huynh Inc Huynh Inc - 1 year ago 175
iOS Question

UIScreen.mainScreen.scale on NSScreen

I have a problem with CATextLayer cleaning.
and with iOS the solution is:

textLayer.contentsScale = UIScreen.mainScreen.scale

But I can't found "scale" property on cocoa NSScreen

Note: Answer with Object-C or Swift are OK.

sac sac
Answer Source

[[NSScreen mainScreen] backingScaleFactor] will give you the scaling factor for main display

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download