├── .swift-version
├── .DS_Store
├── Classes
├── .DS_Store
└── LJBarrageView
│ ├── .DS_Store
│ ├── UIView+LJBarrageBind.h
│ ├── UIView+LJBarrageBind.m
│ ├── UIView+LJBarrageTool.h
│ ├── LJBarrageView.h
│ ├── UIView+LJBarrageTool.m
│ └── LJBarrageView.m
├── LJBarrageDemo
├── .DS_Store
├── BarrageDemo
│ ├── .DS_Store
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ ├── AppDelegate.m
│ └── ViewController.m
├── BarrageDemo.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── project.pbxproj
├── BarrageDemoTests
│ ├── Info.plist
│ └── BarrageDemoTests.m
└── BarrageDemoUITests
│ ├── Info.plist
│ └── BarrageDemoUITests.m
├── .gitignore
├── README.md
├── LJBarrageView.podspec
└── LICENSE
/.swift-version:
--------------------------------------------------------------------------------
1 | 3.0
2 |
--------------------------------------------------------------------------------
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LJMagicCoder/LJBarrageView/HEAD/.DS_Store
--------------------------------------------------------------------------------
/Classes/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LJMagicCoder/LJBarrageView/HEAD/Classes/.DS_Store
--------------------------------------------------------------------------------
/LJBarrageDemo/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LJMagicCoder/LJBarrageView/HEAD/LJBarrageDemo/.DS_Store
--------------------------------------------------------------------------------
/Classes/LJBarrageView/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LJMagicCoder/LJBarrageView/HEAD/Classes/LJBarrageView/.DS_Store
--------------------------------------------------------------------------------
/LJBarrageDemo/BarrageDemo/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LJMagicCoder/LJBarrageView/HEAD/LJBarrageDemo/BarrageDemo/.DS_Store
--------------------------------------------------------------------------------
/LJBarrageDemo/BarrageDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/LJBarrageDemo/BarrageDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // BarrageDemo
4 | //
5 | // Created by 宋立军 on 2017/7/28.
6 | // Copyright © 2017年 宋立军. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 | @end
14 |
15 |
--------------------------------------------------------------------------------
/LJBarrageDemo/BarrageDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/LJBarrageDemo/BarrageDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // BarrageDemo
4 | //
5 | // Created by 宋立军 on 2017/7/28.
6 | // Copyright © 2017年 宋立军. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/LJBarrageDemo/BarrageDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // BarrageDemo
4 | //
5 | // Created by 宋立军 on 2017/7/28.
6 | // Copyright © 2017年 宋立军. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Classes/LJBarrageView/UIView+LJBarrageBind.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+LJBarrageBind.h
3 | // BarrageDemo
4 | //
5 | // Created by 宋立军 on 2019/5/26.
6 | // Copyright © 2019年 宋立军. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (LJBarrageBind)
12 |
13 | //传入的弹幕文字
14 | @property (nonatomic, copy) id lj_barrageText;
15 |
16 | //绑定内容
17 | @property (nonatomic, strong) id lj_barrageContent;
18 |
19 | //默认显示的label
20 | @property (nonatomic, strong) UILabel *lj_barrageLabel;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/LJBarrageDemo/BarrageDemoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/LJBarrageDemo/BarrageDemoUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/LJBarrageDemo/BarrageDemoTests/BarrageDemoTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // BarrageDemoTests.m
3 | // BarrageDemoTests
4 | //
5 | // Created by 宋立军 on 2017/7/28.
6 | // Copyright © 2017年 宋立军. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface BarrageDemoTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation BarrageDemoTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/LJBarrageDemo/BarrageDemo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ios-marketing",
45 | "size" : "1024x1024",
46 | "scale" : "1x"
47 | }
48 | ],
49 | "info" : {
50 | "version" : 1,
51 | "author" : "xcode"
52 | }
53 | }
--------------------------------------------------------------------------------
/Classes/LJBarrageView/UIView+LJBarrageBind.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+LJBarrageBind.m
3 | // BarrageDemo
4 | //
5 | // Created by 宋立军 on 2019/5/26.
6 | // Copyright © 2019年 宋立军. All rights reserved.
7 | //
8 |
9 | #import "UIView+LJBarrageBind.h"
10 | #import
11 |
12 | @implementation UIView (LJBarrageBind)
13 |
14 | - (id)lj_barrageText {
15 | return objc_getAssociatedObject(self, _cmd);
16 | }
17 |
18 | - (void)setLj_barrageText:(id)lj_barrageText {
19 | objc_setAssociatedObject(self, @selector(lj_barrageText), lj_barrageText, OBJC_ASSOCIATION_COPY_NONATOMIC);
20 | }
21 |
22 | - (id)lj_barrageContent {
23 | return objc_getAssociatedObject(self, _cmd);
24 | }
25 |
26 | - (void)setLj_barrageContent:(id)lj_barrageContent {
27 | objc_setAssociatedObject(self, @selector(lj_barrageContent), lj_barrageContent, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
28 | }
29 |
30 | - (id)lj_barrageLabel {
31 | return objc_getAssociatedObject(self, _cmd);
32 | }
33 |
34 | - (void)setLj_barrageLabel:(id)lj_barrageLabel {
35 | objc_setAssociatedObject(self, @selector(lj_barrageLabel), lj_barrageLabel, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/LJBarrageDemo/BarrageDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0.3
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/LJBarrageDemo/BarrageDemoUITests/BarrageDemoUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // BarrageDemoUITests.m
3 | // BarrageDemoUITests
4 | //
5 | // Created by 宋立军 on 2017/7/28.
6 | // Copyright © 2017年 宋立军. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface BarrageDemoUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation BarrageDemoUITests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 |
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 |
22 | // In UI tests it is usually best to stop immediately when a failure occurs.
23 | self.continueAfterFailure = NO;
24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
25 | [[[XCUIApplication alloc] init] launch];
26 |
27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
28 | }
29 |
30 | - (void)tearDown {
31 | // Put teardown code here. This method is called after the invocation of each test method in the class.
32 | [super tearDown];
33 | }
34 |
35 | - (void)testExample {
36 | // Use recording to get started writing UI tests.
37 | // Use XCTAssert and related functions to verify your tests produce the correct results.
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xccheckout
23 | *.xcscmblueprint
24 |
25 | ## Obj-C/Swift specific
26 | *.hmap
27 | *.ipa
28 | *.dSYM.zip
29 | *.dSYM
30 |
31 | # CocoaPods
32 | #
33 | # We recommend against adding the Pods directory to your .gitignore. However
34 | # you should judge for yourself, the pros and cons are mentioned at:
35 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
36 | #
37 | # Pods/
38 |
39 | # Carthage
40 | #
41 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
42 | # Carthage/Checkouts
43 |
44 | Carthage/Build
45 |
46 | # fastlane
47 | #
48 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
49 | # screenshots whenever they are needed.
50 | # For more information about the recommended setup visit:
51 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
52 |
53 | fastlane/report.xml
54 | fastlane/Preview.html
55 | fastlane/screenshots
56 | fastlane/test_output
57 |
58 | # Code Injection
59 | #
60 | # After new code Injection tools there's a generated folder /iOSInjectionProject
61 | # https://github.com/johnno1962/injectionforxcode
62 |
63 | iOSInjectionProject/
64 |
--------------------------------------------------------------------------------
/LJBarrageDemo/BarrageDemo/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/LJBarrageDemo/BarrageDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/LJBarrageDemo/BarrageDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // BarrageDemo
4 | //
5 | // Created by 宋立军 on 2017/7/28.
6 | // Copyright © 2017年 宋立军. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 |
24 | - (void)applicationWillResignActive:(UIApplication *)application {
25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
27 | }
28 |
29 |
30 | - (void)applicationDidEnterBackground:(UIApplication *)application {
31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
33 | }
34 |
35 |
36 | - (void)applicationWillEnterForeground:(UIApplication *)application {
37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
38 | }
39 |
40 |
41 | - (void)applicationDidBecomeActive:(UIApplication *)application {
42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
43 | }
44 |
45 |
46 | - (void)applicationWillTerminate:(UIApplication *)application {
47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
48 | }
49 |
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/Classes/LJBarrageView/UIView+LJBarrageTool.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+LJBarrageTool.h
3 | // BarrageDemo
4 | //
5 | // Created by 宋立军 on 2017/7/28.
6 | // Copyright © 2017年 宋立军. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "LJBarrageView.h"
11 | #import "UIView+LJBarrageBind.h"
12 |
13 | @interface UIView (LJBarrageTool)
14 |
15 | /*!
16 | @brief 初始化默认参数弹幕视图
17 | @result 返回弹幕视图
18 | @discussion 初始化弹幕视图(默认开启弹幕视图)(默认为按时间显示,显示时长为5s)
19 | @param frame 弹幕视图的位置
20 | */
21 | + (LJBarrageView *)lj_creatNormalWithFrame:(CGRect)frame;
22 |
23 | /*!
24 | @brief 初始化弹幕视图
25 | @result 返回弹幕视图
26 | @discussion 初始化弹幕视图(默认开启弹幕视图)
27 | @param frame 弹幕视图的位置
28 | @param barrageShowStyle 弹幕显示风格
29 | @param styleParameter 弹幕相应风格的参数
30 | @param barrageRow 弹幕行数(0为不分行)
31 | @param barrageHeightType 弹幕行高度样式(默认正常)
32 | @param barrageEnterInterval 弹幕进入间隔时间
33 | @param barrageShowMax 弹幕最大显示个数
34 | */
35 | + (LJBarrageView *)lj_creatBarrageViewWithFrame:(CGRect)frame
36 | BarrageShowStyle:(LJBarrageShowStyleType)barrageShowStyle
37 | StyleParameter:(CGFloat)styleParameter
38 | BarrageRow:(NSInteger)barrageRow
39 | barrageHeightType:(BarrageHeightType)barrageHeightType
40 | barrageEnterInterval:(CGFloat)barrageEnterInterval
41 | barrageShowMax:(NSInteger)barrageShowMax;
42 |
43 | @end
44 |
45 | @interface LJBarrageView (LJBarrageTool)
46 |
47 | /*!@brief 弹幕文字(可以传入NSString/NSMutableAttributedString) */
48 | - (void)lj_addBarrageText:(id)barrageText;
49 |
50 | /*!@brief 弹幕文字及富文本组(可以传入NSString/NSMutableAttributedString混合组) */
51 | - (void)lj_addBarrageTexts:(NSArray *)barrageTexts;
52 |
53 | /*!
54 | @brief 弹幕样式
55 | @param barrageHeight 弹幕高度
56 | @param barrageBackgroundColor 弹幕背景
57 | @param barrageTextAlignment 弹幕文本对齐方式
58 | @param barrageFont 弹幕字体大小
59 | */
60 | - (void)lj_modificationBarrageStyleWithBarrageHeight:(CGFloat)barrageHeight
61 | barrageBackgroundColor:(UIColor *)barrageBackgroundColor
62 | barrageTextAlignment:(NSTextAlignment)barrageTextAlignment
63 | barrageFont:(UIFont *)barrageFont;
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # LJBarrageView是一款支持长连接不断传入数据的弹幕。
2 |
3 | 对该轮子有什么不满或者建议可以在[简书](https://www.jianshu.com/p/975946afc03d)的评论区里留言给我。
4 |
5 | 支持 pod 'LJBarrageView'
6 |
7 | 其中在UIView+LJBarrageTool.h里提供了简单集成的方法。
8 |
9 | /*!
10 | @brief 初始化默认参数弹幕视图
11 | @result 返回弹幕视图
12 | @discussion 初始化弹幕视图(默认开启弹幕视图)(默认为按时间显示,显示时长为5s)
13 | @param frame 弹幕视图的位置
14 | */
15 | + (LJBarrageView *)lj_creatNormalWithFrame:(CGRect)frame;
16 |
17 | /*!
18 | @brief 初始化弹幕视图
19 | @result 返回弹幕视图
20 | @discussion 初始化弹幕视图(默认开启弹幕视图)
21 | @param frame 弹幕视图的位置
22 | @param barrageShowStyle 弹幕显示风格
23 | @param styleParameter 弹幕相应风格的参数
24 | @param barrageRow 弹幕行数(0为不分行)
25 | @param barrageHeightType 弹幕行高度样式(默认正常)
26 | @param barrageEnterInterval 弹幕进入间隔时间
27 | @param barrageShowMax 弹幕最大显示个数
28 | */
29 | + (LJBarrageView *)lj_creatBarrageViewWithFrame:(CGRect)frame
30 | BarrageShowStyle:(LJBarrageShowStyleType)barrageShowStyle
31 | StyleParameter:(CGFloat)styleParameter
32 | BarrageRow:(NSInteger)barrageRow
33 | barrageHeightType:(BarrageHeightType)barrageHeightType
34 | barrageEnterInterval:(CGFloat)barrageEnterInterval
35 | barrageShowMax:(NSInteger)barrageShowMax;
36 |
37 | @end
38 |
39 | @interface LJBarrageView (LJBarrageTool)
40 |
41 | /*!@brief 弹幕文字(可以传入NSString/NSMutableAttributedString) */
42 | - (void)lj_addBarrageText:(id)barrageText;
43 |
44 | /*!@brief 弹幕文字及富文本组(可以传入NSString/NSMutableAttributedString混合组) */
45 | - (void)lj_addBarrageTexts:(NSArray *)barrageTexts;
46 |
47 | /*!
48 | @brief 弹幕样式
49 | @param barrageHeight 弹幕高度
50 | @param barrageBackgroundColor 弹幕背景
51 | @param barrageTextAlignment 弹幕文本对齐方式
52 | @param barrageFont 弹幕字体大小
53 | */
54 | - (void)lj_modificationBarrageStyleWithBarrageHeight:(CGFloat)barrageHeight
55 | barrageBackgroundColor:(UIColor *)barrageBackgroundColor
56 | barrageTextAlignment:(NSTextAlignment)barrageTextAlignment
57 | barrageFont:(UIFont *)barrageFont;
58 |
59 | @end
60 |
61 |
62 | 通过LJBarrageView.h里的参数进行详细的设置,也可以通过协议对样式进行重构。
63 |
64 |
--------------------------------------------------------------------------------
/Classes/LJBarrageView/LJBarrageView.h:
--------------------------------------------------------------------------------
1 | //
2 | // LJBarrageView.h
3 | // BarrageDemo
4 | //
5 | // Created by 宋立军 on 2017/7/28.
6 | // Copyright © 2017年 宋立军. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef NS_ENUM(NSUInteger,LJBarrageShowStyleType) {
12 | LJBarrageShowStyleTypeShowTime, //按时间显示(一共显示多长时间)
13 | LJBarrageShowStyleTypeVelocity, //按速度显示(像素/s)
14 | LJBarrageShowStyleTypeVelocityScreenThan //按速度与屏幕比例显示(1屏幕/s)
15 | };
16 |
17 | typedef NS_ENUM(NSUInteger,BarrageHeightType) {
18 | BarrageHeightTypeNormal, //正常按行高进入
19 | BarrageHeightTypeRandom //随机高度进入
20 | };
21 |
22 | @protocol LJBarrageViewDelegate
23 |
24 | @optional
25 |
26 | //重构弹幕样式
27 | - (UIView *)refactoringView:(UIView *)view text:(id)text;
28 |
29 | //单次点击弹幕
30 | - (void)clickBarrageWithView:(UIView *)view text:(id)text;
31 |
32 | //单次点击弹幕
33 | - (void)clickBarrageWithLabel:(UILabel *)label text:(id)text;
34 |
35 | @end
36 |
37 | @interface BarrageStyle : NSObject
38 |
39 | //弹幕高度
40 | @property (nonatomic, assign) CGFloat barrageHeight;
41 |
42 | //弹幕背景
43 | @property (nonatomic, strong) UIColor *barrageBackgroundColor;
44 |
45 | //弹幕文本对齐方式
46 | @property(nonatomic) NSTextAlignment barrageTextAlignment;
47 |
48 | //弹幕字体大小
49 | @property (nonatomic, strong) UIFont *barrageFont;
50 |
51 | @end
52 |
53 | @interface LJBarrageView : UIView
54 |
55 | //弹幕协议
56 | @property (nonatomic, weak) id delegate;
57 |
58 | //弹幕显示风格
59 | @property (nonatomic, assign) LJBarrageShowStyleType barrageShowStyle;
60 |
61 | //弹幕相应风格的参数
62 | @property (nonatomic, assign) CGFloat styleParameter;
63 |
64 | //弹幕行数(0为不分行)
65 | @property (nonatomic, assign) NSInteger barrageRow;
66 |
67 | //弹幕行高度
68 | @property (nonatomic, assign) NSInteger barrageRowHeight;
69 |
70 | //弹幕行高度样式(默认正常)
71 | @property (nonatomic, assign) BarrageHeightType barrageHeightType;
72 |
73 | //弹幕进入间隔时间
74 | @property (nonatomic, assign) CGFloat barrageEnterInterval;
75 |
76 | //弹幕最大显示个数
77 | @property (nonatomic, assign) NSInteger barrageShowMax;
78 |
79 | /* - 弹幕样式 - */
80 | @property (nonatomic, strong) BarrageStyle *barrageStyle;
81 |
82 | /* - 弹幕输入 - */
83 |
84 | //弹幕文字(可以传入NSString/NSMutableAttributedString)
85 | @property (nonatomic, copy) id barrageText;
86 |
87 | //弹幕文字及富文本组(可以传入NSString/NSMutableAttributedString混合组)
88 | @property (nonatomic, copy) NSArray *barrageTexts;
89 |
90 | /*!@brief 打开弹幕 */
91 | - (void)open;
92 |
93 | /*!@brief 关闭弹幕 (不再接收数据,并清空数据)(销毁界面时续调用)*/
94 | - (void)shut;
95 |
96 | @end
97 |
--------------------------------------------------------------------------------
/Classes/LJBarrageView/UIView+LJBarrageTool.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+LJBarrageTool.m
3 | // BarrageDemo
4 | //
5 | // Created by 宋立军 on 2017/7/28.
6 | // Copyright © 2017年 宋立军. All rights reserved.
7 | //
8 |
9 | #import "UIView+LJBarrageTool.h"
10 |
11 | @implementation UIView (LJBarrageTool)
12 |
13 | + (LJBarrageView *)lj_creatNormalWithFrame:(CGRect)frame {
14 |
15 | LJBarrageView *barrageView = [[LJBarrageView alloc] initWithFrame:frame];
16 | barrageView.barrageShowStyle = LJBarrageShowStyleTypeShowTime;
17 | barrageView.styleParameter = 5;
18 |
19 | [barrageView open];
20 |
21 | return barrageView;
22 | }
23 |
24 | + (LJBarrageView *)lj_creatBarrageViewWithFrame:(CGRect)frame
25 | BarrageShowStyle:(LJBarrageShowStyleType)barrageShowStyle
26 | StyleParameter:(CGFloat)styleParameter
27 | BarrageRow:(NSInteger)barrageRow
28 | barrageHeightType:(BarrageHeightType)barrageHeightType
29 | barrageEnterInterval:(CGFloat)barrageEnterInterval
30 | barrageShowMax:(NSInteger)barrageShowMax
31 | {
32 |
33 | LJBarrageView *barrageView = [[LJBarrageView alloc] initWithFrame:frame];
34 |
35 | barrageView.barrageShowStyle = barrageShowStyle;
36 | barrageView.styleParameter = styleParameter;
37 | barrageView.barrageRow = barrageRow;
38 | barrageView.barrageHeightType = barrageHeightType;
39 | barrageView.barrageEnterInterval = barrageEnterInterval;
40 | barrageView.barrageShowMax = barrageShowMax;
41 |
42 | [barrageView open];
43 |
44 | return barrageView;
45 | }
46 |
47 | @end
48 |
49 | @implementation LJBarrageView (LJBarrageTool)
50 |
51 | //弹幕文字
52 | - (void)lj_addBarrageText:(id)barrageText {
53 | self.barrageText = barrageText;
54 | }
55 |
56 | //弹幕文字及富文本组
57 | - (void)lj_addBarrageTexts:(NSArray *)barrageTexts {
58 | self.barrageTexts = barrageTexts;
59 | }
60 |
61 | //弹幕样式
62 | - (void)lj_modificationBarrageStyleWithBarrageHeight:(CGFloat)barrageHeight
63 | barrageBackgroundColor:(UIColor *)barrageBackgroundColor
64 | barrageTextAlignment:(NSTextAlignment)barrageTextAlignment
65 | barrageFont:(UIFont *)barrageFont
66 | {
67 | self.barrageStyle.barrageHeight = barrageHeight;
68 | self.barrageStyle.barrageBackgroundColor = barrageBackgroundColor;
69 | self.barrageStyle.barrageTextAlignment = barrageTextAlignment;
70 | self.barrageStyle.barrageFont = barrageFont;
71 | }
72 |
73 | @end
74 |
75 |
--------------------------------------------------------------------------------
/LJBarrageDemo/BarrageDemo/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // BarrageDemo
4 | //
5 | // Created by 宋立军 on 2017/7/28.
6 | // Copyright © 2017年 宋立军. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "UIView+LJBarrageTool.h"
11 |
12 | @interface ViewController ()
13 |
14 | @property (nonatomic, strong) LJBarrageView *barrageView;
15 |
16 | @end
17 |
18 | @implementation ViewController
19 |
20 | - (void)viewDidLoad {
21 | [super viewDidLoad];
22 | self.view.backgroundColor = [UIColor grayColor];
23 |
24 | //初始化展示区域界面
25 | LJBarrageView *barrageView = [LJBarrageView lj_creatNormalWithFrame:CGRectMake(0, 100, self.view.frame.size.width, 350)];
26 | [self.view addSubview:barrageView];
27 | self.barrageView = barrageView;
28 |
29 | //配置参数
30 | barrageView.barrageRow = 5;
31 | barrageView.barrageHeightType = BarrageHeightTypeNormal;
32 | barrageView.barrageShowStyle = LJBarrageShowStyleTypeVelocityScreenThan;
33 | barrageView.styleParameter = 0.3;
34 | barrageView.delegate = self;
35 |
36 | // Do any additional setup after loading the view, typically from a nib.
37 | }
38 |
39 | -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
40 |
41 | //传入数据(模拟长连接不断地传)
42 | [self.barrageView lj_addBarrageText:[NSString stringWithFormat:@"test-test-test-test-test-test"]];
43 |
44 | for (int i = 0; i < 20; i++) {
45 | [self.barrageView lj_addBarrageText:[NSString stringWithFormat:@"test%d",i]];
46 | [self.barrageView lj_addBarrageText:[NSString stringWithFormat:@"test-test%d",i]];
47 | }
48 |
49 | for (int i = 0; i < 10; i++) {
50 | //富文本样式
51 | [self.barrageView lj_addBarrageText:[self dropShadowWithString:[NSString stringWithFormat:@"attributedText%d",i]]];
52 | }
53 | }
54 |
55 | //富文本样式
56 | - (NSMutableAttributedString *)dropShadowWithString:(NSString *)string {
57 |
58 | NSShadow *shadow = [[NSShadow alloc] init];
59 | shadow.shadowBlurRadius = 5.0;
60 | shadow.shadowOffset = CGSizeMake(0, 0);
61 | shadow.shadowColor = [UIColor orangeColor];
62 |
63 | return [[NSMutableAttributedString alloc] initWithString:string attributes:@{NSShadowAttributeName:shadow}];
64 | }
65 |
66 | #pragma mark -
67 |
68 | //重构弹幕样式
69 | - (UIView *)refactoringView:(UIView *)view text:(id)text {
70 | //这里重写label样式
71 | return view;
72 | }
73 |
74 | //单次点击弹幕
75 | - (void)clickBarrageWithView:(UIView *)view text:(id)text {
76 |
77 | NSLog(@"%@",text);
78 | }
79 |
80 | - (void)dealloc {
81 | // 销毁界面时需释放
82 | [self.barrageView shut];
83 | }
84 |
85 | - (void)didReceiveMemoryWarning {
86 | [super didReceiveMemoryWarning];
87 | // Dispose of any resources that can be recreated.
88 | }
89 |
90 | @end
91 |
--------------------------------------------------------------------------------
/LJBarrageView.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # Be sure to run `pod spec lint LJToolKit.podspec' to ensure this is a
3 | # valid spec and to remove all comments including this before submitting the spec.
4 | #
5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
7 | #
8 |
9 | Pod::Spec.new do |s|
10 |
11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
12 | #
13 | # These will help people to find your library, and whilst it
14 | # can feel like a chore to fill in it's definitely to your advantage. The
15 | # summary should be tweet-length, and the description more in depth.
16 | #
17 |
18 | s.name = "LJBarrageView"
19 | s.version = "1.0.3"
20 | s.summary = "LJ弹幕."
21 |
22 | # This description is used to generate tags and improve search results.
23 | # * Think: What does it do? Why did you write it? What is the focus?
24 | # * Try to keep it short, snappy and to the point.
25 | # * Write the description between the DESC delimiters below.
26 | # * Finally, don't worry about the indent, CocoaPods strips it!
27 |
28 | s.description = "LJ弹幕,一款支持长连接不断传入数据的弹幕界面."
29 | s.homepage = "https://github.com/LJMagicCoder/LJBarrageView"
30 |
31 |
32 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
33 | #
34 | # Licensing your code is important. See http://choosealicense.com for more info.
35 | # CocoaPods will detect a license file if there is a named LICENSE*
36 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
37 | #
38 |
39 | # s.license = "Apache License, Version 2.0"
40 |
41 | s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" }
42 |
43 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
44 | #
45 | # Specify the authors of the library, with email addresses. Email addresses
46 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
47 | # accepts just a name if you'd rather not provide an email address.
48 | #
49 | # Specify a social_media_url where others can refer to, for example a twitter
50 | # profile URL.
51 | #
52 |
53 | s.author = { "LJMagicCoder" => "lijuncoder@gmail.com" }
54 |
55 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
56 | #
57 | # If this Pod runs only on iOS or OS X, then specify the platform and
58 | # the deployment target. You can optionally include the target after the platform.
59 | #
60 |
61 | # s.platform = :ios
62 | s.platform = :ios, "8.0"
63 |
64 | # When using multiple platforms
65 | # s.ios.deployment_target = "5.0"
66 | # s.osx.deployment_target = "10.7"
67 | # s.watchos.deployment_target = "2.0"
68 | # s.tvos.deployment_target = "9.0"
69 |
70 |
71 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
72 | #
73 | # Specify the location from where the source should be retrieved.
74 | # Supports git, hg, bzr, svn and HTTP.
75 | #
76 |
77 | s.source = { :git => "https://github.com/LJMagicCoder/LJBarrageView.git", :tag => s.version }
78 |
79 |
80 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
81 | #
82 | # CocoaPods is smart about how it includes source code. For source files
83 | # giving a folder will include any swift, h, m, mm, c & cpp files.
84 | # For header files it will include any header in the folder.
85 | # Not including the public_header_files will make all headers public.
86 | #
87 |
88 | s.source_files = "Classes", "Classes/**/*.{h,m}"
89 | s.exclude_files = "Classes/Exclude"
90 |
91 | # s.public_header_files = "Classes/**/*.h"
92 |
93 |
94 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
95 | #
96 | # A list of resources included with the Pod. These are copied into the
97 | # target bundle with a build phase script. Anything else will be cleaned.
98 | # You can preserve files from being cleaned, please don't preserve
99 | # non-essential files like tests, examples and documentation.
100 | #
101 |
102 | # s.resource = "icon.png"
103 | # s.resources = "Resources/*.png"
104 |
105 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave"
106 |
107 |
108 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
109 | #
110 | # Link your library with frameworks, or libraries. Libraries do not include
111 | # the lib prefix of their name.
112 | #
113 |
114 | # s.framework = "SomeFramework"
115 | # s.frameworks = "SomeFramework", "AnotherFramework"
116 |
117 | # s.library = "iconv"
118 | # s.libraries = "iconv", "xml2"
119 |
120 |
121 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
122 | #
123 | # If your library depends on compiler flags you can set them in the xcconfig hash
124 | # where they will only apply to your library. If you depend on other Podspecs
125 | # you can include multiple dependencies to ensure it works.
126 |
127 | # s.requires_arc = true
128 |
129 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
130 | # s.dependency "JSONKit", "~> 1.4"
131 |
132 | end
133 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/Classes/LJBarrageView/LJBarrageView.m:
--------------------------------------------------------------------------------
1 | //
2 | // LJBarrageView.m
3 | // BarrageDemo
4 | //
5 | // Created by 宋立军 on 2017/7/28.
6 | // Copyright © 2017年 宋立军. All rights reserved.
7 | //
8 |
9 | #import "LJBarrageView.h"
10 | #import "UIView+LJBarrageBind.h"
11 |
12 | typedef NS_ENUM(NSUInteger,BarrageShowType) {
13 | BarrageTypeStop,
14 | BarrageTypeStart
15 | };
16 |
17 | typedef NS_ENUM(NSUInteger,BarrageSwitchType) {
18 | BarrageTypeShut,
19 | BarrageTypeOpen
20 | };
21 |
22 | //默认参数
23 | static const int LJBarrageRow = 2;
24 | static const int LJBarrageRowHeight = 50;
25 | static const BarrageHeightType LJBarrageHeightType = BarrageHeightTypeNormal;
26 | static const int LJBarrageEnterInterval = 1;
27 | static const int LJBarrageShowMax = 20;
28 |
29 | static const int LJBarrageHeight = 49;
30 | static const NSTextAlignment LJBarrageTextAlignment = NSTextAlignmentCenter;
31 |
32 | static const BarrageShowType LJBarrageShowType = BarrageTypeStop;
33 | static const BarrageSwitchType LJBarrageSwitchType = BarrageTypeShut;
34 |
35 | @implementation BarrageStyle
36 |
37 | @end
38 |
39 | @interface LJBarrageView ()
40 |
41 | @property (nonatomic, strong) NSMutableSet *reusePool; //复用池
42 |
43 | @property (nonatomic, strong) NSMutableArray *texts;
44 |
45 | @property (nonatomic, assign) BarrageShowType barrageShowType;
46 |
47 | @property (nonatomic, assign) BarrageSwitchType barrageSwitchType;
48 |
49 | @property (nonatomic, strong) NSMutableArray *showRows;
50 |
51 | @property (nonatomic, strong) dispatch_semaphore_t barrageMaxEnterSemaphore;
52 |
53 | @property (nonatomic, strong) dispatch_queue_t barrageQueue;
54 |
55 | @property (nonatomic, assign) NSInteger nextNum;
56 |
57 | @end
58 |
59 | @implementation LJBarrageView
60 |
61 | - (dispatch_semaphore_t)barrageMaxEnterSemaphore {
62 | if (!_barrageMaxEnterSemaphore) {
63 | _barrageMaxEnterSemaphore = dispatch_semaphore_create(self.barrageShowMax);
64 | }
65 | return _barrageMaxEnterSemaphore;
66 | }
67 |
68 | - (dispatch_queue_t)barrageQueue {
69 | if (!_barrageQueue) {
70 | _barrageQueue = dispatch_queue_create("com.dispatch.ljbarrage", DISPATCH_QUEUE_SERIAL);
71 | }
72 | return _barrageQueue;
73 | }
74 |
75 | - (NSMutableArray *)texts {
76 | if (!_texts) {
77 | _texts = [NSMutableArray array];
78 | }
79 | return _texts;
80 | }
81 |
82 | - (NSMutableSet *)reusePool {
83 | if (!_reusePool) {
84 | _reusePool = [NSMutableSet set];
85 | }
86 | return _reusePool;
87 | }
88 |
89 | - (BarrageStyle *)barrageStyle {
90 | if (!_barrageStyle) {
91 | _barrageStyle = [[BarrageStyle alloc] init];
92 | }
93 | return _barrageStyle;
94 | }
95 |
96 | - (instancetype)initWithFrame:(CGRect)frame {
97 | self = [super initWithFrame:frame];
98 | if (self) {
99 | [self loadUI];
100 | }
101 | return self;
102 | }
103 |
104 | - (void)loadUI {
105 |
106 | self.layer.masksToBounds = YES;
107 |
108 | //默认参数
109 | self.barrageRow = LJBarrageRow;
110 | self.barrageRowHeight = LJBarrageRowHeight;
111 | self.barrageHeightType = LJBarrageHeightType;
112 | self.barrageEnterInterval = LJBarrageEnterInterval;
113 | self.barrageShowMax = LJBarrageShowMax;
114 |
115 | self.barrageStyle.barrageHeight = LJBarrageHeight;
116 | self.barrageStyle.barrageBackgroundColor = [UIColor whiteColor];
117 | self.barrageStyle.barrageTextAlignment = LJBarrageTextAlignment;
118 | self.barrageStyle.barrageFont = [UIFont systemFontOfSize:17];
119 |
120 | self.barrageShowType = LJBarrageShowType;
121 | self.barrageSwitchType = LJBarrageSwitchType;
122 | }
123 |
124 | - (void)open {
125 | self.barrageSwitchType = BarrageTypeOpen;
126 | self.hidden = NO;
127 | }
128 |
129 | - (void)shut {
130 | self.barrageSwitchType = BarrageTypeShut;
131 | self.texts = nil;
132 | self.hidden = YES;
133 | }
134 |
135 | - (void)showBarrageWithRow:(NSInteger)row text:(id)text enter:(void (^)(NSInteger row))enter finishShow:(void (^)(void))finishShow {
136 |
137 | UIView *view = [self getReuseBarrageLabel];
138 | view.lj_barrageText = text;
139 |
140 | if ([text isKindOfClass:[NSMutableAttributedString class]]) {
141 | NSMutableAttributedString *attributedText = text;
142 | if (attributedText.length) view.lj_barrageLabel.attributedText = attributedText;
143 | } else if ([text isKindOfClass:[NSString class]]){
144 | NSString *stringText = text;
145 | if (stringText.length) view.lj_barrageLabel.text = stringText;
146 | }
147 |
148 | [view.lj_barrageLabel sizeToFit];
149 |
150 | CGFloat maxY = [self getBarrageHeightWithRow:row rowHeight:self.barrageStyle.barrageHeight];
151 |
152 | CGFloat barrageWidth = view.lj_barrageLabel.bounds.size.width + 10;
153 | view.frame = CGRectMake(self.frame.size.width, maxY, barrageWidth, self.barrageStyle.barrageHeight);
154 | view.lj_barrageLabel.frame = view.bounds;
155 |
156 | if ([self.delegate respondsToSelector:@selector(refactoringView:text:)]) view = [self.delegate refactoringView:view text:text];
157 |
158 | CGFloat setMaxY = [self getBarrageHeightWithRow:row rowHeight:view.frame.size.height];
159 | view.frame = CGRectMake(self.frame.size.width, setMaxY, view.frame.size.width, view.frame.size.height);
160 |
161 | CGFloat intervalTime = [self getIntervalTimeWithBarrageWidth:barrageWidth];
162 | CGFloat showTime = [self getShowTimeWithBarrageWidth:barrageWidth];
163 |
164 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(intervalTime * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
165 | if (enter) enter(row);
166 | });
167 |
168 | [UIView animateWithDuration:showTime delay:0 options:UIViewAnimationOptionCurveLinear animations:^{
169 |
170 | view.frame = CGRectMake(- view.frame.size.width, view.frame.origin.y, view.frame.size.width, view.frame.size.height);
171 |
172 | } completion:^(BOOL finished) {
173 |
174 | [self.reusePool addObject:view];
175 | if (finishShow) finishShow();
176 | }];
177 | }
178 |
179 | - (CGFloat)getIntervalTimeWithBarrageWidth:(CGFloat)barrageWidth {
180 |
181 | CGFloat viewWidth = self.frame.size.width;
182 |
183 | if (self.barrageShowStyle == LJBarrageShowStyleTypeShowTime)
184 | return (barrageWidth / (viewWidth + barrageWidth)) * self.styleParameter;
185 |
186 | if (self.barrageShowStyle == LJBarrageShowStyleTypeVelocity)
187 | return barrageWidth / self.styleParameter;
188 |
189 | if (self.barrageShowStyle == LJBarrageShowStyleTypeVelocityScreenThan)
190 | return barrageWidth / viewWidth / self.styleParameter;
191 |
192 | return 0;
193 | }
194 |
195 | - (CGFloat)getShowTimeWithBarrageWidth:(CGFloat)barrageWidth {
196 |
197 | CGFloat viewWidth = self.frame.size.width;
198 |
199 | if (self.barrageShowStyle == LJBarrageShowStyleTypeShowTime)
200 | return self.styleParameter;
201 |
202 | if (self.barrageShowStyle == LJBarrageShowStyleTypeVelocity)
203 | return viewWidth / self.styleParameter;
204 |
205 | if (self.barrageShowStyle == LJBarrageShowStyleTypeVelocityScreenThan)
206 | return (viewWidth + barrageWidth) / viewWidth / self.styleParameter;
207 |
208 | return 0;
209 | }
210 |
211 | - (UIView *)getBarrageView {
212 |
213 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, self.barrageStyle.barrageHeight)];
214 | view.lj_barrageLabel = [[UILabel alloc] init];
215 | [view addSubview:view.lj_barrageLabel];
216 | view.lj_barrageLabel.frame = view.bounds;
217 | view.lj_barrageLabel.font = self.barrageStyle.barrageFont;
218 | view.backgroundColor = self.barrageStyle.barrageBackgroundColor;
219 | view.lj_barrageLabel.textAlignment = self.barrageStyle.barrageTextAlignment;
220 | view.userInteractionEnabled = NO;
221 | [self addSubview:view];
222 |
223 | return view;
224 | }
225 |
226 | - (UIView *)getReuseBarrageLabel{
227 |
228 | @synchronized (self) {
229 |
230 | UIView *view = [self.reusePool anyObject];
231 | if (view) {
232 | [self.reusePool removeObject:view];
233 | return view;
234 | }
235 | view = [self getBarrageView];
236 | return view;
237 | }
238 | }
239 |
240 | - (void)setBarrageText:(NSString *)barrageText {
241 | if (self.barrageSwitchType == BarrageTypeShut) return;
242 | [self.texts addObject:barrageText];
243 | [self start];
244 | }
245 |
246 | - (void)setBarrageTexts:(NSArray *)barrageTexts {
247 | if (self.barrageSwitchType == BarrageTypeShut) return;
248 | [self.texts addObjectsFromArray:barrageTexts];
249 | [self start];
250 | }
251 |
252 | - (void)start {
253 |
254 | dispatch_async(dispatch_get_main_queue(), ^{
255 |
256 | if (self.barrageSwitchType == BarrageTypeOpen && self.barrageShowType == BarrageTypeStop && [self isCanShow])
257 | [self showWithRow:[self loadShowRow]];
258 | });
259 | }
260 |
261 | - (void)showWithRow:(NSInteger)row {
262 |
263 | if (self.barrageSwitchType == BarrageTypeShut) return;
264 | self.barrageShowType = BarrageTypeStart;
265 |
266 | if (!self.texts || self.texts.count <= self.nextNum) return;
267 |
268 | id text = [self.texts[self.nextNum] mutableCopy];
269 |
270 | self.nextNum++;
271 |
272 | __block id blockText = text;
273 | __weak typeof(self) weakSelf = self;
274 |
275 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(self.barrageEnterInterval * NSEC_PER_SEC)), self.barrageQueue, ^{
276 |
277 | __strong typeof (weakSelf) strongSelf = weakSelf;
278 | if (!strongSelf) return;
279 |
280 | dispatch_semaphore_wait(strongSelf.barrageMaxEnterSemaphore, DISPATCH_TIME_FOREVER);
281 |
282 | dispatch_async(dispatch_get_main_queue(), ^{
283 |
284 | [strongSelf showBarrageWithRow:row text:blockText enter:^(NSInteger row) {
285 |
286 | [strongSelf clearOutWithShowRow:row];
287 | if ([strongSelf isCanShow]) {
288 | [strongSelf showWithRow:[strongSelf loadShowRow]];
289 | }
290 | blockText = nil;
291 | } finishShow:^{
292 |
293 | if (strongSelf.texts && strongSelf.texts.count) [strongSelf.texts removeObjectAtIndex:0];
294 | strongSelf.nextNum--;
295 | if (!strongSelf.nextNum) {
296 | strongSelf.barrageShowType = BarrageTypeStop;
297 | }
298 | dispatch_semaphore_signal(strongSelf.barrageMaxEnterSemaphore);
299 | }];
300 |
301 | if ([strongSelf isCanShow]) {
302 |
303 | [strongSelf showWithRow:[strongSelf loadShowRow]];
304 | }
305 | });
306 | });
307 |
308 | NSMutableArray *array = [NSMutableArray array];
309 | [array addObject:@YES];
310 | }
311 |
312 | - (BOOL)isCanShow {
313 | return self.texts.count > self.nextNum && [self isHaveFreeLine];
314 | }
315 |
316 | - (CGFloat)getBarrageHeightWithRow:(NSInteger)row rowHeight:(CGFloat)rowHeight {
317 |
318 | switch (self.barrageHeightType) {
319 | case BarrageHeightTypeNormal:
320 |
321 | return rowHeight *row;
322 | case BarrageHeightTypeRandom:
323 | {
324 | NSInteger arcInt = [[NSString stringWithFormat:@"%f",(int)self.frame.size.height - rowHeight] integerValue];
325 | if (arcInt) return arc4random() % arcInt;
326 | return 0;
327 | }
328 | default:
329 | return 0;
330 | }
331 | }
332 |
333 | - (void)clearOutWithShowRow:(NSInteger)row {
334 |
335 | @synchronized (self.showRows) {
336 | if (row >= 0) self.showRows[row] = @NO;
337 | }
338 | }
339 |
340 | - (NSInteger)loadShowRow {
341 |
342 | @synchronized (self.showRows) {
343 |
344 | NSInteger num = 0;
345 |
346 | __block NSInteger blockNum = num;
347 |
348 | for (int i = 0; i < self.showRows.count; i++) {
349 | if (![self.showRows[i] boolValue]) {
350 | blockNum = i;
351 | [self.showRows replaceObjectAtIndex:i withObject:@YES];
352 | break;
353 | }
354 | }
355 | return blockNum;
356 | }
357 | }
358 |
359 | - (BOOL)isHaveFreeLine {
360 |
361 | @synchronized (self.showRows) {
362 |
363 | return [self.showRows containsObject:@NO];
364 | }
365 | }
366 |
367 | - (void)setBarrageRow:(NSInteger)barrageRow {
368 |
369 | @synchronized (self.showRows) {
370 |
371 | _barrageRow = barrageRow;
372 |
373 | self.showRows = [NSMutableArray array];
374 |
375 | for (int i = 0; i < barrageRow; i++) {
376 | [self.showRows addObject:@NO];
377 | }
378 | }
379 | }
380 |
381 | - (void)setDelegate:(id)delegate {
382 | _delegate = delegate;
383 | [self loadTapGesture];
384 | }
385 |
386 | - (void)loadTapGesture {
387 |
388 | if ([_delegate respondsToSelector:@selector(clickBarrageWithView:text:)]) {
389 | UITapGestureRecognizer *gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(clickBarrage:)];
390 | gesture.numberOfTapsRequired = 1;
391 | [self addGestureRecognizer:gesture];
392 | }
393 | }
394 |
395 | - (void)clickBarrage:(UITapGestureRecognizer*)gesture {
396 |
397 | CGPoint touchPoint = [gesture locationInView:self];
398 | for(UIView *subView in self.subviews){
399 | if([subView isKindOfClass:[UIView class]]){
400 | CALayer *layer = subView.layer.presentationLayer;
401 | if(CGRectContainsPoint(layer.frame, touchPoint)){
402 | UIView *view = (UIView *)subView;
403 | if ([self.delegate respondsToSelector:@selector(clickBarrageWithView:text:)]) {
404 | [self.delegate clickBarrageWithView:view text:view.lj_barrageText];
405 | }
406 | }
407 | }
408 | }
409 | }
410 |
411 | /*
412 | // Only override drawRect: if you perform custom drawing.
413 | // An empty implementation adversely affects performance during animation.
414 | - (void)drawRect:(CGRect)rect {
415 | // Drawing code
416 | }
417 | */
418 |
419 | @end
420 |
--------------------------------------------------------------------------------
/LJBarrageDemo/BarrageDemo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | AB6025511FA42394002B3B24 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = AB6025501FA42394002B3B24 /* main.m */; };
11 | AB6025541FA42394002B3B24 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AB6025531FA42394002B3B24 /* AppDelegate.m */; };
12 | AB6025571FA42394002B3B24 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AB6025561FA42394002B3B24 /* ViewController.m */; };
13 | AB60255A1FA42394002B3B24 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AB6025581FA42394002B3B24 /* Main.storyboard */; };
14 | AB60255C1FA42394002B3B24 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AB60255B1FA42394002B3B24 /* Assets.xcassets */; };
15 | AB60255F1FA42394002B3B24 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AB60255D1FA42394002B3B24 /* LaunchScreen.storyboard */; };
16 | AB60256A1FA42394002B3B24 /* BarrageDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = AB6025691FA42394002B3B24 /* BarrageDemoTests.m */; };
17 | AB6025751FA42394002B3B24 /* BarrageDemoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = AB6025741FA42394002B3B24 /* BarrageDemoUITests.m */; };
18 | ABAB2EE521099E3F00106328 /* UIView+LJBarrageTool.m in Sources */ = {isa = PBXBuildFile; fileRef = ABAB2EE321099E3F00106328 /* UIView+LJBarrageTool.m */; };
19 | ABAB2EE621099E3F00106328 /* LJBarrageView.m in Sources */ = {isa = PBXBuildFile; fileRef = ABAB2EE421099E3F00106328 /* LJBarrageView.m */; };
20 | ABE50436229AA54C001BA696 /* UIView+LJBarrageBind.m in Sources */ = {isa = PBXBuildFile; fileRef = ABE50435229AA54C001BA696 /* UIView+LJBarrageBind.m */; };
21 | /* End PBXBuildFile section */
22 |
23 | /* Begin PBXContainerItemProxy section */
24 | AB6025661FA42394002B3B24 /* PBXContainerItemProxy */ = {
25 | isa = PBXContainerItemProxy;
26 | containerPortal = AB6025441FA42394002B3B24 /* Project object */;
27 | proxyType = 1;
28 | remoteGlobalIDString = AB60254B1FA42394002B3B24;
29 | remoteInfo = BarrageDemo;
30 | };
31 | AB6025711FA42394002B3B24 /* PBXContainerItemProxy */ = {
32 | isa = PBXContainerItemProxy;
33 | containerPortal = AB6025441FA42394002B3B24 /* Project object */;
34 | proxyType = 1;
35 | remoteGlobalIDString = AB60254B1FA42394002B3B24;
36 | remoteInfo = BarrageDemo;
37 | };
38 | /* End PBXContainerItemProxy section */
39 |
40 | /* Begin PBXFileReference section */
41 | AB60254C1FA42394002B3B24 /* BarrageDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BarrageDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
42 | AB6025501FA42394002B3B24 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
43 | AB6025521FA42394002B3B24 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
44 | AB6025531FA42394002B3B24 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
45 | AB6025551FA42394002B3B24 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
46 | AB6025561FA42394002B3B24 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
47 | AB6025591FA42394002B3B24 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
48 | AB60255B1FA42394002B3B24 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
49 | AB60255E1FA42394002B3B24 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
50 | AB6025601FA42394002B3B24 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
51 | AB6025651FA42394002B3B24 /* BarrageDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BarrageDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
52 | AB6025691FA42394002B3B24 /* BarrageDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BarrageDemoTests.m; sourceTree = ""; };
53 | AB60256B1FA42394002B3B24 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
54 | AB6025701FA42394002B3B24 /* BarrageDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BarrageDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
55 | AB6025741FA42394002B3B24 /* BarrageDemoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BarrageDemoUITests.m; sourceTree = ""; };
56 | AB6025761FA42394002B3B24 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
57 | ABAB2EE121099E3F00106328 /* LJBarrageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LJBarrageView.h; sourceTree = ""; };
58 | ABAB2EE221099E3F00106328 /* UIView+LJBarrageTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+LJBarrageTool.h"; sourceTree = ""; };
59 | ABAB2EE321099E3F00106328 /* UIView+LJBarrageTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+LJBarrageTool.m"; sourceTree = ""; };
60 | ABAB2EE421099E3F00106328 /* LJBarrageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LJBarrageView.m; sourceTree = ""; };
61 | ABE50434229AA54C001BA696 /* UIView+LJBarrageBind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+LJBarrageBind.h"; sourceTree = ""; };
62 | ABE50435229AA54C001BA696 /* UIView+LJBarrageBind.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+LJBarrageBind.m"; sourceTree = ""; };
63 | /* End PBXFileReference section */
64 |
65 | /* Begin PBXFrameworksBuildPhase section */
66 | AB6025491FA42394002B3B24 /* Frameworks */ = {
67 | isa = PBXFrameworksBuildPhase;
68 | buildActionMask = 2147483647;
69 | files = (
70 | );
71 | runOnlyForDeploymentPostprocessing = 0;
72 | };
73 | AB6025621FA42394002B3B24 /* Frameworks */ = {
74 | isa = PBXFrameworksBuildPhase;
75 | buildActionMask = 2147483647;
76 | files = (
77 | );
78 | runOnlyForDeploymentPostprocessing = 0;
79 | };
80 | AB60256D1FA42394002B3B24 /* Frameworks */ = {
81 | isa = PBXFrameworksBuildPhase;
82 | buildActionMask = 2147483647;
83 | files = (
84 | );
85 | runOnlyForDeploymentPostprocessing = 0;
86 | };
87 | /* End PBXFrameworksBuildPhase section */
88 |
89 | /* Begin PBXGroup section */
90 | AB6025431FA42394002B3B24 = {
91 | isa = PBXGroup;
92 | children = (
93 | AB60254E1FA42394002B3B24 /* BarrageDemo */,
94 | AB6025681FA42394002B3B24 /* BarrageDemoTests */,
95 | AB6025731FA42394002B3B24 /* BarrageDemoUITests */,
96 | AB60254D1FA42394002B3B24 /* Products */,
97 | );
98 | sourceTree = "";
99 | };
100 | AB60254D1FA42394002B3B24 /* Products */ = {
101 | isa = PBXGroup;
102 | children = (
103 | AB60254C1FA42394002B3B24 /* BarrageDemo.app */,
104 | AB6025651FA42394002B3B24 /* BarrageDemoTests.xctest */,
105 | AB6025701FA42394002B3B24 /* BarrageDemoUITests.xctest */,
106 | );
107 | name = Products;
108 | sourceTree = "";
109 | };
110 | AB60254E1FA42394002B3B24 /* BarrageDemo */ = {
111 | isa = PBXGroup;
112 | children = (
113 | ABAB2EE021099E3F00106328 /* LJBarrageView */,
114 | AB6025521FA42394002B3B24 /* AppDelegate.h */,
115 | AB6025531FA42394002B3B24 /* AppDelegate.m */,
116 | AB6025551FA42394002B3B24 /* ViewController.h */,
117 | AB6025561FA42394002B3B24 /* ViewController.m */,
118 | AB6025581FA42394002B3B24 /* Main.storyboard */,
119 | AB60255B1FA42394002B3B24 /* Assets.xcassets */,
120 | AB60255D1FA42394002B3B24 /* LaunchScreen.storyboard */,
121 | AB6025601FA42394002B3B24 /* Info.plist */,
122 | AB60254F1FA42394002B3B24 /* Supporting Files */,
123 | );
124 | path = BarrageDemo;
125 | sourceTree = "";
126 | };
127 | AB60254F1FA42394002B3B24 /* Supporting Files */ = {
128 | isa = PBXGroup;
129 | children = (
130 | AB6025501FA42394002B3B24 /* main.m */,
131 | );
132 | name = "Supporting Files";
133 | sourceTree = "";
134 | };
135 | AB6025681FA42394002B3B24 /* BarrageDemoTests */ = {
136 | isa = PBXGroup;
137 | children = (
138 | AB6025691FA42394002B3B24 /* BarrageDemoTests.m */,
139 | AB60256B1FA42394002B3B24 /* Info.plist */,
140 | );
141 | path = BarrageDemoTests;
142 | sourceTree = "";
143 | };
144 | AB6025731FA42394002B3B24 /* BarrageDemoUITests */ = {
145 | isa = PBXGroup;
146 | children = (
147 | AB6025741FA42394002B3B24 /* BarrageDemoUITests.m */,
148 | AB6025761FA42394002B3B24 /* Info.plist */,
149 | );
150 | path = BarrageDemoUITests;
151 | sourceTree = "";
152 | };
153 | ABAB2EE021099E3F00106328 /* LJBarrageView */ = {
154 | isa = PBXGroup;
155 | children = (
156 | ABAB2EE121099E3F00106328 /* LJBarrageView.h */,
157 | ABAB2EE421099E3F00106328 /* LJBarrageView.m */,
158 | ABAB2EE221099E3F00106328 /* UIView+LJBarrageTool.h */,
159 | ABAB2EE321099E3F00106328 /* UIView+LJBarrageTool.m */,
160 | ABE50434229AA54C001BA696 /* UIView+LJBarrageBind.h */,
161 | ABE50435229AA54C001BA696 /* UIView+LJBarrageBind.m */,
162 | );
163 | name = LJBarrageView;
164 | path = ../../Classes/LJBarrageView;
165 | sourceTree = "";
166 | };
167 | /* End PBXGroup section */
168 |
169 | /* Begin PBXNativeTarget section */
170 | AB60254B1FA42394002B3B24 /* BarrageDemo */ = {
171 | isa = PBXNativeTarget;
172 | buildConfigurationList = AB6025791FA42394002B3B24 /* Build configuration list for PBXNativeTarget "BarrageDemo" */;
173 | buildPhases = (
174 | AB6025481FA42394002B3B24 /* Sources */,
175 | AB6025491FA42394002B3B24 /* Frameworks */,
176 | AB60254A1FA42394002B3B24 /* Resources */,
177 | );
178 | buildRules = (
179 | );
180 | dependencies = (
181 | );
182 | name = BarrageDemo;
183 | productName = BarrageDemo;
184 | productReference = AB60254C1FA42394002B3B24 /* BarrageDemo.app */;
185 | productType = "com.apple.product-type.application";
186 | };
187 | AB6025641FA42394002B3B24 /* BarrageDemoTests */ = {
188 | isa = PBXNativeTarget;
189 | buildConfigurationList = AB60257C1FA42394002B3B24 /* Build configuration list for PBXNativeTarget "BarrageDemoTests" */;
190 | buildPhases = (
191 | AB6025611FA42394002B3B24 /* Sources */,
192 | AB6025621FA42394002B3B24 /* Frameworks */,
193 | AB6025631FA42394002B3B24 /* Resources */,
194 | );
195 | buildRules = (
196 | );
197 | dependencies = (
198 | AB6025671FA42394002B3B24 /* PBXTargetDependency */,
199 | );
200 | name = BarrageDemoTests;
201 | productName = BarrageDemoTests;
202 | productReference = AB6025651FA42394002B3B24 /* BarrageDemoTests.xctest */;
203 | productType = "com.apple.product-type.bundle.unit-test";
204 | };
205 | AB60256F1FA42394002B3B24 /* BarrageDemoUITests */ = {
206 | isa = PBXNativeTarget;
207 | buildConfigurationList = AB60257F1FA42394002B3B24 /* Build configuration list for PBXNativeTarget "BarrageDemoUITests" */;
208 | buildPhases = (
209 | AB60256C1FA42394002B3B24 /* Sources */,
210 | AB60256D1FA42394002B3B24 /* Frameworks */,
211 | AB60256E1FA42394002B3B24 /* Resources */,
212 | );
213 | buildRules = (
214 | );
215 | dependencies = (
216 | AB6025721FA42394002B3B24 /* PBXTargetDependency */,
217 | );
218 | name = BarrageDemoUITests;
219 | productName = BarrageDemoUITests;
220 | productReference = AB6025701FA42394002B3B24 /* BarrageDemoUITests.xctest */;
221 | productType = "com.apple.product-type.bundle.ui-testing";
222 | };
223 | /* End PBXNativeTarget section */
224 |
225 | /* Begin PBXProject section */
226 | AB6025441FA42394002B3B24 /* Project object */ = {
227 | isa = PBXProject;
228 | attributes = {
229 | LastUpgradeCheck = 0830;
230 | ORGANIZATIONNAME = "宋立军";
231 | TargetAttributes = {
232 | AB60254B1FA42394002B3B24 = {
233 | CreatedOnToolsVersion = 8.3.3;
234 | ProvisioningStyle = Automatic;
235 | };
236 | AB6025641FA42394002B3B24 = {
237 | CreatedOnToolsVersion = 8.3.3;
238 | ProvisioningStyle = Automatic;
239 | TestTargetID = AB60254B1FA42394002B3B24;
240 | };
241 | AB60256F1FA42394002B3B24 = {
242 | CreatedOnToolsVersion = 8.3.3;
243 | ProvisioningStyle = Automatic;
244 | TestTargetID = AB60254B1FA42394002B3B24;
245 | };
246 | };
247 | };
248 | buildConfigurationList = AB6025471FA42394002B3B24 /* Build configuration list for PBXProject "BarrageDemo" */;
249 | compatibilityVersion = "Xcode 3.2";
250 | developmentRegion = English;
251 | hasScannedForEncodings = 0;
252 | knownRegions = (
253 | en,
254 | Base,
255 | );
256 | mainGroup = AB6025431FA42394002B3B24;
257 | productRefGroup = AB60254D1FA42394002B3B24 /* Products */;
258 | projectDirPath = "";
259 | projectRoot = "";
260 | targets = (
261 | AB60254B1FA42394002B3B24 /* BarrageDemo */,
262 | AB6025641FA42394002B3B24 /* BarrageDemoTests */,
263 | AB60256F1FA42394002B3B24 /* BarrageDemoUITests */,
264 | );
265 | };
266 | /* End PBXProject section */
267 |
268 | /* Begin PBXResourcesBuildPhase section */
269 | AB60254A1FA42394002B3B24 /* Resources */ = {
270 | isa = PBXResourcesBuildPhase;
271 | buildActionMask = 2147483647;
272 | files = (
273 | AB60255F1FA42394002B3B24 /* LaunchScreen.storyboard in Resources */,
274 | AB60255C1FA42394002B3B24 /* Assets.xcassets in Resources */,
275 | AB60255A1FA42394002B3B24 /* Main.storyboard in Resources */,
276 | );
277 | runOnlyForDeploymentPostprocessing = 0;
278 | };
279 | AB6025631FA42394002B3B24 /* Resources */ = {
280 | isa = PBXResourcesBuildPhase;
281 | buildActionMask = 2147483647;
282 | files = (
283 | );
284 | runOnlyForDeploymentPostprocessing = 0;
285 | };
286 | AB60256E1FA42394002B3B24 /* Resources */ = {
287 | isa = PBXResourcesBuildPhase;
288 | buildActionMask = 2147483647;
289 | files = (
290 | );
291 | runOnlyForDeploymentPostprocessing = 0;
292 | };
293 | /* End PBXResourcesBuildPhase section */
294 |
295 | /* Begin PBXSourcesBuildPhase section */
296 | AB6025481FA42394002B3B24 /* Sources */ = {
297 | isa = PBXSourcesBuildPhase;
298 | buildActionMask = 2147483647;
299 | files = (
300 | ABE50436229AA54C001BA696 /* UIView+LJBarrageBind.m in Sources */,
301 | AB6025571FA42394002B3B24 /* ViewController.m in Sources */,
302 | ABAB2EE521099E3F00106328 /* UIView+LJBarrageTool.m in Sources */,
303 | AB6025541FA42394002B3B24 /* AppDelegate.m in Sources */,
304 | AB6025511FA42394002B3B24 /* main.m in Sources */,
305 | ABAB2EE621099E3F00106328 /* LJBarrageView.m in Sources */,
306 | );
307 | runOnlyForDeploymentPostprocessing = 0;
308 | };
309 | AB6025611FA42394002B3B24 /* Sources */ = {
310 | isa = PBXSourcesBuildPhase;
311 | buildActionMask = 2147483647;
312 | files = (
313 | AB60256A1FA42394002B3B24 /* BarrageDemoTests.m in Sources */,
314 | );
315 | runOnlyForDeploymentPostprocessing = 0;
316 | };
317 | AB60256C1FA42394002B3B24 /* Sources */ = {
318 | isa = PBXSourcesBuildPhase;
319 | buildActionMask = 2147483647;
320 | files = (
321 | AB6025751FA42394002B3B24 /* BarrageDemoUITests.m in Sources */,
322 | );
323 | runOnlyForDeploymentPostprocessing = 0;
324 | };
325 | /* End PBXSourcesBuildPhase section */
326 |
327 | /* Begin PBXTargetDependency section */
328 | AB6025671FA42394002B3B24 /* PBXTargetDependency */ = {
329 | isa = PBXTargetDependency;
330 | target = AB60254B1FA42394002B3B24 /* BarrageDemo */;
331 | targetProxy = AB6025661FA42394002B3B24 /* PBXContainerItemProxy */;
332 | };
333 | AB6025721FA42394002B3B24 /* PBXTargetDependency */ = {
334 | isa = PBXTargetDependency;
335 | target = AB60254B1FA42394002B3B24 /* BarrageDemo */;
336 | targetProxy = AB6025711FA42394002B3B24 /* PBXContainerItemProxy */;
337 | };
338 | /* End PBXTargetDependency section */
339 |
340 | /* Begin PBXVariantGroup section */
341 | AB6025581FA42394002B3B24 /* Main.storyboard */ = {
342 | isa = PBXVariantGroup;
343 | children = (
344 | AB6025591FA42394002B3B24 /* Base */,
345 | );
346 | name = Main.storyboard;
347 | sourceTree = "";
348 | };
349 | AB60255D1FA42394002B3B24 /* LaunchScreen.storyboard */ = {
350 | isa = PBXVariantGroup;
351 | children = (
352 | AB60255E1FA42394002B3B24 /* Base */,
353 | );
354 | name = LaunchScreen.storyboard;
355 | sourceTree = "";
356 | };
357 | /* End PBXVariantGroup section */
358 |
359 | /* Begin XCBuildConfiguration section */
360 | AB6025771FA42394002B3B24 /* Debug */ = {
361 | isa = XCBuildConfiguration;
362 | buildSettings = {
363 | ALWAYS_SEARCH_USER_PATHS = NO;
364 | CLANG_ANALYZER_NONNULL = YES;
365 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
366 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
367 | CLANG_CXX_LIBRARY = "libc++";
368 | CLANG_ENABLE_MODULES = YES;
369 | CLANG_ENABLE_OBJC_ARC = YES;
370 | CLANG_WARN_BOOL_CONVERSION = YES;
371 | CLANG_WARN_CONSTANT_CONVERSION = YES;
372 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
373 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
374 | CLANG_WARN_EMPTY_BODY = YES;
375 | CLANG_WARN_ENUM_CONVERSION = YES;
376 | CLANG_WARN_INFINITE_RECURSION = YES;
377 | CLANG_WARN_INT_CONVERSION = YES;
378 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
379 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
380 | CLANG_WARN_UNREACHABLE_CODE = YES;
381 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
382 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
383 | COPY_PHASE_STRIP = NO;
384 | DEBUG_INFORMATION_FORMAT = dwarf;
385 | ENABLE_STRICT_OBJC_MSGSEND = YES;
386 | ENABLE_TESTABILITY = YES;
387 | GCC_C_LANGUAGE_STANDARD = gnu99;
388 | GCC_DYNAMIC_NO_PIC = NO;
389 | GCC_NO_COMMON_BLOCKS = YES;
390 | GCC_OPTIMIZATION_LEVEL = 0;
391 | GCC_PREPROCESSOR_DEFINITIONS = (
392 | "DEBUG=1",
393 | "$(inherited)",
394 | );
395 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
396 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
397 | GCC_WARN_UNDECLARED_SELECTOR = YES;
398 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
399 | GCC_WARN_UNUSED_FUNCTION = YES;
400 | GCC_WARN_UNUSED_VARIABLE = YES;
401 | IPHONEOS_DEPLOYMENT_TARGET = 10.3;
402 | MTL_ENABLE_DEBUG_INFO = YES;
403 | ONLY_ACTIVE_ARCH = YES;
404 | SDKROOT = iphoneos;
405 | };
406 | name = Debug;
407 | };
408 | AB6025781FA42394002B3B24 /* Release */ = {
409 | isa = XCBuildConfiguration;
410 | buildSettings = {
411 | ALWAYS_SEARCH_USER_PATHS = NO;
412 | CLANG_ANALYZER_NONNULL = YES;
413 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
414 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
415 | CLANG_CXX_LIBRARY = "libc++";
416 | CLANG_ENABLE_MODULES = YES;
417 | CLANG_ENABLE_OBJC_ARC = YES;
418 | CLANG_WARN_BOOL_CONVERSION = YES;
419 | CLANG_WARN_CONSTANT_CONVERSION = YES;
420 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
421 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
422 | CLANG_WARN_EMPTY_BODY = YES;
423 | CLANG_WARN_ENUM_CONVERSION = YES;
424 | CLANG_WARN_INFINITE_RECURSION = YES;
425 | CLANG_WARN_INT_CONVERSION = YES;
426 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
427 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
428 | CLANG_WARN_UNREACHABLE_CODE = YES;
429 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
430 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
431 | COPY_PHASE_STRIP = NO;
432 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
433 | ENABLE_NS_ASSERTIONS = NO;
434 | ENABLE_STRICT_OBJC_MSGSEND = YES;
435 | GCC_C_LANGUAGE_STANDARD = gnu99;
436 | GCC_NO_COMMON_BLOCKS = YES;
437 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
438 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
439 | GCC_WARN_UNDECLARED_SELECTOR = YES;
440 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
441 | GCC_WARN_UNUSED_FUNCTION = YES;
442 | GCC_WARN_UNUSED_VARIABLE = YES;
443 | IPHONEOS_DEPLOYMENT_TARGET = 10.3;
444 | MTL_ENABLE_DEBUG_INFO = NO;
445 | SDKROOT = iphoneos;
446 | VALIDATE_PRODUCT = YES;
447 | };
448 | name = Release;
449 | };
450 | AB60257A1FA42394002B3B24 /* Debug */ = {
451 | isa = XCBuildConfiguration;
452 | buildSettings = {
453 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
454 | INFOPLIST_FILE = BarrageDemo/Info.plist;
455 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
456 | PRODUCT_BUNDLE_IDENTIFIER = com.slj.BarrageDemo;
457 | PRODUCT_NAME = "$(TARGET_NAME)";
458 | };
459 | name = Debug;
460 | };
461 | AB60257B1FA42394002B3B24 /* Release */ = {
462 | isa = XCBuildConfiguration;
463 | buildSettings = {
464 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
465 | INFOPLIST_FILE = BarrageDemo/Info.plist;
466 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
467 | PRODUCT_BUNDLE_IDENTIFIER = com.slj.BarrageDemo;
468 | PRODUCT_NAME = "$(TARGET_NAME)";
469 | };
470 | name = Release;
471 | };
472 | AB60257D1FA42394002B3B24 /* Debug */ = {
473 | isa = XCBuildConfiguration;
474 | buildSettings = {
475 | BUNDLE_LOADER = "$(TEST_HOST)";
476 | INFOPLIST_FILE = BarrageDemoTests/Info.plist;
477 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
478 | PRODUCT_BUNDLE_IDENTIFIER = com.slj.BarrageDemoTests;
479 | PRODUCT_NAME = "$(TARGET_NAME)";
480 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BarrageDemo.app/BarrageDemo";
481 | };
482 | name = Debug;
483 | };
484 | AB60257E1FA42394002B3B24 /* Release */ = {
485 | isa = XCBuildConfiguration;
486 | buildSettings = {
487 | BUNDLE_LOADER = "$(TEST_HOST)";
488 | INFOPLIST_FILE = BarrageDemoTests/Info.plist;
489 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
490 | PRODUCT_BUNDLE_IDENTIFIER = com.slj.BarrageDemoTests;
491 | PRODUCT_NAME = "$(TARGET_NAME)";
492 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BarrageDemo.app/BarrageDemo";
493 | };
494 | name = Release;
495 | };
496 | AB6025801FA42394002B3B24 /* Debug */ = {
497 | isa = XCBuildConfiguration;
498 | buildSettings = {
499 | INFOPLIST_FILE = BarrageDemoUITests/Info.plist;
500 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
501 | PRODUCT_BUNDLE_IDENTIFIER = com.slj.BarrageDemoUITests;
502 | PRODUCT_NAME = "$(TARGET_NAME)";
503 | TEST_TARGET_NAME = BarrageDemo;
504 | };
505 | name = Debug;
506 | };
507 | AB6025811FA42394002B3B24 /* Release */ = {
508 | isa = XCBuildConfiguration;
509 | buildSettings = {
510 | INFOPLIST_FILE = BarrageDemoUITests/Info.plist;
511 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
512 | PRODUCT_BUNDLE_IDENTIFIER = com.slj.BarrageDemoUITests;
513 | PRODUCT_NAME = "$(TARGET_NAME)";
514 | TEST_TARGET_NAME = BarrageDemo;
515 | };
516 | name = Release;
517 | };
518 | /* End XCBuildConfiguration section */
519 |
520 | /* Begin XCConfigurationList section */
521 | AB6025471FA42394002B3B24 /* Build configuration list for PBXProject "BarrageDemo" */ = {
522 | isa = XCConfigurationList;
523 | buildConfigurations = (
524 | AB6025771FA42394002B3B24 /* Debug */,
525 | AB6025781FA42394002B3B24 /* Release */,
526 | );
527 | defaultConfigurationIsVisible = 0;
528 | defaultConfigurationName = Release;
529 | };
530 | AB6025791FA42394002B3B24 /* Build configuration list for PBXNativeTarget "BarrageDemo" */ = {
531 | isa = XCConfigurationList;
532 | buildConfigurations = (
533 | AB60257A1FA42394002B3B24 /* Debug */,
534 | AB60257B1FA42394002B3B24 /* Release */,
535 | );
536 | defaultConfigurationIsVisible = 0;
537 | defaultConfigurationName = Release;
538 | };
539 | AB60257C1FA42394002B3B24 /* Build configuration list for PBXNativeTarget "BarrageDemoTests" */ = {
540 | isa = XCConfigurationList;
541 | buildConfigurations = (
542 | AB60257D1FA42394002B3B24 /* Debug */,
543 | AB60257E1FA42394002B3B24 /* Release */,
544 | );
545 | defaultConfigurationIsVisible = 0;
546 | defaultConfigurationName = Release;
547 | };
548 | AB60257F1FA42394002B3B24 /* Build configuration list for PBXNativeTarget "BarrageDemoUITests" */ = {
549 | isa = XCConfigurationList;
550 | buildConfigurations = (
551 | AB6025801FA42394002B3B24 /* Debug */,
552 | AB6025811FA42394002B3B24 /* Release */,
553 | );
554 | defaultConfigurationIsVisible = 0;
555 | defaultConfigurationName = Release;
556 | };
557 | /* End XCConfigurationList section */
558 | };
559 | rootObject = AB6025441FA42394002B3B24 /* Project object */;
560 | }
561 |
--------------------------------------------------------------------------------