Saturday, March 31, 2012

Upgrade OpenFlowSharp to work with retina display

For those of you using OpenFlowSharp for your MonoTouch apps for iOS and is wondering why it is not displaying retina resolution images the following is the fix to make it work:

In ImageUtils.cs line 81, replace:


if (UIScreen.MainScreen.RespondsToSelector(new Selector("scale")))


UIGraphics.BeginImageContextWithOptions(size, false, UIScreen.MainScreen.Scale);




UIGraphics.BeginImageContext (size);


You'll need the if block to check for "scale" because it is only supported on iOS 4 and above.

No comments:

Post a Comment