Commit b73ae247bf714c98fa46fbe39e872b80504f0664
1 parent
0f9973a4
no message
Showing
132 changed files
with
5614 additions
and
1 deletions
CNLiveIntegralModule.podspec
0 → 100644
| 1 | +# | ||
| 2 | +# Be sure to run `pod lib lint CNLiveIntegralModule.podspec' to ensure this is a | ||
| 3 | +# valid spec before submitting. | ||
| 4 | +# | ||
| 5 | +# Any lines starting with a # are optional, but their use is encouraged | ||
| 6 | +# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html | ||
| 7 | +# | ||
| 8 | + | ||
| 9 | +Pod::Spec.new do |s| | ||
| 10 | + s.name = 'CNLiveIntegralModule' | ||
| 11 | + s.version = '0.0.1' | ||
| 12 | + s.summary = 'CNLiveIntegralModule.' | ||
| 13 | + | ||
| 14 | +# This description is used to generate tags and improve search results. | ||
| 15 | +# * Think: What does it do? Why did you write it? What is the focus? | ||
| 16 | +# * Try to keep it short, snappy and to the point. | ||
| 17 | +# * Write the description between the DESC delimiters below. | ||
| 18 | +# * Finally, don't worry about the indent, CocoaPods strips it! | ||
| 19 | + | ||
| 20 | + s.description = <<-DESC | ||
| 21 | +TODO: 网家家-积分模块. | ||
| 22 | + DESC | ||
| 23 | + | ||
| 24 | + s.homepage = 'http://bj.gitlab.cnlive.com/ios-team/CNLiveIntegralModule' | ||
| 25 | + # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' | ||
| 26 | + s.license = { :type => 'MIT', :file => 'LICENSE' } | ||
| 27 | + s.author = { '153993236@qq.com' => 'zhangxiaowen@cnlive.com' } | ||
| 28 | + s.source = { :git => 'http://bj.gitlab.cnlive.com/ios-team/CNLiveIntegralModule.git', :tag => s.version.to_s } | ||
| 29 | + # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>' | ||
| 30 | + | ||
| 31 | + s.ios.deployment_target = '9.0' | ||
| 32 | + | ||
| 33 | + # s.source_files = 'CNLiveIntegralModule/Classes/**/*' | ||
| 34 | + | ||
| 35 | + # Module | ||
| 36 | + s.subspec 'Module' do |ss| | ||
| 37 | + ss.source_files = 'CNLiveIntegralModule/Classes/Module/*.{h,m}' | ||
| 38 | + ss.dependency 'CNLiveIntegralModule/Controller' | ||
| 39 | + end | ||
| 40 | + | ||
| 41 | + # Controller | ||
| 42 | + s.subspec 'Controller' do |ss| | ||
| 43 | + ss.source_files = 'CNLiveIntegralModule/Classes/Controller/*.{h,m}' | ||
| 44 | + end | ||
| 45 | + | ||
| 46 | + # View | ||
| 47 | + s.subspec 'View' do |ss| | ||
| 48 | + ss.source_files = 'CNLiveIntegralModule/Classes/View/*.{h,m}' | ||
| 49 | + end | ||
| 50 | + | ||
| 51 | + # Model | ||
| 52 | + s.subspec 'Model' do |ss| | ||
| 53 | + ss.source_files = 'CNLiveIntegralModule/Classes/Model/*.{h,m}' | ||
| 54 | + end | ||
| 55 | + | ||
| 56 | + s.resource_bundles = { | ||
| 57 | + 'CNLiveIntegralModule' => ['CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets'] | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + # s.public_header_files = 'Pod/Classes/**/*.h' | ||
| 61 | + # s.frameworks = 'UIKit', 'MapKit' | ||
| 62 | + # s.dependency 'AFNetworking', '~> 2.3' | ||
| 63 | + | ||
| 64 | + # pod | ||
| 65 | + s.dependency 'CNLiveTripartiteManagement/QMUIKit' | ||
| 66 | + s.dependency 'CNLiveTripartiteManagement/SDWebImage' | ||
| 67 | + s.dependency 'CNLiveTripartiteManagement/Masonry' | ||
| 68 | + s.dependency 'CNLiveTripartiteManagement/MJExtension' | ||
| 69 | + s.dependency 'CNLiveTripartiteManagement/MJRefresh' | ||
| 70 | + s.dependency 'CNLiveTripartiteManagement/YYKit' | ||
| 71 | + | ||
| 72 | + # 服务层 | ||
| 73 | + s.dependency 'CNLiveServices' | ||
| 74 | + | ||
| 75 | + # 基类 | ||
| 76 | + s.dependency 'CNLiveCommonClass' | ||
| 77 | + | ||
| 78 | + # 环境 | ||
| 79 | + s.dependency 'CNLiveEnvironment' | ||
| 80 | + | ||
| 81 | + # 数据请求 | ||
| 82 | + s.dependency 'CNLiveRequestBastKit' | ||
| 83 | + | ||
| 84 | + # 用户信息本地化 | ||
| 85 | + s.dependency 'CNLiveUserManagement' | ||
| 86 | + | ||
| 87 | + # 用户协议 | ||
| 88 | + s.dependency 'CNLiveUserAgreementManager' | ||
| 89 | + | ||
| 90 | +end |
CNLiveIntegralModule/Assets/.gitkeep
0 → 100644
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/Contents.json
0 → 100644
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/add_score_bg.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "add_score_bg@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "add_score_bg@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/add_score_bg.imageset/add_score_bg@2x.png
0 → 100644
406 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/add_score_bg.imageset/add_score_bg@3x.png
0 → 100644
839 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/add_score_close.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "add_score_close@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "add_score_close@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/add_score_close.imageset/add_score_close@2x.png
0 → 100644
1.38 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/add_score_close.imageset/add_score_close@3x.png
0 → 100644
2.86 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/add_score_label.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "add_score_label@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "add_score_label@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/add_score_label.imageset/add_score_label@2x.png
0 → 100644
20.7 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/add_score_label.imageset/add_score_label@3x.png
0 → 100644
34.9 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/code_back_black_b.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "code_back_black_b@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "code_back_black_b@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/code_back_black_b.imageset/code_back_black_b@2x.png
0 → 100644
1.49 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/code_back_black_b.imageset/code_back_black_b@3x.png
0 → 100644
1.79 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/default_avatar_f.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "filename" : "default_avatar_f.png", | ||
| 6 | + "scale" : "1x" | ||
| 7 | + }, | ||
| 8 | + { | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "scale" : "3x" | ||
| 15 | + } | ||
| 16 | + ], | ||
| 17 | + "info" : { | ||
| 18 | + "version" : 1, | ||
| 19 | + "author" : "xcode" | ||
| 20 | + } | ||
| 21 | +} | ||
| 0 | \ No newline at end of file | 22 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/default_avatar_f.imageset/default_avatar_f.png
0 → 100644
11.1 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/default_avatar_y.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "filename" : "default_avatar_y.png", | ||
| 6 | + "scale" : "1x" | ||
| 7 | + }, | ||
| 8 | + { | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "scale" : "3x" | ||
| 15 | + } | ||
| 16 | + ], | ||
| 17 | + "info" : { | ||
| 18 | + "version" : 1, | ||
| 19 | + "author" : "xcode" | ||
| 20 | + } | ||
| 21 | +} | ||
| 0 | \ No newline at end of file | 22 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/default_avatar_y.imageset/default_avatar_y.png
0 → 100644
10.7 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/gold_whereabouts1.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "filename" : "gold_whereabouts1.png", | ||
| 6 | + "scale" : "1x" | ||
| 7 | + }, | ||
| 8 | + { | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "scale" : "3x" | ||
| 15 | + } | ||
| 16 | + ], | ||
| 17 | + "info" : { | ||
| 18 | + "version" : 1, | ||
| 19 | + "author" : "xcode" | ||
| 20 | + } | ||
| 21 | +} | ||
| 0 | \ No newline at end of file | 22 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/gold_whereabouts1.imageset/gold_whereabouts1.png
0 → 100644
22.1 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/gold_whereabouts2.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "filename" : "gold_whereabouts2.png", | ||
| 6 | + "scale" : "1x" | ||
| 7 | + }, | ||
| 8 | + { | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "scale" : "3x" | ||
| 15 | + } | ||
| 16 | + ], | ||
| 17 | + "info" : { | ||
| 18 | + "version" : 1, | ||
| 19 | + "author" : "xcode" | ||
| 20 | + } | ||
| 21 | +} | ||
| 0 | \ No newline at end of file | 22 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/gold_whereabouts2.imageset/gold_whereabouts2.png
0 → 100644
25.1 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/gold_whereabouts3.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "filename" : "gold_whereabouts3.png", | ||
| 6 | + "scale" : "1x" | ||
| 7 | + }, | ||
| 8 | + { | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "scale" : "3x" | ||
| 15 | + } | ||
| 16 | + ], | ||
| 17 | + "info" : { | ||
| 18 | + "version" : 1, | ||
| 19 | + "author" : "xcode" | ||
| 20 | + } | ||
| 21 | +} | ||
| 0 | \ No newline at end of file | 22 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/gold_whereabouts3.imageset/gold_whereabouts3.png
0 → 100644
21.7 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/gold_whereabouts4.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "filename" : "gold_whereabouts4.png", | ||
| 6 | + "scale" : "1x" | ||
| 7 | + }, | ||
| 8 | + { | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "scale" : "3x" | ||
| 15 | + } | ||
| 16 | + ], | ||
| 17 | + "info" : { | ||
| 18 | + "version" : 1, | ||
| 19 | + "author" : "xcode" | ||
| 20 | + } | ||
| 21 | +} | ||
| 0 | \ No newline at end of file | 22 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/gold_whereabouts4.imageset/gold_whereabouts4.png
0 → 100644
24.5 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/integrate_list_bg.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "integrate_list_bg@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "integrate_list_bg@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/integrate_list_bg.imageset/integrate_list_bg@2x.png
0 → 100644
78 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/integrate_list_bg.imageset/integrate_list_bg@3x.png
0 → 100644
131 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/integrate_next_white.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "integrate_next_white@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "integrate_next_white@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/integrate_next_white.imageset/integrate_next_white@2x.png
0 → 100644
380 Bytes
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/integrate_next_white.imageset/integrate_next_white@3x.png
0 → 100644
686 Bytes
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/mf_soccer_smallcoin.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "mf_soccer_smallcoin@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "mf_soccer_smallcoin@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/mf_soccer_smallcoin.imageset/mf_soccer_smallcoin@2x.png
0 → 100644
2.1 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/mf_soccer_smallcoin.imageset/mf_soccer_smallcoin@3x.png
0 → 100644
4.2 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/mine_all_front.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "mine_all_front@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "mine_all_front@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/mine_all_front.imageset/mine_all_front@2x.png
0 → 100644
266 Bytes
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/mine_all_front.imageset/mine_all_front@3x.png
0 → 100644
615 Bytes
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/mine_back_white_b.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "mine_back_white_b@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "mine_back_white_b@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/mine_back_white_b.imageset/mine_back_white_b@2x.png
0 → 100644
2.03 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/mine_back_white_b.imageset/mine_back_white_b@3x.png
0 → 100644
2.28 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/mine_code_more.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "mine_code_more@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "mine_code_more@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/mine_code_more.imageset/mine_code_more@2x.png
0 → 100644
448 Bytes
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/mine_code_more.imageset/mine_code_more@3x.png
0 → 100644
771 Bytes
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/mine_info_front.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "mine_info_front@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "mine_info_front@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/mine_info_front.imageset/mine_info_front@2x.png
0 → 100644
1.24 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/mine_info_front.imageset/mine_info_front@3x.png
0 → 100644
1.51 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/my_soccer_task.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "my_soccer_task@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "my_soccer_task@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/my_soccer_task.imageset/my_soccer_task@2x.png
0 → 100644
30 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/my_soccer_task.imageset/my_soccer_task@3x.png
0 → 100644
67.4 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/qr_code_icon.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "qr_code_icon@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "qr_code_icon@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/qr_code_icon.imageset/qr_code_icon@2x.png
0 → 100644
7.47 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/qr_code_icon.imageset/qr_code_icon@3x.png
0 → 100644
11.1 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_allday_bg.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "sign_allday_bg@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "sign_allday_bg@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_allday_bg.imageset/sign_allday_bg@2x.png
0 → 100644
40.4 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_allday_bg.imageset/sign_allday_bg@3x.png
0 → 100644
123 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_day_bg.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "sign_day_bg@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "sign_day_bg@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_day_bg.imageset/sign_day_bg@2x.png
0 → 100644
14.7 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_day_bg.imageset/sign_day_bg@3x.png
0 → 100644
27.7 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_day_bg7.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "sign_day_bg7@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "sign_day_bg7@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_day_bg7.imageset/sign_day_bg7@2x.png
0 → 100644
34.1 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_day_bg7.imageset/sign_day_bg7@3x.png
0 → 100644
69.6 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_day_close.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "sign_day_close@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "sign_day_close@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_day_close.imageset/sign_day_close@2x.png
0 → 100644
1.54 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_day_close.imageset/sign_day_close@3x.png
0 → 100644
4.23 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_day_select.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "sign_day_select@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "sign_day_select@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_day_select.imageset/sign_day_select@2x.png
0 → 100644
3.09 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_day_select.imageset/sign_day_select@3x.png
0 → 100644
6.83 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_in_soccer.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "idiom" : "universal", | ||
| 9 | + "filename" : "sign_in_soccer@2x.png", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "filename" : "sign_in_soccer@3x.png", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "version" : 1, | ||
| 20 | + "author" : "xcode" | ||
| 21 | + } | ||
| 22 | +} | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_in_soccer.imageset/sign_in_soccer@2x.png
0 → 100644
1.64 KB
CNLiveIntegralModule/Assets/CNLiveIntegralModule.xcassets/sign_in_soccer.imageset/sign_in_soccer@3x.png
0 → 100644
4.54 KB
CNLiveIntegralModule/Classes/.gitkeep
0 → 100644
CNLiveIntegralModule/Classes/Controller/CNLiveIntegralDetailsController.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveIntegralDetailsController.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/3/1. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +// 积分明细 | ||
| 10 | + | ||
| 11 | +#import <UIKit/UIKit.h> | ||
| 12 | +#import "CNCommonViewController.h" | ||
| 13 | + | ||
| 14 | +NS_ASSUME_NONNULL_BEGIN | ||
| 15 | + | ||
| 16 | +@interface CNLiveIntegralDetailsController : CNCommonViewController | ||
| 17 | + | ||
| 18 | +@end | ||
| 19 | + | ||
| 20 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/Controller/CNLiveIntegralDetailsController.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveIntegralDetailsController.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/3/1. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLiveIntegralDetailsController.h" | ||
| 10 | + | ||
| 11 | +#import "QMUIKit.h" | ||
| 12 | +#import "MJRefresh.h" | ||
| 13 | +#import "MJExtension.h" | ||
| 14 | +#import <Masonry/Masonry.h> | ||
| 15 | +#import <SDWebImage/SDWebImage.h> | ||
| 16 | + | ||
| 17 | +#import "CNLiveNetworking.h" | ||
| 18 | +#import "CNLiveEnvironment.h" | ||
| 19 | +#import "CNUserInfoManager.h" | ||
| 20 | +#import "CNLiveUserAgreementManager.h" | ||
| 21 | + | ||
| 22 | +#import "CNIntegralDetailsTableViewCell.h" | ||
| 23 | +#import "CNScoreModel.h" | ||
| 24 | +#import "CNLiveIntegralRulesController.h" | ||
| 25 | +#import "CNLiveIntegralNavigationBar.h" | ||
| 26 | + | ||
| 27 | +@interface CNLiveIntegralDetailsController ()<UITableViewDelegate,UITableViewDataSource,CNLiveIntegralNavigationBarDelegate> | ||
| 28 | + | ||
| 29 | +@property (nonatomic, strong) CNLiveIntegralNavigationBar *navigationBar; | ||
| 30 | + | ||
| 31 | +@property (nonatomic, strong) UITableView *tableView; | ||
| 32 | +@property (nonatomic, strong) NSMutableArray *data; | ||
| 33 | +@property (nonatomic, assign) NSInteger pageNo; | ||
| 34 | +@property (nonatomic, assign) BOOL isRefreshing; | ||
| 35 | + | ||
| 36 | +@end | ||
| 37 | + | ||
| 38 | +@implementation CNLiveIntegralDetailsController | ||
| 39 | + | ||
| 40 | +#pragma mark - Data | ||
| 41 | +- (void)loadData{ | ||
| 42 | +// NSDictionary *params = @{@"pageSize":@"10", | ||
| 43 | +// @"pageNo":[NSString stringWithFormat:@"%ld",_pageNo], | ||
| 44 | +// @"sid":CNUserShareModel.uid}; | ||
| 45 | + NSDictionary *params = @{@"pageSize":@"10", | ||
| 46 | + @"pageNo":[NSString stringWithFormat:@"%ld",_pageNo], | ||
| 47 | + @"sid":@"10514405"}; | ||
| 48 | + [CNLiveNetworking setAllowRequestDefaultArgument:YES]; | ||
| 49 | + [CNLiveNetworking setupShowDataResult:NO]; | ||
| 50 | + [QMUITips showLoadingInView:[UIApplication sharedApplication].keyWindow]; | ||
| 51 | + [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:CNIntegralDetailsUrl Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { | ||
| 52 | + [QMUITips hideAllTipsInView:[UIApplication sharedApplication].keyWindow]; | ||
| 53 | + [self hideEmptyView]; | ||
| 54 | + | ||
| 55 | + if (error) { | ||
| 56 | + if (self.data.count == 0) { | ||
| 57 | + if (error.code == -1001||error.code == -1003||error.code == -1009) { | ||
| 58 | + [self showEmptyViewWithImage:[UIImage imageNamed:@"dd_wlcw"] text:@"无法连接网络" detailText:@"别紧张,试试看刷新页面~" buttonTitle:@" 重试 " buttonAction:@selector(loadData)]; | ||
| 59 | + [self setCNAPIErrorEmptyView]; | ||
| 60 | + self.tableView.mj_footer.hidden = self.data.count == 0; | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + } | ||
| 64 | + return; | ||
| 65 | + } | ||
| 66 | + if ([responseObject isKindOfClass:[NSDictionary class]] && [responseObject[@"errorCode"] isEqualToString:@"0"]) { | ||
| 67 | + _isRefreshing = NO; | ||
| 68 | + _pageNo++; | ||
| 69 | + NSArray *arr = [CNScoreModel mj_objectArrayWithKeyValuesArray:responseObject[@"data"][@"list"]]; | ||
| 70 | + [self.data addObjectsFromArray:arr]; | ||
| 71 | + if (arr.count < 10) { | ||
| 72 | + [self.tableView.mj_footer endRefreshingWithNoMoreData]; | ||
| 73 | + | ||
| 74 | + } else { | ||
| 75 | + [self.tableView.mj_footer endRefreshing]; | ||
| 76 | + | ||
| 77 | + } | ||
| 78 | + } | ||
| 79 | + self.tableView.mj_footer.hidden = self.data.count == 0; | ||
| 80 | + [self.tableView reloadData]; | ||
| 81 | + | ||
| 82 | + if (self.data.count == 0) {//显示empty | ||
| 83 | +// [self showEmptyViewWithImage:[UIImage imageNamed:@"zhuangtai_kong"] text:@"您现在没有相关内容哦" detailText:@"" buttonTitle:@"" buttonAction:nil]; | ||
| 84 | +// [self setCNNoDataEmptyView]; | ||
| 85 | + self.tableView.tableFooterView = nil; | ||
| 86 | + } | ||
| 87 | + }]; | ||
| 88 | + | ||
| 89 | +} | ||
| 90 | + | ||
| 91 | +- (void)loadMoreData{ | ||
| 92 | + if(!_isRefreshing){ | ||
| 93 | + _isRefreshing = YES; | ||
| 94 | + [self loadData]; | ||
| 95 | + } | ||
| 96 | +} | ||
| 97 | + | ||
| 98 | +- (void)viewWillAppear:(BOOL)animated{ | ||
| 99 | + [super viewWillAppear:animated]; | ||
| 100 | + self.navigationController.navigationBar.hidden = YES; | ||
| 101 | +} | ||
| 102 | + | ||
| 103 | +- (void)viewDidLoad { | ||
| 104 | + [super viewDidLoad]; | ||
| 105 | + // Do any additional setup after loading the view. | ||
| 106 | + _pageNo = 1; | ||
| 107 | + _isRefreshing = NO; | ||
| 108 | + | ||
| 109 | + [self loadData]; | ||
| 110 | + [self createUI]; | ||
| 111 | + | ||
| 112 | +} | ||
| 113 | + | ||
| 114 | +#pragma mark - UI | ||
| 115 | +- (void)createUI { | ||
| 116 | + [self.view addSubview:self.navigationBar]; | ||
| 117 | + [self.view addSubview:self.tableView]; | ||
| 118 | + | ||
| 119 | +} | ||
| 120 | + | ||
| 121 | +/* | ||
| 122 | + #pragma mark - Navigation | ||
| 123 | + | ||
| 124 | + // In a storyboard-based application, you will often want to do a little preparation before navigation | ||
| 125 | + - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | ||
| 126 | + // Get the new view controller using [segue destinationViewController]. | ||
| 127 | + // Pass the selected object to the new view controller. | ||
| 128 | + } | ||
| 129 | + */ | ||
| 130 | +#pragma mark - UITableViewDataSource | ||
| 131 | +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | ||
| 132 | + return self.data.count; | ||
| 133 | + | ||
| 134 | +} | ||
| 135 | +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | ||
| 136 | + CNIntegralDetailsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCNIntegralDetailsTableViewCell forIndexPath:indexPath]; | ||
| 137 | + cell.selectionStyle = UITableViewCellSelectionStyleNone; | ||
| 138 | + cell.model = self.data[indexPath.row]; | ||
| 139 | + return cell; | ||
| 140 | + | ||
| 141 | +} | ||
| 142 | +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | ||
| 143 | + return 30+40; | ||
| 144 | + | ||
| 145 | +} | ||
| 146 | +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ | ||
| 147 | + | ||
| 148 | + | ||
| 149 | +} | ||
| 150 | + | ||
| 151 | +/* | ||
| 152 | + #pragma mark - Navigation | ||
| 153 | + | ||
| 154 | + // In a storyboard-based application, you will often want to do a little preparation before navigation | ||
| 155 | + - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | ||
| 156 | + // Get the new view controller using [segue destinationViewController]. | ||
| 157 | + // Pass the selected object to the new view controller. | ||
| 158 | + } | ||
| 159 | + */ | ||
| 160 | + | ||
| 161 | +#pragma mark - CNLiveIntegralNavigationBarDelegate | ||
| 162 | +- (void)navigationBar:(CNLiveIntegralNavigationBar *)navigationBar actionEvents:(NSString *)actionEvents{ | ||
| 163 | + if([actionEvents isEqualToString:@"1"]){ | ||
| 164 | + [self.navigationController popViewControllerAnimated:YES]; | ||
| 165 | + }else if([actionEvents isEqualToString:@"2"]){ | ||
| 166 | + [CNLiveUserAgreementManager jumpToAgreementH5WithType:CNLiveUserAgreementIntegralRules]; | ||
| 167 | + } | ||
| 168 | +} | ||
| 169 | + | ||
| 170 | +#pragma mark - Lazy loading | ||
| 171 | +- (CNLiveIntegralNavigationBar *)navigationBar { | ||
| 172 | + if (!_navigationBar) { | ||
| 173 | + _navigationBar = [[CNLiveIntegralNavigationBar alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, NavigationContentTop)]; | ||
| 174 | + _navigationBar.backgroundColor = [UIColor whiteColor]; | ||
| 175 | + _navigationBar.delegate = self; | ||
| 176 | + _navigationBar.title.text = @"积分明细"; | ||
| 177 | + [_navigationBar.right setTitle:@"积分规则" forState:UIControlStateNormal]; | ||
| 178 | + [_navigationBar.right setTitleColor:[UIColor colorWithRed:102/255.0 green:102/255.0 blue:102/255.0 alpha:1.0] forState:UIControlStateNormal]; | ||
| 179 | + _navigationBar.right.titleLabel.font = [UIFont systemFontOfSize:16.0]; | ||
| 180 | + _navigationBar.right.frame = CGRectMake(SCREEN_WIDTH-80-15, StatusBarHeight, 80, NavigationBarHeight); | ||
| 181 | + } | ||
| 182 | + return _navigationBar; | ||
| 183 | +} | ||
| 184 | + | ||
| 185 | +- (UITableView *)tableView { | ||
| 186 | + if (!_tableView) { | ||
| 187 | + _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT-NavigationContentTop) style:UITableViewStylePlain]; | ||
| 188 | + _tableView.backgroundColor = [UIColor whiteColor]; | ||
| 189 | + _tableView.delegate = self; | ||
| 190 | + _tableView.dataSource = self; | ||
| 191 | + _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; | ||
| 192 | + _tableView.showsVerticalScrollIndicator = NO; | ||
| 193 | + _tableView.showsHorizontalScrollIndicator = NO; | ||
| 194 | + [_tableView registerClass:[CNIntegralDetailsTableViewCell class] forCellReuseIdentifier:kCNIntegralDetailsTableViewCell]; | ||
| 195 | + __weak __typeof(self)weakSelf = self; | ||
| 196 | + MJRefreshAutoNormalFooter *refreshView = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ | ||
| 197 | + [weakSelf loadMoreData]; | ||
| 198 | + }]; | ||
| 199 | + _tableView.mj_footer = refreshView; | ||
| 200 | + } | ||
| 201 | + return _tableView; | ||
| 202 | +} | ||
| 203 | + | ||
| 204 | +- (NSMutableArray *)data{ | ||
| 205 | + if (!_data) { | ||
| 206 | + _data = [[NSMutableArray alloc] init]; | ||
| 207 | + } | ||
| 208 | + return _data; | ||
| 209 | +} | ||
| 210 | + | ||
| 211 | +- (void)dealloc{ | ||
| 212 | + | ||
| 213 | +} | ||
| 214 | + | ||
| 215 | +@end |
CNLiveIntegralModule/Classes/Controller/CNLiveIntegralRulesController.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveIntegralRulesController.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/3/12. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +// 积分规则 | ||
| 10 | + | ||
| 11 | +#import "CNCommonViewController.h" | ||
| 12 | + | ||
| 13 | +NS_ASSUME_NONNULL_BEGIN | ||
| 14 | + | ||
| 15 | +@interface CNLiveIntegralRulesController : CNCommonViewController | ||
| 16 | +@property (nonatomic, copy) NSString *url; | ||
| 17 | +@property (nonatomic, copy) NSString *name; | ||
| 18 | +@end | ||
| 19 | + | ||
| 20 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/Controller/CNLiveIntegralRulesController.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveIntegralRulesController.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/3/12. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLiveIntegralRulesController.h" | ||
| 10 | +#import <WebKit/WebKit.h> | ||
| 11 | +#import "QMUIKit.h" | ||
| 12 | +#import <Masonry/Masonry.h> | ||
| 13 | +#import <SDWebImage/SDWebImage.h> | ||
| 14 | + | ||
| 15 | +@interface CNLiveIntegralRulesController ()<WKNavigationDelegate,WKUIDelegate> | ||
| 16 | +@property (nonatomic, weak) WKWebView *webView; | ||
| 17 | + | ||
| 18 | +@end | ||
| 19 | + | ||
| 20 | +@implementation CNLiveIntegralRulesController | ||
| 21 | +#pragma mark - Data | ||
| 22 | +- (void)setData{ | ||
| 23 | + [QMUITips showLoadingInView:self.view]; | ||
| 24 | + [_webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.url]]]; | ||
| 25 | +} | ||
| 26 | +- (void)viewDidLoad { | ||
| 27 | + [super viewDidLoad]; | ||
| 28 | + // Do any additional setup after loading the view. | ||
| 29 | + [self createUI]; | ||
| 30 | + [self layoutUI]; | ||
| 31 | + [self setData]; | ||
| 32 | + | ||
| 33 | +} | ||
| 34 | +- (void)dealloc{ | ||
| 35 | + | ||
| 36 | +} | ||
| 37 | +#pragma mark - UI | ||
| 38 | +- (void)createUI{ | ||
| 39 | + self.title = self.name; | ||
| 40 | + | ||
| 41 | + WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc]init]; | ||
| 42 | + config.preferences = [WKPreferences new]; | ||
| 43 | + config.preferences.javaScriptEnabled = YES; | ||
| 44 | + config.preferences.minimumFontSize = 15; | ||
| 45 | + config.preferences.javaScriptCanOpenWindowsAutomatically = YES; | ||
| 46 | + | ||
| 47 | + WKUserContentController *userController = [WKUserContentController new]; | ||
| 48 | + NSString *js = @"var script = document.createElement('meta');" | ||
| 49 | + "script.name = 'viewport';" | ||
| 50 | + "script.content=\"width=device-width, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0, user-scalable=no\";" | ||
| 51 | + "document.getElementsByTagName('body')[0].appendChild(script);"; | ||
| 52 | + WKUserScript *script = [[WKUserScript alloc] initWithSource:js injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:NO]; | ||
| 53 | + | ||
| 54 | + NSMutableString *javascript = [NSMutableString string]; | ||
| 55 | + [javascript appendString:@"document.documentElement.style.webkitTouchCallout='none';"];//禁止长按 | ||
| 56 | + [javascript appendString:@"document.documentElement.style.webkitUserSelect='none';"];//禁止选择 | ||
| 57 | + WKUserScript *noneSelectScript = [[WKUserScript alloc] initWithSource:javascript injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:YES]; | ||
| 58 | + [userController addUserScript:script]; | ||
| 59 | + [userController addUserScript:noneSelectScript]; | ||
| 60 | + config.userContentController = userController; | ||
| 61 | + | ||
| 62 | + WKWebView *webView = [[WKWebView alloc] initWithFrame:CGRectZero configuration:config]; | ||
| 63 | + webView.navigationDelegate = self; | ||
| 64 | + webView.UIDelegate = self; | ||
| 65 | + webView.scrollView.bounces = NO; | ||
| 66 | + webView.scrollView.exclusiveTouch = NO; | ||
| 67 | + webView.scrollView.showsVerticalScrollIndicator = NO; | ||
| 68 | + webView.scrollView.showsHorizontalScrollIndicator = NO; | ||
| 69 | + [self.view addSubview:webView]; | ||
| 70 | + _webView = webView; | ||
| 71 | + | ||
| 72 | +} | ||
| 73 | +- (void)layoutUI{ | ||
| 74 | + [_webView mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 75 | + make.top.equalTo(self.view.mas_top).with.offset(0); | ||
| 76 | + make.left.equalTo(self.view.mas_left).with.offset(0); | ||
| 77 | + make.right.equalTo(self.view.mas_right).with.offset(-0); | ||
| 78 | + make.bottom.equalTo(self.view.mas_bottom).with.offset(-0); | ||
| 79 | + | ||
| 80 | + }]; | ||
| 81 | + | ||
| 82 | +} | ||
| 83 | +#pragma mark - WKNavigationDelegate | ||
| 84 | +// 页面加载完成之后调用 | ||
| 85 | +- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation{ | ||
| 86 | + [QMUITips hideAllTipsInView:self.view]; | ||
| 87 | + | ||
| 88 | +} | ||
| 89 | + | ||
| 90 | +// 页面加载失败时调用 | ||
| 91 | +- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(null_unspecified WKNavigation *)navigation withError:(nonnull NSError *)error{ | ||
| 92 | + [QMUITips hideAllTipsInView:self.view]; | ||
| 93 | + | ||
| 94 | + NSString *errorMsg = @"接口请求失败,请稍后再试!"; | ||
| 95 | + //404->102->返回按钮 | ||
| 96 | + if (error.code==-1009||error.code==102) { | ||
| 97 | + errorMsg = @"网络连接失败,请稍后再试!"; | ||
| 98 | + [self showEmptyViewWithImage:[UIImage imageNamed:@"wufalianjie"] text:errorMsg detailText:@" " buttonTitle:@" 返回 " buttonAction:@selector(goBack)]; | ||
| 99 | + self.emptyView.backgroundColor = [UIColor whiteColor]; | ||
| 100 | + | ||
| 101 | + } else { | ||
| 102 | + [self showEmptyViewWithImage:[UIImage imageNamed:@"wufalianjie"] text:errorMsg detailText:@"别紧张,试试看刷新页面~" buttonTitle:@" 重试 " buttonAction:@selector(setData)]; | ||
| 103 | + self.emptyView.backgroundColor = [UIColor whiteColor]; | ||
| 104 | + | ||
| 105 | + } | ||
| 106 | + [self setCNAPIErrorEmptyView]; | ||
| 107 | + | ||
| 108 | +} | ||
| 109 | +- (void)goBack{ | ||
| 110 | + [self.navigationController popViewControllerAnimated:YES]; | ||
| 111 | + | ||
| 112 | +} | ||
| 113 | +/* | ||
| 114 | +#pragma mark - Navigation | ||
| 115 | + | ||
| 116 | +// In a storyboard-based application, you will often want to do a little preparation before navigation | ||
| 117 | +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | ||
| 118 | + // Get the new view controller using [segue destinationViewController]. | ||
| 119 | + // Pass the selected object to the new view controller. | ||
| 120 | +} | ||
| 121 | +*/ | ||
| 122 | + | ||
| 123 | +@end |
CNLiveIntegralModule/Classes/Controller/CNLiveTaskListController.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveMineController.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by 153993236@qq.com on 11/12/2019. | ||
| 6 | +// Copyright (c) 2019 153993236@qq.com. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * 任务列表 | ||
| 11 | + */ | ||
| 12 | + | ||
| 13 | +#import "CNCommonViewController.h" | ||
| 14 | + | ||
| 15 | +NS_ASSUME_NONNULL_BEGIN | ||
| 16 | + | ||
| 17 | +@interface CNLiveTaskListController : CNCommonViewController | ||
| 18 | +@property (nonatomic, copy) NSString *isFrom; | ||
| 19 | + | ||
| 20 | +@end | ||
| 21 | + | ||
| 22 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/Controller/CNLiveTaskListController.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveTaskListController.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by 153993236@qq.com on 11/12/2019. | ||
| 6 | +// Copyright (c) 2019 153993236@qq.com. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLiveTaskListController.h" | ||
| 10 | + | ||
| 11 | +#import "MJExtension.h" | ||
| 12 | +#import "QMUIKit.h" | ||
| 13 | +#import "YYKit.h" | ||
| 14 | +#import <Masonry/Masonry.h> | ||
| 15 | + | ||
| 16 | +#import "CNLiveServices.h" | ||
| 17 | + | ||
| 18 | +//#import "CNLiveMineNavigationBar.h" | ||
| 19 | +#import "CNTaskListTableViewCell.h" | ||
| 20 | +#import "CNTaskListModel.h" | ||
| 21 | +#import "CNGoldWhereaboutsView.h"//金币下落 | ||
| 22 | +#import "CNAddScoreView.h" | ||
| 23 | + | ||
| 24 | +#import "CNLiveNetworking.h" | ||
| 25 | +#import "CNLiveEnvironment.h" | ||
| 26 | +#import "CNUserInfoManager.h" | ||
| 27 | + | ||
| 28 | +//#import "CNTabBarViewController.h" | ||
| 29 | +//#import "CNNavigationController.h" | ||
| 30 | +//#import "CNClassifySegmentController.h" | ||
| 31 | +//#import "CNSubClassifySegmentController.h" | ||
| 32 | + | ||
| 33 | +//#import "CNMinePersonInfoController.h"//个人资料 | ||
| 34 | +//#import "CNAddNewFriendViewController.h"//添加好友 | ||
| 35 | +//#import "CNFirendNewListViewController.h"//生活圈 | ||
| 36 | +//#import "CNReportAndComplaintWebController.h"//帮助与反馈 | ||
| 37 | +//#import "CNGifFaceListHeaderView.h" | ||
| 38 | +#import "CNTaskListHeadView.h" | ||
| 39 | +#import "CNLiveIntegralDetailsController.h"//积分明细 | ||
| 40 | +#import "CNAddScoreManager.h" | ||
| 41 | +//#import "CNTouristsLoginTipsView.h" | ||
| 42 | +//#import "CNWebRedirectHandle.h" | ||
| 43 | + | ||
| 44 | +//@interface CNLiveTaskListController ()<UITableViewDelegate,UITableViewDataSource,CNTaskListTableViewCellDelegate,CNTaskListHeadViewDelegate,TouristsLoginTipsViewDelegate> | ||
| 45 | +@interface CNLiveTaskListController ()<UITableViewDelegate,UITableViewDataSource,CNTaskListTableViewCellDelegate,CNTaskListHeadViewDelegate> | ||
| 46 | +@property (nonatomic, strong) UITableView *tableView; | ||
| 47 | +@property (nonatomic, strong) CNTaskListHeadView *headView; | ||
| 48 | +@property (nonatomic, strong) NSMutableArray *data; | ||
| 49 | + | ||
| 50 | +@property (nonatomic, strong) UIButton *backButton; | ||
| 51 | +@property (nonatomic, strong) UILabel *titleLabel; | ||
| 52 | + | ||
| 53 | +//@property (nonatomic, strong) CNTouristsLoginTipsView *fuzzyView;//游客登录弹框 | ||
| 54 | + | ||
| 55 | +@end | ||
| 56 | + | ||
| 57 | +@implementation CNLiveTaskListController | ||
| 58 | +#pragma mark - CNTaskListTableViewCellDelegate | ||
| 59 | +- (void)clickedCellButton:(CNTaskListTableViewCell *)cell type:(NSString *)type{ | ||
| 60 | + if([type isEqualToString:@"update_face"]||[type isEqualToString:@"update_nick"]){//头像 昵称 | ||
| 61 | +// CNMinePersonInfoController *infoVC = [[CNMinePersonInfoController alloc] init]; | ||
| 62 | +// [[AppDelegate sharedAppDelegate] pushViewController:infoVC withBackTitle:@" "]; | ||
| 63 | + | ||
| 64 | + } | ||
| 65 | + else if ([type isEqualToString:@"publish_witness"]){//发布目击者 | ||
| 66 | + [self selectChannelId:@"1" classifyId:@"101"]; | ||
| 67 | + | ||
| 68 | + } | ||
| 69 | + else if ([type isEqualToString:@"add_friend"]){//添加好友 | ||
| 70 | +// CNAddNewFriendViewController *newFriendVC = [[CNAddNewFriendViewController alloc] init]; | ||
| 71 | +// [[AppDelegate sharedAppDelegate] pushViewController:newFriendVC withBackTitle:@"返回"]; | ||
| 72 | + | ||
| 73 | + } | ||
| 74 | + else if ([type isEqualToString:@"publish_moment"]){//生活圈 | ||
| 75 | +// CNFirendNewListViewController *vc = [[CNFirendNewListViewController alloc] init]; | ||
| 76 | +// [[AppDelegate sharedAppDelegate] pushViewController:vc withBackTitle:@" "]; | ||
| 77 | + | ||
| 78 | + } | ||
| 79 | + else if ([type isEqualToString:@"share_video"]){//分享目击者视频 | ||
| 80 | + [self selectChannelId:@"1" classifyId:@"101"]; | ||
| 81 | + | ||
| 82 | + } | ||
| 83 | + else if ([type isEqualToString:@"share_article"]){//分享文章 | ||
| 84 | + [self selectChannelId:@"1" classifyId:@"102"]; | ||
| 85 | + | ||
| 86 | + } | ||
| 87 | + else if ([type isEqualToString:@"publish_comment"]){//评论 | ||
| 88 | + [self selectChannelId:@"1" classifyId:@"101"]; | ||
| 89 | + | ||
| 90 | + } | ||
| 91 | + else if ([type isEqualToString:@"read_article"]){//看文章-> 视讯中国 -> 今日要闻 | ||
| 92 | + [self selectChannelId:@"1" classifyId:@"102"]; | ||
| 93 | + | ||
| 94 | + } | ||
| 95 | + else if ([type isEqualToString:@"customer_feedback"]){//帮助与反馈 | ||
| 96 | +// NSString *savePath = [NSString stringWithFormat:@"%@%@",CNWjjUserTermsUrls,@"bzfk"]; | ||
| 97 | +// NSDictionary *h5Dic = [[NSUserDefaults standardUserDefaults] objectForKey:savePath]; | ||
| 98 | +// NSString *uuid = [CNLiveBusinessTools uuid]; | ||
| 99 | +// NSString *defaultH5Url = @"http://wjjh5.cnlive.com/cnhf.html"; | ||
| 100 | +// NSString *baseH5Url = [NSString isEmpty:h5Dic[@"detailUrl"]]?defaultH5Url:h5Dic[@"detailUrl"]; | ||
| 101 | +// NSString *h5Url = [NSString stringWithFormat:@"%@?sid=%@&uuid=%@",baseH5Url,CNUserShareModel.uid,uuid]; | ||
| 102 | +// NSString *h5Title = [NSString stringWithFormat:@"%@",h5Dic[@"title"]]; | ||
| 103 | +// CNReportAndComplaintWebController *webVC = [[CNReportAndComplaintWebController alloc] initWithUrl:h5Url webType:CNFeedbackWebType pageTitle:h5Title]; | ||
| 104 | +// [[AppDelegate sharedAppDelegate] pushViewController:webVC withBackTitle:@" "]; | ||
| 105 | + } | ||
| 106 | + else if ([type isEqualToString:@"watch_video"]){//看视频 -> 视讯中国 -> 目击者 | ||
| 107 | + [self selectChannelId:@"1" classifyId:@"101"]; | ||
| 108 | + | ||
| 109 | + } | ||
| 110 | + else if ([type isEqualToString:@"check_in"]){//签到 | ||
| 111 | +// if([self.isFrom isEqualToString:@"Classify"]){ | ||
| 112 | +// CNTabBarViewController *tabbarController = (CNTabBarViewController *)[AppDelegate sharedAppDelegate].window.rootViewController; | ||
| 113 | +// tabbarController.selectedIndex = 2; | ||
| 114 | +// } | ||
| 115 | +// [self.navigationController popViewControllerAnimated:YES]; | ||
| 116 | + } | ||
| 117 | + else if ([type isEqualToString:@"listen_novel"]){//听小说 | ||
| 118 | + [self selectChannelId:@"219" classifyId:@"215"]; | ||
| 119 | + | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + | ||
| 123 | +} | ||
| 124 | +- (void)selectChannelId:(NSString *)channelId classifyId:(NSString *)classifyId{ | ||
| 125 | + NSInteger channel = [self containsWithChannelId:channelId]; | ||
| 126 | + if(channel == -1){ | ||
| 127 | +// [[UIApplication sharedApplication].keyWindow addSubview:self.fuzzyView]; | ||
| 128 | + | ||
| 129 | + }else{ | ||
| 130 | + NSInteger classify = [self containsWithChannelIndex:channel classifyId:classifyId]; | ||
| 131 | + if(classify == -1){ | ||
| 132 | + [self selectTabbarControllerItem:1 channelId:channel classifyId:0]; | ||
| 133 | + | ||
| 134 | + }else{ | ||
| 135 | + [self selectTabbarControllerItem:1 channelId:channel classifyId:classify]; | ||
| 136 | + | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + } | ||
| 140 | +} | ||
| 141 | +- (void)selectTabbarControllerItem:(NSInteger)item channelId:(NSInteger)channelId classifyId:(NSInteger)classifyId{ | ||
| 142 | +// CNTabBarViewController *tabbarController = (CNTabBarViewController *)[AppDelegate sharedAppDelegate].window.rootViewController; | ||
| 143 | +// tabbarController.selectedIndex = item; | ||
| 144 | +// if([self.isFrom isEqualToString:@"Classify"]){ | ||
| 145 | +// [self.navigationController popViewControllerAnimated:YES]; | ||
| 146 | +// } | ||
| 147 | +// | ||
| 148 | +// if (![CNWebRedirectHandle manager].isSelectedClassify) { | ||
| 149 | +// [CNWebRedirectHandle manager].isClickedIntegral = YES; | ||
| 150 | +// [CNWebRedirectHandle manager].channelId = channelId; | ||
| 151 | +// [CNWebRedirectHandle manager].classifyId = classifyId; | ||
| 152 | +// return; | ||
| 153 | +// } | ||
| 154 | +// | ||
| 155 | +// //分类 | ||
| 156 | +// CNNavigationController *nav = tabbarController.childViewControllers[item]; | ||
| 157 | +// CNClassifySegmentController *vc = nav.childViewControllers[0]; | ||
| 158 | +// | ||
| 159 | +// if([vc isKindOfClass:[CNClassifySegmentController class]]){ | ||
| 160 | +// //视讯中国 - 听见中国 | ||
| 161 | +// [vc categoryView:vc.titleImageCategoryView didSelectedItemAtIndex:channelId]; | ||
| 162 | +// | ||
| 163 | +// CNSubClassifySegmentController *svc = [vc.vcArrayM safetyObjectAtIndex:channelId]; | ||
| 164 | +// if([svc isKindOfClass:[CNSubClassifySegmentController class]]){ | ||
| 165 | +// //目击者 - 今日要闻 - 中国冰雪 | ||
| 166 | +// [svc categoryView:svc.categoryView didSelectedItemAtIndex:classifyId]; | ||
| 167 | +// | ||
| 168 | +// } | ||
| 169 | +// } | ||
| 170 | +} | ||
| 171 | +//判断是否有这个频道 -- 一级 | ||
| 172 | +- (NSInteger)containsWithChannelId:(NSString *)channelId { | ||
| 173 | +// NSString *normalKey = [NSString stringWithFormat:@"%@_%@",NormalChannelArray,CNUserShareModel.uid]; | ||
| 174 | +// NSMutableArray *channelArray = [[NSMutableArray alloc] initWithArray:[[NSUserDefaults standardUserDefaults] objectForKey:normalKey]]; | ||
| 175 | +// | ||
| 176 | +// NSInteger i = 0; | ||
| 177 | +// for (NSString *str in channelArray) { | ||
| 178 | +// NSDictionary *dic = CNLiveStringJsonToDictionary(str); | ||
| 179 | +// CNCategoryGetChannelModel *model = [CNCategoryGetChannelModel mj_objectWithKeyValues:dic]; | ||
| 180 | +// if ([model.id isEqualToString:channelId]) { | ||
| 181 | +// return i; | ||
| 182 | +// } | ||
| 183 | +// i++; | ||
| 184 | +// } | ||
| 185 | + return -1; | ||
| 186 | + | ||
| 187 | +} | ||
| 188 | +//判断有这个频道的分类在第几个 -- 二级 | ||
| 189 | +- (NSInteger)containsWithChannelIndex:(NSInteger)index classifyId:(NSString *)classifyId { | ||
| 190 | +// NSString *normalKey = [NSString stringWithFormat:@"%@_%@",NormalChannelArray,CNUserShareModel.uid]; | ||
| 191 | +// NSMutableArray *channelArray = [[NSMutableArray alloc] initWithArray:[[NSUserDefaults standardUserDefaults] objectForKey:normalKey]]; | ||
| 192 | +// NSInteger i = 0; | ||
| 193 | +// | ||
| 194 | +// if(channelArray.count > index){ | ||
| 195 | +// NSString *modelStr = channelArray[index]; | ||
| 196 | +// NSDictionary *dic = CNLiveStringJsonToDictionary(modelStr); | ||
| 197 | +// CNCategoryGetChannelModel *model = [CNCategoryGetChannelModel mj_objectWithKeyValues:dic]; | ||
| 198 | +// for (CNCategoryGetChannelModel *subModel in model.pageStyleList) { | ||
| 199 | +// if ([subModel.id isEqualToString:classifyId]) { | ||
| 200 | +// return i; | ||
| 201 | +// } | ||
| 202 | +// if (CNLiveStringIsEmpty(subModel.pageType)) { | ||
| 203 | +// continue; | ||
| 204 | +// }else{ | ||
| 205 | +// i++; | ||
| 206 | +// } | ||
| 207 | +// } | ||
| 208 | +// } | ||
| 209 | + return -1; | ||
| 210 | + | ||
| 211 | +} | ||
| 212 | +#pragma mark - Data | ||
| 213 | +- (void)loadData{ | ||
| 214 | +// NSDictionary *params = @{@"sid":CNUserShareModel.uid}; | ||
| 215 | + NSDictionary *params = @{@"sid":@"10514405",@"appId":AppId}; | ||
| 216 | + [CNLiveNetworking setAllowRequestDefaultArgument:YES]; | ||
| 217 | + [CNLiveNetworking setupShowDataResult:NO]; | ||
| 218 | + [QMUITips showLoadingInView:[UIApplication sharedApplication].keyWindow]; | ||
| 219 | + [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:CNIntegralGetTasksUrl Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { | ||
| 220 | + [QMUITips hideAllTipsInView:[UIApplication sharedApplication].keyWindow]; | ||
| 221 | + [self hideEmptyView]; | ||
| 222 | + if (error) { | ||
| 223 | + if (self.data.count == 0) { | ||
| 224 | + if (error.code == -1001) { | ||
| 225 | + [self showEmptyViewWithImage:[UIImage imageNamed:@"dd_wlcw"] text:@"无法连接网络" detailText:@"别紧张,试试看刷新页面~" buttonTitle:@" 重试 " buttonAction:@selector(loadData)]; | ||
| 226 | + [self setCNAPIErrorEmptyView]; | ||
| 227 | + } | ||
| 228 | + } | ||
| 229 | + return; | ||
| 230 | + } | ||
| 231 | + if(responseObject[@"data"] && [responseObject[@"data"] isKindOfClass:[NSDictionary class]]){ | ||
| 232 | + CNTaskListModel *model = [CNTaskListModel mj_objectWithKeyValues:responseObject[@"data"]]; | ||
| 233 | + [self.data addObject:model]; | ||
| 234 | + self.headView.score = model.integral; | ||
| 235 | + [self.tableView reloadData]; | ||
| 236 | + if ([responseObject isKindOfClass:[NSDictionary class]] && [responseObject[@"errorCode"] isEqualToString:@"0"]) { | ||
| 237 | + if([responseObject isKindOfClass:[NSDictionary class]]){ | ||
| 238 | + //存入任务列表 | ||
| 239 | + if(responseObject[@"data"] && [responseObject[@"data"] isKindOfClass:[NSDictionary class]]){ | ||
| 240 | + [CNAddScoreManager writeJsonName:@"TaskList.json" dic:responseObject[@"data"]]; | ||
| 241 | + } | ||
| 242 | + } | ||
| 243 | + | ||
| 244 | + } | ||
| 245 | + } | ||
| 246 | + | ||
| 247 | + }]; | ||
| 248 | + | ||
| 249 | +} | ||
| 250 | +- (void)viewWillAppear:(BOOL)animated { | ||
| 251 | + [super viewWillAppear: animated]; | ||
| 252 | + self.navigationController.navigationBar.hidden = YES; | ||
| 253 | + | ||
| 254 | +} | ||
| 255 | + | ||
| 256 | +- (void)viewDidLoad { | ||
| 257 | + [super viewDidLoad]; | ||
| 258 | + if (@available(iOS 11.0, *)) { | ||
| 259 | + self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; | ||
| 260 | + } else { | ||
| 261 | + self.automaticallyAdjustsScrollViewInsets = NO; | ||
| 262 | + } | ||
| 263 | + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(notification:) name:@"AddScoreRequestSuccess" object:nil]; | ||
| 264 | + | ||
| 265 | + [self loadData]; | ||
| 266 | + [self createUI]; | ||
| 267 | + | ||
| 268 | +} | ||
| 269 | +- (void)dealloc{ | ||
| 270 | + [[NSNotificationCenter defaultCenter] removeObserver:self name:@"AddScoreRequestSuccess" object:nil]; | ||
| 271 | + | ||
| 272 | +} | ||
| 273 | +//实现方法 | ||
| 274 | +- (void)notification:(NSNotification *)noti{ | ||
| 275 | + NSString *taskId = noti.userInfo[@"taskId"]; | ||
| 276 | + | ||
| 277 | + //改变总积分 | ||
| 278 | + NSInteger addScore = [noti.userInfo[@"score"] integerValue]; | ||
| 279 | + NSInteger scored = [self.headView.score integerValue]; | ||
| 280 | + NSString *scoreStr = [NSString stringWithFormat:@"%ld",scored + addScore]; | ||
| 281 | + self.headView.score = scoreStr; | ||
| 282 | + | ||
| 283 | + //改变任务次数 | ||
| 284 | + NSArray *arr = [self.tableView indexPathsForVisibleRows]; | ||
| 285 | + for (NSIndexPath *indexPath in arr) { | ||
| 286 | + CNTaskListTableViewCell *cell = (CNTaskListTableViewCell *)[self.tableView cellForRowAtIndexPath:indexPath]; | ||
| 287 | + if([taskId isEqualToString:cell.model.taskId]){ | ||
| 288 | + cell.model.times++; | ||
| 289 | + cell.model = cell.model; | ||
| 290 | + } | ||
| 291 | + } | ||
| 292 | + | ||
| 293 | +} | ||
| 294 | + | ||
| 295 | +//- (void)viewWillDisappear:(BOOL)animated{ | ||
| 296 | +// [super viewWillDisappear:animated]; | ||
| 297 | +// self.navigationController.navigationBar.hidden = NO; | ||
| 298 | +//} | ||
| 299 | + | ||
| 300 | +#pragma mark - UI | ||
| 301 | +- (void)createUI { | ||
| 302 | + [self.headView addSubview:self.backButton]; | ||
| 303 | + [self.headView addSubview:self.titleLabel]; | ||
| 304 | + [self.view addSubview:self.headView]; | ||
| 305 | + [self.view addSubview:self.tableView]; | ||
| 306 | + | ||
| 307 | +} | ||
| 308 | + | ||
| 309 | +- (void)viewDidLayoutSubviews { | ||
| 310 | + [super viewDidLayoutSubviews]; | ||
| 311 | + [self.tableView mas_remakeConstraints:^(MASConstraintMaker *make) { | ||
| 312 | + make.top.equalTo(self.headView.mas_bottom); | ||
| 313 | + make.bottom.left.right.equalTo(self.view); | ||
| 314 | + | ||
| 315 | + }]; | ||
| 316 | + | ||
| 317 | +} | ||
| 318 | +/* | ||
| 319 | +#pragma mark - Navigation | ||
| 320 | + | ||
| 321 | +// In a storyboard-based application, you will often want to do a little preparation before navigation | ||
| 322 | +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | ||
| 323 | + // Get the new view controller using [segue destinationViewController]. | ||
| 324 | + // Pass the selected object to the new view controller. | ||
| 325 | +} | ||
| 326 | +*/ | ||
| 327 | +#pragma mark - UITableViewDataSource | ||
| 328 | +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ | ||
| 329 | + return 2; | ||
| 330 | +} | ||
| 331 | +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | ||
| 332 | + if(self.data.count > 0){ | ||
| 333 | + if(section == 0){ | ||
| 334 | + CNTaskListModel *model = self.data[0]; | ||
| 335 | + return model.dailyTask.count; | ||
| 336 | + | ||
| 337 | + }else if(section == 1){ | ||
| 338 | + CNTaskListModel *model = self.data[0]; | ||
| 339 | + return model.firstTask.count; | ||
| 340 | + | ||
| 341 | + } | ||
| 342 | + } | ||
| 343 | + return 0; | ||
| 344 | + | ||
| 345 | +} | ||
| 346 | +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | ||
| 347 | + CNTaskListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCNTaskListTableViewCell forIndexPath:indexPath]; | ||
| 348 | + cell.delegate = self; | ||
| 349 | + if(self.data.count > 0){ | ||
| 350 | + CNTaskListModel *model = self.data[0]; | ||
| 351 | + if(indexPath.section == 0){ | ||
| 352 | + cell.model = model.dailyTask[indexPath.row]; | ||
| 353 | + | ||
| 354 | + }else if(indexPath.section == 1){ | ||
| 355 | + cell.model = model.firstTask[indexPath.row]; | ||
| 356 | + | ||
| 357 | + } | ||
| 358 | + } | ||
| 359 | + cell.selectionStyle = UITableViewCellSelectionStyleNone; | ||
| 360 | + return cell; | ||
| 361 | + | ||
| 362 | +} | ||
| 363 | +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ | ||
| 364 | + NSArray *arr = @[@"每日任务",@"首次任务"]; | ||
| 365 | + UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 45)]; | ||
| 366 | + view.backgroundColor = [UIColor whiteColor]; | ||
| 367 | + UILabel *title = [[UILabel alloc]initWithFrame:CGRectMake(15, 0, SCREEN_WIDTH-30, 45)]; | ||
| 368 | + title.text = arr[section]; | ||
| 369 | + title.textColor = [UIColor blackColor]; | ||
| 370 | + title.font = [UIFont systemFontOfSize:15.0]; | ||
| 371 | + [view addSubview:title]; | ||
| 372 | + return view; | ||
| 373 | +} | ||
| 374 | +- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{ | ||
| 375 | + return 0.1; // 注意要设置为0.1,不能设置为0 | ||
| 376 | +} | ||
| 377 | + | ||
| 378 | +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ | ||
| 379 | + return 45; // 注意要设置为0.1,不能设置为0 | ||
| 380 | +} | ||
| 381 | +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | ||
| 382 | + return 40+30; | ||
| 383 | + | ||
| 384 | +} | ||
| 385 | +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ | ||
| 386 | + | ||
| 387 | + | ||
| 388 | +} | ||
| 389 | + | ||
| 390 | +#pragma mark - CNTaskListHeadViewDelegate | ||
| 391 | +- (void)clickedDetailButton:(CNTaskListHeadView *)view{ | ||
| 392 | + CNLiveIntegralDetailsController *vc = [[CNLiveIntegralDetailsController alloc] init]; | ||
| 393 | + [self.navigationController pushViewController:vc animated:YES]; | ||
| 394 | +} | ||
| 395 | +#pragma mark - TouristsLoginTipsViewDelegate | ||
| 396 | +//- (void)touristsLoginTipsView:(CNTouristsLoginTipsView *)view isClassify:(NSString *)isClassify{ | ||
| 397 | +// if([isClassify isEqualToString:@"close"]){ | ||
| 398 | +// //隐藏TouristsLoginTipsView | ||
| 399 | +// [self.fuzzyView removeFromSuperview]; | ||
| 400 | +// | ||
| 401 | +// }else if([isClassify isEqualToString:@"jump"]){ | ||
| 402 | +// //进入频道管理页面 | ||
| 403 | +// [self.fuzzyView removeFromSuperview]; | ||
| 404 | +// CNTabBarViewController *tabbarController = (CNTabBarViewController *)[AppDelegate sharedAppDelegate].window.rootViewController; | ||
| 405 | +// tabbarController.selectedIndex = 1; | ||
| 406 | +// //分类 | ||
| 407 | +// CNNavigationController *nav = tabbarController.childViewControllers[1]; | ||
| 408 | +// CNClassifySegmentController *vc = nav.childViewControllers[0]; | ||
| 409 | +// | ||
| 410 | +// if([vc isKindOfClass:[CNClassifySegmentController class]]){ | ||
| 411 | +// [vc customAction:nil]; | ||
| 412 | +// | ||
| 413 | +// } | ||
| 414 | +// | ||
| 415 | +// } | ||
| 416 | +// | ||
| 417 | +//} | ||
| 418 | +/* | ||
| 419 | + #pragma mark - Navigation | ||
| 420 | + | ||
| 421 | + // In a storyboard-based application, you will often want to do a little preparation before navigation | ||
| 422 | + - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | ||
| 423 | + // Get the new view controller using [segue destinationViewController]. | ||
| 424 | + // Pass the selected object to the new view controller. | ||
| 425 | + } | ||
| 426 | + */ | ||
| 427 | + | ||
| 428 | +#pragma mark - Action | ||
| 429 | +- (void)backAction:(UIButton *)btn{ | ||
| 430 | + [self.navigationController popViewControllerAnimated:YES]; | ||
| 431 | + | ||
| 432 | +} | ||
| 433 | + | ||
| 434 | +#pragma mark - Lazy loading | ||
| 435 | +- (UIButton *)backButton { | ||
| 436 | + if (!_backButton) { | ||
| 437 | + _backButton = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 438 | + _backButton.frame = CGRectMake(15, StatusBarHeight, 44, 44); | ||
| 439 | + [_backButton setContentHorizontalAlignment:UIControlContentHorizontalAlignmentLeft]; | ||
| 440 | + UIImage *image = [self xw_getImageName:@"mine_back_white_b" bundleName:@"CNLiveIntegralModule" targetClass:[self class]]; | ||
| 441 | + [_backButton setImage:image forState:UIControlStateNormal]; | ||
| 442 | +// _backButton.touchAreaInsets = UIEdgeInsetsMake(15, 15, 15, 15); | ||
| 443 | + [_backButton addTarget:self action:@selector(backAction:) forControlEvents:UIControlEventTouchUpInside]; | ||
| 444 | + } | ||
| 445 | + return _backButton; | ||
| 446 | +} | ||
| 447 | + | ||
| 448 | +- (UILabel *)titleLabel{ | ||
| 449 | + if (!_titleLabel) { | ||
| 450 | + _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, StatusBarHeight, 120, 44)]; | ||
| 451 | + _titleLabel.centerX = self.view.centerX; | ||
| 452 | + _titleLabel.text = @"任务列表"; | ||
| 453 | + _titleLabel.font = [UIFont systemFontOfSize:18.0]; | ||
| 454 | + _titleLabel.textColor = [UIColor whiteColor]; | ||
| 455 | + _titleLabel.textAlignment = NSTextAlignmentCenter; | ||
| 456 | + } | ||
| 457 | + return _titleLabel; | ||
| 458 | +} | ||
| 459 | + | ||
| 460 | +- (UITableView *)tableView { | ||
| 461 | + if (!_tableView) { | ||
| 462 | + _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; | ||
| 463 | + _tableView.backgroundColor = [UIColor whiteColor]; | ||
| 464 | + _tableView.delegate = self; | ||
| 465 | + _tableView.dataSource = self; | ||
| 466 | + _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; | ||
| 467 | + _tableView.showsVerticalScrollIndicator = NO; | ||
| 468 | + _tableView.showsHorizontalScrollIndicator = NO; | ||
| 469 | + _tableView.bounces = NO; | ||
| 470 | + [_tableView registerClass:[CNTaskListTableViewCell class] forCellReuseIdentifier:kCNTaskListTableViewCell]; | ||
| 471 | +// [_tableView registerClass:[CNGifFaceListHeaderView class] forHeaderFooterViewReuseIdentifier:kCNGifFaceListHeaderView]; | ||
| 472 | + } | ||
| 473 | + return _tableView; | ||
| 474 | +} | ||
| 475 | + | ||
| 476 | +- (NSMutableArray *)data{ | ||
| 477 | + if (!_data) { | ||
| 478 | + _data = [[NSMutableArray alloc] init]; | ||
| 479 | + } | ||
| 480 | + return _data; | ||
| 481 | +} | ||
| 482 | + | ||
| 483 | +- (CNTaskListHeadView *)headView{ | ||
| 484 | + if (!_headView) { | ||
| 485 | + _headView = [[CNTaskListHeadView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, NavigationContentTop+SCREEN_WIDTH*100/375.0)]; | ||
| 486 | + _headView.backgroundColor = [UIColor whiteColor]; | ||
| 487 | + UIImage *image = [self xw_getImageName:@"integrate_list_bg" bundleName:@"CNLiveIntegralModule" targetClass:[CNLiveTaskListController class]]; | ||
| 488 | + _headView.image = image; | ||
| 489 | + _headView.delegate = self; | ||
| 490 | + } | ||
| 491 | + return _headView; | ||
| 492 | +} | ||
| 493 | + | ||
| 494 | +//- (CNTouristsLoginTipsView *)fuzzyView{ | ||
| 495 | +// if (!_fuzzyView) { | ||
| 496 | +// _fuzzyView = [[CNTouristsLoginTipsView alloc] initWithFrame:[UIApplication sharedApplication].keyWindow.bounds]; | ||
| 497 | +// _fuzzyView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.6]; | ||
| 498 | +// _fuzzyView.delegate = self; | ||
| 499 | +// } | ||
| 500 | +// return _fuzzyView; | ||
| 501 | +// | ||
| 502 | +//} | ||
| 503 | + | ||
| 504 | +- (UIImage *)navigationBarBackgroundImage{ | ||
| 505 | + return [UIImage imageWithColor:[UIColor clearColor]]; | ||
| 506 | +} | ||
| 507 | + | ||
| 508 | +- (UIStatusBarStyle)preferredStatusBarStyle{ | ||
| 509 | + return UIStatusBarStyleLightContent; | ||
| 510 | +} | ||
| 511 | + | ||
| 512 | +/** | ||
| 513 | + * 创建图片 | ||
| 514 | + * | ||
| 515 | + * @param imageName 图片名字 | ||
| 516 | + * @param bundleName 图片所在的bundle名字 | ||
| 517 | + * @param targetClass 类和bundle的同级目录 | ||
| 518 | + * @return 返回UIImage | ||
| 519 | + */ | ||
| 520 | +- (UIImage *)xw_getImageName:(NSString *)imageName bundleName:(NSString *)bundleName targetClass:(Class)targetClass{ | ||
| 521 | + NSBundle *bundle = [NSBundle bundleForClass:targetClass]; | ||
| 522 | + NSURL *url = [bundle URLForResource:bundleName withExtension:@"bundle"]; | ||
| 523 | + NSBundle *targetBundle = [NSBundle bundleWithURL:url]; | ||
| 524 | + UIImage *image = [UIImage imageNamed:imageName inBundle:targetBundle compatibleWithTraitCollection:nil]; | ||
| 525 | + return image?image:[UIImage imageNamed:imageName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil]; | ||
| 526 | +} | ||
| 527 | + | ||
| 528 | +@end |
CNLiveIntegralModule/Classes/Model/CNAddScoreManager.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNAddScoreManager.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/3/5. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | + | ||
| 11 | +NS_ASSUME_NONNULL_BEGIN | ||
| 12 | +typedef void(^RequestCompleted) (BOOL isSuccess, NSString *desc, NSString *score); | ||
| 13 | +@interface CNAddScoreManager : NSObject | ||
| 14 | +@property (nonatomic, copy) RequestCompleted block; | ||
| 15 | + | ||
| 16 | +//延时调用 | ||
| 17 | ++ (instancetype)manager; | ||
| 18 | +- (void)requestTime:(NSInteger)time taskId:(NSString *)taskId contentId:(NSString *)contentId block:(RequestCompleted _Nullable)block; | ||
| 19 | +//取消延时 | ||
| 20 | +- (void)cancelSendRequest; | ||
| 21 | + | ||
| 22 | +//首次登录加积分 | ||
| 23 | ++ (void)firstLogin:(RequestCompleted _Nullable)block; | ||
| 24 | + | ||
| 25 | +//直接调用 | ||
| 26 | ++ (void)requestTaskId:(NSString *)taskId contentId:(NSString *)contentId block:(RequestCompleted _Nullable)block; | ||
| 27 | + | ||
| 28 | ++ (BOOL)judgeIsAddScoreJson:(NSString *)name taskType:(NSString *)taskType taskId:(NSString *)taskId; | ||
| 29 | ++ (BOOL)writeJsonName:(NSString *)name dic:(NSDictionary *)dic; | ||
| 30 | + | ||
| 31 | +@end | ||
| 32 | + | ||
| 33 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/Model/CNAddScoreManager.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNAddScoreManager.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/3/5. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNAddScoreManager.h" | ||
| 10 | + | ||
| 11 | +#import "MJExtension.h" | ||
| 12 | + | ||
| 13 | +#import "CNLiveNetworking.h" | ||
| 14 | +#import "CNUserInfoManager.h" | ||
| 15 | +#import "CNLiveEnvironment.h" | ||
| 16 | + | ||
| 17 | +#import "CNScoreModel.h" | ||
| 18 | +#import "CNTaskListModel.h" | ||
| 19 | + | ||
| 20 | +@interface CNAddScoreManager() | ||
| 21 | +@property (nonatomic, weak) NSTimer *timer; | ||
| 22 | +@property (nonatomic, copy) NSString *taskId; | ||
| 23 | +@property (nonatomic, copy) NSString *contentId; | ||
| 24 | + | ||
| 25 | +@end | ||
| 26 | +@implementation CNAddScoreManager | ||
| 27 | +#pragma mark - 单例 | ||
| 28 | ++ (instancetype)manager { | ||
| 29 | + static CNAddScoreManager *_singleton = nil; | ||
| 30 | + static dispatch_once_t onceToken; | ||
| 31 | + dispatch_once(&onceToken, ^{ | ||
| 32 | + //不能再使用alloc方法 | ||
| 33 | + //因为已经重写了allocWithZone方法,所以这里要调用父类的分配空间的方法 | ||
| 34 | + _singleton = [[super allocWithZone:NULL] init]; | ||
| 35 | + }); | ||
| 36 | + return _singleton; | ||
| 37 | +} | ||
| 38 | +// 防止外部调用alloc 或者 new | ||
| 39 | ++ (instancetype)allocWithZone:(struct _NSZone *)zone { | ||
| 40 | + return [CNAddScoreManager manager]; | ||
| 41 | +} | ||
| 42 | +// 防止外部调用copy | ||
| 43 | +- (id)copyWithZone:(nullable NSZone *)zone { | ||
| 44 | + return [CNAddScoreManager manager]; | ||
| 45 | +} | ||
| 46 | +// 防止外部调用mutableCopy | ||
| 47 | +- (id)mutableCopyWithZone:(nullable NSZone *)zone { | ||
| 48 | + return [CNAddScoreManager manager]; | ||
| 49 | +} | ||
| 50 | + | ||
| 51 | +#pragma mark - 工具方法 | ||
| 52 | +/* | ||
| 53 | + errorCode 432 errorMessage 此内容今日上限 | ||
| 54 | + errorCode 431 errorMessage 积分任务上限 | ||
| 55 | + errorCode 0 errorMessage 成功 | ||
| 56 | + errorCode 403 errorMessage 缺少必要参数 | ||
| 57 | + */ | ||
| 58 | +#pragma mark - 延时请求加分接口 | ||
| 59 | +- (void)requestTime:(NSInteger)time taskId:(NSString *)taskId contentId:(NSString *)contentId block:(RequestCompleted _Nullable)block{ | ||
| 60 | + CNAddScoreManager *manager = [CNAddScoreManager manager]; | ||
| 61 | + manager.taskId = taskId; | ||
| 62 | + manager.contentId = contentId; | ||
| 63 | + manager.block = block; | ||
| 64 | + [manager performSelector:@selector(sendRequest) withObject:nil afterDelay:time]; | ||
| 65 | + | ||
| 66 | +} | ||
| 67 | +- (void)sendRequest{ | ||
| 68 | + [CNAddScoreManager requestTaskId:self.taskId contentId:self.contentId block:self.block]; | ||
| 69 | +} | ||
| 70 | +#pragma mark - 取消延时请求加分接口 | ||
| 71 | +- (void)cancelSendRequest{ | ||
| 72 | + [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(sendRequest) object:nil]; | ||
| 73 | + | ||
| 74 | +} | ||
| 75 | +//首次登录加积分 | ||
| 76 | ++ (void)firstLogin:(RequestCompleted _Nullable)block { | ||
| 77 | + //根据后台数据设置 | ||
| 78 | + NSDictionary *dic = [[NSUserDefaults standardUserDefaults] objectForKey:@"CNWjjAddSourceTime"]; | ||
| 79 | + if(!dic[@"isShowIntegral"]||[dic[@"isShowIntegral"] isEqualToString:@"false"]||[dic[@"isShowIntegral"] isEqualToString:@"0"]){ | ||
| 80 | + block?block(NO, @"关闭增加积分", @"0"):@""; | ||
| 81 | + return; | ||
| 82 | + } | ||
| 83 | + //判断是否可以请求加分 | ||
| 84 | + NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults]; | ||
| 85 | + BOOL haveAdd = [userDefault boolForKey:@"kAddScoreFirstLogin"]; | ||
| 86 | + if(!haveAdd){ | ||
| 87 | + NSDictionary *params = @{@"sid":CNUserShareModel.uid,@"taskId":@"first_login",@"contentId":@""}; | ||
| 88 | + [CNLiveNetworking setAllowRequestDefaultArgument:YES]; | ||
| 89 | + [CNLiveNetworking setupShowDataResult:NO]; | ||
| 90 | + [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNIntegralAddUrl Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { | ||
| 91 | + | ||
| 92 | + if ([responseObject isKindOfClass:[NSDictionary class]] && [responseObject[@"errorCode"] isEqualToString:@"0"]) { | ||
| 93 | + //完成次数加一 | ||
| 94 | + [CNAddScoreManager updateAddScoreJson:@"TaskList.json" taskType:@"firstTask" taskId:@"first_login"]; | ||
| 95 | + CNScoreModel *model = [CNScoreModel mj_objectWithKeyValues:responseObject[@"data"]]; | ||
| 96 | + | ||
| 97 | + //发送通知 | ||
| 98 | + [[NSNotificationCenter defaultCenter] postNotificationName:@"AddScoreRequestSuccess" object:nil userInfo:@{@"taskType":@"firstTask", @"taskId":@"first_login", @"score":model.score}]; | ||
| 99 | + [userDefault setBool:YES forKey:@"kAddScoreFirstLogin"]; | ||
| 100 | + block?block(YES, model.desc, model.score):@""; | ||
| 101 | + | ||
| 102 | + }else{ | ||
| 103 | + block?block(NO, @"失败", @"0"):@""; | ||
| 104 | + } | ||
| 105 | + }]; | ||
| 106 | + | ||
| 107 | + }else{ | ||
| 108 | + block?block(NO, @"首次登录已增加积分", @"0"):@""; | ||
| 109 | + | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | +} | ||
| 113 | + | ||
| 114 | +#pragma mark - 直接请求加分接口 | ||
| 115 | ++ (void)requestTaskId:(NSString *)taskId contentId:(NSString *)contentId block:(RequestCompleted _Nullable)block{ | ||
| 116 | + if(!CNUserShareManager.isLogin){ | ||
| 117 | + block(NO, @"用户未登录", @"0"); | ||
| 118 | + return; | ||
| 119 | + } | ||
| 120 | + //根据后台数据设置 | ||
| 121 | + NSDictionary *dic = [[NSUserDefaults standardUserDefaults] objectForKey:@"CNWjjAddSourceTime"]; | ||
| 122 | + if(!dic[@"isShowIntegral"]||[dic[@"isShowIntegral"] isEqualToString:@"false"]||[dic[@"isShowIntegral"] isEqualToString:@"0"]){ | ||
| 123 | + block(NO, @"关闭增加积分", @"0"); | ||
| 124 | + return; | ||
| 125 | + } | ||
| 126 | + //首次任务 | ||
| 127 | + NSString *taskType = nil; | ||
| 128 | + if([taskId isEqualToString:@"update_face"]){//更新头像 | ||
| 129 | + taskType = @"firstTask"; | ||
| 130 | + } | ||
| 131 | + else if ([taskId isEqualToString:@"update_nick"]){//换个昵称 | ||
| 132 | + taskType = @"firstTask"; | ||
| 133 | + | ||
| 134 | + } | ||
| 135 | + else if ([taskId isEqualToString:@"publish_witness"]){//发条目击者 | ||
| 136 | + taskType = @"firstTask"; | ||
| 137 | + | ||
| 138 | + } | ||
| 139 | + else if ([taskId isEqualToString:@"add_friend"]){//添加好友 | ||
| 140 | + taskType = @"firstTask"; | ||
| 141 | + | ||
| 142 | + } | ||
| 143 | + else if ([taskId isEqualToString:@"publish_moment"]){//发条生活圈 | ||
| 144 | + taskType = @"firstTask"; | ||
| 145 | + | ||
| 146 | + } | ||
| 147 | + else if ([taskId isEqualToString:@"customer_feedback"]){//客服留言 | ||
| 148 | + taskType = @"firstTask"; | ||
| 149 | + | ||
| 150 | + } | ||
| 151 | + //每日任务 | ||
| 152 | + else if ([taskId isEqualToString:@"check_in"]){//签到 | ||
| 153 | + taskType = @"dailyTask"; | ||
| 154 | + | ||
| 155 | + } | ||
| 156 | + else if ([taskId isEqualToString:@"watch_video"]){//观看视频 | ||
| 157 | + taskType = @"dailyTask"; | ||
| 158 | + | ||
| 159 | + } | ||
| 160 | + else if ([taskId isEqualToString:@"listen_novel"]){//听本小说 | ||
| 161 | + taskType = @"dailyTask"; | ||
| 162 | + | ||
| 163 | + } | ||
| 164 | + else if ([taskId isEqualToString:@"read_article"]){//啃篇文档 | ||
| 165 | + taskType = @"dailyTask"; | ||
| 166 | + | ||
| 167 | + } | ||
| 168 | + else if ([taskId isEqualToString:@"publish_comment"]){//发布评论 | ||
| 169 | + taskType = @"dailyTask"; | ||
| 170 | + | ||
| 171 | + } | ||
| 172 | + else if ([taskId isEqualToString:@"share_video"]){//分享目击者视频 | ||
| 173 | + taskType = @"dailyTask"; | ||
| 174 | + | ||
| 175 | + } | ||
| 176 | + else if ([taskId isEqualToString:@"share_article"]){//分享文章 | ||
| 177 | + taskType = @"dailyTask"; | ||
| 178 | + | ||
| 179 | + } | ||
| 180 | + | ||
| 181 | + //判断是否可以请求加分 | ||
| 182 | + BOOL isOk = [CNAddScoreManager judgeIsAddScoreJson:@"TaskList.json" taskType:taskType taskId:taskId]; | ||
| 183 | + if(isOk){ | ||
| 184 | + NSDictionary *params = @{@"sid":CNUserShareModel.uid,@"taskId":taskId,@"contentId":!contentId?@"":contentId}; | ||
| 185 | + [CNLiveNetworking setAllowRequestDefaultArgument:YES]; | ||
| 186 | + [CNLiveNetworking setupShowDataResult:NO]; | ||
| 187 | + [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNIntegralAddUrl Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { | ||
| 188 | + | ||
| 189 | + if ([responseObject isKindOfClass:[NSDictionary class]] && [responseObject[@"errorCode"] isEqualToString:@"0"]) { | ||
| 190 | + //完成次数加一 | ||
| 191 | + [CNAddScoreManager updateAddScoreJson:@"TaskList.json" taskType:taskType taskId:taskId]; | ||
| 192 | + CNScoreModel *model = [CNScoreModel mj_objectWithKeyValues:responseObject[@"data"]]; | ||
| 193 | + | ||
| 194 | + //发送通知 | ||
| 195 | + [[NSNotificationCenter defaultCenter] postNotificationName:@"AddScoreRequestSuccess" object:nil userInfo:@{@"taskType":taskType, @"taskId":taskId, @"score":model.score}]; | ||
| 196 | + block(YES, model.desc, model.score); | ||
| 197 | + | ||
| 198 | + }else{ | ||
| 199 | + block(NO, @"失败", @"0"); | ||
| 200 | + | ||
| 201 | + } | ||
| 202 | + | ||
| 203 | + }]; | ||
| 204 | + }else{ | ||
| 205 | + block(NO, @"任务达到上限", @"0"); | ||
| 206 | + | ||
| 207 | + } | ||
| 208 | + | ||
| 209 | +} | ||
| 210 | + | ||
| 211 | +#pragma mark - 判断是否完成任务 | ||
| 212 | ++ (BOOL)judgeIsAddScoreJson:(NSString *)name taskType:(NSString *)taskType taskId:(NSString *)taskId{ | ||
| 213 | + CNTaskListModel *model = [CNAddScoreManager readJson:name taskType:taskType taskId:taskId]; | ||
| 214 | + | ||
| 215 | + if([taskType isEqualToString:@"dailyTask"]){ | ||
| 216 | + for (CNTaskListItemModel *smodel in model.dailyTask) { | ||
| 217 | + if([smodel.taskId isEqualToString:taskId]){ | ||
| 218 | + return smodel.times < smodel.totalCount;//能分享 | ||
| 219 | + } | ||
| 220 | + } | ||
| 221 | + } | ||
| 222 | + if([taskType isEqualToString:@"firstTask"]){ | ||
| 223 | + for (CNTaskListItemModel *smodel in model.firstTask) { | ||
| 224 | + if([smodel.taskId isEqualToString:taskId]){ | ||
| 225 | + return smodel.times < smodel.totalCount;//能分享 | ||
| 226 | + } | ||
| 227 | + } | ||
| 228 | + } | ||
| 229 | + return NO; | ||
| 230 | + | ||
| 231 | +} | ||
| 232 | + | ||
| 233 | +#pragma mark - 更新本地完成任务次数 | ||
| 234 | ++ (BOOL)updateAddScoreJson:(NSString *)name taskType:(NSString *)taskType taskId:(NSString *)taskId{ | ||
| 235 | + CNTaskListModel *model = [CNAddScoreManager readJson:name taskType:taskType taskId:taskId]; | ||
| 236 | + | ||
| 237 | + if([taskType isEqualToString:@"dailyTask"]){ | ||
| 238 | + for (CNTaskListItemModel *smodel in model.dailyTask) { | ||
| 239 | + if([smodel.taskId isEqualToString:taskId]){ | ||
| 240 | + smodel.times++; | ||
| 241 | + } | ||
| 242 | + } | ||
| 243 | + } | ||
| 244 | + if([taskType isEqualToString:@"firstTask"]){ | ||
| 245 | + for (CNTaskListItemModel *smodel in model.firstTask) { | ||
| 246 | + if([smodel.taskId isEqualToString:taskId]){ | ||
| 247 | + smodel.times++; | ||
| 248 | + } | ||
| 249 | + } | ||
| 250 | + } | ||
| 251 | + NSDictionary *dic = [model mj_keyValues]; | ||
| 252 | + return [CNAddScoreManager writeJsonName:name dic:dic]; | ||
| 253 | + | ||
| 254 | +} | ||
| 255 | + | ||
| 256 | +#pragma mark - 读取本地json | ||
| 257 | ++ (CNTaskListModel *)readJson:(NSString *)name taskType:(NSString *)taskType taskId:(NSString *)taskId{ | ||
| 258 | + NSString *docPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; | ||
| 259 | + NSString *filePath = [docPath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@/%@",CNUserShareModel.uid,name]]; | ||
| 260 | + NSDictionary *jsonObject = [NSDictionary dictionaryWithContentsOfFile:filePath]; | ||
| 261 | + CNTaskListModel *model = [CNTaskListModel mj_objectWithKeyValues:jsonObject]; | ||
| 262 | + return model; | ||
| 263 | + | ||
| 264 | +} | ||
| 265 | + | ||
| 266 | +#pragma mark - 写入本地json | ||
| 267 | ++ (BOOL)writeJsonName:(NSString *)name dic:(NSDictionary *)dic{ | ||
| 268 | + if (![NSJSONSerialization isValidJSONObject:dic]) { | ||
| 269 | + return NO; | ||
| 270 | + } | ||
| 271 | + NSString *docPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; | ||
| 272 | + NSString *filePath = [docPath stringByAppendingPathComponent:CNUserShareModel.uid]; | ||
| 273 | + | ||
| 274 | + NSFileManager *fileManager = [NSFileManager defaultManager]; | ||
| 275 | + BOOL isDir = NO; | ||
| 276 | + BOOL isDirExist = [fileManager fileExistsAtPath:filePath isDirectory:&isDir]; | ||
| 277 | + if (isDir && isDirExist) { | ||
| 278 | + NSString *savePath = [filePath stringByAppendingPathComponent:name]; | ||
| 279 | + return [dic writeToFile:savePath atomically:YES]; | ||
| 280 | + | ||
| 281 | + }else{ | ||
| 282 | + BOOL success = [fileManager createDirectoryAtPath:filePath withIntermediateDirectories:YES attributes:nil error:nil]; | ||
| 283 | + if(success){ | ||
| 284 | + NSString *savePath = [filePath stringByAppendingPathComponent:name]; | ||
| 285 | + return [dic writeToFile:savePath atomically:YES]; | ||
| 286 | + } | ||
| 287 | + } | ||
| 288 | + return NO; | ||
| 289 | + | ||
| 290 | +} | ||
| 291 | + | ||
| 292 | +@end |
CNLiveIntegralModule/Classes/Model/CNScoreModel.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNScoreModel.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/3/2. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | + | ||
| 11 | +NS_ASSUME_NONNULL_BEGIN | ||
| 12 | + | ||
| 13 | +@interface CNScoreModel : NSObject | ||
| 14 | +//积分明细 | ||
| 15 | +@property (nonatomic, copy) NSString *date; | ||
| 16 | +@property (nonatomic, copy) NSString *integral; | ||
| 17 | +@property (nonatomic, copy) NSString *source; | ||
| 18 | +@property (nonatomic, copy) NSString *title; | ||
| 19 | + | ||
| 20 | +//签到 | ||
| 21 | +@property (nonatomic, strong) NSArray *scores; | ||
| 22 | +@property (nonatomic, assign) NSInteger times; | ||
| 23 | +@property (nonatomic, copy) NSString *url; | ||
| 24 | +@property (nonatomic, copy) NSString *score; | ||
| 25 | +@property (nonatomic, copy) NSString *desc; | ||
| 26 | + | ||
| 27 | +@property (nonatomic, copy) NSString *status; | ||
| 28 | + | ||
| 29 | +@end | ||
| 30 | + | ||
| 31 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/Model/CNScoreModel.m
0 → 100644
CNLiveIntegralModule/Classes/Model/CNTaskListModel.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNTaskListModel.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/2/26. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | + | ||
| 11 | +NS_ASSUME_NONNULL_BEGIN | ||
| 12 | +@interface CNTaskListItemModel : NSObject | ||
| 13 | +@property (nonatomic, copy) NSString *icon; | ||
| 14 | +@property (nonatomic, copy) NSString *score; | ||
| 15 | +@property (nonatomic, copy) NSString *status; | ||
| 16 | +@property (nonatomic, copy) NSString *taskId; | ||
| 17 | +@property (nonatomic, copy) NSString *taskType; | ||
| 18 | + | ||
| 19 | +@property (nonatomic, assign) NSInteger times; | ||
| 20 | +@property (nonatomic, copy) NSString *title; | ||
| 21 | +@property (nonatomic, assign) NSInteger totalCount; | ||
| 22 | +@property (nonatomic, copy) NSString *url; | ||
| 23 | + | ||
| 24 | +@end | ||
| 25 | +@interface CNTaskListModel : NSObject | ||
| 26 | +@property (nonatomic, copy) NSString *integral; | ||
| 27 | +@property (nonatomic, strong) NSArray *dailyTask; | ||
| 28 | +@property (nonatomic, strong) NSArray *firstTask; | ||
| 29 | + | ||
| 30 | + | ||
| 31 | +@end | ||
| 32 | + | ||
| 33 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/Model/CNTaskListModel.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNTaskListModel.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/2/26. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNTaskListModel.h" | ||
| 10 | + | ||
| 11 | +@implementation CNTaskListItemModel | ||
| 12 | + | ||
| 13 | +@end | ||
| 14 | +@implementation CNTaskListModel | ||
| 15 | ++ (NSDictionary *)mj_objectClassInArray{ | ||
| 16 | + return @{ | ||
| 17 | + @"dailyTask" : @"CNTaskListItemModel",@"firstTask" : @"CNTaskListItemModel" | ||
| 18 | + }; | ||
| 19 | +} | ||
| 20 | +@end |
CNLiveIntegralModule/Classes/Module/CNLiveIntegralModule.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveIntegralModule.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by 153993236@qq.com on 11/12/2019. | ||
| 6 | +// Copyright (c) 2019 153993236@qq.com. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | + | ||
| 11 | +NS_ASSUME_NONNULL_BEGIN | ||
| 12 | + | ||
| 13 | +@interface CNLiveIntegralModule : NSObject | ||
| 14 | + | ||
| 15 | +@end | ||
| 16 | + | ||
| 17 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/Module/CNLiveIntegralModule.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveIntegralModule.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by 153993236@qq.com on 11/12/2019. | ||
| 6 | +// Copyright (c) 2019 153993236@qq.com. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLiveIntegralModule.h" | ||
| 10 | +#import "CNLiveServices.h" | ||
| 11 | + | ||
| 12 | +@BeeHiveMod(CNLiveIntegralModule) | ||
| 13 | +@interface CNLiveIntegralModule()<BHModuleProtocol> | ||
| 14 | + | ||
| 15 | +@end | ||
| 16 | + | ||
| 17 | +@implementation CNLiveIntegralModule | ||
| 18 | +- (id)init { | ||
| 19 | + if (self = [super init]) { | ||
| 20 | + | ||
| 21 | + } | ||
| 22 | + return self; | ||
| 23 | + | ||
| 24 | +} | ||
| 25 | + | ||
| 26 | +- (NSUInteger)moduleLevel { | ||
| 27 | + return 0; | ||
| 28 | + | ||
| 29 | +} | ||
| 30 | + | ||
| 31 | +- (void)modSetUp:(BHContext *)context { | ||
| 32 | + switch (context.env) { | ||
| 33 | + case BHEnvironmentDev: | ||
| 34 | + //....初始化开发环境 | ||
| 35 | + break; | ||
| 36 | + case BHEnvironmentProd: | ||
| 37 | + //....初始化生产环境 | ||
| 38 | + default: | ||
| 39 | + break; | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | +} | ||
| 43 | + | ||
| 44 | +- (void)modInit:(BHContext *)context { | ||
| 45 | + | ||
| 46 | +} | ||
| 47 | + | ||
| 48 | +@end |
CNLiveIntegralModule/Classes/Module/CNLiveIntegralService.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveIntegralService.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by 153993236@qq.com on 11/12/2019. | ||
| 6 | +// Copyright (c) 2019 153993236@qq.com. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | + | ||
| 11 | +NS_ASSUME_NONNULL_BEGIN | ||
| 12 | + | ||
| 13 | +@interface CNLiveIntegralService : NSObject | ||
| 14 | + | ||
| 15 | +@end | ||
| 16 | + | ||
| 17 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/Module/CNLiveIntegralService.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveIntegralService.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by 153993236@qq.com on 11/12/2019. | ||
| 6 | +// Copyright (c) 2019 153993236@qq.com. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLiveIntegralService.h" | ||
| 10 | +#import "CNLiveServices.h" | ||
| 11 | +#import "CNLiveTaskListController.h" | ||
| 12 | + | ||
| 13 | + | ||
| 14 | +@BeeHiveService(CNLiveMineServiceProtocol,CNLiveIntegralService) | ||
| 15 | +@interface CNLiveIntegralService ()<CNLiveMineServiceProtocol> | ||
| 16 | + | ||
| 17 | +@end | ||
| 18 | + | ||
| 19 | +@implementation CNLiveIntegralService | ||
| 20 | + | ||
| 21 | +// 任务列表 | ||
| 22 | +- (UIViewController *)getTaskListViewController { | ||
| 23 | + return [CNLiveTaskListController new]; | ||
| 24 | +} | ||
| 25 | + | ||
| 26 | +- (void)pushToTaskListViewController { | ||
| 27 | + CNLiveTaskListController *vc = [[CNLiveTaskListController alloc]init]; | ||
| 28 | +// [CNLivePageJumpManager pushViewController:vc]; | ||
| 29 | +} | ||
| 30 | + | ||
| 31 | + | ||
| 32 | +@end |
CNLiveIntegralModule/Classes/View/CAEmitterLayerView.h
0 → 100644
| 1 | +// | ||
| 2 | +// CAEmitterLayerView.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/2/28. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <UIKit/UIKit.h> | ||
| 10 | + | ||
| 11 | +NS_ASSUME_NONNULL_BEGIN | ||
| 12 | + | ||
| 13 | +@interface CAEmitterLayerView : UIView | ||
| 14 | +//模仿setter,getter方法 | ||
| 15 | +- (void)setEmitterLayer:(CAEmitterLayer *)layer; | ||
| 16 | +- (CAEmitterLayer *)emitterLayer; | ||
| 17 | + | ||
| 18 | +//显示出当前view | ||
| 19 | +- (void)show; | ||
| 20 | +//隐藏 | ||
| 21 | +- (void)hide; | ||
| 22 | + | ||
| 23 | +@end | ||
| 24 | + | ||
| 25 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/View/CAEmitterLayerView.m
0 → 100644
| 1 | +// | ||
| 2 | +// CAEmitterLayerView.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/2/28. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CAEmitterLayerView.h" | ||
| 10 | + | ||
| 11 | +@interface CAEmitterLayerView() { | ||
| 12 | + CAEmitterLayer *_emitterLayer; | ||
| 13 | +} | ||
| 14 | + | ||
| 15 | +@end | ||
| 16 | + | ||
| 17 | +@implementation CAEmitterLayerView | ||
| 18 | ++ (Class)layerClass { | ||
| 19 | + return [CAEmitterLayer class]; | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | +- (instancetype)initWithFrame:(CGRect)frame { | ||
| 23 | + self = [super initWithFrame:frame]; | ||
| 24 | + if (self) { | ||
| 25 | + _emitterLayer = (CAEmitterLayer *)self.layer; | ||
| 26 | + } | ||
| 27 | + return self; | ||
| 28 | +} | ||
| 29 | + | ||
| 30 | +- (void)setEmitterLayer:(CAEmitterLayer *)layer { | ||
| 31 | + _emitterLayer = layer; | ||
| 32 | +} | ||
| 33 | + | ||
| 34 | +- (CAEmitterLayer *)emitterLayer { | ||
| 35 | + return _emitterLayer; | ||
| 36 | +} | ||
| 37 | + | ||
| 38 | +- (void)show { | ||
| 39 | + | ||
| 40 | +} | ||
| 41 | + | ||
| 42 | +- (void)hide { | ||
| 43 | + | ||
| 44 | +} | ||
| 45 | +@end |
CNLiveIntegralModule/Classes/View/CNAddScoreView.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNAddScoreView.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/2/28. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <UIKit/UIKit.h> | ||
| 10 | + | ||
| 11 | +NS_ASSUME_NONNULL_BEGIN | ||
| 12 | +@protocol CNAddScoreViewDelegate <NSObject> | ||
| 13 | +@optional | ||
| 14 | +- (void)login; | ||
| 15 | +@end | ||
| 16 | + | ||
| 17 | +@interface CNAddScoreView : UIView | ||
| 18 | +@property (nonatomic, weak) id<CNAddScoreViewDelegate> delegate; | ||
| 19 | + | ||
| 20 | ++ (void)showAddScoreViewWithDesc:(NSString *)desc score:(NSString *)score; | ||
| 21 | ++ (void)showAddScoreViewWithDesc:(NSString *)desc login:(NSString *)login delegate:(id<CNAddScoreViewDelegate>)delegate; | ||
| 22 | + | ||
| 23 | ++ (void)hide; | ||
| 24 | + | ||
| 25 | +@end | ||
| 26 | + | ||
| 27 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/View/CNAddScoreView.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNAddScoreView.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/2/28. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNAddScoreView.h" | ||
| 10 | + | ||
| 11 | +#import <Masonry/Masonry.h> | ||
| 12 | +#import <SDWebImage/SDWebImage.h> | ||
| 13 | +#import "QMUIKit.h" | ||
| 14 | +#import "YYKit.h" | ||
| 15 | + | ||
| 16 | +#import "NSString+CNLiveExtension.h" | ||
| 17 | + | ||
| 18 | +#import "CNGoldWhereaboutsView.h" | ||
| 19 | + | ||
| 20 | +@interface CNAddScoreView() | ||
| 21 | +@property (nonatomic, strong) UIImageView *midImage; | ||
| 22 | +@property (nonatomic, strong) UIButton *scoreBtn; | ||
| 23 | +@property (nonatomic, strong) UILabel *scoreLabel; | ||
| 24 | +@property (nonatomic, strong) UIButton *colseBtn; | ||
| 25 | + | ||
| 26 | +@property (nonatomic, strong) UILabel *descLabel; | ||
| 27 | + | ||
| 28 | +@property (nonatomic, copy) NSString *score; | ||
| 29 | +@property (nonatomic, copy) NSString *desc; | ||
| 30 | +@property (nonatomic, copy) NSString *login; | ||
| 31 | + | ||
| 32 | +@end | ||
| 33 | + | ||
| 34 | +@implementation CNAddScoreView | ||
| 35 | +#pragma mark - Using Method | ||
| 36 | ++ (void)showAddScoreViewWithDesc:(NSString *)desc score:(NSString *)score{ | ||
| 37 | + CNAddScoreView *view = [[CNAddScoreView alloc]initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)]; | ||
| 38 | + view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; | ||
| 39 | + view.desc = desc; | ||
| 40 | + view.score = score; | ||
| 41 | + [[UIApplication sharedApplication].keyWindow addSubview:view]; | ||
| 42 | + | ||
| 43 | +} | ||
| 44 | ++ (void)showAddScoreViewWithDesc:(NSString *)desc login:(NSString *)login delegate:(id<CNAddScoreViewDelegate>)delegate { | ||
| 45 | + CNAddScoreView *view = [[CNAddScoreView alloc]initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)]; | ||
| 46 | + view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; | ||
| 47 | + view.desc = desc; | ||
| 48 | + view.login = login; | ||
| 49 | + view.delegate = delegate; | ||
| 50 | + [[UIApplication sharedApplication].keyWindow addSubview:view]; | ||
| 51 | +} | ||
| 52 | + | ||
| 53 | +#pragma mark - Init | ||
| 54 | +- (instancetype)initWithFrame:(CGRect)frame { | ||
| 55 | + if (self = [super initWithFrame:frame]) { | ||
| 56 | + self.userInteractionEnabled = YES; | ||
| 57 | + self.clipsToBounds = YES; | ||
| 58 | + [self setupUI]; | ||
| 59 | + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(clickedClose)]; | ||
| 60 | + [self addGestureRecognizer:tap]; | ||
| 61 | + } | ||
| 62 | + return self; | ||
| 63 | +} | ||
| 64 | +#pragma mark - UI | ||
| 65 | +- (void)setupUI{ | ||
| 66 | + [self addSubview:self.midImage]; | ||
| 67 | + [self addSubview:self.scoreBtn]; | ||
| 68 | + [self addSubview:self.scoreLabel]; | ||
| 69 | + [self addSubview:self.colseBtn]; | ||
| 70 | + [self addSubview:self.descLabel]; | ||
| 71 | + | ||
| 72 | + [self xw_layoutSubviews]; | ||
| 73 | + | ||
| 74 | + [self addAnimation]; | ||
| 75 | +} | ||
| 76 | + | ||
| 77 | +- (void)xw_layoutSubviews{ | ||
| 78 | + [_midImage mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 79 | + make.centerX.equalTo(self.mas_centerX); | ||
| 80 | + make.centerY.equalTo(self.mas_centerY).with.offset(-30*(SCREEN_WIDTH/375.0)); | ||
| 81 | + make.width.offset(SCREEN_WIDTH); | ||
| 82 | + make.height.offset(SCREEN_WIDTH); | ||
| 83 | + | ||
| 84 | + }]; | ||
| 85 | + [_scoreBtn mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 86 | + make.centerX.equalTo(self.mas_centerX); | ||
| 87 | + make.bottom.equalTo(_midImage.mas_bottom); | ||
| 88 | + make.width.offset(160*(SCREEN_WIDTH/375.0)); | ||
| 89 | + make.height.offset(44*(SCREEN_WIDTH/375.0)); | ||
| 90 | + | ||
| 91 | + }]; | ||
| 92 | + [_scoreLabel mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 93 | + make.centerX.equalTo(self.mas_centerX); | ||
| 94 | + make.bottom.equalTo(_midImage.mas_bottom).with.offset(-2*(SCREEN_WIDTH/375.0)); | ||
| 95 | + make.width.offset(160*(SCREEN_WIDTH/375.0)); | ||
| 96 | + make.height.offset(44*(SCREEN_WIDTH/375.0)); | ||
| 97 | + | ||
| 98 | + }]; | ||
| 99 | + [_colseBtn mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 100 | + make.top.equalTo(_midImage.mas_top).with.offset(0); | ||
| 101 | + make.right.equalTo(self.mas_right).with.offset(-10*(SCREEN_WIDTH/375.0)); | ||
| 102 | + make.width.height.offset(30*(SCREEN_WIDTH/375.0)); | ||
| 103 | + | ||
| 104 | + }]; | ||
| 105 | + [_descLabel mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 106 | + make.centerX.equalTo(self.mas_centerX); | ||
| 107 | + make.centerY.equalTo(self.mas_centerY).with.offset(-35*(SCREEN_WIDTH/375.0)); | ||
| 108 | + make.width.offset(150*(SCREEN_WIDTH/375.0)); | ||
| 109 | + make.height.offset(80*(SCREEN_WIDTH/375.0)); | ||
| 110 | + | ||
| 111 | + }]; | ||
| 112 | + | ||
| 113 | +} | ||
| 114 | + | ||
| 115 | +#pragma mark - Data | ||
| 116 | +- (void)setLogin:(NSString *)login{ | ||
| 117 | + _login = login; | ||
| 118 | + _scoreLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:20]; | ||
| 119 | + _scoreLabel.text = login; | ||
| 120 | +} | ||
| 121 | +- (void)setScore:(NSString *)score{ | ||
| 122 | + _score = score; | ||
| 123 | + _scoreLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:30]; | ||
| 124 | + _scoreLabel.text = [NSString stringWithFormat:@"+%@",score]; | ||
| 125 | + | ||
| 126 | +} | ||
| 127 | + | ||
| 128 | +- (void)setDesc:(NSString *)desc{ | ||
| 129 | + _desc = desc; | ||
| 130 | + | ||
| 131 | + NSMutableString *str = [[NSMutableString alloc]initWithString:desc]; | ||
| 132 | + | ||
| 133 | + CGSize size = [@"钱" textSizeIn:CGSizeMake(HUGE_VAL, HUGE_VAL) font:_descLabel.font]; | ||
| 134 | + NSInteger characters1 = ceil(140*(SCREEN_WIDTH/375.0)/size.width); | ||
| 135 | + NSInteger characters2 = ceil(110*(SCREEN_WIDTH/375.0)/size.width); | ||
| 136 | + NSInteger characters3 = ceil(90*(SCREEN_WIDTH/375.0)/size.width); | ||
| 137 | + | ||
| 138 | + if(str.length > characters1){ | ||
| 139 | + [str insertString:@"\n"atIndex:characters1]; | ||
| 140 | + } | ||
| 141 | + if(str.length > characters1+characters2){ | ||
| 142 | + [str insertString:@"\n"atIndex:characters1+characters2]; | ||
| 143 | + } | ||
| 144 | + if(str.length > characters1+characters2+characters3){ | ||
| 145 | + [str insertString:@"\n"atIndex:characters1+characters2+characters3]; | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStyle new]; | ||
| 149 | + paragraphStyle.lineSpacing = 10*(SCREEN_WIDTH/375.0); | ||
| 150 | + paragraphStyle.alignment = NSTextAlignmentCenter; | ||
| 151 | + paragraphStyle.lineBreakMode = NSLineBreakByTruncatingTail; | ||
| 152 | + NSMutableDictionary *attributes = [NSMutableDictionary dictionary]; | ||
| 153 | + [attributes setObject:paragraphStyle forKey:NSParagraphStyleAttributeName]; | ||
| 154 | + _descLabel.attributedText = [[NSAttributedString alloc] initWithString:str attributes:attributes]; | ||
| 155 | + | ||
| 156 | +} | ||
| 157 | + | ||
| 158 | +/* | ||
| 159 | + // Only override drawRect: if you perform custom drawing. | ||
| 160 | + // An empty implementation adversely affects performance during animation. | ||
| 161 | + - (void)drawRect:(CGRect)rect { | ||
| 162 | + // Drawing code | ||
| 163 | + } | ||
| 164 | + */ | ||
| 165 | + | ||
| 166 | +#pragma mark - Private Methods | ||
| 167 | +- (void)addAnimation{ | ||
| 168 | + _midImage.transform = CGAffineTransformMake(0.01, 0, 0, 0.01, _midImage.left, _midImage.top); | ||
| 169 | + _scoreBtn.transform = CGAffineTransformMake(0.01, 0, 0, 0.01, _scoreBtn.left, _scoreBtn.top); | ||
| 170 | + _scoreLabel.transform = CGAffineTransformMake(0.01, 0, 0, 0.01, _scoreLabel.left, _scoreLabel.top); | ||
| 171 | + _colseBtn.transform = CGAffineTransformMake(0.01, 0, 0, 0.01, _scoreLabel.left, _scoreLabel.top); | ||
| 172 | + _descLabel.transform = CGAffineTransformMake(0.01, 0, 0, 0.01, _scoreLabel.left, _scoreLabel.top); | ||
| 173 | + | ||
| 174 | + [UIView animateWithDuration:0.3f animations:^{ | ||
| 175 | + _midImage.transform = CGAffineTransformMake(1.05f, 0, 0, 1.0f, 0, 0); | ||
| 176 | + _scoreBtn.transform = CGAffineTransformMake(1.05f, 0, 0, 1.0f, 0, 0); | ||
| 177 | + _scoreLabel.transform = CGAffineTransformMake(1.05f, 0, 0, 1.0f, 0, 0); | ||
| 178 | + _colseBtn.transform = CGAffineTransformMake(1.05f, 0, 0, 1.0f, 0, 0); | ||
| 179 | + _descLabel.transform = CGAffineTransformMake(1.05f, 0, 0, 1.0f, 0, 0); | ||
| 180 | + | ||
| 181 | + } completion:^(BOOL finished) { | ||
| 182 | + [UIView animateWithDuration:0.1f animations:^{ | ||
| 183 | + _midImage.transform = CGAffineTransformMake(1, 0, 0, 1, 0, 0); | ||
| 184 | + _scoreBtn.transform = CGAffineTransformMake(1, 0, 0, 1, 0, 0); | ||
| 185 | + _scoreLabel.transform = CGAffineTransformMake(1, 0, 0, 1, 0, 0); | ||
| 186 | + _colseBtn.transform = CGAffineTransformMake(1, 0, 0, 1, 0, 0); | ||
| 187 | + _descLabel.transform = CGAffineTransformMake(1, 0, 0, 1, 0, 0); | ||
| 188 | + | ||
| 189 | + } completion:^(BOOL finished) { | ||
| 190 | + // 恢复原位 | ||
| 191 | + _midImage.transform = CGAffineTransformIdentity; | ||
| 192 | + _scoreBtn.transform = CGAffineTransformIdentity; | ||
| 193 | + _scoreLabel.transform = CGAffineTransformIdentity; | ||
| 194 | + _colseBtn.transform = CGAffineTransformIdentity; | ||
| 195 | + _descLabel.transform = CGAffineTransformIdentity; | ||
| 196 | + | ||
| 197 | + }]; | ||
| 198 | + | ||
| 199 | + }]; | ||
| 200 | + | ||
| 201 | +} | ||
| 202 | +- (void)hiddenAction{ | ||
| 203 | + _midImage.layer.transform = CATransform3DMakeScale(1, 1, 1); | ||
| 204 | + _scoreBtn.layer.transform = CATransform3DMakeScale(1, 1, 1); | ||
| 205 | + _scoreLabel.layer.transform = CATransform3DMakeScale(1, 1, 1); | ||
| 206 | + _colseBtn.layer.transform = CATransform3DMakeScale(1, 1, 1); | ||
| 207 | + _descLabel.layer.transform = CATransform3DMakeScale(1, 1, 1); | ||
| 208 | + | ||
| 209 | + [UIView animateWithDuration:0.3f animations:^{ | ||
| 210 | + // 按照比例scalex=0.001,y=0.001进行缩小 | ||
| 211 | + _midImage.layer.transform = CATransform3DMakeScale(0.001, 0.001, 1); | ||
| 212 | + _scoreBtn.layer.transform = CATransform3DMakeScale(0.001, 0.001, 1); | ||
| 213 | + _scoreLabel.layer.transform = CATransform3DMakeScale(0.001, 0.001, 1); | ||
| 214 | + _colseBtn.layer.transform = CATransform3DMakeScale(0.001, 0.001, 1); | ||
| 215 | + _descLabel.layer.transform = CATransform3DMakeScale(0.001, 0.001, 1); | ||
| 216 | + | ||
| 217 | + } completion:^(BOOL finished) { | ||
| 218 | + [self removeFromSuperview]; | ||
| 219 | + | ||
| 220 | + }]; | ||
| 221 | + | ||
| 222 | +} | ||
| 223 | + | ||
| 224 | +#pragma mark - Action | ||
| 225 | ++ (void)hide { | ||
| 226 | + for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) { | ||
| 227 | + if([view isKindOfClass:[CNGoldWhereaboutsView class]]){ | ||
| 228 | + [view removeAllSubviews]; | ||
| 229 | + [view removeFromSuperview]; | ||
| 230 | + | ||
| 231 | + } | ||
| 232 | + } | ||
| 233 | + for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) { | ||
| 234 | + if([view isKindOfClass:[CNAddScoreView class]]){ | ||
| 235 | + [view removeAllSubviews]; | ||
| 236 | + [view removeFromSuperview]; | ||
| 237 | + | ||
| 238 | + } | ||
| 239 | + } | ||
| 240 | + | ||
| 241 | +} | ||
| 242 | +- (void)clickedClose { | ||
| 243 | + [self hiddenAction]; | ||
| 244 | + | ||
| 245 | + for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) { | ||
| 246 | + if([view isKindOfClass:[CNGoldWhereaboutsView class]]){ | ||
| 247 | + [view removeFromSuperview]; | ||
| 248 | + | ||
| 249 | + } | ||
| 250 | + } | ||
| 251 | +} | ||
| 252 | +- (void)clickedCloseBtn:(UIButton *)btn{ | ||
| 253 | + [self clickedClose]; | ||
| 254 | + | ||
| 255 | + if (self.delegate && [self.delegate respondsToSelector:@selector(login)]) { | ||
| 256 | + [self.delegate login]; | ||
| 257 | + } | ||
| 258 | +} | ||
| 259 | + | ||
| 260 | +#pragma mark - Lazy loading | ||
| 261 | +- (UIImageView *)midImage{ | ||
| 262 | + if (!_midImage) { | ||
| 263 | + _midImage = [[UIImageView alloc] init]; | ||
| 264 | + _midImage.userInteractionEnabled = YES; | ||
| 265 | + UIImage *image = [self xw_getImageName:@"add_score_bg" bundleName:@"CNLiveIntegralModule" targetClass:[self class]]; | ||
| 266 | + _midImage.image = image; | ||
| 267 | + _midImage.contentMode = UIViewContentModeCenter; | ||
| 268 | + } | ||
| 269 | + return _midImage; | ||
| 270 | +} | ||
| 271 | +- (UIButton *)scoreBtn{ | ||
| 272 | + if (!_scoreBtn) { | ||
| 273 | + _scoreBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 274 | + _scoreBtn.adjustsImageWhenHighlighted = NO; | ||
| 275 | + UIImage *image = [self xw_getImageName:@"add_score_label" bundleName:@"CNLiveIntegralModule" targetClass:[self class]]; | ||
| 276 | + [_scoreBtn setImage:image forState:UIControlStateNormal]; | ||
| 277 | + [_scoreBtn addTarget:self action:@selector(clickedCloseBtn:) forControlEvents:UIControlEventTouchUpInside]; | ||
| 278 | + | ||
| 279 | + } | ||
| 280 | + return _scoreBtn; | ||
| 281 | +} | ||
| 282 | +- (UILabel *)scoreLabel{ | ||
| 283 | + if(!_scoreLabel){ | ||
| 284 | + _scoreLabel = [[UILabel alloc] init]; | ||
| 285 | + _scoreLabel.textColor = [UIColor colorWithRed:133/255.0 green:64/255.0 blue:4/255.0 alpha:1.0]; | ||
| 286 | + _scoreLabel.userInteractionEnabled = NO; | ||
| 287 | + _scoreLabel.layer.cornerRadius = 20*(SCREEN_WIDTH/375.0); | ||
| 288 | + _scoreLabel.layer.masksToBounds = YES; | ||
| 289 | + _scoreLabel.textAlignment = NSTextAlignmentCenter; | ||
| 290 | + _scoreLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:30]; | ||
| 291 | + } | ||
| 292 | + return _scoreLabel; | ||
| 293 | +} | ||
| 294 | +- (UIButton *)colseBtn{ | ||
| 295 | + if(!_colseBtn){ | ||
| 296 | + _colseBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 297 | + [_colseBtn addTarget:self action:@selector(clickedClose) forControlEvents:UIControlEventTouchUpInside]; | ||
| 298 | + UIImage *image = [self xw_getImageName:@"add_score_close" bundleName:@"CNLiveIntegralModule" targetClass:[self class]]; | ||
| 299 | + [_colseBtn setImage:image forState:UIControlStateNormal]; | ||
| 300 | + | ||
| 301 | + } | ||
| 302 | + return _colseBtn; | ||
| 303 | +} | ||
| 304 | +- (UILabel *)descLabel{ | ||
| 305 | + if(!_descLabel){ | ||
| 306 | + _descLabel = [[UILabel alloc] init]; | ||
| 307 | + _descLabel.textColor = [UIColor colorWithRed:160/255.0 green:17/255.0 blue:13/255.0 alpha:1.0]; | ||
| 308 | + _descLabel.userInteractionEnabled = NO; | ||
| 309 | + _descLabel.textAlignment = NSTextAlignmentCenter; | ||
| 310 | + _descLabel.numberOfLines = 3; | ||
| 311 | + _descLabel.lineBreakMode = NSLineBreakByTruncatingTail; | ||
| 312 | + _descLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:16*(SCREEN_WIDTH/375.0)]; | ||
| 313 | + | ||
| 314 | + } | ||
| 315 | + return _descLabel; | ||
| 316 | +} | ||
| 317 | + | ||
| 318 | +/** | ||
| 319 | + * 创建图片 | ||
| 320 | + * | ||
| 321 | + * @param imageName 图片名字 | ||
| 322 | + * @param bundleName 图片所在的bundle名字 | ||
| 323 | + * @param targetClass 类和bundle的同级目录 | ||
| 324 | + * @return 返回UIImage | ||
| 325 | + */ | ||
| 326 | +- (UIImage *)xw_getImageName:(NSString *)imageName bundleName:(NSString *)bundleName targetClass:(Class)targetClass{ | ||
| 327 | + NSBundle *bundle = [NSBundle bundleForClass:targetClass]; | ||
| 328 | + NSURL *url = [bundle URLForResource:bundleName withExtension:@"bundle"]; | ||
| 329 | + NSBundle *targetBundle = [NSBundle bundleWithURL:url]; | ||
| 330 | + UIImage *image = [UIImage imageNamed:imageName inBundle:targetBundle compatibleWithTraitCollection:nil]; | ||
| 331 | + return image?image:[UIImage imageNamed:imageName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil]; | ||
| 332 | +} | ||
| 333 | + | ||
| 334 | +@end |
CNLiveIntegralModule/Classes/View/CNGoldWhereaboutsView.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNGoldWhereaboutsView.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/2/28. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CAEmitterLayerView.h" | ||
| 10 | +#import "CNSignInView.h" | ||
| 11 | + | ||
| 12 | +NS_ASSUME_NONNULL_BEGIN | ||
| 13 | +@class CNScoreModel; | ||
| 14 | +@protocol CNGoldWhereaboutsViewDelegate <NSObject> | ||
| 15 | +@optional | ||
| 16 | +- (void)login; | ||
| 17 | +@end | ||
| 18 | + | ||
| 19 | +typedef NS_ENUM(NSUInteger, CNGoldWhereaboutsViewType) { | ||
| 20 | + CNGoldWhereaboutsViewTypeDefault,//熊猫 | ||
| 21 | + CNGoldWhereaboutsViewTypeSignIn,//签到 | ||
| 22 | + CNGoldWhereaboutsViewTypeLogin,//熊猫 | ||
| 23 | + | ||
| 24 | +}; | ||
| 25 | + | ||
| 26 | +@interface CNGoldWhereaboutsView : CAEmitterLayerView | ||
| 27 | +@property (nonatomic, weak) id<CNGoldWhereaboutsViewDelegate> delegate; | ||
| 28 | + | ||
| 29 | +// 游客模式浏览加积分 | ||
| 30 | ++ (void)showGoldWhereaboutsViewWithDesc:(NSString *)desc delegate:(id<CNGoldWhereaboutsViewDelegate>) delegate; | ||
| 31 | + | ||
| 32 | +// 默认展示添加积分视图 | ||
| 33 | ++ (void)showGoldWhereaboutsViewWithDesc:(NSString *)desc score:(NSString *)score; | ||
| 34 | + | ||
| 35 | +// 默认签到 | ||
| 36 | ++ (void)showGoldWhereaboutsViewModel:(CNScoreModel *)model controller:(id<CNSignInViewDelegate>)controller; | ||
| 37 | ++ (void)hide; | ||
| 38 | + | ||
| 39 | +@end | ||
| 40 | + | ||
| 41 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/View/CNGoldWhereaboutsView.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNGoldWhereaboutsView.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/2/28. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNGoldWhereaboutsView.h" | ||
| 10 | +#import "CNAddScoreView.h" | ||
| 11 | +#import "CNSignInView.h" | ||
| 12 | +#import "CNScoreModel.h" | ||
| 13 | +//#import "CNAudioOrVideoMananger.h" | ||
| 14 | +//#import "CNAudioPlayerManager.h" | ||
| 15 | +//#import "LVCPlayer.h" | ||
| 16 | +#import <AVFoundation/AVFoundation.h> | ||
| 17 | + | ||
| 18 | +@interface CNGoldWhereaboutsView()<CNAddScoreViewDelegate> | ||
| 19 | +@property (nonatomic, copy) NSString *desc; | ||
| 20 | +@property (nonatomic, copy) NSString *score; | ||
| 21 | + | ||
| 22 | +@property (nonatomic, weak) id<CNSignInViewDelegate> controller; | ||
| 23 | +@property (nonatomic, strong) CNScoreModel *model; | ||
| 24 | + | ||
| 25 | +@end | ||
| 26 | +@implementation CNGoldWhereaboutsView | ||
| 27 | +#pragma mark - Using Method | ||
| 28 | ++ (void)showGoldWhereaboutsViewWithDesc:(NSString *)desc delegate:(id<CNGoldWhereaboutsViewDelegate>) delegate{//浏览加积分 | ||
| 29 | + CNGoldWhereaboutsView *sView = [[CNGoldWhereaboutsView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)]; | ||
| 30 | + sView.desc = desc; | ||
| 31 | + sView.delegate = delegate; | ||
| 32 | + [[UIApplication sharedApplication].keyWindow addSubview:sView]; | ||
| 33 | + [sView show:CNGoldWhereaboutsViewTypeLogin]; | ||
| 34 | +} | ||
| 35 | + | ||
| 36 | ++ (void)showGoldWhereaboutsViewWithDesc:(NSString *)desc score:(NSString *)score{ | ||
| 37 | + CNGoldWhereaboutsView *sView = [[CNGoldWhereaboutsView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)]; | ||
| 38 | + sView.desc = desc; | ||
| 39 | + sView.score = score; | ||
| 40 | + [[UIApplication sharedApplication].keyWindow addSubview:sView]; | ||
| 41 | + [sView show:CNGoldWhereaboutsViewTypeDefault]; | ||
| 42 | + | ||
| 43 | +} | ||
| 44 | ++ (void)showGoldWhereaboutsViewModel:(CNScoreModel *)model controller:(id<CNSignInViewDelegate>)controller{ | ||
| 45 | + CNGoldWhereaboutsView *sView = [[CNGoldWhereaboutsView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)]; | ||
| 46 | + sView.model = model; | ||
| 47 | + sView.controller = controller; | ||
| 48 | + [[UIApplication sharedApplication].keyWindow addSubview:sView]; | ||
| 49 | + [sView show:CNGoldWhereaboutsViewTypeSignIn]; | ||
| 50 | +} | ||
| 51 | + | ||
| 52 | +#pragma mark - Init | ||
| 53 | +- (instancetype)initWithFrame:(CGRect)frame { | ||
| 54 | + self = [super initWithFrame:frame]; | ||
| 55 | + if (self) { | ||
| 56 | + [self setup]; | ||
| 57 | + } | ||
| 58 | + return self; | ||
| 59 | +} | ||
| 60 | + | ||
| 61 | +#pragma mark - UI | ||
| 62 | +- (void)setup { | ||
| 63 | + //初始化一些参数 | ||
| 64 | + self.emitterLayer.masksToBounds = YES; | ||
| 65 | + self.emitterLayer.emitterShape = kCAEmitterLayerLine; | ||
| 66 | + self.emitterLayer.emitterMode = kCAEmitterLayerSurface; | ||
| 67 | + self.emitterLayer.emitterSize = self.frame.size; | ||
| 68 | + self.emitterLayer.emitterPosition = CGPointMake(self.bounds.size.width/2.0, -20); | ||
| 69 | + | ||
| 70 | +} | ||
| 71 | + | ||
| 72 | +#pragma mark - Private Methods | ||
| 73 | +- (void)show:(CNGoldWhereaboutsViewType)type { | ||
| 74 | + | ||
| 75 | + self.emitterLayer.birthRate = 4; | ||
| 76 | + | ||
| 77 | + NSMutableArray *arr = [[NSMutableArray alloc]init]; | ||
| 78 | + | ||
| 79 | + for (int i = 1; i <= 4; i++) { | ||
| 80 | + __block CAEmitterCell *snowFlake = [CAEmitterCell emitterCell]; | ||
| 81 | + snowFlake.birthRate = 2.5f; | ||
| 82 | + snowFlake.yAcceleration = 2500.f; | ||
| 83 | + snowFlake.emissionRange = 0.5 * M_PI; | ||
| 84 | + snowFlake.spinRange = 0.25 * M_PI; | ||
| 85 | + snowFlake.contents = (__bridge id _Nullable)([UIImage imageNamed:[NSString stringWithFormat:@"gold_whereabouts%d",i]].CGImage); | ||
| 86 | + snowFlake.lifetime = 100.f; | ||
| 87 | + | ||
| 88 | + snowFlake.scale = 0.08; | ||
| 89 | + snowFlake.scaleRange = 0.08; | ||
| 90 | + snowFlake.velocity = 0.0; | ||
| 91 | + snowFlake.velocityRange = 100.f; | ||
| 92 | + | ||
| 93 | + [arr addObject:snowFlake]; | ||
| 94 | + | ||
| 95 | + } | ||
| 96 | + self.emitterLayer.emitterCells = arr; | ||
| 97 | + | ||
| 98 | + [self controlAmountOfGoldCOINS:arr]; | ||
| 99 | + | ||
| 100 | + NSString *sounds = [[NSUserDefaults standardUserDefaults] valueForKey:@"GoldCoinSound"];//0有声音 1没声音 | ||
| 101 | +// if (!(sounds && [sounds isEqualToString:@"1"])) {//0有声音 | ||
| 102 | +// if(![CNAudioOrVideoMananger IsEnter] && ![[CNAudioPlayerManager sharedInstance] isPlaying] && ![LVCPlayer currentVCIsPalyer]){//不在语音通话 | ||
| 103 | +// AVAudioSession *audioSession = [AVAudioSession sharedInstance]; | ||
| 104 | +// [audioSession setCategory:AVAudioSessionCategoryAmbient error:nil]; | ||
| 105 | +// [audioSession setActive:YES error:nil]; | ||
| 106 | +// } | ||
| 107 | +// } | ||
| 108 | + NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"gold_whereabouts" ofType:@"mp3"]]; | ||
| 109 | + __block AVAudioPlayer *soundPlayer = [[AVAudioPlayer alloc]initWithContentsOfURL:url error:nil]; | ||
| 110 | + if (!(sounds && [sounds isEqualToString:@"1"])) {//0有声音 | ||
| 111 | + soundPlayer.volume = 0.5;//0.0~1.0之间 | ||
| 112 | + [soundPlayer prepareToPlay]; | ||
| 113 | + [soundPlayer play];//播放 | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + //停止金币产生 | ||
| 117 | + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ | ||
| 118 | + [self.emitterLayer setValue:@0.f forKeyPath:@"birthRate"]; | ||
| 119 | + | ||
| 120 | + }); | ||
| 121 | + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(4.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ | ||
| 122 | + [soundPlayer stop];//播放 | ||
| 123 | + if(soundPlayer){ | ||
| 124 | + soundPlayer = nil; | ||
| 125 | + | ||
| 126 | + } | ||
| 127 | + if (!(sounds && [sounds isEqualToString:@"1"])) { | ||
| 128 | +// if(![CNAudioOrVideoMananger IsEnter] && ![[CNAudioPlayerManager sharedInstance] isPlaying]){//不在语音通话 | ||
| 129 | +// //金币下落结束 | ||
| 130 | +// [[NSNotificationCenter defaultCenter] postNotificationName:@"CNGoldWhereaboutsViewEnd" object:nil]; | ||
| 131 | +// } | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + switch (type) { | ||
| 135 | + case CNGoldWhereaboutsViewTypeDefault: | ||
| 136 | + { | ||
| 137 | + if(self.score && ![self.score isEqualToString:@""] && self.desc && ![self.desc isEqualToString:@""]){ | ||
| 138 | + [CNAddScoreView showAddScoreViewWithDesc:self.desc score:self.score]; | ||
| 139 | + }else{ | ||
| 140 | + [self hide]; | ||
| 141 | + } | ||
| 142 | + } | ||
| 143 | + break; | ||
| 144 | + | ||
| 145 | + case CNGoldWhereaboutsViewTypeSignIn: | ||
| 146 | + { | ||
| 147 | + [CNSignInView showSignInView:_model.score scores:_model.scores.count>0?_model.scores[0]:@"1000,2000,3000,4000,5000,6000,7000" day:_model.times url:_model.url delegate:_controller]; | ||
| 148 | + } | ||
| 149 | + break; | ||
| 150 | + case CNGoldWhereaboutsViewTypeLogin: | ||
| 151 | + { | ||
| 152 | + if(self.desc && ![self.desc isEqualToString:@""]){ | ||
| 153 | + [CNAddScoreView showAddScoreViewWithDesc:self.desc login:@"立即登录" delegate:self]; | ||
| 154 | + }else{ | ||
| 155 | + [self hide]; | ||
| 156 | + } | ||
| 157 | + | ||
| 158 | + } | ||
| 159 | + break; | ||
| 160 | + } | ||
| 161 | + | ||
| 162 | + | ||
| 163 | + }); | ||
| 164 | + | ||
| 165 | +} | ||
| 166 | + | ||
| 167 | +- (void)hide { | ||
| 168 | + [self removeFromSuperview]; | ||
| 169 | + | ||
| 170 | +} | ||
| 171 | + | ||
| 172 | ++ (void)hide { | ||
| 173 | + for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) { | ||
| 174 | + if([view isKindOfClass:[CNGoldWhereaboutsView class]]){ | ||
| 175 | + [view removeFromSuperview]; | ||
| 176 | + | ||
| 177 | + } | ||
| 178 | + } | ||
| 179 | + | ||
| 180 | +} | ||
| 181 | + | ||
| 182 | +- (void)controlAmountOfGoldCOINS:(NSMutableArray *)arr{ | ||
| 183 | + | ||
| 184 | + __block CAEmitterCell *snowFlake0 = arr[0]; | ||
| 185 | + __block CAEmitterCell *snowFlake1 = arr[1]; | ||
| 186 | + __block CAEmitterCell *snowFlake2 = arr[2]; | ||
| 187 | + __block CAEmitterCell *snowFlake3 = arr[3]; | ||
| 188 | + | ||
| 189 | + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ | ||
| 190 | + snowFlake0.birthRate = 4; | ||
| 191 | + snowFlake1.birthRate = 4; | ||
| 192 | + snowFlake2.birthRate = 4; | ||
| 193 | + snowFlake3.birthRate = 4; | ||
| 194 | + [self.emitterLayer setValue:@4.f forKeyPath:@"birthRate"]; | ||
| 195 | + | ||
| 196 | + }); | ||
| 197 | + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ | ||
| 198 | + snowFlake0.birthRate = 1; | ||
| 199 | + snowFlake1.birthRate = 1; | ||
| 200 | + snowFlake2.birthRate = 1; | ||
| 201 | + snowFlake3.birthRate = 1; | ||
| 202 | + [self.emitterLayer setValue:@4.f forKeyPath:@"birthRate"]; | ||
| 203 | + | ||
| 204 | + }); | ||
| 205 | + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ | ||
| 206 | + snowFlake0.birthRate = 1; | ||
| 207 | + snowFlake1.birthRate = 0; | ||
| 208 | + snowFlake2.birthRate = 1; | ||
| 209 | + snowFlake3.birthRate = 0; | ||
| 210 | + [self.emitterLayer setValue:@1.f forKeyPath:@"birthRate"]; | ||
| 211 | + | ||
| 212 | + }); | ||
| 213 | + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ | ||
| 214 | + snowFlake0.birthRate = 1; | ||
| 215 | + snowFlake1.birthRate = 1; | ||
| 216 | + snowFlake2.birthRate = 1; | ||
| 217 | + snowFlake3.birthRate = 0; | ||
| 218 | + [self.emitterLayer setValue:@4.f forKeyPath:@"birthRate"]; | ||
| 219 | + | ||
| 220 | + }); | ||
| 221 | + | ||
| 222 | +} | ||
| 223 | +/* | ||
| 224 | + // Only override drawRect: if you perform custom drawing. | ||
| 225 | + // An empty implementation adversely affects performance during animation. | ||
| 226 | + - (void)drawRect:(CGRect)rect { | ||
| 227 | + // Drawing code | ||
| 228 | + } | ||
| 229 | + */ | ||
| 230 | +- (void)dealloc{ | ||
| 231 | + NSLog(@"CNGoldWhereaboutsView - dealloc"); | ||
| 232 | +} | ||
| 233 | +- (void)login{ | ||
| 234 | + if (self.delegate && [self.delegate respondsToSelector:@selector(login)]) { | ||
| 235 | + [self.delegate login]; | ||
| 236 | + } | ||
| 237 | +} | ||
| 238 | + | ||
| 239 | +@end |
CNLiveIntegralModule/Classes/View/CNIntegralDetailsTableViewCell.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNIntegralDetailsTableViewCell.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/3/1. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <UIKit/UIKit.h> | ||
| 10 | + | ||
| 11 | +NS_ASSUME_NONNULL_BEGIN | ||
| 12 | + | ||
| 13 | +#define kCNIntegralDetailsTableViewCell @"CNIntegralDetailsTableViewCell" | ||
| 14 | +@class CNScoreModel; | ||
| 15 | + | ||
| 16 | +@interface CNIntegralDetailsTableViewCell : UITableViewCell | ||
| 17 | +@property (nonatomic, strong) CNScoreModel *model; | ||
| 18 | + | ||
| 19 | +@end | ||
| 20 | + | ||
| 21 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/View/CNIntegralDetailsTableViewCell.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNIntegralDetailsTableViewCell.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/3/1. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNIntegralDetailsTableViewCell.h" | ||
| 10 | +#import "QMUIKit.h" | ||
| 11 | +#import <Masonry/Masonry.h> | ||
| 12 | +#import <SDWebImage/SDWebImage.h> | ||
| 13 | + | ||
| 14 | +#import "CNScoreModel.h" | ||
| 15 | + | ||
| 16 | +@interface CNIntegralDetailsTableViewCell() | ||
| 17 | +@property (nonatomic, strong) UILabel *titleLabel; | ||
| 18 | +@property (nonatomic, strong) UILabel *timeLabel; | ||
| 19 | +@property (nonatomic, strong) QMUIButton *scoresBtn; | ||
| 20 | +@property (nonatomic, strong) UIView *line; | ||
| 21 | + | ||
| 22 | +@end | ||
| 23 | + | ||
| 24 | +@implementation CNIntegralDetailsTableViewCell | ||
| 25 | +static const NSInteger margin = 15; | ||
| 26 | + | ||
| 27 | +#pragma mark - Init | ||
| 28 | +- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ | ||
| 29 | + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; | ||
| 30 | + if (self) { | ||
| 31 | + self.contentView.backgroundColor = [UIColor whiteColor]; | ||
| 32 | + [self setupUI]; | ||
| 33 | + | ||
| 34 | + } | ||
| 35 | + return self; | ||
| 36 | +} | ||
| 37 | + | ||
| 38 | +#pragma mark - UI | ||
| 39 | +- (void)setupUI{ | ||
| 40 | + [self.contentView addSubview:self.titleLabel]; | ||
| 41 | + [self.contentView addSubview:self.timeLabel]; | ||
| 42 | + [self.contentView addSubview:self.scoresBtn]; | ||
| 43 | + [self.contentView addSubview:self.line]; | ||
| 44 | + | ||
| 45 | +} | ||
| 46 | +- (void)layoutSubviews{ | ||
| 47 | + [super layoutSubviews]; | ||
| 48 | + [_scoresBtn mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 49 | + make.centerY.equalTo(self.mas_centerY).with.offset(0); | ||
| 50 | + make.right.equalTo(self.mas_right).with.offset(-margin); | ||
| 51 | + | ||
| 52 | + }]; | ||
| 53 | + | ||
| 54 | + [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 55 | + make.top.equalTo(self.mas_top).with.offset(margin); | ||
| 56 | + make.left.equalTo(self.mas_left).with.offset(margin); | ||
| 57 | + make.right.lessThanOrEqualTo(_scoresBtn.mas_left).offset(-margin); | ||
| 58 | + | ||
| 59 | + }]; | ||
| 60 | + | ||
| 61 | + [_timeLabel mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 62 | + make.bottom.equalTo(self.mas_bottom).with.offset(-margin); | ||
| 63 | + make.left.equalTo(self.mas_left).with.offset(margin); | ||
| 64 | + make.right.equalTo(_scoresBtn.mas_left).with.offset(-margin); | ||
| 65 | + | ||
| 66 | + }]; | ||
| 67 | + | ||
| 68 | + [_line mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 69 | + make.bottom.equalTo(self.mas_bottom).with.offset(-0.5); | ||
| 70 | + make.left.equalTo(self.mas_left).with.offset(margin); | ||
| 71 | + make.right.equalTo(self.mas_right).with.offset(0); | ||
| 72 | + make.height.offset(0.5); | ||
| 73 | + | ||
| 74 | + }]; | ||
| 75 | + | ||
| 76 | +} | ||
| 77 | +- (void)dealloc{ | ||
| 78 | + | ||
| 79 | +} | ||
| 80 | +#pragma mark - Data | ||
| 81 | +- (void)setModel:(CNScoreModel *)model{ | ||
| 82 | + _model = model; | ||
| 83 | + _titleLabel.text = model.title; | ||
| 84 | + _timeLabel.text = model.date; | ||
| 85 | + [_scoresBtn setTitle:[NSString stringWithFormat:@"%@%@",[model.source isEqualToString:@"1"]?@"+":@"-",model.integral] forState:UIControlStateNormal]; | ||
| 86 | + | ||
| 87 | +} | ||
| 88 | + | ||
| 89 | +- (void)awakeFromNib { | ||
| 90 | + [super awakeFromNib]; | ||
| 91 | + // Initialization code | ||
| 92 | +} | ||
| 93 | + | ||
| 94 | +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { | ||
| 95 | + [super setSelected:selected animated:animated]; | ||
| 96 | + | ||
| 97 | + // Configure the view for the selected state | ||
| 98 | +} | ||
| 99 | +#pragma mark - Private Methods | ||
| 100 | + | ||
| 101 | + | ||
| 102 | +#pragma mark - Lazy loading | ||
| 103 | +- (UILabel *)titleLabel{ | ||
| 104 | + if(_titleLabel == nil){ | ||
| 105 | + _titleLabel = [[UILabel alloc] init]; | ||
| 106 | + _titleLabel.textColor = [UIColor blackColor]; | ||
| 107 | + _titleLabel.font = UIFontMake(17); | ||
| 108 | + | ||
| 109 | + } | ||
| 110 | + return _titleLabel; | ||
| 111 | + | ||
| 112 | +} | ||
| 113 | +- (UILabel *)timeLabel{ | ||
| 114 | + if(_timeLabel == nil){ | ||
| 115 | + _timeLabel = [[UILabel alloc] init]; | ||
| 116 | + _timeLabel.textColor = [UIColor colorWithRed:136/255.0 green:136/255.0 blue:136/255.0 alpha:1.0]; | ||
| 117 | + _timeLabel.font = UIFontMake(11); | ||
| 118 | + _timeLabel.userInteractionEnabled = YES; | ||
| 119 | + | ||
| 120 | + } | ||
| 121 | + return _timeLabel; | ||
| 122 | + | ||
| 123 | +} | ||
| 124 | +- ( QMUIButton *)scoresBtn{ | ||
| 125 | + if(_scoresBtn == nil){ | ||
| 126 | + _scoresBtn = [QMUIButton buttonWithType:UIButtonTypeCustom]; | ||
| 127 | + _scoresBtn.titleLabel.font = UIFontMake(14); | ||
| 128 | + [_scoresBtn setTitleColor:[UIColor colorWithRed:249/255.0 green:171/255.0 blue:37/255.0 alpha:1.0] forState:UIControlStateNormal]; | ||
| 129 | + [_scoresBtn setImage:[UIImage imageNamed:@"mf_soccer_smallcoin"] forState:UIControlStateNormal]; | ||
| 130 | + _scoresBtn.adjustsImageWhenHighlighted = NO; | ||
| 131 | + _scoresBtn.spacingBetweenImageAndTitle = 5; | ||
| 132 | + _scoresBtn.imagePosition = QMUIButtonImagePositionRight; | ||
| 133 | + } | ||
| 134 | + return _scoresBtn; | ||
| 135 | + | ||
| 136 | +} | ||
| 137 | + | ||
| 138 | +- (UIView *)line{ | ||
| 139 | + if(_line == nil){ | ||
| 140 | + _line = [[UIView alloc] init]; | ||
| 141 | + _line.backgroundColor = [UIColor colorWithRed:235/255.0 green:235/255.0 blue:235/255.0 alpha:1.0]; | ||
| 142 | + } | ||
| 143 | + return _line; | ||
| 144 | + | ||
| 145 | +} | ||
| 146 | +@end |
CNLiveIntegralModule/Classes/View/CNLiveIntegralNavigationBar.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveIntegralNavigationBar.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by 153993236@qq.com on 11/12/2019. | ||
| 6 | +// Copyright © 2019 153993236@qq.com. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <UIKit/UIKit.h> | ||
| 10 | + | ||
| 11 | +NS_ASSUME_NONNULL_BEGIN | ||
| 12 | + | ||
| 13 | +@class CNLiveIntegralNavigationBar; | ||
| 14 | + | ||
| 15 | +@protocol CNLiveIntegralNavigationBarDelegate <NSObject> | ||
| 16 | +- (void)navigationBar:(CNLiveIntegralNavigationBar *)navigationBar actionEvents:(NSString *)actionEvents; | ||
| 17 | + | ||
| 18 | +@end | ||
| 19 | + | ||
| 20 | +@interface CNLiveIntegralNavigationBar : UIView | ||
| 21 | +@property (nonatomic, weak) id<CNLiveIntegralNavigationBarDelegate> delegate; | ||
| 22 | +@property (nonatomic, strong) UIView *navView; | ||
| 23 | +@property (nonatomic, strong) UIButton *left; | ||
| 24 | +@property (nonatomic, strong) UILabel *title; | ||
| 25 | +@property (nonatomic, strong, nullable) UIButton *right; | ||
| 26 | + | ||
| 27 | + | ||
| 28 | +@end | ||
| 29 | + | ||
| 30 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/View/CNLiveIntegralNavigationBar.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveIntegralNavigationBar.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by 153993236@qq.com on 11/12/2019. | ||
| 6 | +// Copyright © 2019 153993236@qq.com. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLiveIntegralNavigationBar.h" | ||
| 10 | +#import "QMUIKit.h" | ||
| 11 | + | ||
| 12 | +@interface CNLiveIntegralNavigationBar () | ||
| 13 | + | ||
| 14 | +@end | ||
| 15 | + | ||
| 16 | +@implementation CNLiveIntegralNavigationBar | ||
| 17 | +static const NSInteger margin = 15; | ||
| 18 | + | ||
| 19 | +- (instancetype)initWithFrame:(CGRect)frame{ | ||
| 20 | + self = [super initWithFrame:frame]; | ||
| 21 | + if(self){ | ||
| 22 | + self.userInteractionEnabled = YES; | ||
| 23 | + self.backgroundColor = [UIColor clearColor]; | ||
| 24 | + [self createSubViews]; | ||
| 25 | + } | ||
| 26 | + return self; | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +- (void)dealloc { | ||
| 30 | + NSLog(@"CNLiveIntegralNavigationBar -- dealloc"); | ||
| 31 | +} | ||
| 32 | + | ||
| 33 | +- (void)createSubViews { | ||
| 34 | + [self addSubview:self.navView]; | ||
| 35 | + [self addSubview:self.left]; | ||
| 36 | + [self addSubview:self.title]; | ||
| 37 | + [self addSubview:self.right]; | ||
| 38 | +} | ||
| 39 | + | ||
| 40 | +/* | ||
| 41 | + // Only override drawRect: if you perform custom drawing. | ||
| 42 | + // An empty implementation adversely affects performance during animation. | ||
| 43 | + - (void)drawRect:(CGRect)rect { | ||
| 44 | + // Drawing code | ||
| 45 | + } | ||
| 46 | + */ | ||
| 47 | + | ||
| 48 | +#pragma mark - 懒加载 | ||
| 49 | +- (UIView *)navView { | ||
| 50 | + if (!_navView) { | ||
| 51 | + _navView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, NavigationContentTop)]; | ||
| 52 | + _navView.backgroundColor = [UIColor clearColor]; | ||
| 53 | + } | ||
| 54 | + return _navView; | ||
| 55 | +} | ||
| 56 | + | ||
| 57 | +- (UIButton *)left { | ||
| 58 | + if (!_left) { | ||
| 59 | + _left= [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 60 | + _left.adjustsImageWhenHighlighted = NO; | ||
| 61 | + _left.frame = CGRectMake(margin, StatusBarHeight, NavigationBarHeight, NavigationBarHeight); | ||
| 62 | + UIImage *image = [self xw_getImageName:@"code_back_black_b" bundleName:@"CNLiveIntegralModule" targetClass:[self class]]; | ||
| 63 | + [_left setImage:[image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal]; | ||
| 64 | + [_left setContentHorizontalAlignment:UIControlContentHorizontalAlignmentLeft]; | ||
| 65 | + [_left addTarget:self action:@selector(goBack) forControlEvents:UIControlEventTouchUpInside]; | ||
| 66 | + } | ||
| 67 | + return _left; | ||
| 68 | +} | ||
| 69 | + | ||
| 70 | +- (UILabel *)title { | ||
| 71 | + if (!_title) { | ||
| 72 | + _title = [[UILabel alloc] initWithFrame:CGRectMake(margin+NavigationBarHeight, StatusBarHeight, SCREEN_WIDTH-2*(margin+NavigationBarHeight), NavigationBarHeight)]; | ||
| 73 | + [_title setFont:[UIFont systemFontOfSize:18]]; | ||
| 74 | + _title.textColor = [UIColor blackColor]; | ||
| 75 | + _title.textAlignment = NSTextAlignmentCenter; | ||
| 76 | + } | ||
| 77 | + return _title; | ||
| 78 | +} | ||
| 79 | + | ||
| 80 | +- (UIButton *)right { | ||
| 81 | + if (!_right) { | ||
| 82 | + _right = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 83 | + _right.frame = CGRectMake(SCREEN_WIDTH-50-margin, StatusBarHeight, 50, NavigationBarHeight); | ||
| 84 | + [_right setContentHorizontalAlignment:UIControlContentHorizontalAlignmentRight]; | ||
| 85 | + _right.adjustsImageWhenHighlighted = NO; | ||
| 86 | + _right.titleLabel.font = [UIFont systemFontOfSize:15]; | ||
| 87 | + [_right setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; | ||
| 88 | + [_right addTarget:self action:@selector(rightDidClicked:) forControlEvents:UIControlEventTouchUpInside]; | ||
| 89 | + } | ||
| 90 | + return _right; | ||
| 91 | +} | ||
| 92 | + | ||
| 93 | +#pragma mark - 响应方法 | ||
| 94 | +- (void)goBack{ | ||
| 95 | + if (self.delegate && [self.delegate respondsToSelector:@selector(navigationBar:actionEvents:)]) { | ||
| 96 | + [self.delegate navigationBar:self actionEvents:@"1"]; | ||
| 97 | + } | ||
| 98 | +} | ||
| 99 | + | ||
| 100 | +- (void)rightDidClicked:(UIButton *)btn{ | ||
| 101 | + if (self.delegate && [self.delegate respondsToSelector:@selector(navigationBar:actionEvents:)]) { | ||
| 102 | + [self.delegate navigationBar:self actionEvents:@"2"]; | ||
| 103 | + } | ||
| 104 | +} | ||
| 105 | + | ||
| 106 | +/** | ||
| 107 | + * 创建图片 | ||
| 108 | + * | ||
| 109 | + * @param imageName 图片名字 | ||
| 110 | + * @param bundleName 图片所在的bundle名字 | ||
| 111 | + * @param targetClass 类和bundle的同级目录 | ||
| 112 | + * @return 返回UIImage | ||
| 113 | + */ | ||
| 114 | +- (UIImage *)xw_getImageName:(NSString *)imageName bundleName:(NSString *)bundleName targetClass:(Class)targetClass{ | ||
| 115 | + NSBundle *bundle = [NSBundle bundleForClass:targetClass]; | ||
| 116 | + NSURL *url = [bundle URLForResource:bundleName withExtension:@"bundle"]; | ||
| 117 | + NSBundle *targetBundle = [NSBundle bundleWithURL:url]; | ||
| 118 | + UIImage *image = [UIImage imageNamed:imageName inBundle:targetBundle compatibleWithTraitCollection:nil]; | ||
| 119 | + return image?image:[UIImage imageNamed:imageName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil]; | ||
| 120 | + | ||
| 121 | +} | ||
| 122 | + | ||
| 123 | +@end | ||
| 124 | + |
CNLiveIntegralModule/Classes/View/CNRewardRulesView.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNRewardRulesView.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/3/1. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <UIKit/UIKit.h> | ||
| 10 | + | ||
| 11 | +NS_ASSUME_NONNULL_BEGIN | ||
| 12 | + | ||
| 13 | +@interface CNRewardRulesView : UIView | ||
| 14 | ++ (void)showRewardRulesView; | ||
| 15 | ++ (void)showRewardRulesView:(NSString *)url; | ||
| 16 | + | ||
| 17 | +@end | ||
| 18 | + | ||
| 19 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/View/CNRewardRulesView.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNRewardRulesView.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/3/1. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNRewardRulesView.h" | ||
| 10 | +#import <WebKit/WebKit.h> | ||
| 11 | +#import "QMUIKit.h" | ||
| 12 | +#import "YYKit.h" | ||
| 13 | +#import <Masonry/Masonry.h> | ||
| 14 | + | ||
| 15 | +#import "CNGoldWhereaboutsView.h" | ||
| 16 | + | ||
| 17 | +@interface CNRewardRulesView()<WKNavigationDelegate,WKUIDelegate> | ||
| 18 | +@property (nonatomic, strong) UIImageView *bgView; | ||
| 19 | +@property (nonatomic, strong) UIButton *closeBtn; | ||
| 20 | +@property (nonatomic, strong) WKWebView *webView; | ||
| 21 | + | ||
| 22 | +@end | ||
| 23 | + | ||
| 24 | +@implementation CNRewardRulesView | ||
| 25 | +static const NSInteger margin = 0; | ||
| 26 | +#pragma mark - Using Method | ||
| 27 | ++ (void)showRewardRulesView:(NSString *)url{ | ||
| 28 | + CNRewardRulesView *view = [[CNRewardRulesView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]; | ||
| 29 | + view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; | ||
| 30 | + [view.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]]; | ||
| 31 | + [[UIApplication sharedApplication].keyWindow addSubview:view]; | ||
| 32 | + | ||
| 33 | +} | ||
| 34 | ++ (void)showRewardRulesView{ | ||
| 35 | + CNRewardRulesView *view = [[CNRewardRulesView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]; | ||
| 36 | + view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; | ||
| 37 | + [[UIApplication sharedApplication].keyWindow addSubview:view]; | ||
| 38 | + | ||
| 39 | +} | ||
| 40 | +#pragma mark - Init | ||
| 41 | +- (instancetype)initWithFrame:(CGRect)frame { | ||
| 42 | + self = [super initWithFrame:frame]; | ||
| 43 | + if (self) { | ||
| 44 | + [self setup]; | ||
| 45 | + } | ||
| 46 | + return self; | ||
| 47 | +} | ||
| 48 | +#pragma mark - UI | ||
| 49 | +- (void)setup { | ||
| 50 | + [self addSubview:self.bgView]; | ||
| 51 | + [self.bgView addSubview:self.closeBtn]; | ||
| 52 | + [self.bgView addSubview:self.webView]; | ||
| 53 | + [self addAnimation]; | ||
| 54 | + | ||
| 55 | +} | ||
| 56 | +- (void)layoutSubviews{ | ||
| 57 | + [super layoutSubviews]; | ||
| 58 | + [_bgView mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 59 | + make.centerX.equalTo(self.mas_centerX).with.offset(0); | ||
| 60 | + make.centerY.equalTo(self.mas_centerY).with.offset(0); | ||
| 61 | + make.width.offset(320*(SCREEN_WIDTH/375.0)); | ||
| 62 | + make.height.offset(320*(SCREEN_WIDTH/375.0)*454/320.0); | ||
| 63 | + | ||
| 64 | + }]; | ||
| 65 | + | ||
| 66 | + [_closeBtn mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 67 | + make.centerX.equalTo(_bgView.mas_centerX).with.offset(0); | ||
| 68 | + make.bottom.equalTo(_bgView.mas_bottom).with.offset(-0); | ||
| 69 | + make.width.offset(100*(SCREEN_WIDTH/375.0)); | ||
| 70 | + make.height.offset(56*(SCREEN_WIDTH/375.0)); | ||
| 71 | + | ||
| 72 | + }]; | ||
| 73 | + | ||
| 74 | + [_webView mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 75 | + make.top.equalTo(_bgView.mas_top).with.offset(margin); | ||
| 76 | + make.left.equalTo(_bgView.mas_left).with.offset(margin); | ||
| 77 | + make.right.equalTo(_bgView.mas_right).with.offset(-margin); | ||
| 78 | + make.bottom.equalTo(_closeBtn.mas_top).with.offset(margin); | ||
| 79 | + | ||
| 80 | + }]; | ||
| 81 | + | ||
| 82 | +} | ||
| 83 | +#pragma mark - Data | ||
| 84 | +#pragma mark - Private Methods | ||
| 85 | +- (void)addAnimation{ | ||
| 86 | + _bgView.transform = CGAffineTransformMake(0.01, 0, 0, 0.01, _bgView.left, _bgView.top); | ||
| 87 | + [UIView animateWithDuration:0.3f animations:^{ | ||
| 88 | + _bgView.transform = CGAffineTransformMake(1.05f, 0, 0, 1.0f, 0, 0); | ||
| 89 | + | ||
| 90 | + } completion:^(BOOL finished) { | ||
| 91 | + [UIView animateWithDuration:0.1f animations:^{ | ||
| 92 | + _bgView.transform = CGAffineTransformMake(1, 0, 0, 1, 0, 0); | ||
| 93 | + | ||
| 94 | + } completion:^(BOOL finished) { | ||
| 95 | + // 恢复原位 | ||
| 96 | + _bgView.transform = CGAffineTransformIdentity; | ||
| 97 | + | ||
| 98 | + }]; | ||
| 99 | + | ||
| 100 | + }]; | ||
| 101 | + | ||
| 102 | +} | ||
| 103 | +- (void)hiddenAction{ | ||
| 104 | + _bgView.layer.transform = CATransform3DMakeScale(1, 1, 1); | ||
| 105 | + | ||
| 106 | + [UIView animateWithDuration:0.3f animations:^{ | ||
| 107 | + // 按照比例scalex=0.001,y=0.001进行缩小 | ||
| 108 | + _bgView.layer.transform = CATransform3DMakeScale(0.001, 0.001, 1); | ||
| 109 | + | ||
| 110 | + } completion:^(BOOL finished) { | ||
| 111 | + [self removeFromSuperview]; | ||
| 112 | + | ||
| 113 | + }]; | ||
| 114 | + | ||
| 115 | + for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) { | ||
| 116 | + if([view isKindOfClass:[CNGoldWhereaboutsView class]]){ | ||
| 117 | + [view removeFromSuperview]; | ||
| 118 | + | ||
| 119 | + } | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | +} | ||
| 123 | + | ||
| 124 | +/* | ||
| 125 | + // Only override drawRect: if you perform custom drawing. | ||
| 126 | + // An empty implementation adversely affects performance during animation. | ||
| 127 | + - (void)drawRect:(CGRect)rect { | ||
| 128 | + // Drawing code | ||
| 129 | + } | ||
| 130 | + */ | ||
| 131 | +#pragma mark - Action | ||
| 132 | +- (void)clickCloseBtn:(UIButton *)btn{ | ||
| 133 | + [self hiddenAction]; | ||
| 134 | + | ||
| 135 | +} | ||
| 136 | + | ||
| 137 | +#pragma mark - Lazy loading | ||
| 138 | +- (UIImageView *)bgView{ | ||
| 139 | + if (!_bgView) { | ||
| 140 | + _bgView = [[UIImageView alloc] init]; | ||
| 141 | + _bgView.userInteractionEnabled = YES; | ||
| 142 | + _bgView.backgroundColor = [UIColor whiteColor]; | ||
| 143 | + _bgView.layer.cornerRadius = 25*(SCREEN_WIDTH/375.0); | ||
| 144 | + _bgView.layer.masksToBounds = YES; | ||
| 145 | + | ||
| 146 | + } | ||
| 147 | + return _bgView; | ||
| 148 | +} | ||
| 149 | +- (WKWebView *)webView { | ||
| 150 | + if (_webView == nil) { | ||
| 151 | + WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc]init]; | ||
| 152 | + config.preferences = [WKPreferences new]; | ||
| 153 | + config.preferences.javaScriptEnabled = YES; | ||
| 154 | + config.preferences.minimumFontSize = 15; | ||
| 155 | + config.preferences.javaScriptCanOpenWindowsAutomatically = YES; | ||
| 156 | + config.userContentController = [[WKUserContentController alloc]init]; | ||
| 157 | + _webView = [[WKWebView alloc] initWithFrame:CGRectZero configuration:config]; | ||
| 158 | + _webView.navigationDelegate = self; | ||
| 159 | + _webView.UIDelegate = self; | ||
| 160 | + _webView.scrollView.bounces = NO; | ||
| 161 | + _webView.scrollView.exclusiveTouch = NO; | ||
| 162 | + _webView.scrollView.showsVerticalScrollIndicator = NO; | ||
| 163 | + _webView.scrollView.showsHorizontalScrollIndicator = NO; | ||
| 164 | + _webView.layer.cornerRadius = 25*(SCREEN_WIDTH/375.0); | ||
| 165 | + _webView.layer.masksToBounds = YES; | ||
| 166 | + | ||
| 167 | + } | ||
| 168 | + return _webView; | ||
| 169 | +} | ||
| 170 | +- (UIButton *)closeBtn{ | ||
| 171 | + if(_closeBtn == nil){ | ||
| 172 | + _closeBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 173 | + _closeBtn.titleLabel.font = UIFontMake(15); | ||
| 174 | + [_closeBtn addTarget:self action:@selector(clickCloseBtn:) forControlEvents:UIControlEventTouchUpInside]; | ||
| 175 | + [_closeBtn setTitle:@"我知道了" forState:UIControlStateNormal]; | ||
| 176 | + [_closeBtn setTitleColor:[UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0] forState:UIControlStateNormal]; | ||
| 177 | + _closeBtn.adjustsImageWhenHighlighted = NO; | ||
| 178 | + | ||
| 179 | + } | ||
| 180 | + return _closeBtn; | ||
| 181 | + | ||
| 182 | +} | ||
| 183 | + | ||
| 184 | +@end |
CNLiveIntegralModule/Classes/View/CNSignInButtonSelectView.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNSignInButtonSelectView.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/3/1. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <UIKit/UIKit.h> | ||
| 10 | + | ||
| 11 | +NS_ASSUME_NONNULL_BEGIN | ||
| 12 | + | ||
| 13 | +@interface CNSignInButtonSelectView : UIView | ||
| 14 | + | ||
| 15 | +@end | ||
| 16 | + | ||
| 17 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/View/CNSignInButtonSelectView.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNSignInButtonSelectView.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/3/1. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNSignInButtonSelectView.h" | ||
| 10 | +@interface CNSignInButtonSelectView() | ||
| 11 | +@property (nonatomic, strong) UIImageView *selectView; | ||
| 12 | + | ||
| 13 | +@end | ||
| 14 | +@implementation CNSignInButtonSelectView | ||
| 15 | +#pragma mark - Init | ||
| 16 | +- (instancetype)initWithFrame:(CGRect)frame { | ||
| 17 | + self = [super initWithFrame:frame]; | ||
| 18 | + if (self) { | ||
| 19 | + self.userInteractionEnabled = YES; | ||
| 20 | + self.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.6]; | ||
| 21 | + [self setup]; | ||
| 22 | + } | ||
| 23 | + return self; | ||
| 24 | +} | ||
| 25 | +#pragma mark - UI | ||
| 26 | +- (void)setup { | ||
| 27 | + [self addSubview:self.selectView]; | ||
| 28 | +} | ||
| 29 | +/* | ||
| 30 | +// Only override drawRect: if you perform custom drawing. | ||
| 31 | +// An empty implementation adversely affects performance during animation. | ||
| 32 | +- (void)drawRect:(CGRect)rect { | ||
| 33 | + // Drawing code | ||
| 34 | +} | ||
| 35 | +*/ | ||
| 36 | +#pragma mark - Lazy loading | ||
| 37 | +- (UIImageView *)selectView{ | ||
| 38 | + if (!_selectView) { | ||
| 39 | + _selectView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 27, 27)]; | ||
| 40 | + _selectView.center = self.center; | ||
| 41 | + _selectView.userInteractionEnabled = YES; | ||
| 42 | + UIImage *image = [self xw_getImageName:@"sign_day_select" bundleName:@"CNLiveIntegralModule" targetClass:[self class]]; | ||
| 43 | + _selectView.image = image; | ||
| 44 | + } | ||
| 45 | + return _selectView; | ||
| 46 | +} | ||
| 47 | + | ||
| 48 | +/** | ||
| 49 | + * 创建图片 | ||
| 50 | + * | ||
| 51 | + * @param imageName 图片名字 | ||
| 52 | + * @param bundleName 图片所在的bundle名字 | ||
| 53 | + * @param targetClass 类和bundle的同级目录 | ||
| 54 | + * @return 返回UIImage | ||
| 55 | + */ | ||
| 56 | +- (UIImage *)xw_getImageName:(NSString *)imageName bundleName:(NSString *)bundleName targetClass:(Class)targetClass{ | ||
| 57 | + NSBundle *bundle = [NSBundle bundleForClass:targetClass]; | ||
| 58 | + NSURL *url = [bundle URLForResource:bundleName withExtension:@"bundle"]; | ||
| 59 | + NSBundle *targetBundle = [NSBundle bundleWithURL:url]; | ||
| 60 | + UIImage *image = [UIImage imageNamed:imageName inBundle:targetBundle compatibleWithTraitCollection:nil]; | ||
| 61 | + return image?image:[UIImage imageNamed:imageName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil]; | ||
| 62 | +} | ||
| 63 | + | ||
| 64 | +@end |
CNLiveIntegralModule/Classes/View/CNSignInButtonView.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNSignInButtonView.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/3/1. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <UIKit/UIKit.h> | ||
| 10 | + | ||
| 11 | +NS_ASSUME_NONNULL_BEGIN | ||
| 12 | +@class CNSignInButtonView; | ||
| 13 | +@protocol CNSignInButtonViewDelegate <NSObject> | ||
| 14 | +- (void)clickedSignInButton:(CNSignInButtonView *)view day:(NSString *)day; | ||
| 15 | + | ||
| 16 | +@end | ||
| 17 | +@interface CNSignInButtonView : UIView | ||
| 18 | + | ||
| 19 | +@property (nonatomic, assign) NSInteger day; | ||
| 20 | +@property (nonatomic, copy) NSString *scores; | ||
| 21 | +@property (nonatomic, weak) id<CNSignInButtonViewDelegate> delegate; | ||
| 22 | + | ||
| 23 | +- (instancetype)initWithFrame:(CGRect)frame; | ||
| 24 | + | ||
| 25 | +@end | ||
| 26 | + | ||
| 27 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/View/CNSignInButtonView.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNSignInButtonView.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/3/1. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNSignInButtonView.h" | ||
| 10 | + | ||
| 11 | +#import "QMUIKit.h" | ||
| 12 | +#import "YYKit.h" | ||
| 13 | + | ||
| 14 | +#import "CNSignInButtonSelectView.h" | ||
| 15 | + | ||
| 16 | +@interface CNSignInButtonView() | ||
| 17 | +@property (nonatomic, strong) NSMutableArray *btnsArr; | ||
| 18 | + | ||
| 19 | +@end | ||
| 20 | +@implementation CNSignInButtonView | ||
| 21 | +static const NSInteger margin = 6; | ||
| 22 | +#pragma mark - Init | ||
| 23 | +- (instancetype)initWithFrame:(CGRect)frame { | ||
| 24 | + self = [super initWithFrame:frame]; | ||
| 25 | + if (self) { | ||
| 26 | + [self setup]; | ||
| 27 | + } | ||
| 28 | + return self; | ||
| 29 | +} | ||
| 30 | + | ||
| 31 | +#pragma mark - UI | ||
| 32 | +- (void)setup { | ||
| 33 | + CGFloat width = 70*(SCREEN_WIDTH/375.0); | ||
| 34 | + CGFloat height = 80*(SCREEN_WIDTH/375.0); | ||
| 35 | + | ||
| 36 | + for(int i = 0; i < 7; i++){ | ||
| 37 | + UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 38 | + btn.frame = CGRectMake(i<4?i*(width+margin):(i-4)*(width+margin), i<4?0:(margin+height), width, height); | ||
| 39 | + | ||
| 40 | + [btn addTarget:self action:@selector(clickBtn:) forControlEvents:UIControlEventTouchUpInside]; | ||
| 41 | + [btn setImage:[UIImage imageNamed:@"sign_day_bg"] forState:UIControlStateNormal]; | ||
| 42 | + btn.adjustsImageWhenHighlighted = NO; | ||
| 43 | + btn.userInteractionEnabled = NO; | ||
| 44 | + [self.btnsArr addObject:btn]; | ||
| 45 | + [self addSubview:btn]; | ||
| 46 | + | ||
| 47 | + if(i == 6){ | ||
| 48 | + btn.width = 2*width+margin; | ||
| 49 | + [btn setImage:[UIImage imageNamed:@"sign_day_bg7"] forState:UIControlStateNormal]; | ||
| 50 | + | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + CNSignInButtonSelectView *view = [[CNSignInButtonSelectView alloc]initWithFrame:btn.bounds]; | ||
| 54 | + view.hidden = !btn.selected; | ||
| 55 | + [btn addSubview:view]; | ||
| 56 | + | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | +} | ||
| 60 | + | ||
| 61 | +#pragma mark - Setter | ||
| 62 | +- (void)setScores:(NSString *)scores{ | ||
| 63 | + _scores = scores; | ||
| 64 | + NSArray *arr = scores?[scores componentsSeparatedByString:@","]:@[@"1000",@"2000",@"3000",@"4000",@"5000",@"6000",@"7000"]; | ||
| 65 | + arr = arr.count == 7?arr:@[@"1000",@"2000",@"3000",@"4000",@"5000",@"6000",@"7000"]; | ||
| 66 | + | ||
| 67 | + CGFloat width = 70*(SCREEN_WIDTH/375.0); | ||
| 68 | + CGFloat height = 80*(SCREEN_WIDTH/375.0); | ||
| 69 | + | ||
| 70 | + for(int i = 0; i < self.btnsArr.count; i++){ | ||
| 71 | + UIButton *btn = self.btnsArr[i]; | ||
| 72 | + CGFloat day_height = 30*(SCREEN_WIDTH/375.0); | ||
| 73 | + CGFloat score_height = 25*(SCREEN_WIDTH/375.0); | ||
| 74 | + | ||
| 75 | + UILabel *day = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, width, day_height)]; | ||
| 76 | + day.textColor = [UIColor whiteColor]; | ||
| 77 | + day.font = [UIFont fontWithName:@"PingFangSC-Medium" size:12]; | ||
| 78 | + day.textAlignment = NSTextAlignmentCenter; | ||
| 79 | + day.text = [NSString stringWithFormat:@"第%d天",i+1]; | ||
| 80 | + [btn addSubview:day]; | ||
| 81 | + | ||
| 82 | + UILabel *score = [[UILabel alloc] initWithFrame:CGRectMake(0, height-score_height, width, score_height)]; | ||
| 83 | + score.textColor = [UIColor whiteColor]; | ||
| 84 | + score.font = [UIFont fontWithName:@"PingFangSC-Medium" size:11]; | ||
| 85 | + score.textAlignment = NSTextAlignmentCenter; | ||
| 86 | + score.text = [NSString stringWithFormat:@"+%@",arr[i]]; | ||
| 87 | + [btn addSubview:score]; | ||
| 88 | + | ||
| 89 | + if(i == 6){ | ||
| 90 | + day.frame = CGRectMake(2*margin, 0, width, day_height); | ||
| 91 | + day.textAlignment = NSTextAlignmentLeft; | ||
| 92 | + | ||
| 93 | + score.frame = CGRectMake(2*margin, height-score_height, width, score_height); | ||
| 94 | + score.textAlignment = NSTextAlignmentLeft; | ||
| 95 | + | ||
| 96 | + } | ||
| 97 | + } | ||
| 98 | +} | ||
| 99 | + | ||
| 100 | +- (void)setDay:(NSInteger)day{ | ||
| 101 | + _day = day; | ||
| 102 | + for(int i = 0; i < self.btnsArr.count; i++){ | ||
| 103 | + if(i >= day) break; | ||
| 104 | + UIButton *btn = self.btnsArr[i]; | ||
| 105 | + for (UIView *view in btn.subviews) { | ||
| 106 | + if([view isKindOfClass:[CNSignInButtonSelectView class]]){ | ||
| 107 | + view.hidden = NO; | ||
| 108 | + btn.userInteractionEnabled = NO; | ||
| 109 | + } | ||
| 110 | + } | ||
| 111 | + } | ||
| 112 | +} | ||
| 113 | + | ||
| 114 | +/* | ||
| 115 | + // Only override drawRect: if you perform custom drawing. | ||
| 116 | + // An empty implementation adversely affects performance during animation. | ||
| 117 | + - (void)drawRect:(CGRect)rect { | ||
| 118 | + // Drawing code | ||
| 119 | + } | ||
| 120 | + */ | ||
| 121 | +#pragma mark - Action | ||
| 122 | +- (void)clickBtn:(UIButton *)btn{ | ||
| 123 | +// btn.selected = !btn.selected; | ||
| 124 | + for (UIView *view in btn.subviews) { | ||
| 125 | + if([view isKindOfClass:[CNSignInButtonSelectView class]]){ | ||
| 126 | + view.hidden = NO; | ||
| 127 | + btn.userInteractionEnabled = NO; | ||
| 128 | + } | ||
| 129 | + } | ||
| 130 | + if (self.delegate && [self.delegate respondsToSelector:@selector(clickedSignInButton:day:)]) { | ||
| 131 | + [self.delegate clickedSignInButton:self day:@"1"]; | ||
| 132 | + | ||
| 133 | + } | ||
| 134 | + | ||
| 135 | +} | ||
| 136 | +#pragma mark - Lazy loading | ||
| 137 | +- (NSMutableArray *)btnsArr{ | ||
| 138 | + if (!_btnsArr) { | ||
| 139 | + _btnsArr = [[NSMutableArray alloc] init]; | ||
| 140 | + | ||
| 141 | + } | ||
| 142 | + return _btnsArr; | ||
| 143 | +} | ||
| 144 | + | ||
| 145 | +@end |
CNLiveIntegralModule/Classes/View/CNSignInView.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNSignInView.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/3/1. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <UIKit/UIKit.h> | ||
| 10 | + | ||
| 11 | +NS_ASSUME_NONNULL_BEGIN | ||
| 12 | +@class CNSignInView; | ||
| 13 | +@protocol CNSignInViewDelegate <NSObject> | ||
| 14 | +- (void)clickedrRulesButton:(CNSignInView *)view; | ||
| 15 | + | ||
| 16 | +@end | ||
| 17 | +@interface CNSignInView : UIView | ||
| 18 | +@property (nonatomic, weak) id<CNSignInViewDelegate> delegate; | ||
| 19 | +@property (nonatomic, copy) NSString *url; | ||
| 20 | + | ||
| 21 | +//+ (void)showSignInView:(NSString *)score; | ||
| 22 | +//+ (void)showSignInViewDelegate:(id<CNSignInViewDelegate>)delegate; | ||
| 23 | +//+ (void)showSignInView:(NSString *)score delegate:(id<CNSignInViewDelegate>)delegate; | ||
| 24 | +//+ (void)showSignInView:(NSString *)score day:(NSInteger)day delegate:(id<CNSignInViewDelegate>)delegate; | ||
| 25 | +//+ (void)showSignInView:(NSString *)score day:(NSInteger)day url:(NSString *)url delegate:(id<CNSignInViewDelegate>)delegate; | ||
| 26 | +/** | ||
| 27 | + * 显示签到视图 | ||
| 28 | + * | ||
| 29 | + * @param score 1000 | ||
| 30 | + * @param scores "1000,2000,3000,4000,5000,6000,7000" | ||
| 31 | + * @param day 第几天 | ||
| 32 | + * @param url 签到规则url | ||
| 33 | + * @param delegate 代理 | ||
| 34 | + * | ||
| 35 | + */ | ||
| 36 | ++ (void)showSignInView:(NSString *)score scores:(NSString *)scores day:(NSInteger)day url:(NSString *)url delegate:(id<CNSignInViewDelegate>)delegate; | ||
| 37 | + | ||
| 38 | +@end | ||
| 39 | + | ||
| 40 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/View/CNSignInView.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNSignInView.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/3/1. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNSignInView.h" | ||
| 10 | +#import "QMUIKit.h" | ||
| 11 | +#import "YYKit.h" | ||
| 12 | +#import <Masonry/Masonry.h> | ||
| 13 | +#import <SDWebImage/SDWebImage.h> | ||
| 14 | + | ||
| 15 | +#import "CNSignInButtonView.h" | ||
| 16 | +#import "CNGoldWhereaboutsView.h" | ||
| 17 | + | ||
| 18 | +@interface CNSignInView() | ||
| 19 | +@property (nonatomic, strong) UIImageView *bgView; | ||
| 20 | +@property (nonatomic, strong) QMUIButton *scoreBtn; | ||
| 21 | +@property (nonatomic, strong) UIButton *rulesBtn; | ||
| 22 | +@property (nonatomic, strong) CNSignInButtonView *signInButtonView; | ||
| 23 | +@property (nonatomic, strong) UIButton *closeBtn; | ||
| 24 | + | ||
| 25 | +@property (nonatomic, copy) NSString *score; | ||
| 26 | +@property (nonatomic, copy) NSString *scores; | ||
| 27 | +@property (nonatomic, assign) NSInteger day; | ||
| 28 | + | ||
| 29 | +@end | ||
| 30 | + | ||
| 31 | +@implementation CNSignInView | ||
| 32 | +static const NSInteger margin = 15; | ||
| 33 | ++ (void)showSignInView:(NSString *)score scores:(NSString *)scores day:(NSInteger)day url:(NSString *)url delegate:(id<CNSignInViewDelegate>)delegate{ | ||
| 34 | + CNSignInView *view = [[CNSignInView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]; | ||
| 35 | + view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; | ||
| 36 | + view.score = score; | ||
| 37 | + view.scores = scores; | ||
| 38 | + view.day = day; | ||
| 39 | + view.url = url; | ||
| 40 | + view.delegate = delegate; | ||
| 41 | + [[UIApplication sharedApplication].keyWindow addSubview:view]; | ||
| 42 | +} | ||
| 43 | +//+ (void)showSignInView:(NSString *)score day:(NSInteger)day url:(NSString *)url delegate:(id<CNSignInViewDelegate>)delegate{ | ||
| 44 | +// CNSignInView *view = [[CNSignInView alloc]initWithFrame:CGRectMake(0, 0,SCREEN_WIDTH, SCREEN_HEIGHT)]; | ||
| 45 | +// view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; | ||
| 46 | +// view.score = score; | ||
| 47 | +// view.day = day; | ||
| 48 | +// view.url = url; | ||
| 49 | +// view.delegate = delegate; | ||
| 50 | +// [[UIApplication sharedApplication].keyWindow addSubview:view]; | ||
| 51 | +//} | ||
| 52 | +// | ||
| 53 | +//+ (void)showSignInView:(NSString *)score day:(NSInteger)day delegate:(id<CNSignInViewDelegate>)delegate{ | ||
| 54 | +// CNSignInView *view = [[CNSignInView alloc]initWithFrame:CGRectMake(0, 0,SCREEN_WIDTH, SCREEN_HEIGHT)]; | ||
| 55 | +// view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; | ||
| 56 | +// view.score = score; | ||
| 57 | +// view.day = day; | ||
| 58 | +// view.delegate = delegate; | ||
| 59 | +// [[UIApplication sharedApplication].keyWindow addSubview:view]; | ||
| 60 | +// | ||
| 61 | +//} | ||
| 62 | +// | ||
| 63 | +//+ (void)showSignInView:(NSString *)score delegate:(id<CNSignInViewDelegate>)delegate{ | ||
| 64 | +// CNSignInView *view = [[CNSignInView alloc]initWithFrame:CGRectMake(0, 0,SCREEN_WIDTH, SCREEN_HEIGHT)]; | ||
| 65 | +// view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; | ||
| 66 | +// view.score = score; | ||
| 67 | +// view.delegate = delegate; | ||
| 68 | +// [[UIApplication sharedApplication].keyWindow addSubview:view]; | ||
| 69 | +// | ||
| 70 | +//} | ||
| 71 | +// | ||
| 72 | +//+ (void)showSignInViewDelegate:(id<CNSignInViewDelegate>)delegate{ | ||
| 73 | +// CNSignInView *view = [[CNSignInView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]; | ||
| 74 | +// view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; | ||
| 75 | +// view.delegate = delegate; | ||
| 76 | +// [[UIApplication sharedApplication].keyWindow addSubview:view]; | ||
| 77 | +// | ||
| 78 | +//} | ||
| 79 | +// | ||
| 80 | +//+ (void)showSignInView:(NSString *)score{ | ||
| 81 | +// CNSignInView *view = [[CNSignInView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]; | ||
| 82 | +// view.backgroundColor = [UIColor colorWithWhite:0.2f alpha:0.4f]; | ||
| 83 | +// view.score = score; | ||
| 84 | +// [[UIApplication sharedApplication].keyWindow addSubview:view]; | ||
| 85 | +// | ||
| 86 | +//} | ||
| 87 | +#pragma mark - Init | ||
| 88 | +- (instancetype)initWithFrame:(CGRect)frame { | ||
| 89 | + self = [super initWithFrame:frame]; | ||
| 90 | + if (self) { | ||
| 91 | + [self setup]; | ||
| 92 | + [self xw_layoutSubviews]; | ||
| 93 | + [self addAnimation]; | ||
| 94 | + | ||
| 95 | + } | ||
| 96 | + return self; | ||
| 97 | +} | ||
| 98 | + | ||
| 99 | +#pragma mark - UI | ||
| 100 | +- (void)setup { | ||
| 101 | + [self addSubview:self.bgView]; | ||
| 102 | + [self.bgView addSubview:self.scoreBtn]; | ||
| 103 | + [self.bgView addSubview:self.signInButtonView]; | ||
| 104 | + [self.bgView addSubview:self.rulesBtn]; | ||
| 105 | + [self addSubview:self.closeBtn]; | ||
| 106 | + | ||
| 107 | +} | ||
| 108 | +- (void)xw_layoutSubviews{ | ||
| 109 | + [_bgView mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 110 | + make.centerX.equalTo(self.mas_centerX).with.offset(0); | ||
| 111 | + make.centerY.equalTo(self.mas_centerY).with.offset(-20*(SCREEN_WIDTH/375.0)); | ||
| 112 | + make.width.offset(335*(SCREEN_WIDTH/375.0)); | ||
| 113 | + make.height.offset(335*(SCREEN_WIDTH/375.0)*370/335.0); | ||
| 114 | + | ||
| 115 | + }]; | ||
| 116 | + | ||
| 117 | + [_scoreBtn mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 118 | + make.centerX.equalTo(_bgView.mas_centerX).with.offset(0); | ||
| 119 | + make.top.equalTo(_bgView.mas_top).with.offset(45*(SCREEN_WIDTH/375.0)); | ||
| 120 | + make.width.offset(120*(SCREEN_WIDTH/375.0)); | ||
| 121 | + make.height.offset(40*(SCREEN_WIDTH/375.0)); | ||
| 122 | + | ||
| 123 | + }]; | ||
| 124 | + | ||
| 125 | + [_signInButtonView mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 126 | + make.centerX.equalTo(_bgView.mas_centerX).with.offset(0); | ||
| 127 | + make.top.equalTo(_scoreBtn.mas_bottom).with.offset(65*(SCREEN_WIDTH/375.0)); | ||
| 128 | + make.width.offset(280*(SCREEN_WIDTH/375.0)+18); | ||
| 129 | + make.height.offset(160*(SCREEN_WIDTH/375.0)+5); | ||
| 130 | + | ||
| 131 | + }]; | ||
| 132 | + | ||
| 133 | + [_rulesBtn mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 134 | + make.centerX.equalTo(_bgView.mas_centerX).with.offset(0); | ||
| 135 | + make.top.equalTo(_signInButtonView.mas_bottom).with.offset(0); | ||
| 136 | + make.bottom.equalTo(_bgView.mas_bottom).with.offset(-0); | ||
| 137 | + make.width.offset(100*(SCREEN_WIDTH/375.0)); | ||
| 138 | + | ||
| 139 | + }]; | ||
| 140 | + | ||
| 141 | + [_closeBtn mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 142 | + make.centerX.equalTo(_bgView.mas_centerX).with.offset(0); | ||
| 143 | + make.top.equalTo(_bgView.mas_bottom).with.offset(margin*(SCREEN_WIDTH/375.0)); | ||
| 144 | + make.width.offset(35*(SCREEN_WIDTH/375.0)); | ||
| 145 | + make.height.offset(35*(SCREEN_WIDTH/375.0)); | ||
| 146 | + | ||
| 147 | + }]; | ||
| 148 | + | ||
| 149 | +} | ||
| 150 | + | ||
| 151 | +#pragma mark - Private Methods | ||
| 152 | +- (void)addAnimation{ | ||
| 153 | + _bgView.transform = CGAffineTransformMake(0.01, 0, 0, 0.01, _bgView.left, _bgView.top); | ||
| 154 | + _closeBtn.transform = CGAffineTransformMake(0.01, 0, 0, 0.01, _closeBtn.left, _closeBtn.top); | ||
| 155 | + | ||
| 156 | + [UIView animateWithDuration:0.3f animations:^{ | ||
| 157 | + _bgView.transform = CGAffineTransformMake(1.05f, 0, 0, 1.0f, 0, 0); | ||
| 158 | + _closeBtn.transform = CGAffineTransformMake(1.05f, 0, 0, 1.0f, 0, 0); | ||
| 159 | + | ||
| 160 | + } completion:^(BOOL finished) { | ||
| 161 | + [UIView animateWithDuration:0.1f animations:^{ | ||
| 162 | + _bgView.transform = CGAffineTransformMake(1, 0, 0, 1, 0, 0); | ||
| 163 | + _closeBtn.transform = CGAffineTransformMake(1, 0, 0, 1, 0, 0); | ||
| 164 | + | ||
| 165 | + } completion:^(BOOL finished) { | ||
| 166 | + // 恢复原位 | ||
| 167 | + _bgView.transform = CGAffineTransformIdentity; | ||
| 168 | + _closeBtn.transform = CGAffineTransformIdentity; | ||
| 169 | + | ||
| 170 | + }]; | ||
| 171 | + | ||
| 172 | + }]; | ||
| 173 | + | ||
| 174 | +} | ||
| 175 | +- (void)hiddenAction{ | ||
| 176 | + _bgView.layer.transform = CATransform3DMakeScale(1, 1, 1); | ||
| 177 | + _closeBtn.layer.transform = CATransform3DMakeScale(1, 1, 1); | ||
| 178 | + | ||
| 179 | + [UIView animateWithDuration:0.3f animations:^{ | ||
| 180 | + // 按照比例scalex=0.001,y=0.001进行缩小 | ||
| 181 | + _bgView.layer.transform = CATransform3DMakeScale(0.001, 0.001, 1); | ||
| 182 | + _closeBtn.layer.transform = CATransform3DMakeScale(0.001, 0.001, 1); | ||
| 183 | + | ||
| 184 | + } completion:^(BOOL finished) { | ||
| 185 | + [self removeFromSuperview]; | ||
| 186 | + | ||
| 187 | + }]; | ||
| 188 | + for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) { | ||
| 189 | + if([view isKindOfClass:[CNGoldWhereaboutsView class]]){ | ||
| 190 | + [view removeFromSuperview]; | ||
| 191 | + | ||
| 192 | + } | ||
| 193 | + } | ||
| 194 | +} | ||
| 195 | + | ||
| 196 | +#pragma mark - Data | ||
| 197 | +- (void)setUrl:(NSString *)url{ | ||
| 198 | + _url = url; | ||
| 199 | + | ||
| 200 | +} | ||
| 201 | +- (void)setScore:(NSString *)score{ | ||
| 202 | + _score = score; | ||
| 203 | + [_scoreBtn setTitle:[NSString stringWithFormat:@"+%@",score] forState:UIControlStateNormal]; | ||
| 204 | + | ||
| 205 | +} | ||
| 206 | +- (void)setDay:(NSInteger)day{ | ||
| 207 | + _day = day; | ||
| 208 | + _signInButtonView.day = day; | ||
| 209 | +} | ||
| 210 | +- (void)setScores:(NSString *)scores{ | ||
| 211 | + _scores = scores; | ||
| 212 | + _signInButtonView.scores = scores; | ||
| 213 | + | ||
| 214 | +} | ||
| 215 | + | ||
| 216 | +/* | ||
| 217 | + // Only override drawRect: if you perform custom drawing. | ||
| 218 | + // An empty implementation adversely affects performance during animation. | ||
| 219 | + - (void)drawRect:(CGRect)rect { | ||
| 220 | + // Drawing code | ||
| 221 | + } | ||
| 222 | + */ | ||
| 223 | + | ||
| 224 | +#pragma mark - Action | ||
| 225 | +- (void)clickRulesBtn:(UIButton *)btn{ | ||
| 226 | + if (self.delegate && [self.delegate respondsToSelector:@selector(clickedrRulesButton:)]) { | ||
| 227 | + [self.delegate clickedrRulesButton:self]; | ||
| 228 | + [self removeFromSuperview]; | ||
| 229 | + | ||
| 230 | + } | ||
| 231 | + | ||
| 232 | +} | ||
| 233 | +- (void)clickCloseBtn:(UIButton *)btn{ | ||
| 234 | + [self hiddenAction]; | ||
| 235 | + | ||
| 236 | +} | ||
| 237 | +#pragma mark - Lazy loading | ||
| 238 | +- (UIImageView *)bgView{ | ||
| 239 | + if (!_bgView) { | ||
| 240 | + _bgView = [[UIImageView alloc] init]; | ||
| 241 | + _bgView.userInteractionEnabled = YES; | ||
| 242 | + _bgView.image = [UIImage imageNamed:@"sign_allday_bg"]; | ||
| 243 | + } | ||
| 244 | + return _bgView; | ||
| 245 | +} | ||
| 246 | +- (QMUIButton *)scoreBtn{ | ||
| 247 | + if(_scoreBtn == nil){ | ||
| 248 | + _scoreBtn = [QMUIButton buttonWithType:UIButtonTypeCustom]; | ||
| 249 | + _scoreBtn.titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:20]; | ||
| 250 | +// [_scoreBtn addTarget:self action:@selector(clickScoreBtn:) forControlEvents:UIControlEventTouchUpInside]; | ||
| 251 | + [_scoreBtn setTitle:@"+0" forState:UIControlStateNormal]; | ||
| 252 | + [_scoreBtn setImage:[UIImage imageNamed:@"sign_in_soccer"] forState:UIControlStateNormal]; | ||
| 253 | + [_scoreBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; | ||
| 254 | + _scoreBtn.adjustsImageWhenHighlighted = NO; | ||
| 255 | + _scoreBtn.userInteractionEnabled = NO; | ||
| 256 | + _scoreBtn.spacingBetweenImageAndTitle = 5; | ||
| 257 | + _scoreBtn.imagePosition = QMUIButtonImagePositionRight; | ||
| 258 | + } | ||
| 259 | + return _scoreBtn; | ||
| 260 | + | ||
| 261 | +} | ||
| 262 | +- (CNSignInButtonView *)signInButtonView{ | ||
| 263 | + if(_signInButtonView == nil){ | ||
| 264 | + _signInButtonView = [[CNSignInButtonView alloc]initWithFrame:CGRectMake(0, 0, 280*(SCREEN_WIDTH/375.0)+50, 160*(SCREEN_WIDTH/375.0)+30)]; | ||
| 265 | + | ||
| 266 | + } | ||
| 267 | + return _signInButtonView; | ||
| 268 | + | ||
| 269 | +} | ||
| 270 | + | ||
| 271 | +- (UIButton *)rulesBtn{ | ||
| 272 | + if(_rulesBtn == nil){ | ||
| 273 | + _rulesBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 274 | + _rulesBtn.titleLabel.font = UIFontMake(14); | ||
| 275 | + [_rulesBtn addTarget:self action:@selector(clickRulesBtn:) forControlEvents:UIControlEventTouchUpInside]; | ||
| 276 | + [_rulesBtn setTitle:@"签到规则" forState:UIControlStateNormal]; | ||
| 277 | + [_rulesBtn setTitleColor:[UIColor colorWithRed:181/255.0 green:181/255.0 blue:181/255.0 alpha:1.0] forState:UIControlStateNormal]; | ||
| 278 | + _rulesBtn.adjustsImageWhenHighlighted = NO; | ||
| 279 | + } | ||
| 280 | + return _rulesBtn; | ||
| 281 | + | ||
| 282 | +} | ||
| 283 | +- (UIButton *)closeBtn{ | ||
| 284 | + if(_closeBtn == nil){ | ||
| 285 | + _closeBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 286 | + _closeBtn.titleLabel.font = UIFontMake(12); | ||
| 287 | + [_closeBtn addTarget:self action:@selector(clickCloseBtn:) forControlEvents:UIControlEventTouchUpInside]; | ||
| 288 | + [_closeBtn setImage:[UIImage imageNamed:@"sign_day_close"] forState:UIControlStateNormal]; | ||
| 289 | + _closeBtn.adjustsImageWhenHighlighted = NO; | ||
| 290 | + | ||
| 291 | + } | ||
| 292 | + return _closeBtn; | ||
| 293 | + | ||
| 294 | +} | ||
| 295 | + | ||
| 296 | +@end |
CNLiveIntegralModule/Classes/View/CNTaskListHeadView.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNTaskListHeadView.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/2/28. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <UIKit/UIKit.h> | ||
| 10 | + | ||
| 11 | +NS_ASSUME_NONNULL_BEGIN | ||
| 12 | +@class CNTaskListHeadView; | ||
| 13 | +@protocol CNTaskListHeadViewDelegate <NSObject> | ||
| 14 | +- (void)clickedDetailButton:(CNTaskListHeadView *)view; | ||
| 15 | + | ||
| 16 | +@end | ||
| 17 | +@interface CNTaskListHeadView : UIImageView | ||
| 18 | +@property (nonatomic, weak) id<CNTaskListHeadViewDelegate> delegate; | ||
| 19 | +@property (nonatomic, copy) NSString *score; | ||
| 20 | + | ||
| 21 | +@end | ||
| 22 | + | ||
| 23 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/View/CNTaskListHeadView.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNTaskListHeadView.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/2/28. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNTaskListHeadView.h" | ||
| 10 | +#import "QMUIKit.h" | ||
| 11 | +#import <Masonry/Masonry.h> | ||
| 12 | +#import <SDWebImage/SDWebImage.h> | ||
| 13 | + | ||
| 14 | +@interface CNTaskListHeadView() | ||
| 15 | +@property (nonatomic, strong) UIImageView *headView; | ||
| 16 | +@property (nonatomic, strong) UILabel *currentScore; | ||
| 17 | +@property (nonatomic, strong) UILabel *getScore; | ||
| 18 | +@property (nonatomic, strong) QMUIButton *detailBtn; | ||
| 19 | + | ||
| 20 | +@end | ||
| 21 | + | ||
| 22 | +@implementation CNTaskListHeadView | ||
| 23 | +static const NSInteger margin = 15; | ||
| 24 | +#pragma mark - Init | ||
| 25 | +- (instancetype)initWithFrame:(CGRect)frame { | ||
| 26 | + self = [super initWithFrame:frame]; | ||
| 27 | + if (self) { | ||
| 28 | + self.backgroundColor = [UIColor clearColor]; | ||
| 29 | + self.userInteractionEnabled = YES; | ||
| 30 | + [self setup]; | ||
| 31 | + } | ||
| 32 | + return self; | ||
| 33 | +} | ||
| 34 | +#pragma mark - UI | ||
| 35 | +- (void)setup { | ||
| 36 | + [self addSubview:self.headView]; | ||
| 37 | + [self addSubview:self.currentScore]; | ||
| 38 | + [self addSubview:self.getScore]; | ||
| 39 | + [self addSubview:self.detailBtn]; | ||
| 40 | + | ||
| 41 | +} | ||
| 42 | +- (void)layoutSubviews{ | ||
| 43 | + [super layoutSubviews]; | ||
| 44 | + [_headView mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 45 | + make.left.equalTo(self.mas_left).with.offset(margin); | ||
| 46 | + make.top.equalTo(self.mas_top).with.offset(25*SCREEN_WIDTH/375.0+NavigationContentTop); | ||
| 47 | + make.width.height.offset(50*SCREEN_WIDTH/375.0); | ||
| 48 | + | ||
| 49 | + }]; | ||
| 50 | + [_currentScore mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 51 | + make.left.equalTo(_headView.mas_right).with.offset(margin); | ||
| 52 | + make.top.equalTo(_headView.mas_top); | ||
| 53 | + make.width.offset(100); | ||
| 54 | + make.height.offset(15*SCREEN_WIDTH/375.0); | ||
| 55 | + | ||
| 56 | + }]; | ||
| 57 | + [_getScore mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 58 | + make.left.equalTo(_headView.mas_right).with.offset(margin); | ||
| 59 | + make.top.equalTo(_currentScore.mas_bottom).with.offset(0); | ||
| 60 | + make.height.offset(35*SCREEN_WIDTH/375.0); | ||
| 61 | + | ||
| 62 | + }]; | ||
| 63 | + [_detailBtn mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 64 | + make.left.equalTo(_getScore.mas_right).with.offset(2*margin); | ||
| 65 | + make.centerY.equalTo(_getScore.mas_centerY); | ||
| 66 | + | ||
| 67 | + }]; | ||
| 68 | + | ||
| 69 | +} | ||
| 70 | +#pragma mark - Data | ||
| 71 | +- (void)setScore:(NSString *)score{ | ||
| 72 | + _score = score; | ||
| 73 | + _getScore.text = [score floatValue] > 10000.0?[NSString stringWithFormat:@"%.2lfw",[score floatValue]/10000.0]:score; | ||
| 74 | + | ||
| 75 | +} | ||
| 76 | + | ||
| 77 | +/* | ||
| 78 | + // Only override drawRect: if you perform custom drawing. | ||
| 79 | + // An empty implementation adversely affects performance during animation. | ||
| 80 | + - (void)drawRect:(CGRect)rect { | ||
| 81 | + // Drawing code | ||
| 82 | + } | ||
| 83 | + */ | ||
| 84 | +#pragma mark - Action | ||
| 85 | +- (void)clickedDetailButton:(UIButton *)btn{ | ||
| 86 | + if (self.delegate && [self.delegate respondsToSelector:@selector(clickedDetailButton:)]) { | ||
| 87 | + [self.delegate clickedDetailButton:self]; | ||
| 88 | + | ||
| 89 | + } | ||
| 90 | +} | ||
| 91 | +#pragma mark - Lazy loading | ||
| 92 | +- (UIImageView *)headView{ | ||
| 93 | + if (!_headView) { | ||
| 94 | + _headView = [[UIImageView alloc] init]; | ||
| 95 | + _headView.userInteractionEnabled = YES; | ||
| 96 | + _headView.layer.cornerRadius = 25*SCREEN_WIDTH/375.0; | ||
| 97 | + _headView.layer.masksToBounds = YES; | ||
| 98 | + _headView.layer.borderColor = [UIColor whiteColor].CGColor; | ||
| 99 | + _headView.layer.borderWidth = 1.5; | ||
| 100 | + [_headView sd_setImageWithURL:[NSURL URLWithString:@"CNUserShareModel.faceUrl"] placeholderImage:nil]; | ||
| 101 | + | ||
| 102 | + } | ||
| 103 | + return _headView; | ||
| 104 | +} | ||
| 105 | +- (UILabel *)currentScore{ | ||
| 106 | + if(_currentScore == nil){ | ||
| 107 | + _currentScore = [[UILabel alloc] init]; | ||
| 108 | + _currentScore.textColor = [UIColor whiteColor]; | ||
| 109 | + _currentScore.font = UIFontMake(14); | ||
| 110 | + _currentScore.userInteractionEnabled = YES; | ||
| 111 | + _currentScore.text = @"当前积分"; | ||
| 112 | + | ||
| 113 | + } | ||
| 114 | + return _currentScore; | ||
| 115 | + | ||
| 116 | +} | ||
| 117 | +- (UILabel *)getScore{ | ||
| 118 | + if(_getScore == nil){ | ||
| 119 | + _getScore = [[UILabel alloc] init]; | ||
| 120 | + _getScore.textColor = [UIColor whiteColor]; | ||
| 121 | + _getScore.font = UIFontMake(32); | ||
| 122 | + _getScore.userInteractionEnabled = YES; | ||
| 123 | + | ||
| 124 | + } | ||
| 125 | + return _getScore; | ||
| 126 | + | ||
| 127 | +} | ||
| 128 | +- (QMUIButton *)detailBtn{ | ||
| 129 | + if(_detailBtn == nil){ | ||
| 130 | + _detailBtn = [QMUIButton buttonWithType:UIButtonTypeCustom]; | ||
| 131 | + _detailBtn.titleLabel.font = UIFontMake(12); | ||
| 132 | + [_detailBtn addTarget:self action:@selector(clickedDetailButton:) forControlEvents:UIControlEventTouchUpInside]; | ||
| 133 | + [_detailBtn setTitle:@"明细" forState:UIControlStateNormal]; | ||
| 134 | + UIImage *image = [self xw_getImageName:@"integrate_next_white" bundleName:@"CNLiveIntegralModule" targetClass:[self class]]; | ||
| 135 | + [_detailBtn setImage:image forState:UIControlStateNormal]; | ||
| 136 | + [_detailBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; | ||
| 137 | + _detailBtn.spacingBetweenImageAndTitle = 5; | ||
| 138 | + _detailBtn.imagePosition = QMUIButtonImagePositionRight; | ||
| 139 | + } | ||
| 140 | + return _detailBtn; | ||
| 141 | + | ||
| 142 | +} | ||
| 143 | + | ||
| 144 | +/** | ||
| 145 | + * 创建图片 | ||
| 146 | + * | ||
| 147 | + * @param imageName 图片名字 | ||
| 148 | + * @param bundleName 图片所在的bundle名字 | ||
| 149 | + * @param targetClass 类和bundle的同级目录 | ||
| 150 | + * @return 返回UIImage | ||
| 151 | + */ | ||
| 152 | +- (UIImage *)xw_getImageName:(NSString *)imageName bundleName:(NSString *)bundleName targetClass:(Class)targetClass{ | ||
| 153 | + NSBundle *bundle = [NSBundle bundleForClass:targetClass]; | ||
| 154 | + NSURL *url = [bundle URLForResource:bundleName withExtension:@"bundle"]; | ||
| 155 | + NSBundle *targetBundle = [NSBundle bundleWithURL:url]; | ||
| 156 | + UIImage *image = [UIImage imageNamed:imageName inBundle:targetBundle compatibleWithTraitCollection:nil]; | ||
| 157 | + return image?image:[UIImage imageNamed:imageName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil]; | ||
| 158 | +} | ||
| 159 | + | ||
| 160 | +@end |
CNLiveIntegralModule/Classes/View/CNTaskListTableViewCell.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNTaskListTableViewCell.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/2/26. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <UIKit/UIKit.h> | ||
| 10 | + | ||
| 11 | +NS_ASSUME_NONNULL_BEGIN | ||
| 12 | +#define kCNTaskListTableViewCell @"CNTaskListTableViewCell" | ||
| 13 | +@class CNTaskListItemModel; | ||
| 14 | +@class CNTaskListTableViewCell; | ||
| 15 | + | ||
| 16 | +@protocol CNTaskListTableViewCellDelegate <NSObject> | ||
| 17 | +- (void)clickedCellButton:(CNTaskListTableViewCell *)cell type:(NSString *)type; | ||
| 18 | + | ||
| 19 | +@end | ||
| 20 | +@interface CNTaskListTableViewCell : UITableViewCell | ||
| 21 | +@property (nonatomic, strong) CNTaskListItemModel *model; | ||
| 22 | +@property (nonatomic, weak) id<CNTaskListTableViewCellDelegate> delegate; | ||
| 23 | + | ||
| 24 | +@end | ||
| 25 | + | ||
| 26 | +NS_ASSUME_NONNULL_END |
CNLiveIntegralModule/Classes/View/CNTaskListTableViewCell.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNTaskListTableViewCell.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/2/26. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNTaskListTableViewCell.h" | ||
| 10 | +#import <Masonry/Masonry.h> | ||
| 11 | +#import <SDWebImage/SDWebImage.h> | ||
| 12 | +#import "QMUIKit.h" | ||
| 13 | + | ||
| 14 | +#import "CNTaskListModel.h" | ||
| 15 | + | ||
| 16 | +@interface CNTaskListTableViewCell() | ||
| 17 | +@property (nonatomic, strong) UIImageView *leftImage; | ||
| 18 | +@property (nonatomic, strong) UILabel *titleLabel; | ||
| 19 | +@property (nonatomic, strong) UILabel *pointLabel; | ||
| 20 | +@property (nonatomic, strong) UILabel *progressLabel; | ||
| 21 | +@property (nonatomic, strong) UIButton *completeBtn; | ||
| 22 | +@property (nonatomic, copy) NSString *type; | ||
| 23 | + | ||
| 24 | +@end | ||
| 25 | + | ||
| 26 | +@implementation CNTaskListTableViewCell | ||
| 27 | +static const NSInteger margin = 20; | ||
| 28 | + | ||
| 29 | +#pragma mark - Init | ||
| 30 | +- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ | ||
| 31 | + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; | ||
| 32 | + if (self) { | ||
| 33 | + self.contentView.backgroundColor = [UIColor whiteColor]; | ||
| 34 | + [self setupUI]; | ||
| 35 | + | ||
| 36 | + } | ||
| 37 | + return self; | ||
| 38 | +} | ||
| 39 | + | ||
| 40 | +#pragma mark - UI | ||
| 41 | +- (void)setupUI{ | ||
| 42 | + [self.contentView addSubview:self.leftImage]; | ||
| 43 | + [self.contentView addSubview:self.titleLabel]; | ||
| 44 | + [self.contentView addSubview:self.pointLabel]; | ||
| 45 | + | ||
| 46 | + [self.contentView addSubview:self.progressLabel]; | ||
| 47 | + [self.contentView addSubview:self.completeBtn]; | ||
| 48 | + | ||
| 49 | +} | ||
| 50 | +- (void)layoutSubviews{ | ||
| 51 | + [super layoutSubviews]; | ||
| 52 | + [_leftImage mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 53 | + make.top.equalTo(self.contentView.mas_top).with.offset(margin); | ||
| 54 | + make.left.equalTo(self.contentView.mas_left).with.offset(margin*3/4.0); | ||
| 55 | + make.width.offset(30); | ||
| 56 | + make.height.offset(30); | ||
| 57 | + | ||
| 58 | + }]; | ||
| 59 | + | ||
| 60 | + [_completeBtn mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 61 | + make.top.equalTo(self.contentView.mas_top).with.offset(margin); | ||
| 62 | + make.right.equalTo(self.contentView.mas_right).with.offset(-margin*3/4.0); | ||
| 63 | + make.height.offset(30); | ||
| 64 | + make.width.offset(60); | ||
| 65 | + | ||
| 66 | + }]; | ||
| 67 | + | ||
| 68 | + [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 69 | + make.top.equalTo(self.contentView.mas_top).with.offset(margin/2.0); | ||
| 70 | + make.left.equalTo(_leftImage.mas_right).with.offset(margin*3/4.0); | ||
| 71 | + make.right.equalTo(_completeBtn.mas_left).with.offset(-margin*3/4.0); | ||
| 72 | + make.height.offset(20); | ||
| 73 | + | ||
| 74 | + }]; | ||
| 75 | + | ||
| 76 | + [_pointLabel mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 77 | + make.top.equalTo(_titleLabel.mas_bottom).with.offset(margin/2.0); | ||
| 78 | + make.left.equalTo(_leftImage.mas_right).with.offset(margin*3/4.0); | ||
| 79 | + make.height.offset(10); | ||
| 80 | + | ||
| 81 | + }]; | ||
| 82 | + | ||
| 83 | + [_progressLabel mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 84 | + make.top.equalTo(_titleLabel.mas_bottom).with.offset(margin/2.0); | ||
| 85 | + make.left.equalTo(_pointLabel.mas_right).with.offset(margin*3/4.0); | ||
| 86 | + make.height.offset(10); | ||
| 87 | + | ||
| 88 | + }]; | ||
| 89 | + | ||
| 90 | +} | ||
| 91 | + | ||
| 92 | +#pragma mark - Data | ||
| 93 | +- (void)setType:(NSString *)type{ | ||
| 94 | + _type = type; | ||
| 95 | + if([type isEqualToString:@"update_face"]||[type isEqualToString:@"update_nick"]){//头像 昵称 | ||
| 96 | + [_completeBtn setTitle:@"去完成" forState:UIControlStateNormal]; | ||
| 97 | + } | ||
| 98 | + else if ([type isEqualToString:@"publish_witness"]){//发布目击者 | ||
| 99 | + [_completeBtn setTitle:@"去完成" forState:UIControlStateNormal]; | ||
| 100 | + } | ||
| 101 | + else if ([type isEqualToString:@"add_friend"]){//添加好友 | ||
| 102 | + [_completeBtn setTitle:@"去完成" forState:UIControlStateNormal]; | ||
| 103 | + } | ||
| 104 | + else if ([type isEqualToString:@"publish_moment"]){//生活圈 | ||
| 105 | + [_completeBtn setTitle:@"去完成" forState:UIControlStateNormal]; | ||
| 106 | + } | ||
| 107 | + else if ([type isEqualToString:@"share_video"]){//分享目击者视频 | ||
| 108 | + [_completeBtn setTitle:@"去分享" forState:UIControlStateNormal]; | ||
| 109 | + } | ||
| 110 | + else if ([type isEqualToString:@"share_article"]){//分享文章 | ||
| 111 | + [_completeBtn setTitle:@"去分享" forState:UIControlStateNormal]; | ||
| 112 | + } | ||
| 113 | + else if ([type isEqualToString:@"publish_comment"]){//评论 | ||
| 114 | + [_completeBtn setTitle:@"去完成" forState:UIControlStateNormal]; | ||
| 115 | + } | ||
| 116 | + else if ([type isEqualToString:@"read_article"]){//看文章-> 视讯中国 -> 今日要闻 | ||
| 117 | + [_completeBtn setTitle:@"去完成" forState:UIControlStateNormal]; | ||
| 118 | + } | ||
| 119 | + else if ([type isEqualToString:@"customer_feedback"]){//帮助与反馈 | ||
| 120 | + [_completeBtn setTitle:@"去完成" forState:UIControlStateNormal]; | ||
| 121 | + } | ||
| 122 | + else if ([type isEqualToString:@"watch_video"]){//看视频 -> 视讯中国 -> 目击者 | ||
| 123 | + [_completeBtn setTitle:@"去观看" forState:UIControlStateNormal]; | ||
| 124 | + } | ||
| 125 | + else if ([type isEqualToString:@"check_in"]){//签到 | ||
| 126 | + [_completeBtn setTitle:@"去完成" forState:UIControlStateNormal]; | ||
| 127 | + } | ||
| 128 | + else if ([type isEqualToString:@"listen_novel"]){//听小说 | ||
| 129 | + [_completeBtn setTitle:@"去完成" forState:UIControlStateNormal]; | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | +} | ||
| 133 | +- (void)setModel:(CNTaskListItemModel *)model{ | ||
| 134 | + _model = model; | ||
| 135 | + [_leftImage sd_setImageWithURL:[NSURL URLWithString:model.icon] completed:nil]; | ||
| 136 | + _titleLabel.text = model.title; | ||
| 137 | + _pointLabel.text = [NSString stringWithFormat:@"积分值+%@",model.score]; | ||
| 138 | + | ||
| 139 | + NSString *timesStr = [NSString stringWithFormat:@"完成%ld/%ld",(long)model.times,(long)model.totalCount]; | ||
| 140 | + NSString *times = [NSString stringWithFormat:@"%ld",(long)model.times]; | ||
| 141 | + NSMutableAttributedString *str = [[NSMutableAttributedString alloc]initWithString:timesStr]; | ||
| 142 | + NSRange range = [timesStr rangeOfString:times]; | ||
| 143 | + [str addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0] range:range]; | ||
| 144 | + _progressLabel.attributedText = str; | ||
| 145 | + self.type = model.taskId; | ||
| 146 | + if(model.times >= model.totalCount){ | ||
| 147 | + [_completeBtn setTitle:@"已完成" forState:UIControlStateNormal]; | ||
| 148 | + [_completeBtn setTitleColor:[UIColor colorWithRed:155/255.0 green:155/255.0 blue:155/255.0 alpha:1.0] forState:UIControlStateNormal]; | ||
| 149 | + _completeBtn.layer.borderColor = [UIColor colorWithRed:155/255.0 green:155/255.0 blue:155/255.0 alpha:1.0].CGColor; | ||
| 150 | + _completeBtn.userInteractionEnabled = NO; | ||
| 151 | + | ||
| 152 | + }else{ | ||
| 153 | + [_completeBtn setTitle:@"去完成" forState:UIControlStateNormal]; | ||
| 154 | + [_completeBtn setTitleColor:[UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0] forState:UIControlStateNormal]; | ||
| 155 | + _completeBtn.layer.borderColor = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0].CGColor; | ||
| 156 | + _completeBtn.userInteractionEnabled = YES; | ||
| 157 | + | ||
| 158 | + } | ||
| 159 | + | ||
| 160 | +} | ||
| 161 | +- (void)awakeFromNib { | ||
| 162 | + [super awakeFromNib]; | ||
| 163 | + // Initialization code | ||
| 164 | +} | ||
| 165 | + | ||
| 166 | +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { | ||
| 167 | + [super setSelected:selected animated:animated]; | ||
| 168 | + | ||
| 169 | + // Configure the view for the selected state | ||
| 170 | +} | ||
| 171 | +#pragma mark - Private Methods | ||
| 172 | + | ||
| 173 | +#pragma mark - Action | ||
| 174 | +- (void)clickCompleteBtn:(UIButton *)btn{ | ||
| 175 | +// btn.selected = !btn.selected; | ||
| 176 | + if (self.delegate && [self.delegate respondsToSelector:@selector(clickedCellButton:type:)]) { | ||
| 177 | + [self.delegate clickedCellButton:self type:_type]; | ||
| 178 | + | ||
| 179 | + } | ||
| 180 | + | ||
| 181 | +} | ||
| 182 | +#pragma mark - Lazy loading | ||
| 183 | +- (UIImageView *)leftImage{ | ||
| 184 | + if (!_leftImage) { | ||
| 185 | + _leftImage = [[UIImageView alloc] init]; | ||
| 186 | + _leftImage.userInteractionEnabled = YES; | ||
| 187 | + | ||
| 188 | + } | ||
| 189 | + return _leftImage; | ||
| 190 | +} | ||
| 191 | +- (UILabel *)titleLabel{ | ||
| 192 | + if(_titleLabel == nil){ | ||
| 193 | + _titleLabel = [[UILabel alloc] init]; | ||
| 194 | + _titleLabel.textColor = [UIColor colorWithRed:40/255.0 green:40/255.0 blue:40/255.0 alpha:1.0]; | ||
| 195 | + _titleLabel.font = UIFontMake(16); | ||
| 196 | + _titleLabel.userInteractionEnabled = YES; | ||
| 197 | + | ||
| 198 | + } | ||
| 199 | + return _titleLabel; | ||
| 200 | + | ||
| 201 | +} | ||
| 202 | +- (UILabel *)pointLabel{ | ||
| 203 | + if(_pointLabel == nil){ | ||
| 204 | + _pointLabel = [[UILabel alloc] init]; | ||
| 205 | + _pointLabel.textColor = [UIColor colorWithRed:155/255.0 green:155/255.0 blue:155/255.0 alpha:1.0]; | ||
| 206 | + _pointLabel.font = UIFontMake(12); | ||
| 207 | + _pointLabel.userInteractionEnabled = YES; | ||
| 208 | + | ||
| 209 | + } | ||
| 210 | + return _pointLabel; | ||
| 211 | + | ||
| 212 | +} | ||
| 213 | +- (UILabel *)progressLabel{ | ||
| 214 | + if(_progressLabel == nil){ | ||
| 215 | + _progressLabel = [[UILabel alloc] init]; | ||
| 216 | + _progressLabel.textColor = [UIColor colorWithRed:155/255.0 green:155/255.0 blue:155/255.0 alpha:1.0]; | ||
| 217 | + _progressLabel.font = UIFontMake(12); | ||
| 218 | + _progressLabel.userInteractionEnabled = YES; | ||
| 219 | + | ||
| 220 | + } | ||
| 221 | + return _progressLabel; | ||
| 222 | + | ||
| 223 | +} | ||
| 224 | + | ||
| 225 | +- (UIButton *)completeBtn{ | ||
| 226 | + if(_completeBtn == nil){ | ||
| 227 | + _completeBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 228 | + _completeBtn.titleLabel.font = UIFontMake(12); | ||
| 229 | + _completeBtn.backgroundColor = [UIColor whiteColor]; | ||
| 230 | + _completeBtn.layer.cornerRadius = 15; | ||
| 231 | + _completeBtn.layer.masksToBounds = YES; | ||
| 232 | + _completeBtn.layer.borderWidth = 1; | ||
| 233 | + [_completeBtn addTarget:self action:@selector(clickCompleteBtn:) forControlEvents:UIControlEventTouchUpInside]; | ||
| 234 | + | ||
| 235 | + [_completeBtn setTitle:@"去完成" forState:UIControlStateNormal]; | ||
| 236 | + [_completeBtn setTitleColor:[UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0] forState:UIControlStateNormal]; | ||
| 237 | + _completeBtn.layer.borderColor = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0].CGColor; | ||
| 238 | + | ||
| 239 | + } | ||
| 240 | + return _completeBtn; | ||
| 241 | + | ||
| 242 | +} | ||
| 243 | + | ||
| 244 | +@end |
Example/CNLiveIntegralModule.xcodeproj/project.pbxproj
0 → 100644
| 1 | +// !$*UTF8*$! | ||
| 2 | +{ | ||
| 3 | + archiveVersion = 1; | ||
| 4 | + classes = { | ||
| 5 | + }; | ||
| 6 | + objectVersion = 46; | ||
| 7 | + objects = { | ||
| 8 | + | ||
| 9 | +/* Begin PBXBuildFile section */ | ||
| 10 | + 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; | ||
| 11 | + 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; | ||
| 12 | + 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; | ||
| 13 | + 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; | ||
| 14 | + 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; | ||
| 15 | + 6003F59E195388D20070C39A /* CNLIVEAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* CNLIVEAppDelegate.m */; }; | ||
| 16 | + 6003F5A7195388D20070C39A /* CNLIVEViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* CNLIVEViewController.m */; }; | ||
| 17 | + 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; }; | ||
| 18 | + 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; }; | ||
| 19 | + 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; | ||
| 20 | + 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; | ||
| 21 | + 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; | ||
| 22 | + 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; | ||
| 23 | + 70FCFF9709F570AA7AED04F1 /* Pods_CNLiveIntegralModule_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ADAD0B15A55411529895B73 /* Pods_CNLiveIntegralModule_Tests.framework */; }; | ||
| 24 | + 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; }; | ||
| 25 | + 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; | ||
| 26 | + D3220EE465834E8F88E4596B /* Pods_CNLiveIntegralModule_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F449C22FBDE2C83AA6405A0 /* Pods_CNLiveIntegralModule_Example.framework */; }; | ||
| 27 | +/* End PBXBuildFile section */ | ||
| 28 | + | ||
| 29 | +/* Begin PBXContainerItemProxy section */ | ||
| 30 | + 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { | ||
| 31 | + isa = PBXContainerItemProxy; | ||
| 32 | + containerPortal = 6003F582195388D10070C39A /* Project object */; | ||
| 33 | + proxyType = 1; | ||
| 34 | + remoteGlobalIDString = 6003F589195388D20070C39A; | ||
| 35 | + remoteInfo = CNLiveIntegralModule; | ||
| 36 | + }; | ||
| 37 | +/* End PBXContainerItemProxy section */ | ||
| 38 | + | ||
| 39 | +/* Begin PBXFileReference section */ | ||
| 40 | + 4ED4DEB3CFA970B22F98AF9E /* Pods-CNLiveIntegralModule_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveIntegralModule_Tests.release.xcconfig"; path = "Target Support Files/Pods-CNLiveIntegralModule_Tests/Pods-CNLiveIntegralModule_Tests.release.xcconfig"; sourceTree = "<group>"; }; | ||
| 41 | + 5F449C22FBDE2C83AA6405A0 /* Pods_CNLiveIntegralModule_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveIntegralModule_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
| 42 | + 6003F58A195388D20070C39A /* CNLiveIntegralModule_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CNLiveIntegralModule_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
| 43 | + 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; | ||
| 44 | + 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; | ||
| 45 | + 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; | ||
| 46 | + 6003F595195388D20070C39A /* CNLiveIntegralModule-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CNLiveIntegralModule-Info.plist"; sourceTree = "<group>"; }; | ||
| 47 | + 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; | ||
| 48 | + 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; | ||
| 49 | + 6003F59B195388D20070C39A /* CNLiveIntegralModule-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CNLiveIntegralModule-Prefix.pch"; sourceTree = "<group>"; }; | ||
| 50 | + 6003F59C195388D20070C39A /* CNLIVEAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLIVEAppDelegate.h; sourceTree = "<group>"; }; | ||
| 51 | + 6003F59D195388D20070C39A /* CNLIVEAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLIVEAppDelegate.m; sourceTree = "<group>"; }; | ||
| 52 | + 6003F5A5195388D20070C39A /* CNLIVEViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLIVEViewController.h; sourceTree = "<group>"; }; | ||
| 53 | + 6003F5A6195388D20070C39A /* CNLIVEViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLIVEViewController.m; sourceTree = "<group>"; }; | ||
| 54 | + 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; }; | ||
| 55 | + 6003F5AE195388D20070C39A /* CNLiveIntegralModule_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CNLiveIntegralModule_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
| 56 | + 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; | ||
| 57 | + 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = "<group>"; }; | ||
| 58 | + 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; | ||
| 59 | + 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; }; | ||
| 60 | + 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; }; | ||
| 61 | + 6ADAD0B15A55411529895B73 /* Pods_CNLiveIntegralModule_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveIntegralModule_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
| 62 | + 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; | ||
| 63 | + 7197587013C3AAF2E907A30E /* Pods-CNLiveIntegralModule_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveIntegralModule_Example.release.xcconfig"; path = "Target Support Files/Pods-CNLiveIntegralModule_Example/Pods-CNLiveIntegralModule_Example.release.xcconfig"; sourceTree = "<group>"; }; | ||
| 64 | + 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; | ||
| 65 | + 8DB30E362F9F10B3645AF329 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; }; | ||
| 66 | + 93939B5D51970DA6AEC59E35 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; }; | ||
| 67 | + A62BB4FD387F3C8E29175952 /* Pods-CNLiveIntegralModule_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveIntegralModule_Tests.debug.xcconfig"; path = "Target Support Files/Pods-CNLiveIntegralModule_Tests/Pods-CNLiveIntegralModule_Tests.debug.xcconfig"; sourceTree = "<group>"; }; | ||
| 68 | + B1043828819A650359710010 /* Pods-CNLiveIntegralModule_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveIntegralModule_Example.debug.xcconfig"; path = "Target Support Files/Pods-CNLiveIntegralModule_Example/Pods-CNLiveIntegralModule_Example.debug.xcconfig"; sourceTree = "<group>"; }; | ||
| 69 | + DDCCF8B6CB31E59B7750E764 /* CNLiveIntegralModule.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CNLiveIntegralModule.podspec; path = ../CNLiveIntegralModule.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; | ||
| 70 | +/* End PBXFileReference section */ | ||
| 71 | + | ||
| 72 | +/* Begin PBXFrameworksBuildPhase section */ | ||
| 73 | + 6003F587195388D20070C39A /* Frameworks */ = { | ||
| 74 | + isa = PBXFrameworksBuildPhase; | ||
| 75 | + buildActionMask = 2147483647; | ||
| 76 | + files = ( | ||
| 77 | + 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, | ||
| 78 | + 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, | ||
| 79 | + 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, | ||
| 80 | + D3220EE465834E8F88E4596B /* Pods_CNLiveIntegralModule_Example.framework in Frameworks */, | ||
| 81 | + ); | ||
| 82 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 83 | + }; | ||
| 84 | + 6003F5AB195388D20070C39A /* Frameworks */ = { | ||
| 85 | + isa = PBXFrameworksBuildPhase; | ||
| 86 | + buildActionMask = 2147483647; | ||
| 87 | + files = ( | ||
| 88 | + 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, | ||
| 89 | + 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, | ||
| 90 | + 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, | ||
| 91 | + 70FCFF9709F570AA7AED04F1 /* Pods_CNLiveIntegralModule_Tests.framework in Frameworks */, | ||
| 92 | + ); | ||
| 93 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 94 | + }; | ||
| 95 | +/* End PBXFrameworksBuildPhase section */ | ||
| 96 | + | ||
| 97 | +/* Begin PBXGroup section */ | ||
| 98 | + 2B1546C8C8C58BDB406675A3 /* Pods */ = { | ||
| 99 | + isa = PBXGroup; | ||
| 100 | + children = ( | ||
| 101 | + B1043828819A650359710010 /* Pods-CNLiveIntegralModule_Example.debug.xcconfig */, | ||
| 102 | + 7197587013C3AAF2E907A30E /* Pods-CNLiveIntegralModule_Example.release.xcconfig */, | ||
| 103 | + A62BB4FD387F3C8E29175952 /* Pods-CNLiveIntegralModule_Tests.debug.xcconfig */, | ||
| 104 | + 4ED4DEB3CFA970B22F98AF9E /* Pods-CNLiveIntegralModule_Tests.release.xcconfig */, | ||
| 105 | + ); | ||
| 106 | + path = Pods; | ||
| 107 | + sourceTree = "<group>"; | ||
| 108 | + }; | ||
| 109 | + 6003F581195388D10070C39A = { | ||
| 110 | + isa = PBXGroup; | ||
| 111 | + children = ( | ||
| 112 | + 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, | ||
| 113 | + 6003F593195388D20070C39A /* Example for CNLiveIntegralModule */, | ||
| 114 | + 6003F5B5195388D20070C39A /* Tests */, | ||
| 115 | + 6003F58C195388D20070C39A /* Frameworks */, | ||
| 116 | + 6003F58B195388D20070C39A /* Products */, | ||
| 117 | + 2B1546C8C8C58BDB406675A3 /* Pods */, | ||
| 118 | + ); | ||
| 119 | + sourceTree = "<group>"; | ||
| 120 | + }; | ||
| 121 | + 6003F58B195388D20070C39A /* Products */ = { | ||
| 122 | + isa = PBXGroup; | ||
| 123 | + children = ( | ||
| 124 | + 6003F58A195388D20070C39A /* CNLiveIntegralModule_Example.app */, | ||
| 125 | + 6003F5AE195388D20070C39A /* CNLiveIntegralModule_Tests.xctest */, | ||
| 126 | + ); | ||
| 127 | + name = Products; | ||
| 128 | + sourceTree = "<group>"; | ||
| 129 | + }; | ||
| 130 | + 6003F58C195388D20070C39A /* Frameworks */ = { | ||
| 131 | + isa = PBXGroup; | ||
| 132 | + children = ( | ||
| 133 | + 6003F58D195388D20070C39A /* Foundation.framework */, | ||
| 134 | + 6003F58F195388D20070C39A /* CoreGraphics.framework */, | ||
| 135 | + 6003F591195388D20070C39A /* UIKit.framework */, | ||
| 136 | + 6003F5AF195388D20070C39A /* XCTest.framework */, | ||
| 137 | + 5F449C22FBDE2C83AA6405A0 /* Pods_CNLiveIntegralModule_Example.framework */, | ||
| 138 | + 6ADAD0B15A55411529895B73 /* Pods_CNLiveIntegralModule_Tests.framework */, | ||
| 139 | + ); | ||
| 140 | + name = Frameworks; | ||
| 141 | + sourceTree = "<group>"; | ||
| 142 | + }; | ||
| 143 | + 6003F593195388D20070C39A /* Example for CNLiveIntegralModule */ = { | ||
| 144 | + isa = PBXGroup; | ||
| 145 | + children = ( | ||
| 146 | + 6003F59C195388D20070C39A /* CNLIVEAppDelegate.h */, | ||
| 147 | + 6003F59D195388D20070C39A /* CNLIVEAppDelegate.m */, | ||
| 148 | + 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */, | ||
| 149 | + 6003F5A5195388D20070C39A /* CNLIVEViewController.h */, | ||
| 150 | + 6003F5A6195388D20070C39A /* CNLIVEViewController.m */, | ||
| 151 | + 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */, | ||
| 152 | + 6003F5A8195388D20070C39A /* Images.xcassets */, | ||
| 153 | + 6003F594195388D20070C39A /* Supporting Files */, | ||
| 154 | + ); | ||
| 155 | + name = "Example for CNLiveIntegralModule"; | ||
| 156 | + path = CNLiveIntegralModule; | ||
| 157 | + sourceTree = "<group>"; | ||
| 158 | + }; | ||
| 159 | + 6003F594195388D20070C39A /* Supporting Files */ = { | ||
| 160 | + isa = PBXGroup; | ||
| 161 | + children = ( | ||
| 162 | + 6003F595195388D20070C39A /* CNLiveIntegralModule-Info.plist */, | ||
| 163 | + 6003F596195388D20070C39A /* InfoPlist.strings */, | ||
| 164 | + 6003F599195388D20070C39A /* main.m */, | ||
| 165 | + 6003F59B195388D20070C39A /* CNLiveIntegralModule-Prefix.pch */, | ||
| 166 | + ); | ||
| 167 | + name = "Supporting Files"; | ||
| 168 | + sourceTree = "<group>"; | ||
| 169 | + }; | ||
| 170 | + 6003F5B5195388D20070C39A /* Tests */ = { | ||
| 171 | + isa = PBXGroup; | ||
| 172 | + children = ( | ||
| 173 | + 6003F5BB195388D20070C39A /* Tests.m */, | ||
| 174 | + 6003F5B6195388D20070C39A /* Supporting Files */, | ||
| 175 | + ); | ||
| 176 | + path = Tests; | ||
| 177 | + sourceTree = "<group>"; | ||
| 178 | + }; | ||
| 179 | + 6003F5B6195388D20070C39A /* Supporting Files */ = { | ||
| 180 | + isa = PBXGroup; | ||
| 181 | + children = ( | ||
| 182 | + 6003F5B7195388D20070C39A /* Tests-Info.plist */, | ||
| 183 | + 6003F5B8195388D20070C39A /* InfoPlist.strings */, | ||
| 184 | + 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, | ||
| 185 | + ); | ||
| 186 | + name = "Supporting Files"; | ||
| 187 | + sourceTree = "<group>"; | ||
| 188 | + }; | ||
| 189 | + 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { | ||
| 190 | + isa = PBXGroup; | ||
| 191 | + children = ( | ||
| 192 | + DDCCF8B6CB31E59B7750E764 /* CNLiveIntegralModule.podspec */, | ||
| 193 | + 93939B5D51970DA6AEC59E35 /* README.md */, | ||
| 194 | + 8DB30E362F9F10B3645AF329 /* LICENSE */, | ||
| 195 | + ); | ||
| 196 | + name = "Podspec Metadata"; | ||
| 197 | + sourceTree = "<group>"; | ||
| 198 | + }; | ||
| 199 | +/* End PBXGroup section */ | ||
| 200 | + | ||
| 201 | +/* Begin PBXNativeTarget section */ | ||
| 202 | + 6003F589195388D20070C39A /* CNLiveIntegralModule_Example */ = { | ||
| 203 | + isa = PBXNativeTarget; | ||
| 204 | + buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveIntegralModule_Example" */; | ||
| 205 | + buildPhases = ( | ||
| 206 | + BBC4CB889090285A0AAFD6A5 /* [CP] Check Pods Manifest.lock */, | ||
| 207 | + 6003F586195388D20070C39A /* Sources */, | ||
| 208 | + 6003F587195388D20070C39A /* Frameworks */, | ||
| 209 | + 6003F588195388D20070C39A /* Resources */, | ||
| 210 | + 7C5111D1DB9B7192B2E84959 /* [CP] Embed Pods Frameworks */, | ||
| 211 | + ); | ||
| 212 | + buildRules = ( | ||
| 213 | + ); | ||
| 214 | + dependencies = ( | ||
| 215 | + ); | ||
| 216 | + name = CNLiveIntegralModule_Example; | ||
| 217 | + productName = CNLiveIntegralModule; | ||
| 218 | + productReference = 6003F58A195388D20070C39A /* CNLiveIntegralModule_Example.app */; | ||
| 219 | + productType = "com.apple.product-type.application"; | ||
| 220 | + }; | ||
| 221 | + 6003F5AD195388D20070C39A /* CNLiveIntegralModule_Tests */ = { | ||
| 222 | + isa = PBXNativeTarget; | ||
| 223 | + buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveIntegralModule_Tests" */; | ||
| 224 | + buildPhases = ( | ||
| 225 | + 080103FEFFDB2F4BC100707B /* [CP] Check Pods Manifest.lock */, | ||
| 226 | + 6003F5AA195388D20070C39A /* Sources */, | ||
| 227 | + 6003F5AB195388D20070C39A /* Frameworks */, | ||
| 228 | + 6003F5AC195388D20070C39A /* Resources */, | ||
| 229 | + ); | ||
| 230 | + buildRules = ( | ||
| 231 | + ); | ||
| 232 | + dependencies = ( | ||
| 233 | + 6003F5B4195388D20070C39A /* PBXTargetDependency */, | ||
| 234 | + ); | ||
| 235 | + name = CNLiveIntegralModule_Tests; | ||
| 236 | + productName = CNLiveIntegralModuleTests; | ||
| 237 | + productReference = 6003F5AE195388D20070C39A /* CNLiveIntegralModule_Tests.xctest */; | ||
| 238 | + productType = "com.apple.product-type.bundle.unit-test"; | ||
| 239 | + }; | ||
| 240 | +/* End PBXNativeTarget section */ | ||
| 241 | + | ||
| 242 | +/* Begin PBXProject section */ | ||
| 243 | + 6003F582195388D10070C39A /* Project object */ = { | ||
| 244 | + isa = PBXProject; | ||
| 245 | + attributes = { | ||
| 246 | + CLASSPREFIX = CNLIVE; | ||
| 247 | + LastUpgradeCheck = 0720; | ||
| 248 | + ORGANIZATIONNAME = "153993236@qq.com"; | ||
| 249 | + TargetAttributes = { | ||
| 250 | + 6003F589195388D20070C39A = { | ||
| 251 | + DevelopmentTeam = 94X49GG3ZW; | ||
| 252 | + }; | ||
| 253 | + 6003F5AD195388D20070C39A = { | ||
| 254 | + TestTargetID = 6003F589195388D20070C39A; | ||
| 255 | + }; | ||
| 256 | + }; | ||
| 257 | + }; | ||
| 258 | + buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "CNLiveIntegralModule" */; | ||
| 259 | + compatibilityVersion = "Xcode 3.2"; | ||
| 260 | + developmentRegion = English; | ||
| 261 | + hasScannedForEncodings = 0; | ||
| 262 | + knownRegions = ( | ||
| 263 | + English, | ||
| 264 | + en, | ||
| 265 | + Base, | ||
| 266 | + ); | ||
| 267 | + mainGroup = 6003F581195388D10070C39A; | ||
| 268 | + productRefGroup = 6003F58B195388D20070C39A /* Products */; | ||
| 269 | + projectDirPath = ""; | ||
| 270 | + projectRoot = ""; | ||
| 271 | + targets = ( | ||
| 272 | + 6003F589195388D20070C39A /* CNLiveIntegralModule_Example */, | ||
| 273 | + 6003F5AD195388D20070C39A /* CNLiveIntegralModule_Tests */, | ||
| 274 | + ); | ||
| 275 | + }; | ||
| 276 | +/* End PBXProject section */ | ||
| 277 | + | ||
| 278 | +/* Begin PBXResourcesBuildPhase section */ | ||
| 279 | + 6003F588195388D20070C39A /* Resources */ = { | ||
| 280 | + isa = PBXResourcesBuildPhase; | ||
| 281 | + buildActionMask = 2147483647; | ||
| 282 | + files = ( | ||
| 283 | + 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */, | ||
| 284 | + 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */, | ||
| 285 | + 6003F5A9195388D20070C39A /* Images.xcassets in Resources */, | ||
| 286 | + 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, | ||
| 287 | + ); | ||
| 288 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 289 | + }; | ||
| 290 | + 6003F5AC195388D20070C39A /* Resources */ = { | ||
| 291 | + isa = PBXResourcesBuildPhase; | ||
| 292 | + buildActionMask = 2147483647; | ||
| 293 | + files = ( | ||
| 294 | + 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */, | ||
| 295 | + ); | ||
| 296 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 297 | + }; | ||
| 298 | +/* End PBXResourcesBuildPhase section */ | ||
| 299 | + | ||
| 300 | +/* Begin PBXShellScriptBuildPhase section */ | ||
| 301 | + 080103FEFFDB2F4BC100707B /* [CP] Check Pods Manifest.lock */ = { | ||
| 302 | + isa = PBXShellScriptBuildPhase; | ||
| 303 | + buildActionMask = 2147483647; | ||
| 304 | + files = ( | ||
| 305 | + ); | ||
| 306 | + inputFileListPaths = ( | ||
| 307 | + ); | ||
| 308 | + inputPaths = ( | ||
| 309 | + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", | ||
| 310 | + "${PODS_ROOT}/Manifest.lock", | ||
| 311 | + ); | ||
| 312 | + name = "[CP] Check Pods Manifest.lock"; | ||
| 313 | + outputFileListPaths = ( | ||
| 314 | + ); | ||
| 315 | + outputPaths = ( | ||
| 316 | + "$(DERIVED_FILE_DIR)/Pods-CNLiveIntegralModule_Tests-checkManifestLockResult.txt", | ||
| 317 | + ); | ||
| 318 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 319 | + shellPath = /bin/sh; | ||
| 320 | + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; | ||
| 321 | + showEnvVarsInLog = 0; | ||
| 322 | + }; | ||
| 323 | + 7C5111D1DB9B7192B2E84959 /* [CP] Embed Pods Frameworks */ = { | ||
| 324 | + isa = PBXShellScriptBuildPhase; | ||
| 325 | + buildActionMask = 2147483647; | ||
| 326 | + files = ( | ||
| 327 | + ); | ||
| 328 | + inputPaths = ( | ||
| 329 | + "${PODS_ROOT}/Target Support Files/Pods-CNLiveIntegralModule_Example/Pods-CNLiveIntegralModule_Example-frameworks.sh", | ||
| 330 | + "${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework", | ||
| 331 | + "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework", | ||
| 332 | + "${BUILT_PRODUCTS_DIR}/CNLiveBeeHive/CNLiveBeeHive.framework", | ||
| 333 | + "${BUILT_PRODUCTS_DIR}/CNLiveCommonClass/CNLiveCommonClass.framework", | ||
| 334 | + "${BUILT_PRODUCTS_DIR}/CNLiveEnvironment/CNLiveEnvironment.framework", | ||
| 335 | + "${BUILT_PRODUCTS_DIR}/CNLiveIntegralModule/CNLiveIntegralModule.framework", | ||
| 336 | + "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework", | ||
| 337 | + "${BUILT_PRODUCTS_DIR}/CNLiveTripartiteManagement/CNLiveTripartiteManagement.framework", | ||
| 338 | + "${BUILT_PRODUCTS_DIR}/CNLiveUserAgreementManager/CNLiveUserAgreementManager.framework", | ||
| 339 | + "${BUILT_PRODUCTS_DIR}/CNLiveUserManagement/CNLiveUserManagement.framework", | ||
| 340 | + "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework", | ||
| 341 | + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", | ||
| 342 | + "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework", | ||
| 343 | + "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework", | ||
| 344 | + "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", | ||
| 345 | + "${BUILT_PRODUCTS_DIR}/YYKit/YYKit.framework", | ||
| 346 | + ); | ||
| 347 | + name = "[CP] Embed Pods Frameworks"; | ||
| 348 | + outputPaths = ( | ||
| 349 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework", | ||
| 350 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework", | ||
| 351 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBeeHive.framework", | ||
| 352 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonClass.framework", | ||
| 353 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveEnvironment.framework", | ||
| 354 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveIntegralModule.framework", | ||
| 355 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework", | ||
| 356 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveTripartiteManagement.framework", | ||
| 357 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveUserAgreementManager.framework", | ||
| 358 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveUserManagement.framework", | ||
| 359 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework", | ||
| 360 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", | ||
| 361 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework", | ||
| 362 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework", | ||
| 363 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", | ||
| 364 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYKit.framework", | ||
| 365 | + ); | ||
| 366 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 367 | + shellPath = /bin/sh; | ||
| 368 | + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveIntegralModule_Example/Pods-CNLiveIntegralModule_Example-frameworks.sh\"\n"; | ||
| 369 | + showEnvVarsInLog = 0; | ||
| 370 | + }; | ||
| 371 | + BBC4CB889090285A0AAFD6A5 /* [CP] Check Pods Manifest.lock */ = { | ||
| 372 | + isa = PBXShellScriptBuildPhase; | ||
| 373 | + buildActionMask = 2147483647; | ||
| 374 | + files = ( | ||
| 375 | + ); | ||
| 376 | + inputFileListPaths = ( | ||
| 377 | + ); | ||
| 378 | + inputPaths = ( | ||
| 379 | + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", | ||
| 380 | + "${PODS_ROOT}/Manifest.lock", | ||
| 381 | + ); | ||
| 382 | + name = "[CP] Check Pods Manifest.lock"; | ||
| 383 | + outputFileListPaths = ( | ||
| 384 | + ); | ||
| 385 | + outputPaths = ( | ||
| 386 | + "$(DERIVED_FILE_DIR)/Pods-CNLiveIntegralModule_Example-checkManifestLockResult.txt", | ||
| 387 | + ); | ||
| 388 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 389 | + shellPath = /bin/sh; | ||
| 390 | + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; | ||
| 391 | + showEnvVarsInLog = 0; | ||
| 392 | + }; | ||
| 393 | +/* End PBXShellScriptBuildPhase section */ | ||
| 394 | + | ||
| 395 | +/* Begin PBXSourcesBuildPhase section */ | ||
| 396 | + 6003F586195388D20070C39A /* Sources */ = { | ||
| 397 | + isa = PBXSourcesBuildPhase; | ||
| 398 | + buildActionMask = 2147483647; | ||
| 399 | + files = ( | ||
| 400 | + 6003F59E195388D20070C39A /* CNLIVEAppDelegate.m in Sources */, | ||
| 401 | + 6003F5A7195388D20070C39A /* CNLIVEViewController.m in Sources */, | ||
| 402 | + 6003F59A195388D20070C39A /* main.m in Sources */, | ||
| 403 | + ); | ||
| 404 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 405 | + }; | ||
| 406 | + 6003F5AA195388D20070C39A /* Sources */ = { | ||
| 407 | + isa = PBXSourcesBuildPhase; | ||
| 408 | + buildActionMask = 2147483647; | ||
| 409 | + files = ( | ||
| 410 | + 6003F5BC195388D20070C39A /* Tests.m in Sources */, | ||
| 411 | + ); | ||
| 412 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 413 | + }; | ||
| 414 | +/* End PBXSourcesBuildPhase section */ | ||
| 415 | + | ||
| 416 | +/* Begin PBXTargetDependency section */ | ||
| 417 | + 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { | ||
| 418 | + isa = PBXTargetDependency; | ||
| 419 | + target = 6003F589195388D20070C39A /* CNLiveIntegralModule_Example */; | ||
| 420 | + targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; | ||
| 421 | + }; | ||
| 422 | +/* End PBXTargetDependency section */ | ||
| 423 | + | ||
| 424 | +/* Begin PBXVariantGroup section */ | ||
| 425 | + 6003F596195388D20070C39A /* InfoPlist.strings */ = { | ||
| 426 | + isa = PBXVariantGroup; | ||
| 427 | + children = ( | ||
| 428 | + 6003F597195388D20070C39A /* en */, | ||
| 429 | + ); | ||
| 430 | + name = InfoPlist.strings; | ||
| 431 | + sourceTree = "<group>"; | ||
| 432 | + }; | ||
| 433 | + 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { | ||
| 434 | + isa = PBXVariantGroup; | ||
| 435 | + children = ( | ||
| 436 | + 6003F5B9195388D20070C39A /* en */, | ||
| 437 | + ); | ||
| 438 | + name = InfoPlist.strings; | ||
| 439 | + sourceTree = "<group>"; | ||
| 440 | + }; | ||
| 441 | + 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */ = { | ||
| 442 | + isa = PBXVariantGroup; | ||
| 443 | + children = ( | ||
| 444 | + 71719F9E1E33DC2100824A3D /* Base */, | ||
| 445 | + ); | ||
| 446 | + name = LaunchScreen.storyboard; | ||
| 447 | + sourceTree = "<group>"; | ||
| 448 | + }; | ||
| 449 | +/* End PBXVariantGroup section */ | ||
| 450 | + | ||
| 451 | +/* Begin XCBuildConfiguration section */ | ||
| 452 | + 6003F5BD195388D20070C39A /* Debug */ = { | ||
| 453 | + isa = XCBuildConfiguration; | ||
| 454 | + buildSettings = { | ||
| 455 | + ALWAYS_SEARCH_USER_PATHS = NO; | ||
| 456 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | ||
| 457 | + CLANG_CXX_LIBRARY = "libc++"; | ||
| 458 | + CLANG_ENABLE_MODULES = YES; | ||
| 459 | + CLANG_ENABLE_OBJC_ARC = YES; | ||
| 460 | + CLANG_WARN_BOOL_CONVERSION = YES; | ||
| 461 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
| 462 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
| 463 | + CLANG_WARN_EMPTY_BODY = YES; | ||
| 464 | + CLANG_WARN_ENUM_CONVERSION = YES; | ||
| 465 | + CLANG_WARN_INT_CONVERSION = YES; | ||
| 466 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
| 467 | + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | ||
| 468 | + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | ||
| 469 | + COPY_PHASE_STRIP = NO; | ||
| 470 | + ENABLE_TESTABILITY = YES; | ||
| 471 | + GCC_C_LANGUAGE_STANDARD = gnu99; | ||
| 472 | + GCC_DYNAMIC_NO_PIC = NO; | ||
| 473 | + GCC_OPTIMIZATION_LEVEL = 0; | ||
| 474 | + GCC_PREPROCESSOR_DEFINITIONS = ( | ||
| 475 | + "DEBUG=1", | ||
| 476 | + "$(inherited)", | ||
| 477 | + ); | ||
| 478 | + GCC_SYMBOLS_PRIVATE_EXTERN = NO; | ||
| 479 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
| 480 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
| 481 | + GCC_WARN_UNDECLARED_SELECTOR = YES; | ||
| 482 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
| 483 | + GCC_WARN_UNUSED_FUNCTION = YES; | ||
| 484 | + GCC_WARN_UNUSED_VARIABLE = YES; | ||
| 485 | + IPHONEOS_DEPLOYMENT_TARGET = 9.3; | ||
| 486 | + ONLY_ACTIVE_ARCH = YES; | ||
| 487 | + SDKROOT = iphoneos; | ||
| 488 | + TARGETED_DEVICE_FAMILY = "1,2"; | ||
| 489 | + }; | ||
| 490 | + name = Debug; | ||
| 491 | + }; | ||
| 492 | + 6003F5BE195388D20070C39A /* Release */ = { | ||
| 493 | + isa = XCBuildConfiguration; | ||
| 494 | + buildSettings = { | ||
| 495 | + ALWAYS_SEARCH_USER_PATHS = NO; | ||
| 496 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | ||
| 497 | + CLANG_CXX_LIBRARY = "libc++"; | ||
| 498 | + CLANG_ENABLE_MODULES = YES; | ||
| 499 | + CLANG_ENABLE_OBJC_ARC = YES; | ||
| 500 | + CLANG_WARN_BOOL_CONVERSION = YES; | ||
| 501 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
| 502 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
| 503 | + CLANG_WARN_EMPTY_BODY = YES; | ||
| 504 | + CLANG_WARN_ENUM_CONVERSION = YES; | ||
| 505 | + CLANG_WARN_INT_CONVERSION = YES; | ||
| 506 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
| 507 | + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | ||
| 508 | + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | ||
| 509 | + COPY_PHASE_STRIP = YES; | ||
| 510 | + ENABLE_NS_ASSERTIONS = NO; | ||
| 511 | + GCC_C_LANGUAGE_STANDARD = gnu99; | ||
| 512 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
| 513 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
| 514 | + GCC_WARN_UNDECLARED_SELECTOR = YES; | ||
| 515 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
| 516 | + GCC_WARN_UNUSED_FUNCTION = YES; | ||
| 517 | + GCC_WARN_UNUSED_VARIABLE = YES; | ||
| 518 | + IPHONEOS_DEPLOYMENT_TARGET = 9.3; | ||
| 519 | + SDKROOT = iphoneos; | ||
| 520 | + TARGETED_DEVICE_FAMILY = "1,2"; | ||
| 521 | + VALIDATE_PRODUCT = YES; | ||
| 522 | + }; | ||
| 523 | + name = Release; | ||
| 524 | + }; | ||
| 525 | + 6003F5C0195388D20070C39A /* Debug */ = { | ||
| 526 | + isa = XCBuildConfiguration; | ||
| 527 | + baseConfigurationReference = B1043828819A650359710010 /* Pods-CNLiveIntegralModule_Example.debug.xcconfig */; | ||
| 528 | + buildSettings = { | ||
| 529 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
| 530 | + DEVELOPMENT_TEAM = 94X49GG3ZW; | ||
| 531 | + GCC_PRECOMPILE_PREFIX_HEADER = YES; | ||
| 532 | + GCC_PREFIX_HEADER = "CNLiveIntegralModule/CNLiveIntegralModule-Prefix.pch"; | ||
| 533 | + INFOPLIST_FILE = "CNLiveIntegralModule/CNLiveIntegralModule-Info.plist"; | ||
| 534 | + MODULE_NAME = ExampleApp; | ||
| 535 | + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; | ||
| 536 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 537 | + SWIFT_VERSION = 4.0; | ||
| 538 | + WRAPPER_EXTENSION = app; | ||
| 539 | + }; | ||
| 540 | + name = Debug; | ||
| 541 | + }; | ||
| 542 | + 6003F5C1195388D20070C39A /* Release */ = { | ||
| 543 | + isa = XCBuildConfiguration; | ||
| 544 | + baseConfigurationReference = 7197587013C3AAF2E907A30E /* Pods-CNLiveIntegralModule_Example.release.xcconfig */; | ||
| 545 | + buildSettings = { | ||
| 546 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
| 547 | + DEVELOPMENT_TEAM = 94X49GG3ZW; | ||
| 548 | + GCC_PRECOMPILE_PREFIX_HEADER = YES; | ||
| 549 | + GCC_PREFIX_HEADER = "CNLiveIntegralModule/CNLiveIntegralModule-Prefix.pch"; | ||
| 550 | + INFOPLIST_FILE = "CNLiveIntegralModule/CNLiveIntegralModule-Info.plist"; | ||
| 551 | + MODULE_NAME = ExampleApp; | ||
| 552 | + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; | ||
| 553 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 554 | + SWIFT_VERSION = 4.0; | ||
| 555 | + WRAPPER_EXTENSION = app; | ||
| 556 | + }; | ||
| 557 | + name = Release; | ||
| 558 | + }; | ||
| 559 | + 6003F5C3195388D20070C39A /* Debug */ = { | ||
| 560 | + isa = XCBuildConfiguration; | ||
| 561 | + baseConfigurationReference = A62BB4FD387F3C8E29175952 /* Pods-CNLiveIntegralModule_Tests.debug.xcconfig */; | ||
| 562 | + buildSettings = { | ||
| 563 | + BUNDLE_LOADER = "$(TEST_HOST)"; | ||
| 564 | + FRAMEWORK_SEARCH_PATHS = ( | ||
| 565 | + "$(PLATFORM_DIR)/Developer/Library/Frameworks", | ||
| 566 | + "$(inherited)", | ||
| 567 | + "$(DEVELOPER_FRAMEWORKS_DIR)", | ||
| 568 | + ); | ||
| 569 | + GCC_PRECOMPILE_PREFIX_HEADER = YES; | ||
| 570 | + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; | ||
| 571 | + GCC_PREPROCESSOR_DEFINITIONS = ( | ||
| 572 | + "DEBUG=1", | ||
| 573 | + "$(inherited)", | ||
| 574 | + ); | ||
| 575 | + INFOPLIST_FILE = "Tests/Tests-Info.plist"; | ||
| 576 | + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; | ||
| 577 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 578 | + SWIFT_VERSION = 4.0; | ||
| 579 | + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CNLiveIntegralModule_Example.app/CNLiveIntegralModule_Example"; | ||
| 580 | + WRAPPER_EXTENSION = xctest; | ||
| 581 | + }; | ||
| 582 | + name = Debug; | ||
| 583 | + }; | ||
| 584 | + 6003F5C4195388D20070C39A /* Release */ = { | ||
| 585 | + isa = XCBuildConfiguration; | ||
| 586 | + baseConfigurationReference = 4ED4DEB3CFA970B22F98AF9E /* Pods-CNLiveIntegralModule_Tests.release.xcconfig */; | ||
| 587 | + buildSettings = { | ||
| 588 | + BUNDLE_LOADER = "$(TEST_HOST)"; | ||
| 589 | + FRAMEWORK_SEARCH_PATHS = ( | ||
| 590 | + "$(PLATFORM_DIR)/Developer/Library/Frameworks", | ||
| 591 | + "$(inherited)", | ||
| 592 | + "$(DEVELOPER_FRAMEWORKS_DIR)", | ||
| 593 | + ); | ||
| 594 | + GCC_PRECOMPILE_PREFIX_HEADER = YES; | ||
| 595 | + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; | ||
| 596 | + INFOPLIST_FILE = "Tests/Tests-Info.plist"; | ||
| 597 | + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; | ||
| 598 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 599 | + SWIFT_VERSION = 4.0; | ||
| 600 | + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CNLiveIntegralModule_Example.app/CNLiveIntegralModule_Example"; | ||
| 601 | + WRAPPER_EXTENSION = xctest; | ||
| 602 | + }; | ||
| 603 | + name = Release; | ||
| 604 | + }; | ||
| 605 | +/* End XCBuildConfiguration section */ | ||
| 606 | + | ||
| 607 | +/* Begin XCConfigurationList section */ | ||
| 608 | + 6003F585195388D10070C39A /* Build configuration list for PBXProject "CNLiveIntegralModule" */ = { | ||
| 609 | + isa = XCConfigurationList; | ||
| 610 | + buildConfigurations = ( | ||
| 611 | + 6003F5BD195388D20070C39A /* Debug */, | ||
| 612 | + 6003F5BE195388D20070C39A /* Release */, | ||
| 613 | + ); | ||
| 614 | + defaultConfigurationIsVisible = 0; | ||
| 615 | + defaultConfigurationName = Release; | ||
| 616 | + }; | ||
| 617 | + 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveIntegralModule_Example" */ = { | ||
| 618 | + isa = XCConfigurationList; | ||
| 619 | + buildConfigurations = ( | ||
| 620 | + 6003F5C0195388D20070C39A /* Debug */, | ||
| 621 | + 6003F5C1195388D20070C39A /* Release */, | ||
| 622 | + ); | ||
| 623 | + defaultConfigurationIsVisible = 0; | ||
| 624 | + defaultConfigurationName = Release; | ||
| 625 | + }; | ||
| 626 | + 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveIntegralModule_Tests" */ = { | ||
| 627 | + isa = XCConfigurationList; | ||
| 628 | + buildConfigurations = ( | ||
| 629 | + 6003F5C3195388D20070C39A /* Debug */, | ||
| 630 | + 6003F5C4195388D20070C39A /* Release */, | ||
| 631 | + ); | ||
| 632 | + defaultConfigurationIsVisible = 0; | ||
| 633 | + defaultConfigurationName = Release; | ||
| 634 | + }; | ||
| 635 | +/* End XCConfigurationList section */ | ||
| 636 | + }; | ||
| 637 | + rootObject = 6003F582195388D10070C39A /* Project object */; | ||
| 638 | +} |
Example/CNLiveIntegralModule.xcodeproj/xcshareddata/xcschemes/CNLiveIntegralModule-Example.xcscheme
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<Scheme | ||
| 3 | + LastUpgradeVersion = "0720" | ||
| 4 | + version = "1.3"> | ||
| 5 | + <BuildAction | ||
| 6 | + parallelizeBuildables = "YES" | ||
| 7 | + buildImplicitDependencies = "YES"> | ||
| 8 | + <BuildActionEntries> | ||
| 9 | + <BuildActionEntry | ||
| 10 | + buildForTesting = "YES" | ||
| 11 | + buildForRunning = "YES" | ||
| 12 | + buildForProfiling = "YES" | ||
| 13 | + buildForArchiving = "YES" | ||
| 14 | + buildForAnalyzing = "YES"> | ||
| 15 | + <BuildableReference | ||
| 16 | + BuildableIdentifier = "primary" | ||
| 17 | + BlueprintIdentifier = "6003F589195388D20070C39A" | ||
| 18 | + BuildableName = "CNLiveIntegralModule_Example.app" | ||
| 19 | + BlueprintName = "CNLiveIntegralModule_Example" | ||
| 20 | + ReferencedContainer = "container:CNLiveIntegralModule.xcodeproj"> | ||
| 21 | + </BuildableReference> | ||
| 22 | + </BuildActionEntry> | ||
| 23 | + </BuildActionEntries> | ||
| 24 | + </BuildAction> | ||
| 25 | + <TestAction | ||
| 26 | + buildConfiguration = "Debug" | ||
| 27 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| 28 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| 29 | + shouldUseLaunchSchemeArgsEnv = "YES"> | ||
| 30 | + <Testables> | ||
| 31 | + <TestableReference | ||
| 32 | + skipped = "NO"> | ||
| 33 | + <BuildableReference | ||
| 34 | + BuildableIdentifier = "primary" | ||
| 35 | + BlueprintIdentifier = "6003F5AD195388D20070C39A" | ||
| 36 | + BuildableName = "CNLiveIntegralModule_Tests.xctest" | ||
| 37 | + BlueprintName = "CNLiveIntegralModule_Tests" | ||
| 38 | + ReferencedContainer = "container:CNLiveIntegralModule.xcodeproj"> | ||
| 39 | + </BuildableReference> | ||
| 40 | + </TestableReference> | ||
| 41 | + </Testables> | ||
| 42 | + <MacroExpansion> | ||
| 43 | + <BuildableReference | ||
| 44 | + BuildableIdentifier = "primary" | ||
| 45 | + BlueprintIdentifier = "6003F589195388D20070C39A" | ||
| 46 | + BuildableName = "CNLiveIntegralModule_Example.app" | ||
| 47 | + BlueprintName = "CNLiveIntegralModule_Example" | ||
| 48 | + ReferencedContainer = "container:CNLiveIntegralModule.xcodeproj"> | ||
| 49 | + </BuildableReference> | ||
| 50 | + </MacroExpansion> | ||
| 51 | + <AdditionalOptions> | ||
| 52 | + </AdditionalOptions> | ||
| 53 | + </TestAction> | ||
| 54 | + <LaunchAction | ||
| 55 | + buildConfiguration = "Debug" | ||
| 56 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| 57 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| 58 | + launchStyle = "0" | ||
| 59 | + useCustomWorkingDirectory = "NO" | ||
| 60 | + ignoresPersistentStateOnLaunch = "NO" | ||
| 61 | + debugDocumentVersioning = "YES" | ||
| 62 | + debugServiceExtension = "internal" | ||
| 63 | + allowLocationSimulation = "YES"> | ||
| 64 | + <BuildableProductRunnable | ||
| 65 | + runnableDebuggingMode = "0"> | ||
| 66 | + <BuildableReference | ||
| 67 | + BuildableIdentifier = "primary" | ||
| 68 | + BlueprintIdentifier = "6003F589195388D20070C39A" | ||
| 69 | + BuildableName = "CNLiveIntegralModule_Example.app" | ||
| 70 | + BlueprintName = "CNLiveIntegralModule_Example" | ||
| 71 | + ReferencedContainer = "container:CNLiveIntegralModule.xcodeproj"> | ||
| 72 | + </BuildableReference> | ||
| 73 | + </BuildableProductRunnable> | ||
| 74 | + <AdditionalOptions> | ||
| 75 | + </AdditionalOptions> | ||
| 76 | + </LaunchAction> | ||
| 77 | + <ProfileAction | ||
| 78 | + buildConfiguration = "Release" | ||
| 79 | + shouldUseLaunchSchemeArgsEnv = "YES" | ||
| 80 | + savedToolIdentifier = "" | ||
| 81 | + useCustomWorkingDirectory = "NO" | ||
| 82 | + debugDocumentVersioning = "YES"> | ||
| 83 | + <BuildableProductRunnable | ||
| 84 | + runnableDebuggingMode = "0"> | ||
| 85 | + <BuildableReference | ||
| 86 | + BuildableIdentifier = "primary" | ||
| 87 | + BlueprintIdentifier = "6003F589195388D20070C39A" | ||
| 88 | + BuildableName = "CNLiveIntegralModule_Example.app" | ||
| 89 | + BlueprintName = "CNLiveIntegralModule_Example" | ||
| 90 | + ReferencedContainer = "container:CNLiveIntegralModule.xcodeproj"> | ||
| 91 | + </BuildableReference> | ||
| 92 | + </BuildableProductRunnable> | ||
| 93 | + </ProfileAction> | ||
| 94 | + <AnalyzeAction | ||
| 95 | + buildConfiguration = "Debug"> | ||
| 96 | + </AnalyzeAction> | ||
| 97 | + <ArchiveAction | ||
| 98 | + buildConfiguration = "Release" | ||
| 99 | + revealArchiveInOrganizer = "YES"> | ||
| 100 | + </ArchiveAction> | ||
| 101 | +</Scheme> |
Example/CNLiveIntegralModule/Base.lproj/LaunchScreen.storyboard
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> | ||
| 3 | + <device id="retina4_7" orientation="portrait"> | ||
| 4 | + <adaptation id="fullscreen"/> | ||
| 5 | + </device> | ||
| 6 | + <dependencies> | ||
| 7 | + <deployment identifier="iOS"/> | ||
| 8 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> | ||
| 9 | + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
| 10 | + </dependencies> | ||
| 11 | + <scenes> | ||
| 12 | + <!--View Controller--> | ||
| 13 | + <scene sceneID="EHf-IW-A2E"> | ||
| 14 | + <objects> | ||
| 15 | + <viewController id="01J-lp-oVM" sceneMemberID="viewController"> | ||
| 16 | + <layoutGuides> | ||
| 17 | + <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/> | ||
| 18 | + <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/> | ||
| 19 | + </layoutGuides> | ||
| 20 | + <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> | ||
| 21 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
| 22 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
| 23 | + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
| 24 | + </view> | ||
| 25 | + </viewController> | ||
| 26 | + <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
| 27 | + </objects> | ||
| 28 | + <point key="canvasLocation" x="53" y="375"/> | ||
| 29 | + </scene> | ||
| 30 | + </scenes> | ||
| 31 | +</document> |
Example/CNLiveIntegralModule/Base.lproj/Main.storyboard
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="whP-gf-Uak"> | ||
| 3 | + <device id="retina4_7" orientation="portrait"> | ||
| 4 | + <adaptation id="fullscreen"/> | ||
| 5 | + </device> | ||
| 6 | + <dependencies> | ||
| 7 | + <deployment identifier="iOS"/> | ||
| 8 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> | ||
| 9 | + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
| 10 | + </dependencies> | ||
| 11 | + <scenes> | ||
| 12 | + <!--View Controller--> | ||
| 13 | + <scene sceneID="wQg-tq-qST"> | ||
| 14 | + <objects> | ||
| 15 | + <viewController id="whP-gf-Uak" customClass="CNLIVEViewController" sceneMemberID="viewController"> | ||
| 16 | + <layoutGuides> | ||
| 17 | + <viewControllerLayoutGuide type="top" id="uEw-UM-LJ8"/> | ||
| 18 | + <viewControllerLayoutGuide type="bottom" id="Mvr-aV-6Um"/> | ||
| 19 | + </layoutGuides> | ||
| 20 | + <view key="view" contentMode="scaleToFill" id="TpU-gO-2f1"> | ||
| 21 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
| 22 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
| 23 | + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
| 24 | + </view> | ||
| 25 | + </viewController> | ||
| 26 | + <placeholder placeholderIdentifier="IBFirstResponder" id="tc2-Qw-aMS" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
| 27 | + </objects> | ||
| 28 | + <point key="canvasLocation" x="305" y="433"/> | ||
| 29 | + </scene> | ||
| 30 | + </scenes> | ||
| 31 | +</document> |
Example/CNLiveIntegralModule/CNLIVEAppDelegate.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLIVEAppDelegate.h | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by 153993236@qq.com on 11/18/2019. | ||
| 6 | +// Copyright (c) 2019 153993236@qq.com. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +@import UIKit; | ||
| 10 | + | ||
| 11 | +@interface CNLIVEAppDelegate : UIResponder <UIApplicationDelegate> | ||
| 12 | + | ||
| 13 | +@property (strong, nonatomic) UIWindow *window; | ||
| 14 | + | ||
| 15 | +@end |
Example/CNLiveIntegralModule/CNLIVEAppDelegate.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLIVEAppDelegate.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by 153993236@qq.com on 11/18/2019. | ||
| 6 | +// Copyright (c) 2019 153993236@qq.com. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLIVEAppDelegate.h" | ||
| 10 | +#import "CNLiveEnvironment.h" | ||
| 11 | +#import "CNLiveTaskListController.h" | ||
| 12 | + | ||
| 13 | +@implementation CNLIVEAppDelegate | ||
| 14 | + | ||
| 15 | +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | ||
| 16 | +{ | ||
| 17 | + // Override point for customization after application launch. | ||
| 18 | + [CNLiveEnvironmentManager setEnvironment:CNLiveDebugAppStore]; | ||
| 19 | + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; | ||
| 20 | + CNLiveTaskListController *vc = [[CNLiveTaskListController alloc] init]; | ||
| 21 | + // vc.jump_URL = @"http://www.baidu.com"; | ||
| 22 | + UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:vc]; | ||
| 23 | + | ||
| 24 | + self.window.rootViewController = nav;//设置根视图控制器 | ||
| 25 | + | ||
| 26 | + [self.window makeKeyAndVisible]; | ||
| 27 | + return YES; | ||
| 28 | +} | ||
| 29 | + | ||
| 30 | +- (void)applicationWillResignActive:(UIApplication *)application | ||
| 31 | +{ | ||
| 32 | + // 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. | ||
| 33 | + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. | ||
| 34 | +} | ||
| 35 | + | ||
| 36 | +- (void)applicationDidEnterBackground:(UIApplication *)application | ||
| 37 | +{ | ||
| 38 | + // 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. | ||
| 39 | + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. | ||
| 40 | +} | ||
| 41 | + | ||
| 42 | +- (void)applicationWillEnterForeground:(UIApplication *)application | ||
| 43 | +{ | ||
| 44 | + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. | ||
| 45 | +} | ||
| 46 | + | ||
| 47 | +- (void)applicationDidBecomeActive:(UIApplication *)application | ||
| 48 | +{ | ||
| 49 | + // 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. | ||
| 50 | +} | ||
| 51 | + | ||
| 52 | +- (void)applicationWillTerminate:(UIApplication *)application | ||
| 53 | +{ | ||
| 54 | + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. | ||
| 55 | +} | ||
| 56 | + | ||
| 57 | +@end |
Example/CNLiveIntegralModule/CNLIVEViewController.h
0 → 100644
Example/CNLiveIntegralModule/CNLIVEViewController.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLIVEViewController.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by 153993236@qq.com on 11/18/2019. | ||
| 6 | +// Copyright (c) 2019 153993236@qq.com. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLIVEViewController.h" | ||
| 10 | + | ||
| 11 | +@interface CNLIVEViewController () | ||
| 12 | + | ||
| 13 | +@end | ||
| 14 | + | ||
| 15 | +@implementation CNLIVEViewController | ||
| 16 | + | ||
| 17 | +- (void)viewDidLoad | ||
| 18 | +{ | ||
| 19 | + [super viewDidLoad]; | ||
| 20 | + // Do any additional setup after loading the view, typically from a nib. | ||
| 21 | +} | ||
| 22 | + | ||
| 23 | +- (void)didReceiveMemoryWarning | ||
| 24 | +{ | ||
| 25 | + [super didReceiveMemoryWarning]; | ||
| 26 | + // Dispose of any resources that can be recreated. | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +@end |
Example/CNLiveIntegralModule/CNLiveIntegralModule-Info.plist
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| 3 | +<plist version="1.0"> | ||
| 4 | +<dict> | ||
| 5 | + <key>NSAppTransportSecurity</key> | ||
| 6 | + <dict> | ||
| 7 | + <key>NSAllowsArbitraryLoads</key> | ||
| 8 | + <true/> | ||
| 9 | + </dict> | ||
| 10 | + <key>CFBundleDevelopmentRegion</key> | ||
| 11 | + <string>en</string> | ||
| 12 | + <key>CFBundleDisplayName</key> | ||
| 13 | + <string>${PRODUCT_NAME}</string> | ||
| 14 | + <key>CFBundleExecutable</key> | ||
| 15 | + <string>${EXECUTABLE_NAME}</string> | ||
| 16 | + <key>CFBundleIdentifier</key> | ||
| 17 | + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
| 18 | + <key>CFBundleInfoDictionaryVersion</key> | ||
| 19 | + <string>6.0</string> | ||
| 20 | + <key>CFBundleName</key> | ||
| 21 | + <string>${PRODUCT_NAME}</string> | ||
| 22 | + <key>CFBundlePackageType</key> | ||
| 23 | + <string>APPL</string> | ||
| 24 | + <key>CFBundleShortVersionString</key> | ||
| 25 | + <string>1.0</string> | ||
| 26 | + <key>CFBundleSignature</key> | ||
| 27 | + <string>????</string> | ||
| 28 | + <key>CFBundleVersion</key> | ||
| 29 | + <string>1.0</string> | ||
| 30 | + <key>LSRequiresIPhoneOS</key> | ||
| 31 | + <true/> | ||
| 32 | + <key>UILaunchStoryboardName</key> | ||
| 33 | + <string>LaunchScreen</string> | ||
| 34 | + <key>UIMainStoryboardFile</key> | ||
| 35 | + <string>Main</string> | ||
| 36 | + <key>UIRequiredDeviceCapabilities</key> | ||
| 37 | + <array> | ||
| 38 | + <string>armv7</string> | ||
| 39 | + </array> | ||
| 40 | + <key>UISupportedInterfaceOrientations</key> | ||
| 41 | + <array> | ||
| 42 | + <string>UIInterfaceOrientationPortrait</string> | ||
| 43 | + <string>UIInterfaceOrientationLandscapeLeft</string> | ||
| 44 | + <string>UIInterfaceOrientationLandscapeRight</string> | ||
| 45 | + </array> | ||
| 46 | + <key>UISupportedInterfaceOrientations~ipad</key> | ||
| 47 | + <array> | ||
| 48 | + <string>UIInterfaceOrientationPortrait</string> | ||
| 49 | + <string>UIInterfaceOrientationPortraitUpsideDown</string> | ||
| 50 | + <string>UIInterfaceOrientationLandscapeLeft</string> | ||
| 51 | + <string>UIInterfaceOrientationLandscapeRight</string> | ||
| 52 | + </array> | ||
| 53 | +</dict> | ||
| 54 | +</plist> |
Example/CNLiveIntegralModule/CNLiveIntegralModule-Prefix.pch
0 → 100644
| 1 | +// | ||
| 2 | +// Prefix header | ||
| 3 | +// | ||
| 4 | +// The contents of this file are implicitly included at the beginning of every source file. | ||
| 5 | +// | ||
| 6 | + | ||
| 7 | +#import <Availability.h> | ||
| 8 | + | ||
| 9 | +#ifndef __IPHONE_5_0 | ||
| 10 | +#warning "This project uses features only available in iOS SDK 5.0 and later." | ||
| 11 | +#endif | ||
| 12 | + | ||
| 13 | +#ifdef __OBJC__ | ||
| 14 | + @import UIKit; | ||
| 15 | + @import Foundation; | ||
| 16 | +#endif |
Example/CNLiveIntegralModule/Images.xcassets/AppIcon.appiconset/Contents.json
0 → 100644
| 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" : "ipad", | ||
| 45 | + "size" : "20x20", | ||
| 46 | + "scale" : "1x" | ||
| 47 | + }, | ||
| 48 | + { | ||
| 49 | + "idiom" : "ipad", | ||
| 50 | + "size" : "20x20", | ||
| 51 | + "scale" : "2x" | ||
| 52 | + }, | ||
| 53 | + { | ||
| 54 | + "idiom" : "ipad", | ||
| 55 | + "size" : "29x29", | ||
| 56 | + "scale" : "1x" | ||
| 57 | + }, | ||
| 58 | + { | ||
| 59 | + "idiom" : "ipad", | ||
| 60 | + "size" : "29x29", | ||
| 61 | + "scale" : "2x" | ||
| 62 | + }, | ||
| 63 | + { | ||
| 64 | + "idiom" : "ipad", | ||
| 65 | + "size" : "40x40", | ||
| 66 | + "scale" : "1x" | ||
| 67 | + }, | ||
| 68 | + { | ||
| 69 | + "idiom" : "ipad", | ||
| 70 | + "size" : "40x40", | ||
| 71 | + "scale" : "2x" | ||
| 72 | + }, | ||
| 73 | + { | ||
| 74 | + "idiom" : "ipad", | ||
| 75 | + "size" : "76x76", | ||
| 76 | + "scale" : "1x" | ||
| 77 | + }, | ||
| 78 | + { | ||
| 79 | + "idiom" : "ipad", | ||
| 80 | + "size" : "76x76", | ||
| 81 | + "scale" : "2x" | ||
| 82 | + }, | ||
| 83 | + { | ||
| 84 | + "idiom" : "ipad", | ||
| 85 | + "size" : "83.5x83.5", | ||
| 86 | + "scale" : "2x" | ||
| 87 | + }, | ||
| 88 | + { | ||
| 89 | + "idiom" : "ios-marketing", | ||
| 90 | + "size" : "1024x1024", | ||
| 91 | + "scale" : "1x" | ||
| 92 | + } | ||
| 93 | + ], | ||
| 94 | + "info" : { | ||
| 95 | + "version" : 1, | ||
| 96 | + "author" : "xcode" | ||
| 97 | + } | ||
| 98 | +} |
Example/CNLiveIntegralModule/en.lproj/InfoPlist.strings
0 → 100644
Example/CNLiveIntegralModule/main.m
0 → 100644
| 1 | +// | ||
| 2 | +// main.m | ||
| 3 | +// CNLiveIntegralModule | ||
| 4 | +// | ||
| 5 | +// Created by 153993236@qq.com on 11/18/2019. | ||
| 6 | +// Copyright (c) 2019 153993236@qq.com. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +@import UIKit; | ||
| 10 | +#import "CNLIVEAppDelegate.h" | ||
| 11 | + | ||
| 12 | +int main(int argc, char * argv[]) | ||
| 13 | +{ | ||
| 14 | + @autoreleasepool { | ||
| 15 | + return UIApplicationMain(argc, argv, nil, NSStringFromClass([CNLIVEAppDelegate class])); | ||
| 16 | + } | ||
| 17 | +} |
Example/Podfile
0 → 100644
| 1 | +use_frameworks! | ||
| 2 | +source 'https://github.com/CocoaPods/Specs.git' | ||
| 3 | +source 'http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git' | ||
| 4 | + | ||
| 5 | +platform :ios, '9.0' | ||
| 6 | + | ||
| 7 | +target 'CNLiveIntegralModule_Example' do | ||
| 8 | + pod 'CNLiveIntegralModule', :path => '../' | ||
| 9 | + | ||
| 10 | + target 'CNLiveIntegralModule_Tests' do | ||
| 11 | + inherit! :search_paths | ||
| 12 | + | ||
| 13 | + | ||
| 14 | + end | ||
| 15 | +end |
Example/Tests/Tests-Info.plist
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| 3 | +<plist version="1.0"> | ||
| 4 | +<dict> | ||
| 5 | + <key>CFBundleDevelopmentRegion</key> | ||
| 6 | + <string>en</string> | ||
| 7 | + <key>CFBundleExecutable</key> | ||
| 8 | + <string>${EXECUTABLE_NAME}</string> | ||
| 9 | + <key>CFBundleIdentifier</key> | ||
| 10 | + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
| 11 | + <key>CFBundleInfoDictionaryVersion</key> | ||
| 12 | + <string>6.0</string> | ||
| 13 | + <key>CFBundlePackageType</key> | ||
| 14 | + <string>BNDL</string> | ||
| 15 | + <key>CFBundleShortVersionString</key> | ||
| 16 | + <string>1.0</string> | ||
| 17 | + <key>CFBundleSignature</key> | ||
| 18 | + <string>????</string> | ||
| 19 | + <key>CFBundleVersion</key> | ||
| 20 | + <string>1</string> | ||
| 21 | +</dict> | ||
| 22 | +</plist> |
Example/Tests/Tests-Prefix.pch
0 → 100644
Example/Tests/Tests.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveIntegralModuleTests.m | ||
| 3 | +// CNLiveIntegralModuleTests | ||
| 4 | +// | ||
| 5 | +// Created by 153993236@qq.com on 11/18/2019. | ||
| 6 | +// Copyright (c) 2019 153993236@qq.com. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +@import XCTest; | ||
| 10 | + | ||
| 11 | +@interface Tests : XCTestCase | ||
| 12 | + | ||
| 13 | +@end | ||
| 14 | + | ||
| 15 | +@implementation Tests | ||
| 16 | + | ||
| 17 | +- (void)setUp | ||
| 18 | +{ | ||
| 19 | + [super setUp]; | ||
| 20 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
| 21 | +} | ||
| 22 | + | ||
| 23 | +- (void)tearDown | ||
| 24 | +{ | ||
| 25 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
| 26 | + [super tearDown]; | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +- (void)testExample | ||
| 30 | +{ | ||
| 31 | + XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); | ||
| 32 | +} | ||
| 33 | + | ||
| 34 | +@end | ||
| 35 | + |
Example/Tests/en.lproj/InfoPlist.strings
0 → 100644
LICENSE
0 → 100644
| 1 | +Copyright (c) 2019 153993236@qq.com <zhangxiaowen@cnlive.com> | ||
| 2 | + | ||
| 3 | +Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 4 | +of this software and associated documentation files (the "Software"), to deal | ||
| 5 | +in the Software without restriction, including without limitation the rights | ||
| 6 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| 7 | +copies of the Software, and to permit persons to whom the Software is | ||
| 8 | +furnished to do so, subject to the following conditions: | ||
| 9 | + | ||
| 10 | +The above copyright notice and this permission notice shall be included in | ||
| 11 | +all copies or substantial portions of the Software. | ||
| 12 | + | ||
| 13 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 14 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 15 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 16 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 17 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 18 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| 19 | +THE SOFTWARE. |
README.md
| 1 | -CNLiveIntegralModule | ||
| 2 | \ No newline at end of file | 1 | \ No newline at end of file |
| 2 | +# CNLiveIntegralModule | ||
| 3 | + | ||
| 4 | +[](https://travis-ci.org/153993236@qq.com/CNLiveIntegralModule) | ||
| 5 | +[](https://cocoapods.org/pods/CNLiveIntegralModule) | ||
| 6 | +[](https://cocoapods.org/pods/CNLiveIntegralModule) | ||
| 7 | +[](https://cocoapods.org/pods/CNLiveIntegralModule) | ||
| 8 | + | ||
| 9 | +## Example | ||
| 10 | + | ||
| 11 | +To run the example project, clone the repo, and run `pod install` from the Example directory first. | ||
| 12 | + | ||
| 13 | +## Requirements | ||
| 14 | + | ||
| 15 | +## Installation | ||
| 16 | + | ||
| 17 | +CNLiveIntegralModule is available through [CocoaPods](https://cocoapods.org). To install | ||
| 18 | +it, simply add the following line to your Podfile: | ||
| 19 | + | ||
| 20 | +```ruby | ||
| 21 | +pod 'CNLiveIntegralModule' | ||
| 22 | +``` | ||
| 23 | + | ||
| 24 | +## Author | ||
| 25 | + | ||
| 26 | +153993236@qq.com, zhangxiaowen@cnlive.com | ||
| 27 | + | ||
| 28 | +## License | ||
| 29 | + | ||
| 30 | +CNLiveIntegralModule is available under the MIT license. See the LICENSE file for more info. |
_Pods.xcodeproj
0 → 120000