Updated the iOS Objective-C code to use NSDictionary/NSArray/NSNumber literals and subscripting, for improved code clarity.

This requires at least Xcode 4.5 and the iOS 6 SDK to build, but it doesn't change the minimum supported runtime version (iOS 5.1). Less than 2% of iOS users are running iOS 5, so I hope developers aren't trying to build SDL using an SDK which doesn't support iOS 6/7...
This commit is contained in:
Alex Szpakowski 2014-07-23 01:28:24 -03:00
parent 078ca9f078
commit 967549c9ad
6 changed files with 12 additions and 28 deletions

View file

@ -94,10 +94,10 @@
CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;
eaglLayer.opaque = YES;
eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool: retained], kEAGLDrawablePropertyRetainedBacking,
colorFormat, kEAGLDrawablePropertyColorFormat,
nil];
eaglLayer.drawableProperties = @{
kEAGLDrawablePropertyRetainedBacking: @(retained),
kEAGLDrawablePropertyColorFormat: colorFormat
};
/* Set the appropriate scale (for retina display support) */
self.contentScaleFactor = scale;