خرید بک لینک

Vote count: 0

I Need to take a screenshot of a part of the screen.

This is the code to take a screenshot of the full screen in an iOS project:

UIGraphicsBeginImageContext(view.frame.size)
view.layer.renderInContext(UIGraphicsGetCurrentContext())
let imageRef = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()

But how do I take a screenshot of the full screen in an Mac OS X Cocoa project ?

Thank you

asked 59 secs ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 18 مرداد 1395 ساعت: 1:13

صفحه بندی