Skip to content
Browse files

EPGLTransitionView - iOS 3.0 devices support

  • Loading branch information...
1 parent d43ee04 commit 0f5ed162b200068b2ee51c4e24d87dd0d25d6406 @Remint Remint committed
Showing with 22 additions and 5 deletions.
  1. +12 −0 DemoProject/DemoProject.xcodeproj/project.pbxproj
  2. +10 −5 src/EPGLTransitionView.m
View
12 DemoProject/DemoProject.xcodeproj/project.pbxproj
@@ -273,13 +273,20 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = (
+ armv6,
+ "$(ARCHS_STANDARD_32_BIT)",
+ );
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = DemoProject_Prefix.pch;
INFOPLIST_FILE = "DemoProject-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 3.0;
PRODUCT_NAME = DemoProject;
+ "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
};
name = Debug;
};
@@ -287,10 +294,15 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = (
+ armv6,
+ "$(ARCHS_STANDARD_32_BIT)",
+ );
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = DemoProject_Prefix.pch;
INFOPLIST_FILE = "DemoProject-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 3.0;
PRODUCT_NAME = DemoProject;
};
name = Release;
View
15 src/EPGLTransitionView.m
@@ -38,7 +38,10 @@ + (Class)layerClass
- (UIImage *)imageWithView:(UIView *)view
{
- UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.opaque, view.contentScaleFactor); //Retina support
+ if ([view respondsToSelector:@selector(contentScaleFactor)])
+ UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.opaque, view.contentScaleFactor); //Retina support
+ else
+ UIGraphicsBeginImageContext(view.bounds.size);
[view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
@@ -54,10 +57,12 @@ - (id)initWithView:(UIView*)view
size = UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]) ? view.bounds.size : CGSizeMake(view.bounds.size.height, view.bounds.size.width);
//Retina support
- CGFloat contentScale = view.contentScaleFactor;
- size.width *= contentScale;
- size.height *= contentScale;
- self.contentScaleFactor = contentScale;
+ if ([view respondsToSelector:@selector(contentScaleFactor)]) {
+ CGFloat contentScale = view.contentScaleFactor;
+ size.width *= contentScale;
+ size.height *= contentScale;
+ self.contentScaleFactor = contentScale;
+ }
maxTextureSize = 512;

0 comments on commit 0f5ed16

Please sign in to comment.
Something went wrong with that request. Please try again.