Skip to content

Commit

Permalink
fix: category properties name fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
尹久盼 committed May 24, 2017
1 parent 0eddcbf commit 4e2f1a5
Show file tree
Hide file tree
Showing 12 changed files with 317 additions and 23 deletions.
4 changes: 2 additions & 2 deletions JPVideoPlayer/UIView+PlayerStatusAndDownloadIndicator.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
/**
* The download progress value.
*/
@property(nonatomic, readonly)CGFloat downloadProgressValue;
@property(nonatomic, readonly)CGFloat jp_downloadProgressValue;

/**
* The playing progress value.
*/
@property(nonatomic, readonly)CGFloat playingProgressValue;
@property(nonatomic, readonly)CGFloat jp_playingProgressValue;

/**
* Call this method to custom the dowload indicator color of progress view(@optional).
Expand Down
16 changes: 8 additions & 8 deletions JPVideoPlayer/UIView+PlayerStatusAndDownloadIndicator.m
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@ -(void)jp_progressViewDownloadingStatusChangedWithProgressValue:(NSNumber *)prog
delta = MAX(0, delta);
delta = MIN(delta, 1);
[self.progressView setDownloadProgress:delta];
self.downloadProgressValue = delta;
self.jp_downloadProgressValue = delta;
}

-(void)jp_progressViewPlayingStatusChangedWithProgressValue:(NSNumber *)progress{
CGFloat delta = [progress floatValue];
delta = MAX(0, delta);
delta = MIN(delta, 1);
[self.progressView setPlayingProgress:delta];
self.playingProgressValue = delta;
self.jp_playingProgressValue = delta;
}

-(void)jp_showActivityIndicatorView{
Expand Down Expand Up @@ -170,19 +170,19 @@ -(CALayer *)jp_backgroundLayer{
return backLayer;
}

-(void)setPlayingProgressValue:(CGFloat)playingProgressValue{
objc_setAssociatedObject(self, &playingProgressValueKey, @(playingProgressValue), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-(void)setJp_playingProgressValue:(CGFloat)jp_playingProgressValue{
objc_setAssociatedObject(self, &playingProgressValueKey, @(jp_playingProgressValue), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

-(CGFloat)playingProgressValue{
-(CGFloat)jp_playingProgressValue{
return [objc_getAssociatedObject(self, &playingProgressValueKey) floatValue];
}

-(void)setDownloadProgressValue:(CGFloat)downloadProgressValue{
objc_setAssociatedObject(self, &downloadProgressValueKey, @(downloadProgressValue), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-(void)setJp_downloadProgressValue:(CGFloat)jp_downloadProgressValue{
objc_setAssociatedObject(self, &downloadProgressValueKey, @(jp_downloadProgressValue), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

-(CGFloat)downloadProgressValue{
-(CGFloat)jp_downloadProgressValue{
return [objc_getAssociatedObject(self, &downloadProgressValueKey) floatValue];
}

Expand Down
1 change: 0 additions & 1 deletion JPVideoPlayer/UIView+WebVideoCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
* or http://www.jianshu.com/users/e2f2d779c022/latest_articles to contact me.
*/


#import <UIKit/UIKit.h>
#import "JPVideoPlayerManager.h"
#import "UIView+PlayerStatusAndDownloadIndicator.h"
Expand Down
24 changes: 24 additions & 0 deletions JPVideoPlayerDemo/OC/JPVideoPlayer/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
18 changes: 18 additions & 0 deletions JPVideoPlayerDemo/OC/JPVideoPlayer/JPVideoPlayer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* This file is part of the JPVideoPlayer package.
* (c) NewPan <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Click https://github.com/Chris-Pan
* or http://www.jianshu.com/users/e2f2d779c022/latest_articles to contact me.
*/

#import "UIView+WebVideoCache.h"
#import "UIView+PlayerStatusAndDownloadIndicator.h"
#import "JPVideoPlayerCache.h"




164 changes: 164 additions & 0 deletions JPVideoPlayerDemo/OC/JPVideoPlayerDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
484BB72B1ECFE04E00A5EFF9 /* JRSwizzle.m in Sources */ = {isa = PBXBuildFile; fileRef = 484BB72A1ECFE04E00A5EFF9 /* JRSwizzle.m */; };
488717511EB63CBA00300CA6 /* JPVideoPlayerDemoVC_Setting.m in Sources */ = {isa = PBXBuildFile; fileRef = 4887174F1EB63CBA00300CA6 /* JPVideoPlayerDemoVC_Setting.m */; };
488717521EB63CBA00300CA6 /* JPVideoPlayerDemoVC_Setting.xib in Resources */ = {isa = PBXBuildFile; fileRef = 488717501EB63CBA00300CA6 /* JPVideoPlayerDemoVC_Setting.xib */; };
48B548F11ED5B3AB00062DC2 /* JPVideoPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 48B548EF1ED5B3AB00062DC2 /* JPVideoPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
48B548F41ED5B3AB00062DC2 /* JPVideoPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 48B548ED1ED5B3AB00062DC2 /* JPVideoPlayer.framework */; };
48B548F51ED5B3AB00062DC2 /* JPVideoPlayer.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 48B548ED1ED5B3AB00062DC2 /* JPVideoPlayer.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
48D290401E7842D50024C5C6 /* hello.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 48D2903F1E7842D50024C5C6 /* hello.mp4 */; };
48EE51D01E6C069900BA602D /* JPVideoPlayerDemoCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 48EE51CE1E6C069900BA602D /* JPVideoPlayerDemoCell.m */; };
48EE51D11E6C069900BA602D /* JPVideoPlayerDemoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 48EE51CF1E6C069900BA602D /* JPVideoPlayerDemoCell.xib */; };
Expand All @@ -41,6 +44,30 @@
C3D50D2EF7B7EB2F36B72E2D /* libPods-JPVideoPlayerDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8EBFC49659DDED5EA35F2A91 /* libPods-JPVideoPlayerDemo.a */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
48B548F21ED5B3AB00062DC2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5F67055B1DADE88F001EBFAF /* Project object */;
proxyType = 1;
remoteGlobalIDString = 48B548EC1ED5B3AB00062DC2;
remoteInfo = JPVideoPlayer;
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
48B548F91ED5B3AB00062DC2 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
48B548F51ED5B3AB00062DC2 /* JPVideoPlayer.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
0C9A80C1EADCB50E8B8E7648 /* Pods-JPVideoPlayerDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JPVideoPlayerDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-JPVideoPlayerDemo/Pods-JPVideoPlayerDemo.debug.xcconfig"; sourceTree = "<group>"; };
1F5F3C3412F93A0936D3FBB0 /* Pods-JPVideoPlayerDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JPVideoPlayerDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-JPVideoPlayerDemo/Pods-JPVideoPlayerDemo.release.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -86,6 +113,9 @@
4887174E1EB63CBA00300CA6 /* JPVideoPlayerDemoVC_Setting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JPVideoPlayerDemoVC_Setting.h; sourceTree = "<group>"; };
4887174F1EB63CBA00300CA6 /* JPVideoPlayerDemoVC_Setting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JPVideoPlayerDemoVC_Setting.m; sourceTree = "<group>"; };
488717501EB63CBA00300CA6 /* JPVideoPlayerDemoVC_Setting.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = JPVideoPlayerDemoVC_Setting.xib; sourceTree = "<group>"; };
48B548ED1ED5B3AB00062DC2 /* JPVideoPlayer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JPVideoPlayer.framework; sourceTree = BUILT_PRODUCTS_DIR; };
48B548EF1ED5B3AB00062DC2 /* JPVideoPlayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JPVideoPlayer.h; sourceTree = "<group>"; };
48B548F01ED5B3AB00062DC2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
48D2903F1E7842D50024C5C6 /* hello.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = hello.mp4; sourceTree = "<group>"; };
48EE51CD1E6C069900BA602D /* JPVideoPlayerDemoCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JPVideoPlayerDemoCell.h; sourceTree = "<group>"; };
48EE51CE1E6C069900BA602D /* JPVideoPlayerDemoCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JPVideoPlayerDemoCell.m; sourceTree = "<group>"; };
Expand All @@ -107,11 +137,19 @@
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
48B548E91ED5B3AB00062DC2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
5F6705601DADE88F001EBFAF /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C3D50D2EF7B7EB2F36B72E2D /* libPods-JPVideoPlayerDemo.a in Frameworks */,
48B548F41ED5B3AB00062DC2 /* JPVideoPlayer.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -170,6 +208,15 @@
path = JPVideoPlayer;
sourceTree = "<group>";
};
48B548EE1ED5B3AB00062DC2 /* JPVideoPlayer */ = {
isa = PBXGroup;
children = (
48B548EF1ED5B3AB00062DC2 /* JPVideoPlayer.h */,
48B548F01ED5B3AB00062DC2 /* Info.plist */,
);
path = JPVideoPlayer;
sourceTree = "<group>";
};
48FD32691EB6FF3B00ACCB05 /* Player */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -227,6 +274,7 @@
isa = PBXGroup;
children = (
5F6705651DADE88F001EBFAF /* JPVideoPlayerDemo */,
48B548EE1ED5B3AB00062DC2 /* JPVideoPlayer */,
5F6705641DADE88F001EBFAF /* Products */,
272BF3831ADEABFABB821412 /* Pods */,
71FA05B037030D7EBC04D718 /* Frameworks */,
Expand All @@ -237,6 +285,7 @@
isa = PBXGroup;
children = (
5F6705631DADE88F001EBFAF /* JPVideoPlayerDemo.app */,
48B548ED1ED5B3AB00062DC2 /* JPVideoPlayer.framework */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -276,7 +325,36 @@
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
48B548EA1ED5B3AB00062DC2 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
48B548F11ED5B3AB00062DC2 /* JPVideoPlayer.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
48B548EC1ED5B3AB00062DC2 /* JPVideoPlayer */ = {
isa = PBXNativeTarget;
buildConfigurationList = 48B548F81ED5B3AB00062DC2 /* Build configuration list for PBXNativeTarget "JPVideoPlayer" */;
buildPhases = (
48B548E81ED5B3AB00062DC2 /* Sources */,
48B548E91ED5B3AB00062DC2 /* Frameworks */,
48B548EA1ED5B3AB00062DC2 /* Headers */,
48B548EB1ED5B3AB00062DC2 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = JPVideoPlayer;
productName = JPVideoPlayer;
productReference = 48B548ED1ED5B3AB00062DC2 /* JPVideoPlayer.framework */;
productType = "com.apple.product-type.framework";
};
5F6705621DADE88F001EBFAF /* JPVideoPlayerDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 5F67057A1DADE88F001EBFAF /* Build configuration list for PBXNativeTarget "JPVideoPlayerDemo" */;
Expand All @@ -287,10 +365,12 @@
5F6705611DADE88F001EBFAF /* Resources */,
818F9AB63D84633DC080A828 /* [CP] Embed Pods Frameworks */,
428134F9DF52FE292474C6FA /* [CP] Copy Pods Resources */,
48B548F91ED5B3AB00062DC2 /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
48B548F31ED5B3AB00062DC2 /* PBXTargetDependency */,
);
name = JPVideoPlayerDemo;
productName = JPVideoPlayerDemo;
Expand All @@ -306,6 +386,11 @@
LastUpgradeCheck = 0810;
ORGANIZATIONNAME = NewPan;
TargetAttributes = {
48B548EC1ED5B3AB00062DC2 = {
CreatedOnToolsVersion = 8.3;
DevelopmentTeam = U7FB52A877;
ProvisioningStyle = Automatic;
};
5F6705621DADE88F001EBFAF = {
CreatedOnToolsVersion = 8.0;
DevelopmentTeam = U7FB52A877;
Expand All @@ -327,11 +412,19 @@
projectRoot = "";
targets = (
5F6705621DADE88F001EBFAF /* JPVideoPlayerDemo */,
48B548EC1ED5B3AB00062DC2 /* JPVideoPlayer */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
48B548EB1ED5B3AB00062DC2 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
5F6705611DADE88F001EBFAF /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -396,6 +489,13 @@
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
48B548E81ED5B3AB00062DC2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
5F67055F1DADE88F001EBFAF /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -430,6 +530,14 @@
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
48B548F31ED5B3AB00062DC2 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 48B548EC1ED5B3AB00062DC2 /* JPVideoPlayer */;
targetProxy = 48B548F21ED5B3AB00062DC2 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
5F6705741DADE88F001EBFAF /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
Expand All @@ -442,6 +550,54 @@
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
48B548F61ED5B3AB00062DC2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = U7FB52A877;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = JPVideoPlayer/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ibeiliao.www.JPVideoPlayer;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
48B548F71ED5B3AB00062DC2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = U7FB52A877;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = JPVideoPlayer/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ibeiliao.www.JPVideoPlayer;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
5F6705781DADE88F001EBFAF /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -565,6 +721,14 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
48B548F81ED5B3AB00062DC2 /* Build configuration list for PBXNativeTarget "JPVideoPlayer" */ = {
isa = XCConfigurationList;
buildConfigurations = (
48B548F61ED5B3AB00062DC2 /* Debug */,
48B548F71ED5B3AB00062DC2 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
5F67055E1DADE88F001EBFAF /* Build configuration list for PBXProject "JPVideoPlayerDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
Expand Down
Loading

0 comments on commit 4e2f1a5

Please sign in to comment.