RubyGladiator
RubyGladiator

Reputation: 1765

Not losing resolution on ios screen snapshot

If I set the scale to 2 in the below function when taking a snapshot of a view, will that prevent losing resolution when the image is diSplayed on a larger device such as from iphonE 5 to iphone 6+?

void UIGraphicsBeginImageContextWithOptions ( CGSize size, BOOL opaque, CGFloat scale );

Upvotes: 0

Views: 65

Answers (1)

AdamPro13
AdamPro13

Reputation: 7400

Yes, and instead of hard-coding it to 2, use [UIScreen mainScreen].scale.

Upvotes: 1

Related Questions