diff --git a/JhtMarquee/JhtMarqueeSDK/JhtHorizontalMarquee.h b/JhtMarquee.framework/Headers/JhtHorizontalMarquee.h similarity index 100% rename from JhtMarquee/JhtMarqueeSDK/JhtHorizontalMarquee.h rename to JhtMarquee.framework/Headers/JhtHorizontalMarquee.h diff --git a/JhtMarquee/JhtMarqueeSDK/JhtVerticalMarquee.h b/JhtMarquee.framework/Headers/JhtVerticalMarquee.h similarity index 100% rename from JhtMarquee/JhtMarqueeSDK/JhtVerticalMarquee.h rename to JhtMarquee.framework/Headers/JhtVerticalMarquee.h diff --git a/JhtMarquee.framework/Info.plist b/JhtMarquee.framework/Info.plist new file mode 100644 index 0000000..f240a4a Binary files /dev/null and b/JhtMarquee.framework/Info.plist differ diff --git a/JhtMarquee.framework/JhtMarquee b/JhtMarquee.framework/JhtMarquee new file mode 100644 index 0000000..32b355b Binary files /dev/null and b/JhtMarquee.framework/JhtMarquee differ diff --git a/JhtMarquee.xcodeproj/project.pbxproj b/JhtMarquee.xcodeproj/project.pbxproj index 7516413..66c9112 100755 --- a/JhtMarquee.xcodeproj/project.pbxproj +++ b/JhtMarquee.xcodeproj/project.pbxproj @@ -15,7 +15,7 @@ 78808AE31E6EADB60081C941 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 78808AD61E6EADB60081C941 /* main.m */; }; 78808AE41E6EADB60081C941 /* testVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 78808AD91E6EADB60081C941 /* testVC.m */; }; 78808AE51E6EADB60081C941 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 78808ADB1E6EADB60081C941 /* ViewController.m */; }; - 8E3400981ED7D64700ECC223 /* JhtMarqueeSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E3400951ED7D64700ECC223 /* JhtMarqueeSDK.a */; }; + A52039D21F7C9E8400272F6F /* JhtMarquee.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A52039591F7BAB0800272F6F /* JhtMarquee.framework */; }; A58F83FA1E1120BE00E30D68 /* JhtMarqueeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A58F83F91E1120BE00E30D68 /* JhtMarqueeTests.m */; }; A58F84051E1120BE00E30D68 /* JhtMarqueeUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = A58F84041E1120BE00E30D68 /* JhtMarqueeUITests.m */; }; /* End PBXBuildFile section */ @@ -49,10 +49,7 @@ 78808AD91E6EADB60081C941 /* testVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = testVC.m; sourceTree = ""; }; 78808ADA1E6EADB60081C941 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 78808ADB1E6EADB60081C941 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - 8E3400941ED7D64700ECC223 /* JhtHorizontalMarquee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JhtHorizontalMarquee.h; sourceTree = ""; }; - 8E3400951ED7D64700ECC223 /* JhtMarqueeSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = JhtMarqueeSDK.a; sourceTree = ""; }; - 8E3400961ED7D64700ECC223 /* JhtMarqueeSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JhtMarqueeSDK.h; sourceTree = ""; }; - 8E3400971ED7D64700ECC223 /* JhtVerticalMarquee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JhtVerticalMarquee.h; sourceTree = ""; }; + A52039591F7BAB0800272F6F /* JhtMarquee.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JhtMarquee.framework; sourceTree = ""; }; A58F83DC1E1120BE00E30D68 /* JhtMarquee.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JhtMarquee.app; sourceTree = BUILT_PRODUCTS_DIR; }; A58F83F51E1120BE00E30D68 /* JhtMarqueeTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JhtMarqueeTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; A58F83F91E1120BE00E30D68 /* JhtMarqueeTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JhtMarqueeTests.m; sourceTree = ""; }; @@ -67,7 +64,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 8E3400981ED7D64700ECC223 /* JhtMarqueeSDK.a in Frameworks */, + A52039D21F7C9E8400272F6F /* JhtMarquee.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -96,7 +93,6 @@ 78808ADA1E6EADB60081C941 /* ViewController.h */, 78808ADB1E6EADB60081C941 /* ViewController.m */, 78808AD71E6EADB60081C941 /* testVC */, - 8E3400931ED7D64700ECC223 /* JhtMarqueeSDK */, 78808AC91E6EADB60081C941 /* Assets.xcassets */, 78808ACA1E6EADB60081C941 /* LaunchScreen.storyboard */, 78808ACC1E6EADB60081C941 /* Main.storyboard */, @@ -115,24 +111,15 @@ path = testVC; sourceTree = ""; }; - 8E3400931ED7D64700ECC223 /* JhtMarqueeSDK */ = { - isa = PBXGroup; - children = ( - 8E3400961ED7D64700ECC223 /* JhtMarqueeSDK.h */, - 8E3400971ED7D64700ECC223 /* JhtVerticalMarquee.h */, - 8E3400941ED7D64700ECC223 /* JhtHorizontalMarquee.h */, - 8E3400951ED7D64700ECC223 /* JhtMarqueeSDK.a */, - ); - path = JhtMarqueeSDK; - sourceTree = ""; - }; A58F83D31E1120BE00E30D68 = { isa = PBXGroup; children = ( + A52039591F7BAB0800272F6F /* JhtMarquee.framework */, 78808AC61E6EADB60081C941 /* JhtMarquee */, A58F83F81E1120BE00E30D68 /* JhtMarqueeTests */, A58F84031E1120BE00E30D68 /* JhtMarqueeUITests */, A58F83DD1E1120BE00E30D68 /* Products */, + A5A0FE921F7B894900688220 /* Frameworks */, ); sourceTree = ""; }; @@ -164,6 +151,13 @@ path = JhtMarqueeUITests; sourceTree = ""; }; + A5A0FE921F7B894900688220 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -398,7 +392,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -439,7 +433,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; @@ -451,13 +445,20 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = BY48QUJK83; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/JhtMarquee.framework", + "$(PROJECT_DIR)", + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/JhtMarquee.framework/Headers", + ); INFOPLIST_FILE = JhtMarquee/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/JhtMarquee/JhtMarqueeSDK", - ); + LIBRARY_SEARCH_PATHS = "$(inherited)"; + ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.jht.JhtMarquee; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -468,13 +469,20 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = BY48QUJK83; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/JhtMarquee.framework", + "$(PROJECT_DIR)", + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/JhtMarquee.framework/Headers", + ); INFOPLIST_FILE = JhtMarquee/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/JhtMarquee/JhtMarqueeSDK", - ); + LIBRARY_SEARCH_PATHS = "$(inherited)"; + ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.jht.JhtMarquee; PRODUCT_NAME = "$(TARGET_NAME)"; }; diff --git a/JhtMarquee.xcodeproj/project.xcworkspace/xcuserdata/Jht.xcuserdatad/UserInterfaceState.xcuserstate b/JhtMarquee.xcodeproj/project.xcworkspace/xcuserdata/Jht.xcuserdatad/UserInterfaceState.xcuserstate index 30f93c5..227656c 100755 Binary files a/JhtMarquee.xcodeproj/project.xcworkspace/xcuserdata/Jht.xcuserdatad/UserInterfaceState.xcuserstate and b/JhtMarquee.xcodeproj/project.xcworkspace/xcuserdata/Jht.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/JhtMarquee/JhtMarqueeSDK/JhtMarqueeSDK.a b/JhtMarquee/JhtMarqueeSDK/JhtMarqueeSDK.a deleted file mode 100644 index f722dc9..0000000 Binary files a/JhtMarquee/JhtMarqueeSDK/JhtMarqueeSDK.a and /dev/null differ diff --git a/JhtMarquee/JhtMarqueeSDK/JhtMarqueeSDK.h b/JhtMarquee/JhtMarqueeSDK/JhtMarqueeSDK.h deleted file mode 100755 index 766365c..0000000 --- a/JhtMarquee/JhtMarqueeSDK/JhtMarqueeSDK.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// JhtMarqueeSDK.h -// JhtMarqueeSDK -// -// GitHub主页: https://github.com/jinht -// CSDN博客: http://blog.csdn.net/anticipate91 -// -// Created by Jht on 16/8/29. -// Copyright © 2016年 JhtMarquee. All rights reserved. -// - -#import - - -#import "JhtVerticalMarquee.h" -#import "JhtHorizontalMarquee.h" diff --git a/JhtMarquee/ViewController.m b/JhtMarquee/ViewController.m index 84610cf..50ce121 100755 --- a/JhtMarquee/ViewController.m +++ b/JhtMarquee/ViewController.m @@ -11,8 +11,8 @@ #import "ViewController.h" #import "testVC.h" -#import "JhtVerticalMarquee.h" -#import "JhtHorizontalMarquee.h" +#import +#import /** 屏幕的宽度 */ #define FrameW [UIScreen mainScreen].bounds.size.width @@ -87,7 +87,7 @@ - (void)createUI { #pragma mark 水平滚动的跑马灯 /** 添加水平滚动的跑马灯 */ - (void)addHorizontalMarquee { - _horizontalMarquee = [[JhtHorizontalMarquee alloc] initWithFrame:CGRectMake(0, 64, FrameW, 40) withSingleScrollDuration:10.0]; + _horizontalMarquee = [[JhtHorizontalMarquee alloc] initWithFrame:CGRectMake(0, 64 + 20, FrameW, 40) withSingleScrollDuration:10.0]; _horizontalMarquee.text = @"这是一个跑马灯View,测试一下好不好用,哈哈哈,😁👌😀 😁👌😀 😁👌😀 😁👌😀 哈哈哈哈! "; [self.view addSubview:_horizontalMarquee]; @@ -97,7 +97,7 @@ - (void)addHorizontalMarquee { } - (void)horizontalMarqueeTapGes:(UITapGestureRecognizer *)ges { - NSLog(@"点击__水平__滚动的跑马灯啦啊!!!"); + NSLog(@"点击__水平__滚动的跑马灯啦!!!"); [_verticalMarquee marqueeOfSettingWithState:MarqueePause_V]; _isPauseV = YES; @@ -137,7 +137,7 @@ - (void)addVerticalMarquee { // _verticalMarquee.isCounterclockwise = YES; _verticalMarquee.sourceArray = soureArray; [_verticalMarquee scrollWithCallbackBlock:^(JhtVerticalMarquee *view, NSInteger currentIndex) { - NSLog(@"滚动到第 %ld 条数据", currentIndex); + NSLog(@"滚动到第 %ld 条数据", (long)currentIndex); }]; // 开始滚动 @@ -149,7 +149,7 @@ - (void)addVerticalMarquee { } - (void)verticalMarqueeTapGes:(UITapGestureRecognizer *)ges { - NSLog(@"点击__纵向__滚动的跑马灯_第 %ld 条数据啦啊!!!", _verticalMarquee.currentIndex); + NSLog(@"点击__纵向__滚动的跑马灯_第 %ld 条数据啦!!!", (long)_verticalMarquee.currentIndex); [_verticalMarquee marqueeOfSettingWithState:MarqueePause_V]; _isPauseV = YES; diff --git a/JhtMarqueeSDK/JhtHorizontalMarquee.h b/JhtMarqueeSDK/JhtHorizontalMarquee.h deleted file mode 100755 index d7d80c2..0000000 --- a/JhtMarqueeSDK/JhtHorizontalMarquee.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// JhtHorizontalMarquee.h -// JhtTools -// -// GitHub主页: https://github.com/jinht -// CSDN博客: http://blog.csdn.net/anticipate91 -// -// Created by Jht on 2016/11/15. -// Copyright © 2016年 JhtMarquee. All rights reserved. -// - -/************支持attributedText************/ - -#import - -/** 跑马灯状态_枚举 */ -typedef NS_ENUM(NSUInteger, MarqueeState_H) { - // 开启 - MarqueeStart_H, - // 关闭 - MarqueeShutDown_H, - // 暂停 - MarqueePause_H, - // 取消暂停(继续) - MarqueeContinue_H, -}; - -/** 水平滚动的跑马灯 */ -@interface JhtHorizontalMarquee : UILabel -#pragma mark - property -/** 获取_是否处于_暂停状态(只读) */ -@property (nonatomic, assign, readonly) BOOL isPaused; - - - -#pragma mark - Public Method -/** 初始化 - * duration:单次滚动时间 - */ -- (instancetype)initWithFrame:(CGRect)frame withSingleScrollDuration:(NSTimeInterval)duration; - -#pragma mark 设置跑马灯状态 -/** 设置跑马灯状态 - * marqueeState:跑马灯状态(枚举) - * 注:“开启跑马灯”放在viewDidAppear中,“关闭跑马灯”放在viewWillDisappear中 - */ -- (void)marqueeOfSettingWithState:(MarqueeState_H)marqueeState; - - -@end diff --git a/JhtMarqueeSDK/JhtMarqueeSDK.a b/JhtMarqueeSDK/JhtMarqueeSDK.a deleted file mode 100644 index f722dc9..0000000 Binary files a/JhtMarqueeSDK/JhtMarqueeSDK.a and /dev/null differ diff --git a/JhtMarqueeSDK/JhtMarqueeSDK.h b/JhtMarqueeSDK/JhtMarqueeSDK.h deleted file mode 100755 index 766365c..0000000 --- a/JhtMarqueeSDK/JhtMarqueeSDK.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// JhtMarqueeSDK.h -// JhtMarqueeSDK -// -// GitHub主页: https://github.com/jinht -// CSDN博客: http://blog.csdn.net/anticipate91 -// -// Created by Jht on 16/8/29. -// Copyright © 2016年 JhtMarquee. All rights reserved. -// - -#import - - -#import "JhtVerticalMarquee.h" -#import "JhtHorizontalMarquee.h" diff --git a/JhtMarqueeSDK/JhtVerticalMarquee.h b/JhtMarqueeSDK/JhtVerticalMarquee.h deleted file mode 100755 index f4fad65..0000000 --- a/JhtMarqueeSDK/JhtVerticalMarquee.h +++ /dev/null @@ -1,83 +0,0 @@ -// -// JhtVerticalMarquee.h -// JhtMarquee -// -// GitHub主页: https://github.com/jinht -// CSDN博客: http://blog.csdn.net/anticipate91 -// -// Created by Zl on 2017/3/6. -// Copyright © 2017年 JhtMarquee. All rights reserved. -// - -#import - -/** 跑马灯状态_枚举 */ -typedef NS_ENUM(NSUInteger, MarqueeState_V) { - // 开启 - MarqueeStart_V, - // 关闭 - MarqueeShutDown_V, - // 暂停 - MarqueePause_V, - // 取消暂停(继续) - MarqueeContinue_V -}; - -/** 上下滚动的跑马灯 */ -@interface JhtVerticalMarquee : UIView -#pragma mark - Property -#pragma mark required -/** 滚动文字的 数据源数组(支持attributedText与text混合) */ -@property (nonatomic, strong) NSArray *sourceArray; - - -#pragma mark optional -/** 当前显示展示的文字 在数据源数组中的索引_只读 */ -@property (nonatomic, assign, readonly) NSInteger currentIndex; - -/** 是否为逆时针滚动(default:NO) - * 顺时针:底部 ===> 顶部 - * 逆时针:顶部 ===> 底部 - */ -@property (nonatomic, assign) BOOL isCounterclockwise; - -/** 单次滚动时间 - * default:0.5f - */ -@property (nonatomic, assign) CGFloat scrollDuration; -/** 滚动延迟 - * default:2.5f - */ -@property (nonatomic, assign) CGFloat scrollDelay; - -/** 滚动文字的颜色 - * default:[UIColor blackColor] - */ -@property (nonatomic, strong) UIColor *verticalTextColor; -/** 滚动文字的字体 - * default:[UIFont systemFontOfSize:14] - */ -@property (nonatomic, strong) UIFont *verticalTextFont; -/** 显示文字的对齐方式 - * default:NSTextAlignmentLeft - */ -@property (nonatomic, assign) NSTextAlignment verticalTextAlignment; -/** 显示文字的行数 - * default:2(注意一下self.frame的设置) - */ -@property (nonatomic, assign) NSInteger verticalNumberOfLines; - - - -#pragma mark - Public Method -/** 设置跑马灯状态 - * marqueeState:跑马灯状态(MarqueeState_V) - */ -- (void)marqueeOfSettingWithState:(MarqueeState_V)marqueeState; - -/** 每次滚动回调的Block */ -typedef void(^verticalMarqueeBlock)(JhtVerticalMarquee *view, NSInteger currentIndex); -- (void)scrollWithCallbackBlock:(verticalMarqueeBlock)block; - - -@end