Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.进行iOS系统的适配 #1638

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
18 changes: 18 additions & 0 deletions TZImagePickerController.xcodeproj/project.pbxproj
Expand Up @@ -81,6 +81,9 @@
B662C36F2662914D006A672A /* TZVideoEditedPreviewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B662C36E2662914D006A672A /* TZVideoEditedPreviewController.m */; };
B662C37326629179006A672A /* TZVideoEditedPreviewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B662C36E2662914D006A672A /* TZVideoEditedPreviewController.m */; };
B6977B0A265FDB280028BA31 /* TZVideoCropController.m in Sources */ = {isa = PBXBuildFile; fileRef = B606A9C2265FD53200F5493E /* TZVideoCropController.m */; };
DB3E9FC229B89DCA00292257 /* TZWindowManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DB3E9FC029B89DCA00292257 /* TZWindowManager.m */; };
DB3E9FC329B89DCA00292257 /* TZWindowManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DB3E9FC029B89DCA00292257 /* TZWindowManager.m */; };
DB3E9FC429B89DCA00292257 /* TZWindowManager.h in Headers */ = {isa = PBXBuildFile; fileRef = DB3E9FC129B89DCA00292257 /* TZWindowManager.h */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -200,6 +203,8 @@
B606A9C3265FD53200F5493E /* TZVideoCropController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TZVideoCropController.h; sourceTree = "<group>"; };
B662C36D2662914D006A672A /* TZVideoEditedPreviewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TZVideoEditedPreviewController.h; sourceTree = "<group>"; };
B662C36E2662914D006A672A /* TZVideoEditedPreviewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TZVideoEditedPreviewController.m; sourceTree = "<group>"; };
DB3E9FC029B89DCA00292257 /* TZWindowManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TZWindowManager.m; sourceTree = "<group>"; };
DB3E9FC129B89DCA00292257 /* TZWindowManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TZWindowManager.h; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -281,6 +286,7 @@
900E657E1C2BB8D5003D9A9E /* TZImagePickerController */ = {
isa = PBXGroup;
children = (
DB3E9FBF29B89DCA00292257 /* TZWindowManager */,
5B7A0D4F288691E7002B2603 /* Location */,
901F228F215CABD600F604ED /* FLAnimatedImage */,
900EEFF51C2BBF7600EA709B /* TZImagePickerController */,
Expand Down Expand Up @@ -413,6 +419,15 @@
path = TZImagePickerControllerFramework;
sourceTree = "<group>";
};
DB3E9FBF29B89DCA00292257 /* TZWindowManager */ = {
isa = PBXGroup;
children = (
DB3E9FC029B89DCA00292257 /* TZWindowManager.m */,
DB3E9FC129B89DCA00292257 /* TZWindowManager.h */,
);
path = TZWindowManager;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
Expand All @@ -428,6 +443,7 @@
9F763A741FA0741D00D9E526 /* TZGifPhotoPreviewController.h in Headers */,
9005E2B5257A462E002A8682 /* UIView+TZLayout.h in Headers */,
9F763A761FA0741D00D9E526 /* TZImageManager.h in Headers */,
DB3E9FC429B89DCA00292257 /* TZWindowManager.h in Headers */,
908D115A2887ED8000DD212E /* TZLocationManager.h in Headers */,
9F763A711FA0741D00D9E526 /* TZPhotoPreviewController.h in Headers */,
9F763A721FA0741D00D9E526 /* TZPhotoPreviewCell.h in Headers */,
Expand Down Expand Up @@ -611,6 +627,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DB3E9FC229B89DCA00292257 /* TZWindowManager.m in Sources */,
B606A9CE265FD5F700F5493E /* TZVideoPlayerController.m in Sources */,
B662C36F2662914D006A672A /* TZVideoEditedPreviewController.m in Sources */,
9038D5911C3974F0007DE549 /* TZTestCell.m in Sources */,
Expand Down Expand Up @@ -677,6 +694,7 @@
908D11592887ED8000DD212E /* TZLocationManager.m in Sources */,
9F763A621FA072E500D9E526 /* TZImageManager.m in Sources */,
9F763A641FA072E500D9E526 /* TZImageCropManager.m in Sources */,
DB3E9FC329B89DCA00292257 /* TZWindowManager.m in Sources */,
9F763A6A1FA072E500D9E526 /* NSBundle+TZImagePicker.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
3 changes: 2 additions & 1 deletion TZImagePickerController/AppDelegate.m
Expand Up @@ -58,7 +58,8 @@ - (void)useNavControllerAsRoot {
- (void)pushTZImagePickerController {
TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:9 columnNumber:4 delegate:nil pushPhotoPickerVc:YES];
imagePickerVc.modalPresentationStyle = UIModalPresentationFullScreen;
UINavigationController *nav = (UINavigationController *)[UIApplication sharedApplication].keyWindow.rootViewController;
UIWindow *keyWindow = [[TZWindowManager manager] currentWindow];
UINavigationController *nav =(UINavigationController *)keyWindow.rootViewController;
[nav.topViewController presentViewController:imagePickerVc animated:YES completion:nil];
}

Expand Down
5 changes: 2 additions & 3 deletions TZImagePickerController/FLAnimatedImage/FLAnimatedImage.h
Expand Up @@ -3,7 +3,7 @@
// Flipboard
//
// Created by Raphael Schaad on 7/8/13.
// Copyright (c) 2013-2015 Flipboard. All rights reserved.
// Copyright (c) Flipboard. All rights reserved.
//


Expand All @@ -12,7 +12,6 @@
// Allow user classes conveniently just importing one header.
#import "FLAnimatedImageView.h"


#ifndef NS_DESIGNATED_INITIALIZER
#if __has_attribute(objc_designated_initializer)
#define NS_DESIGNATED_INITIALIZER __attribute((objc_designated_initializer))
Expand All @@ -34,7 +33,7 @@ extern const NSTimeInterval kFLAnimatedImageDelayTimeIntervalMinimum;
@property (nonatomic, strong, readonly) UIImage *posterImage; // Guaranteed to be loaded; usually equivalent to `-imageLazilyCachedAtIndex:0`
@property (nonatomic, assign, readonly) CGSize size; // The `.posterImage`'s `.size`

@property (nonatomic, assign, readonly) NSUInteger loopCount; // 0 means repeating the animation indefinitely
@property (nonatomic, assign, readonly) NSUInteger loopCount; // "The number of times to repeat an animated sequence." according to ImageIO (note the slightly different definition to Netscape 2.0 Loop Extension); 0 means repeating the animation forever
@property (nonatomic, strong, readonly) NSDictionary *delayTimesForIndexes; // Of type `NSTimeInterval` boxed in `NSNumber`s
@property (nonatomic, assign, readonly) NSUInteger frameCount; // Number of valid frames; equal to `[.delayTimes count]`

Expand Down