12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-20.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-20@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-20@2x-1.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-29@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-29@2x-1.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-40@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-40@2x-1.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/AppIcon.appiconset/icon.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_nav_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_leftbackicon_nav_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_leftbackicon_nav_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_nav_nor.imageset/infor_leftbackicon_nav_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_nav_nor.imageset/infor_leftbackicon_nav_nor@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_nav_nor.imageset/infor_leftbackicon_nav_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_nav_nor.imageset/infor_leftbackicon_nav_nor@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_nav_pre.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_leftbackicon_nav_pre@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_leftbackicon_nav_pre@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_nav_pre.imageset/infor_leftbackicon_nav_pre@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_nav_pre.imageset/infor_leftbackicon_nav_pre@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_nav_pre.imageset/infor_leftbackicon_nav_pre@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_nav_pre.imageset/infor_leftbackicon_nav_pre@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_white_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_leftbackicon_white_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_leftbackicon_white_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_white_nor.imageset/infor_leftbackicon_white_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_white_nor.imageset/infor_leftbackicon_white_nor@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_white_nor.imageset/infor_leftbackicon_white_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_white_nor.imageset/infor_leftbackicon_white_nor@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_white_pre.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_leftbackicon_white_pre@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_leftbackicon_white_pre@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_white_pre.imageset/infor_leftbackicon_white_pre@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_white_pre.imageset/infor_leftbackicon_white_pre@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_white_pre.imageset/infor_leftbackicon_white_pre@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_leftbackicon_white_pre.imageset/infor_leftbackicon_white_pre@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_home_setup_nav.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_nav_home_setup_nav@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_nav_home_setup_nav@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_home_setup_nav.imageset/infor_nav_home_setup_nav@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_home_setup_nav.imageset/infor_nav_home_setup_nav@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_home_setup_nav.imageset/infor_nav_home_setup_nav@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_home_setup_nav.imageset/infor_nav_home_setup_nav@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_home_setup_pre.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_nav_home_setup_pre@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_nav_home_setup_pre@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_home_setup_pre.imageset/infor_nav_home_setup_pre@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_home_setup_pre.imageset/infor_nav_home_setup_pre@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_home_setup_pre.imageset/infor_nav_home_setup_pre@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_home_setup_pre.imageset/infor_nav_home_setup_pre@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_nav_more_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_nav_more_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_nor.imageset/infor_nav_more_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_nor.imageset/infor_nav_more_nor@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_nor.imageset/infor_nav_more_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_nor.imageset/infor_nav_more_nor@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_pre.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_nav_more_pre@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_nav_more_pre@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_pre.imageset/infor_nav_more_pre@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_pre.imageset/infor_nav_more_pre@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_pre.imageset/infor_nav_more_pre@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_pre.imageset/infor_nav_more_pre@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_white_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_nav_more_white_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_nav_more_white_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_white_nor.imageset/infor_nav_more_white_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_white_nor.imageset/infor_nav_more_white_nor@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_white_nor.imageset/infor_nav_more_white_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_white_nor.imageset/infor_nav_more_white_nor@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_white_pre.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_nav_more_white_pre@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_nav_more_white_pre@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_white_pre.imageset/infor_nav_more_white_pre@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_white_pre.imageset/infor_nav_more_white_pre@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_white_pre.imageset/infor_nav_more_white_pre@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Navigation/infor_nav_more_white_pre.imageset/infor_nav_more_white_pre@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_article_dislike_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_article_dislike_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_article_dislike_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_article_dislike_nor.imageset/infor_article_dislike_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/News/infor_article_dislike_nor.imageset/infor_article_dislike_nor@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_article_dislike_nor.imageset/infor_article_dislike_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/News/infor_article_dislike_nor.imageset/infor_article_dislike_nor@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_article_dislike_pre.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_article_dislike_pre@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_article_dislike_pre@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_article_dislike_pre.imageset/infor_article_dislike_pre@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/News/infor_article_dislike_pre.imageset/infor_article_dislike_pre@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_article_dislike_pre.imageset/infor_article_dislike_pre@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/News/infor_article_dislike_pre.imageset/infor_article_dislike_pre@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_article_good_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_article_good_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_article_good_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_article_good_nor.imageset/infor_article_good_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/News/infor_article_good_nor.imageset/infor_article_good_nor@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_article_good_nor.imageset/infor_article_good_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/News/infor_article_good_nor.imageset/infor_article_good_nor@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_article_good_pre.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_article_good_pre@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_article_good_pre@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_article_good_pre.imageset/infor_article_good_pre@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/News/infor_article_good_pre.imageset/infor_article_good_pre@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_article_good_pre.imageset/infor_article_good_pre@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/News/infor_article_good_pre.imageset/infor_article_good_pre@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_comment_praise_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_articlecom_good_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_articlecom_good_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_comment_praise_nor.imageset/infor_articlecom_good_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/News/infor_comment_praise_nor.imageset/infor_articlecom_good_nor@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_comment_praise_nor.imageset/infor_articlecom_good_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/News/infor_comment_praise_nor.imageset/infor_articlecom_good_nor@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_comment_praise_sel.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_articlecom_good_vis@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_articlecom_good_vis@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_comment_praise_sel.imageset/infor_articlecom_good_vis@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/News/infor_comment_praise_sel.imageset/infor_articlecom_good_vis@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_comment_praise_sel.imageset/infor_articlecom_good_vis@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/News/infor_comment_praise_sel.imageset/infor_articlecom_good_vis@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_tag_ad.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_list_home_ad@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_list_home_ad@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_tag_ad.imageset/infor_list_home_ad@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/News/infor_tag_ad.imageset/infor_list_home_ad@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/News/infor_tag_ad.imageset/infor_list_home_ad@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/News/infor_tag_ad.imageset/infor_list_home_ad@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_copylink_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_copylink_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_copylink_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_copylink_nor.imageset/infor_popshare_copylink_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_copylink_nor.imageset/infor_popshare_copylink_nor@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_copylink_nor.imageset/infor_popshare_copylink_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_copylink_nor.imageset/infor_popshare_copylink_nor@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_copylink_pre.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_copylink_pre@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_copylink_pre@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_copylink_pre.imageset/infor_popshare_copylink_pre@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_copylink_pre.imageset/infor_popshare_copylink_pre@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_copylink_pre.imageset/infor_popshare_copylink_pre@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_copylink_pre.imageset/infor_popshare_copylink_pre@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_day_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_day_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_day_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_day_nor.imageset/infor_popshare_day_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_day_nor.imageset/infor_popshare_day_nor@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_day_nor.imageset/infor_popshare_day_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_day_nor.imageset/infor_popshare_day_nor@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_day_pre.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_day_pre@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_day_pre@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_day_pre.imageset/infor_popshare_day_pre@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_day_pre.imageset/infor_popshare_day_pre@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_day_pre.imageset/infor_popshare_day_pre@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_day_pre.imageset/infor_popshare_day_pre@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_friends_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_friends_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_friends_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_friends_nor.imageset/infor_popshare_friends_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_friends_nor.imageset/infor_popshare_friends_nor@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_friends_nor.imageset/infor_popshare_friends_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_friends_nor.imageset/infor_popshare_friends_nor@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_friends_pre.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_friends_pre@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_friends_pre@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_friends_pre.imageset/infor_popshare_friends_pre@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_friends_pre.imageset/infor_popshare_friends_pre@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_friends_pre.imageset/infor_popshare_friends_pre@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_friends_pre.imageset/infor_popshare_friends_pre@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_kunjian_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_kunjian_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_kunjian_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_kunjian_nor.imageset/infor_popshare_kunjian_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_kunjian_nor.imageset/infor_popshare_kunjian_nor@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_kunjian_nor.imageset/infor_popshare_kunjian_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_kunjian_nor.imageset/infor_popshare_kunjian_nor@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_kunjian_pre.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_kunjian_pre@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_kunjian_pre@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_kunjian_pre.imageset/infor_popshare_kunjian_pre@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_kunjian_pre.imageset/infor_popshare_kunjian_pre@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_kunjian_pre.imageset/infor_popshare_kunjian_pre@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_kunjian_pre.imageset/infor_popshare_kunjian_pre@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_light_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_light_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_light_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_light_nor.imageset/infor_popshare_light_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_light_nor.imageset/infor_popshare_light_nor@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_light_nor.imageset/infor_popshare_light_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_light_nor.imageset/infor_popshare_light_nor@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_light_pre.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_light_pre@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_light_pre@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_light_pre.imageset/infor_popshare_light_pre@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_light_pre.imageset/infor_popshare_light_pre@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_light_pre.imageset/infor_popshare_light_pre@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_light_pre.imageset/infor_popshare_light_pre@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_qq_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_qq_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_qq_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_qq_nor.imageset/infor_popshare_qq_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_qq_nor.imageset/infor_popshare_qq_nor@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_qq_nor.imageset/infor_popshare_qq_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_qq_nor.imageset/infor_popshare_qq_nor@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_qq_pre.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_qq_pre@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_qq_pre@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_qq_pre.imageset/infor_popshare_qq_pre@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_qq_pre.imageset/infor_popshare_qq_pre@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_qq_pre.imageset/infor_popshare_qq_pre@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_qq_pre.imageset/infor_popshare_qq_pre@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_report_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_report_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_report_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_report_nor.imageset/infor_popshare_report_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_report_nor.imageset/infor_popshare_report_nor@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_report_nor.imageset/infor_popshare_report_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_report_nor.imageset/infor_popshare_report_nor@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_report_pre.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_report_pre@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_report_pre@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_report_pre.imageset/infor_popshare_report_pre@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_report_pre.imageset/infor_popshare_report_pre@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_report_pre.imageset/infor_popshare_report_pre@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_report_pre.imageset/infor_popshare_report_pre@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_sina_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_sina_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_sina_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_sina_nor.imageset/infor_popshare_sina_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_sina_nor.imageset/infor_popshare_sina_nor@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_sina_nor.imageset/infor_popshare_sina_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_sina_nor.imageset/infor_popshare_sina_nor@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_sina_pre.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_sina_pre@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_sina_pre@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_sina_pre.imageset/infor_popshare_sina_pre@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_sina_pre.imageset/infor_popshare_sina_pre@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_sina_pre.imageset/infor_popshare_sina_pre@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_sina_pre.imageset/infor_popshare_sina_pre@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_weixin_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_weixing_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_weixing_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_weixin_nor.imageset/infor_popshare_weixing_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_weixin_nor.imageset/infor_popshare_weixing_nor@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_weixin_nor.imageset/infor_popshare_weixing_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_weixin_nor.imageset/infor_popshare_weixing_nor@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_weixin_pre.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_weixing_pre@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_weixing_pre@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_weixin_pre.imageset/infor_popshare_weixing_pre@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_weixin_pre.imageset/infor_popshare_weixing_pre@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_weixin_pre.imageset/infor_popshare_weixing_pre@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_weixin_pre.imageset/infor_popshare_weixing_pre@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_wordsize_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_wordsize_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_wordsize_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_wordsize_nor.imageset/infor_popshare_wordsize_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_wordsize_nor.imageset/infor_popshare_wordsize_nor@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_wordsize_nor.imageset/infor_popshare_wordsize_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_wordsize_nor.imageset/infor_popshare_wordsize_nor@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_wordsize_pre.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_popshare_wordsize_pre@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_popshare_wordsize_pre@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_wordsize_pre.imageset/infor_popshare_wordsize_pre@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_wordsize_pre.imageset/infor_popshare_wordsize_pre@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_wordsize_pre.imageset/infor_popshare_wordsize_pre@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_popshare_wordsize_pre.imageset/infor_popshare_wordsize_pre@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_poptypebar_slider.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_poptypebar_slider@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_poptypebar_slider@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_poptypebar_slider.imageset/infor_poptypebar_slider@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_poptypebar_slider.imageset/infor_poptypebar_slider@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_poptypebar_slider.imageset/infor_poptypebar_slider@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_poptypebar_slider.imageset/infor_poptypebar_slider@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_poptypebar_wordbig.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_poptypebar_wordbig@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_poptypebar_wordbig@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_poptypebar_wordbig.imageset/infor_poptypebar_wordbig@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_poptypebar_wordbig.imageset/infor_poptypebar_wordbig@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_poptypebar_wordbig.imageset/infor_poptypebar_wordbig@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_poptypebar_wordbig.imageset/infor_poptypebar_wordbig@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_poptypebar_wordsmall.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "infor_poptypebar_wordsmall@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "infor_poptypebar_wordsmall@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_poptypebar_wordsmall.imageset/infor_poptypebar_wordsmall@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_poptypebar_wordsmall.imageset/infor_poptypebar_wordsmall@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_poptypebar_wordsmall.imageset/infor_poptypebar_wordsmall@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Assets.xcassets/Utility/Share/infor_poptypebar_wordsmall.imageset/infor_poptypebar_wordsmall@3x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/FakeData:
--------------------------------------------------------------------------------
1 |
2 | 女朋友和她姐姐是双胞胎,总是分不清!
3 |
4 | 猫:喜欢猴子养一个呗,在这折腾我干嘛?
5 |
6 | 一看就知道是只痛快狗!
7 |
8 | 被这个枪电一下不知道会不会死
9 |
10 | 可以吹一辈子了,那么我看你怎么拿下来
11 |
12 | 蓝翔毕业典礼
13 |
14 | 手指不够长啊
15 |
16 | 惊喜就是这样的
17 | 
18 | 惊不惊喜 意不意外
19 | 
20 | 开心一刻
21 | 带女朋友回家见家长:“妈,这是我女朋友。”妈打量了女朋友一番说:“你咋找个这样的?”女朋友瞬间脸色就变了,我赶紧打圆场。“妈,她是我女朋友,说话客气点,我们是真心相爱的。”没想到,妈拉过女朋友说:“闺女你那么漂亮,你咋找个这样的,这让我咋跟你爸妈交待……”
22 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/Base/MJRefreshAutoFooter.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshAutoFooter.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshFooter.h"
10 |
11 | @interface MJRefreshAutoFooter : MJRefreshFooter
12 | /** 是否自动刷新(默认为YES) */
13 | @property (assign, nonatomic, getter=isAutomaticallyRefresh) BOOL automaticallyRefresh;
14 |
15 | /** 当底部控件出现多少时就自动刷新(默认为1.0,也就是底部控件完全出现时,才会自动刷新) */
16 | @property (assign, nonatomic) CGFloat appearencePercentTriggerAutoRefresh MJRefreshDeprecated("请使用triggerAutomaticallyRefreshPercent属性");
17 |
18 | /** 当底部控件出现多少时就自动刷新(默认为1.0,也就是底部控件完全出现时,才会自动刷新) */
19 | @property (assign, nonatomic) CGFloat triggerAutomaticallyRefreshPercent;
20 | @end
21 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/Base/MJRefreshBackFooter.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshBackFooter.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshFooter.h"
10 |
11 | @interface MJRefreshBackFooter : MJRefreshFooter
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/Base/MJRefreshFooter.h:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | // MJRefreshFooter.h
4 | // MJRefreshExample
5 | //
6 | // Created by MJ Lee on 15/3/5.
7 | // Copyright (c) 2015年 小码哥. All rights reserved.
8 | // 上拉刷新控件
9 |
10 | #import "MJRefreshComponent.h"
11 |
12 | @interface MJRefreshFooter : MJRefreshComponent
13 | /** 创建footer */
14 | + (instancetype)footerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock;
15 | /** 创建footer */
16 | + (instancetype)footerWithRefreshingTarget:(id)target refreshingAction:(SEL)action;
17 |
18 | /** 提示没有更多的数据 */
19 | - (void)endRefreshingWithNoMoreData;
20 | - (void)noticeNoMoreData MJRefreshDeprecated("使用endRefreshingWithNoMoreData");
21 |
22 | /** 重置没有更多的数据(消除没有更多数据的状态) */
23 | - (void)resetNoMoreData;
24 |
25 | /** 忽略多少scrollView的contentInset的bottom */
26 | @property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetBottom;
27 |
28 | /** 自动根据有无数据来显示和隐藏(有数据就显示,没有数据隐藏。默认是NO) */
29 | @property (assign, nonatomic, getter=isAutomaticallyHidden) BOOL automaticallyHidden;
30 | @end
31 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/Base/MJRefreshFooter.m:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | // MJRefreshFooter.m
4 | // MJRefreshExample
5 | //
6 | // Created by MJ Lee on 15/3/5.
7 | // Copyright (c) 2015年 小码哥. All rights reserved.
8 | //
9 |
10 | #import "MJRefreshFooter.h"
11 |
12 | @interface MJRefreshFooter()
13 |
14 | @end
15 |
16 | @implementation MJRefreshFooter
17 | #pragma mark - 构造方法
18 | + (instancetype)footerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock
19 | {
20 | MJRefreshFooter *cmp = [[self alloc] init];
21 | cmp.refreshingBlock = refreshingBlock;
22 | return cmp;
23 | }
24 | + (instancetype)footerWithRefreshingTarget:(id)target refreshingAction:(SEL)action
25 | {
26 | MJRefreshFooter *cmp = [[self alloc] init];
27 | [cmp setRefreshingTarget:target refreshingAction:action];
28 | return cmp;
29 | }
30 |
31 | #pragma mark - 重写父类的方法
32 | - (void)prepare
33 | {
34 | [super prepare];
35 |
36 | // 设置自己的高度
37 | self.mj_h = MJRefreshFooterHeight;
38 |
39 | // 默认不会自动隐藏
40 | self.automaticallyHidden = NO;
41 | }
42 |
43 | - (void)willMoveToSuperview:(UIView *)newSuperview
44 | {
45 | [super willMoveToSuperview:newSuperview];
46 |
47 | if (newSuperview) {
48 | // 监听scrollView数据的变化
49 | if ([self.scrollView isKindOfClass:[UITableView class]] || [self.scrollView isKindOfClass:[UICollectionView class]]) {
50 | [self.scrollView setMj_reloadDataBlock:^(NSInteger totalDataCount) {
51 | if (self.isAutomaticallyHidden) {
52 | self.hidden = (totalDataCount == 0);
53 | }
54 | }];
55 | }
56 | }
57 | }
58 |
59 | #pragma mark - 公共方法
60 | - (void)endRefreshingWithNoMoreData
61 | {
62 | self.state = MJRefreshStateNoMoreData;
63 | }
64 |
65 | - (void)noticeNoMoreData
66 | {
67 | [self endRefreshingWithNoMoreData];
68 | }
69 |
70 | - (void)resetNoMoreData
71 | {
72 | self.state = MJRefreshStateIdle;
73 | }
74 | @end
75 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/Base/MJRefreshHeader.h:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | // MJRefreshHeader.h
4 | // MJRefreshExample
5 | //
6 | // Created by MJ Lee on 15/3/4.
7 | // Copyright (c) 2015年 小码哥. All rights reserved.
8 | // 下拉刷新控件:负责监控用户下拉的状态
9 |
10 | #import "MJRefreshComponent.h"
11 |
12 | @interface MJRefreshHeader : MJRefreshComponent
13 | /** 创建header */
14 | + (instancetype)headerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock;
15 | /** 创建header */
16 | + (instancetype)headerWithRefreshingTarget:(id)target refreshingAction:(SEL)action;
17 |
18 | /** 这个key用来存储上一次下拉刷新成功的时间 */
19 | @property (copy, nonatomic) NSString *lastUpdatedTimeKey;
20 | /** 上一次下拉刷新成功的时间 */
21 | @property (strong, nonatomic, readonly) NSDate *lastUpdatedTime;
22 |
23 | /** 忽略多少scrollView的contentInset的top */
24 | @property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetTop;
25 | @end
26 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshAutoGifFooter.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshAutoStateFooter.h"
10 |
11 | @interface MJRefreshAutoGifFooter : MJRefreshAutoStateFooter
12 | @property (weak, nonatomic, readonly) UIImageView *gifView;
13 |
14 | /** 设置state状态下的动画图片images 动画持续时间duration*/
15 | - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state;
16 | - (void)setImages:(NSArray *)images forState:(MJRefreshState)state;
17 | @end
18 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshAutoNormalFooter.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshAutoStateFooter.h"
10 |
11 | @interface MJRefreshAutoNormalFooter : MJRefreshAutoStateFooter
12 | /** 菊花的样式 */
13 | @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle;
14 | @end
15 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.m:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshAutoNormalFooter.m
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshAutoNormalFooter.h"
10 |
11 | @interface MJRefreshAutoNormalFooter()
12 | @property (weak, nonatomic) UIActivityIndicatorView *loadingView;
13 | @end
14 |
15 | @implementation MJRefreshAutoNormalFooter
16 | #pragma mark - 懒加载子控件
17 | - (UIActivityIndicatorView *)loadingView
18 | {
19 | if (!_loadingView) {
20 | UIActivityIndicatorView *loadingView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:self.activityIndicatorViewStyle];
21 | loadingView.hidesWhenStopped = YES;
22 | [self addSubview:_loadingView = loadingView];
23 | }
24 | return _loadingView;
25 | }
26 |
27 | - (void)setActivityIndicatorViewStyle:(UIActivityIndicatorViewStyle)activityIndicatorViewStyle
28 | {
29 | _activityIndicatorViewStyle = activityIndicatorViewStyle;
30 |
31 | self.loadingView = nil;
32 | [self setNeedsLayout];
33 | }
34 | #pragma mark - 重写父类的方法
35 | - (void)prepare
36 | {
37 | [super prepare];
38 |
39 | self.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;
40 | }
41 |
42 | - (void)placeSubviews
43 | {
44 | [super placeSubviews];
45 |
46 | if (self.loadingView.constraints.count) return;
47 |
48 | // 圈圈
49 | CGFloat loadingCenterX = self.mj_w * 0.5;
50 | if (!self.isRefreshingTitleHidden) {
51 | loadingCenterX -= self.stateLabel.mj_textWith * 0.5 + self.labelLeftInset;
52 | }
53 | CGFloat loadingCenterY = self.mj_h * 0.5;
54 | self.loadingView.center = CGPointMake(loadingCenterX, loadingCenterY);
55 | }
56 |
57 | - (void)setState:(MJRefreshState)state
58 | {
59 | MJRefreshCheckState
60 |
61 | // 根据状态做事情
62 | if (state == MJRefreshStateNoMoreData || state == MJRefreshStateIdle) {
63 | [self.loadingView stopAnimating];
64 | } else if (state == MJRefreshStateRefreshing) {
65 | [self.loadingView startAnimating];
66 | }
67 | }
68 |
69 | @end
70 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshAutoStateFooter.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/6/13.
6 | // Copyright © 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshAutoFooter.h"
10 |
11 | @interface MJRefreshAutoStateFooter : MJRefreshAutoFooter
12 | /** 文字距离圈圈、箭头的距离 */
13 | @property (assign, nonatomic) CGFloat labelLeftInset;
14 | /** 显示刷新状态的label */
15 | @property (weak, nonatomic, readonly) UILabel *stateLabel;
16 |
17 | /** 设置state状态下的文字 */
18 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state;
19 |
20 | /** 隐藏刷新状态的文字 */
21 | @property (assign, nonatomic, getter=isRefreshingTitleHidden) BOOL refreshingTitleHidden;
22 | @end
23 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshBackGifFooter.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshBackStateFooter.h"
10 |
11 | @interface MJRefreshBackGifFooter : MJRefreshBackStateFooter
12 | @property (weak, nonatomic, readonly) UIImageView *gifView;
13 |
14 | /** 设置state状态下的动画图片images 动画持续时间duration*/
15 | - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state;
16 | - (void)setImages:(NSArray *)images forState:(MJRefreshState)state;
17 | @end
18 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshBackNormalFooter.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshBackStateFooter.h"
10 |
11 | @interface MJRefreshBackNormalFooter : MJRefreshBackStateFooter
12 | @property (weak, nonatomic, readonly) UIImageView *arrowView;
13 | /** 菊花的样式 */
14 | @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle;
15 | @end
16 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshBackStateFooter.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/6/13.
6 | // Copyright © 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshBackFooter.h"
10 |
11 | @interface MJRefreshBackStateFooter : MJRefreshBackFooter
12 | /** 文字距离圈圈、箭头的距离 */
13 | @property (assign, nonatomic) CGFloat labelLeftInset;
14 | /** 显示刷新状态的label */
15 | @property (weak, nonatomic, readonly) UILabel *stateLabel;
16 | /** 设置state状态下的文字 */
17 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state;
18 |
19 | /** 获取state状态下的title */
20 | - (NSString *)titleForState:(MJRefreshState)state;
21 | @end
22 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.m:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshBackStateFooter.m
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/6/13.
6 | // Copyright © 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshBackStateFooter.h"
10 |
11 | @interface MJRefreshBackStateFooter()
12 | {
13 | /** 显示刷新状态的label */
14 | __unsafe_unretained UILabel *_stateLabel;
15 | }
16 | /** 所有状态对应的文字 */
17 | @property (strong, nonatomic) NSMutableDictionary *stateTitles;
18 | @end
19 |
20 | @implementation MJRefreshBackStateFooter
21 | #pragma mark - 懒加载
22 | - (NSMutableDictionary *)stateTitles
23 | {
24 | if (!_stateTitles) {
25 | self.stateTitles = [NSMutableDictionary dictionary];
26 | }
27 | return _stateTitles;
28 | }
29 |
30 | - (UILabel *)stateLabel
31 | {
32 | if (!_stateLabel) {
33 | [self addSubview:_stateLabel = [UILabel mj_label]];
34 | }
35 | return _stateLabel;
36 | }
37 |
38 | #pragma mark - 公共方法
39 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state
40 | {
41 | if (title == nil) return;
42 | self.stateTitles[@(state)] = title;
43 | self.stateLabel.text = self.stateTitles[@(self.state)];
44 | }
45 |
46 | - (NSString *)titleForState:(MJRefreshState)state {
47 | return self.stateTitles[@(state)];
48 | }
49 |
50 | #pragma mark - 重写父类的方法
51 | - (void)prepare
52 | {
53 | [super prepare];
54 |
55 | // 初始化间距
56 | self.labelLeftInset = MJRefreshLabelLeftInset;
57 |
58 | // 初始化文字
59 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterIdleText] forState:MJRefreshStateIdle];
60 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterPullingText] forState:MJRefreshStatePulling];
61 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterRefreshingText] forState:MJRefreshStateRefreshing];
62 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterNoMoreDataText] forState:MJRefreshStateNoMoreData];
63 | }
64 |
65 | - (void)placeSubviews
66 | {
67 | [super placeSubviews];
68 |
69 | if (self.stateLabel.constraints.count) return;
70 |
71 | // 状态标签
72 | self.stateLabel.frame = self.bounds;
73 | }
74 |
75 | - (void)setState:(MJRefreshState)state
76 | {
77 | MJRefreshCheckState
78 |
79 | // 设置状态文字
80 | self.stateLabel.text = self.stateTitles[@(state)];
81 | }
82 | @end
83 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/Custom/Header/MJRefreshGifHeader.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshGifHeader.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshStateHeader.h"
10 |
11 | @interface MJRefreshGifHeader : MJRefreshStateHeader
12 | @property (weak, nonatomic, readonly) UIImageView *gifView;
13 |
14 | /** 设置state状态下的动画图片images 动画持续时间duration*/
15 | - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state;
16 | - (void)setImages:(NSArray *)images forState:(MJRefreshState)state;
17 | @end
18 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/Custom/Header/MJRefreshNormalHeader.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshNormalHeader.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshStateHeader.h"
10 |
11 | @interface MJRefreshNormalHeader : MJRefreshStateHeader
12 | @property (weak, nonatomic, readonly) UIImageView *arrowView;
13 | /** 菊花的样式 */
14 | @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle;
15 | @end
16 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/Custom/Header/MJRefreshStateHeader.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshStateHeader.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshHeader.h"
10 |
11 | @interface MJRefreshStateHeader : MJRefreshHeader
12 | #pragma mark - 刷新时间相关
13 | /** 利用这个block来决定显示的更新时间文字 */
14 | @property (copy, nonatomic) NSString *(^lastUpdatedTimeText)(NSDate *lastUpdatedTime);
15 | /** 显示上一次刷新时间的label */
16 | @property (weak, nonatomic, readonly) UILabel *lastUpdatedTimeLabel;
17 |
18 | #pragma mark - 状态相关
19 | /** 文字距离圈圈、箭头的距离 */
20 | @property (assign, nonatomic) CGFloat labelLeftInset;
21 | /** 显示刷新状态的label */
22 | @property (weak, nonatomic, readonly) UILabel *stateLabel;
23 | /** 设置state状态下的文字 */
24 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state;
25 | @end
26 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/MJRefresh.bundle/arrow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/MJRefresh.bundle/arrow@2x.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/MJRefresh.bundle/en.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/MJRefresh.bundle/en.lproj/Localizable.strings
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/MJRefresh.bundle/zh-Hans.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/MJRefresh.bundle/zh-Hans.lproj/Localizable.strings
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/MJRefresh.bundle/zh-Hant.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | "MJRefreshHeaderIdleText" = "下拉可以刷新";
2 | "MJRefreshHeaderPullingText" = "鬆開立即刷新";
3 | "MJRefreshHeaderRefreshingText" = "正在刷新數據中...";
4 |
5 | "MJRefreshAutoFooterIdleText" = "點擊或上拉加載更多";
6 | "MJRefreshAutoFooterRefreshingText" = "正在加載更多的數據...";
7 | "MJRefreshAutoFooterNoMoreDataText" = "已經全部加載完畢";
8 |
9 | "MJRefreshBackFooterIdleText" = "上拉可以加載更多";
10 | "MJRefreshBackFooterPullingText" = "鬆開立即加載更多";
11 | "MJRefreshBackFooterRefreshingText" = "正在加載更多的數據...";
12 | "MJRefreshBackFooterNoMoreDataText" = "已經全部加載完畢";
13 |
14 | "MJRefreshHeaderLastTimeText" = "最後更新:";
15 | "MJRefreshHeaderDateTodayText" = "今天";
16 | "MJRefreshHeaderNoneLastDateText" = "無記錄";
17 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/MJRefresh.h:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 |
4 | #import "UIScrollView+MJRefresh.h"
5 | #import "UIScrollView+MJExtension.h"
6 | #import "UIView+MJExtension.h"
7 |
8 | #import "MJRefreshNormalHeader.h"
9 | #import "MJRefreshGifHeader.h"
10 |
11 | #import "MJRefreshBackNormalFooter.h"
12 | #import "MJRefreshBackGifFooter.h"
13 | #import "MJRefreshAutoNormalFooter.h"
14 | #import "MJRefreshAutoGifFooter.h"
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/MJRefreshConst.m:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | #import
4 |
5 | const CGFloat MJRefreshLabelLeftInset = 25;
6 | const CGFloat MJRefreshHeaderHeight = 54.0;
7 | const CGFloat MJRefreshFooterHeight = 44.0;
8 | const CGFloat MJRefreshFastAnimationDuration = 0.25;
9 | const CGFloat MJRefreshSlowAnimationDuration = 0.4;
10 |
11 | NSString *const MJRefreshKeyPathContentOffset = @"contentOffset";
12 | NSString *const MJRefreshKeyPathContentInset = @"contentInset";
13 | NSString *const MJRefreshKeyPathContentSize = @"contentSize";
14 | NSString *const MJRefreshKeyPathPanState = @"state";
15 |
16 | NSString *const MJRefreshHeaderLastUpdatedTimeKey = @"MJRefreshHeaderLastUpdatedTimeKey";
17 |
18 | NSString *const MJRefreshHeaderIdleText = @"MJRefreshHeaderIdleText";
19 | NSString *const MJRefreshHeaderPullingText = @"MJRefreshHeaderPullingText";
20 | NSString *const MJRefreshHeaderRefreshingText = @"MJRefreshHeaderRefreshingText";
21 |
22 | NSString *const MJRefreshAutoFooterIdleText = @"MJRefreshAutoFooterIdleText";
23 | NSString *const MJRefreshAutoFooterRefreshingText = @"MJRefreshAutoFooterRefreshingText";
24 | NSString *const MJRefreshAutoFooterNoMoreDataText = @"MJRefreshAutoFooterNoMoreDataText";
25 |
26 | NSString *const MJRefreshBackFooterIdleText = @"MJRefreshBackFooterIdleText";
27 | NSString *const MJRefreshBackFooterPullingText = @"MJRefreshBackFooterPullingText";
28 | NSString *const MJRefreshBackFooterRefreshingText = @"MJRefreshBackFooterRefreshingText";
29 | NSString *const MJRefreshBackFooterNoMoreDataText = @"MJRefreshBackFooterNoMoreDataText";
30 |
31 | NSString *const MJRefreshHeaderLastTimeText = @"MJRefreshHeaderLastTimeText";
32 | NSString *const MJRefreshHeaderDateTodayText = @"MJRefreshHeaderDateTodayText";
33 | NSString *const MJRefreshHeaderNoneLastDateText = @"MJRefreshHeaderNoneLastDateText";
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/NSBundle+MJRefresh.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSBundle+MJRefresh.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 16/6/13.
6 | // Copyright © 2016年 小码哥. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSBundle (MJRefresh)
12 | + (instancetype)mj_refreshBundle;
13 | + (UIImage *)mj_arrowImage;
14 | + (NSString *)mj_localizedStringForKey:(NSString *)key value:(NSString *)value;
15 | + (NSString *)mj_localizedStringForKey:(NSString *)key;
16 | @end
17 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/NSBundle+MJRefresh.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSBundle+MJRefresh.m
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 16/6/13.
6 | // Copyright © 2016年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "NSBundle+MJRefresh.h"
10 | #import "MJRefreshComponent.h"
11 |
12 | @implementation NSBundle (MJRefresh)
13 | + (instancetype)mj_refreshBundle
14 | {
15 | static NSBundle *refreshBundle = nil;
16 | if (refreshBundle == nil) {
17 | // 这里不使用mainBundle是为了适配pod 1.x和0.x
18 | refreshBundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:[MJRefreshComponent class]] pathForResource:@"MJRefresh" ofType:@"bundle"]];
19 | }
20 | return refreshBundle;
21 | }
22 |
23 | + (UIImage *)mj_arrowImage
24 | {
25 | static UIImage *arrowImage = nil;
26 | if (arrowImage == nil) {
27 | arrowImage = [[UIImage imageWithContentsOfFile:[[self mj_refreshBundle] pathForResource:@"arrow@2x" ofType:@"png"]] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
28 | }
29 | return arrowImage;
30 | }
31 |
32 | + (NSString *)mj_localizedStringForKey:(NSString *)key
33 | {
34 | return [self mj_localizedStringForKey:key value:nil];
35 | }
36 |
37 | + (NSString *)mj_localizedStringForKey:(NSString *)key value:(NSString *)value
38 | {
39 | static NSBundle *bundle = nil;
40 | if (bundle == nil) {
41 | // (iOS获取的语言字符串比较不稳定)目前框架只处理en、zh-Hans、zh-Hant三种情况,其他按照系统默认处理
42 | NSString *language = [NSLocale preferredLanguages].firstObject;
43 | if ([language hasPrefix:@"en"]) {
44 | language = @"en";
45 | } else if ([language hasPrefix:@"zh"]) {
46 | if ([language rangeOfString:@"Hans"].location != NSNotFound) {
47 | language = @"zh-Hans"; // 简体中文
48 | } else { // zh-Hant\zh-HK\zh-TW
49 | language = @"zh-Hant"; // 繁體中文
50 | }
51 | } else {
52 | language = @"en";
53 | }
54 |
55 | // 从MJRefresh.bundle中查找资源
56 | bundle = [NSBundle bundleWithPath:[[NSBundle mj_refreshBundle] pathForResource:language ofType:@"lproj"]];
57 | }
58 | value = [bundle localizedStringForKey:key value:value table:nil];
59 | return [[NSBundle mainBundle] localizedStringForKey:key value:value table:nil];
60 | }
61 | @end
62 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/UIScrollView+MJExtension.h:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | // UIScrollView+Extension.h
4 | // MJRefreshExample
5 | //
6 | // Created by MJ Lee on 14-5-28.
7 | // Copyright (c) 2014年 小码哥. All rights reserved.
8 | //
9 |
10 | #import
11 |
12 | @interface UIScrollView (MJExtension)
13 | @property (assign, nonatomic) CGFloat mj_insetT;
14 | @property (assign, nonatomic) CGFloat mj_insetB;
15 | @property (assign, nonatomic) CGFloat mj_insetL;
16 | @property (assign, nonatomic) CGFloat mj_insetR;
17 |
18 | @property (assign, nonatomic) CGFloat mj_offsetX;
19 | @property (assign, nonatomic) CGFloat mj_offsetY;
20 |
21 | @property (assign, nonatomic) CGFloat mj_contentW;
22 | @property (assign, nonatomic) CGFloat mj_contentH;
23 | @end
24 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/UIScrollView+MJRefresh.h:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | // UIScrollView+MJRefresh.h
4 | // MJRefreshExample
5 | //
6 | // Created by MJ Lee on 15/3/4.
7 | // Copyright (c) 2015年 小码哥. All rights reserved.
8 | // 给ScrollView增加下拉刷新、上拉刷新的功能
9 |
10 | #import
11 | #import "MJRefreshConst.h"
12 |
13 | @class MJRefreshHeader, MJRefreshFooter;
14 |
15 | @interface UIScrollView (MJRefresh)
16 | /** 下拉刷新控件 */
17 | @property (strong, nonatomic) MJRefreshHeader *mj_header;
18 | @property (strong, nonatomic) MJRefreshHeader *header MJRefreshDeprecated("使用mj_header");
19 | /** 上拉刷新控件 */
20 | @property (strong, nonatomic) MJRefreshFooter *mj_footer;
21 | @property (strong, nonatomic) MJRefreshFooter *footer MJRefreshDeprecated("使用mj_footer");
22 |
23 | #pragma mark - other
24 | - (NSInteger)mj_totalDataCount;
25 | @property (copy, nonatomic) void (^mj_reloadDataBlock)(NSInteger totalDataCount);
26 | @end
27 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/UIView+MJExtension.h:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | // UIView+Extension.h
4 | // MJRefreshExample
5 | //
6 | // Created by MJ Lee on 14-5-28.
7 | // Copyright (c) 2014年 小码哥. All rights reserved.
8 | //
9 |
10 | #import
11 |
12 | @interface UIView (MJExtension)
13 | @property (assign, nonatomic) CGFloat mj_x;
14 | @property (assign, nonatomic) CGFloat mj_y;
15 | @property (assign, nonatomic) CGFloat mj_w;
16 | @property (assign, nonatomic) CGFloat mj_h;
17 | @property (assign, nonatomic) CGSize mj_size;
18 | @property (assign, nonatomic) CGPoint mj_origin;
19 | @end
20 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/MJRefresh/MJRefresh/UIView+MJExtension.m:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | // UIView+Extension.m
4 | // MJRefreshExample
5 | //
6 | // Created by MJ Lee on 14-5-28.
7 | // Copyright (c) 2014年 小码哥. All rights reserved.
8 | //
9 |
10 | #import "UIView+MJExtension.h"
11 |
12 | @implementation UIView (MJExtension)
13 | - (void)setMj_x:(CGFloat)mj_x
14 | {
15 | CGRect frame = self.frame;
16 | frame.origin.x = mj_x;
17 | self.frame = frame;
18 | }
19 |
20 | - (CGFloat)mj_x
21 | {
22 | return self.frame.origin.x;
23 | }
24 |
25 | - (void)setMj_y:(CGFloat)mj_y
26 | {
27 | CGRect frame = self.frame;
28 | frame.origin.y = mj_y;
29 | self.frame = frame;
30 | }
31 |
32 | - (CGFloat)mj_y
33 | {
34 | return self.frame.origin.y;
35 | }
36 |
37 | - (void)setMj_w:(CGFloat)mj_w
38 | {
39 | CGRect frame = self.frame;
40 | frame.size.width = mj_w;
41 | self.frame = frame;
42 | }
43 |
44 | - (CGFloat)mj_w
45 | {
46 | return self.frame.size.width;
47 | }
48 |
49 | - (void)setMj_h:(CGFloat)mj_h
50 | {
51 | CGRect frame = self.frame;
52 | frame.size.height = mj_h;
53 | self.frame = frame;
54 | }
55 |
56 | - (CGFloat)mj_h
57 | {
58 | return self.frame.size.height;
59 | }
60 |
61 | - (void)setMj_size:(CGSize)mj_size
62 | {
63 | CGRect frame = self.frame;
64 | frame.size = mj_size;
65 | self.frame = frame;
66 | }
67 |
68 | - (CGSize)mj_size
69 | {
70 | return self.frame.size;
71 | }
72 |
73 | - (void)setMj_origin:(CGPoint)mj_origin
74 | {
75 | CGRect frame = self.frame;
76 | frame.origin = mj_origin;
77 | self.frame = frame;
78 | }
79 |
80 | - (CGPoint)mj_origin
81 | {
82 | return self.frame.origin;
83 | }
84 | @end
85 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/SDAutoLayout/SDAutoLayout.h:
--------------------------------------------------------------------------------
1 | //
2 | // SDAutoLayout.h
3 | // SDAutoLayoutDemo
4 | //
5 | // Created by gsd on 16/6/27.
6 | // Copyright © 2016年 gsd. All rights reserved.
7 | //
8 |
9 |
10 | /*
11 |
12 | SDAutoLayout
13 | 版本:2.1.7
14 | 发布:2016.08.12
15 |
16 | */
17 |
18 | #ifndef SDAutoLayout_h
19 | #define SDAutoLayout_h
20 |
21 | #import "UIView+SDAutoLayout.h"
22 | #import "UITableView+SDAutoTableViewCellHeight.h"
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/Foundation/NSKeyedUnarchiver+YYAdd.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSKeyedUnarchiver+YYAdd.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 13/8/4.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | Provides extensions for `NSKeyedUnarchiver`.
18 | */
19 | @interface NSKeyedUnarchiver (YYAdd)
20 |
21 | /**
22 | Same as unarchiveObjectWithData:, except it returns the exception by reference.
23 |
24 | @param data The data need unarchived.
25 |
26 | @param exception Pointer which will, upon return, if an exception occurred and
27 | said pointer is not NULL, point to said NSException.
28 | */
29 | + (nullable id)unarchiveObjectWithData:(NSData *)data
30 | exception:(NSException *_Nullable *_Nullable)exception;
31 |
32 | /**
33 | Same as unarchiveObjectWithFile:, except it returns the exception by reference.
34 |
35 | @param path The path of archived object file.
36 |
37 | @param exception Pointer which will, upon return, if an exception occurred and
38 | said pointer is not NULL, point to said NSException.
39 | */
40 | + (nullable id)unarchiveObjectWithFile:(NSString *)path
41 | exception:(NSException *_Nullable *_Nullable)exception;
42 |
43 | @end
44 |
45 | NS_ASSUME_NONNULL_END
46 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/Foundation/NSKeyedUnarchiver+YYAdd.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSKeyedUnarchiver+YYAdd.m
3 | // YYKit
4 | //
5 | // Created by ibireme on 13/8/4.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import "NSKeyedUnarchiver+YYAdd.h"
13 | #import "YYKitMacro.h"
14 |
15 | YYSYNTH_DUMMY_CLASS(NSKeyedUnarchiver_YYAdd)
16 |
17 |
18 | @implementation NSKeyedUnarchiver (YYAdd)
19 |
20 | + (id)unarchiveObjectWithData:(NSData *)data exception:(__autoreleasing NSException **)exception {
21 | id object = nil;
22 | @try {
23 | object = [NSKeyedUnarchiver unarchiveObjectWithData:data];
24 | }
25 | @catch (NSException *e)
26 | {
27 | if (exception) *exception = e;
28 | }
29 | @finally
30 | {
31 | }
32 | return object;
33 | }
34 |
35 | + (id)unarchiveObjectWithFile:(NSString *)path exception:(__autoreleasing NSException **)exception {
36 | id object = nil;
37 |
38 | @try {
39 | object = [NSKeyedUnarchiver unarchiveObjectWithFile:path];
40 | }
41 | @catch (NSException *e)
42 | {
43 | if (exception) *exception = e;
44 | }
45 | @finally
46 | {
47 | }
48 | return object;
49 | }
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/Foundation/NSNumber+YYAdd.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSNumber+YYAdd.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 13/8/24.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | Provide a method to parse `NSString` for `NSNumber`.
18 | */
19 | @interface NSNumber (YYAdd)
20 |
21 | /**
22 | Creates and returns an NSNumber object from a string.
23 | Valid format: @"12", @"12.345", @" -0xFF", @" .23e99 "...
24 |
25 | @param string The string described an number.
26 |
27 | @return an NSNumber when parse succeed, or nil if an error occurs.
28 | */
29 | + (nullable NSNumber *)numberWithString:(NSString *)string;
30 |
31 | @end
32 |
33 | NS_ASSUME_NONNULL_END
34 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/Foundation/NSNumber+YYAdd.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSNumber+YYAdd.m
3 | // YYKit
4 | //
5 | // Created by ibireme on 13/8/24.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import "NSNumber+YYAdd.h"
13 | #import "NSString+YYAdd.h"
14 | #import "YYKitMacro.h"
15 |
16 | YYSYNTH_DUMMY_CLASS(NSNumber_YYAdd)
17 |
18 |
19 | @implementation NSNumber (YYAdd)
20 |
21 | + (NSNumber *)numberWithString:(NSString *)string {
22 | NSString *str = [[string stringByTrim] lowercaseString];
23 | if (!str || !str.length) {
24 | return nil;
25 | }
26 |
27 | static NSDictionary *dic;
28 | static dispatch_once_t onceToken;
29 | dispatch_once(&onceToken, ^{
30 | dic = @{@"true" : @(YES),
31 | @"yes" : @(YES),
32 | @"false" : @(NO),
33 | @"no" : @(NO),
34 | @"nil" : [NSNull null],
35 | @"null" : [NSNull null],
36 | @"" : [NSNull null]};
37 | });
38 | id num = dic[str];
39 | if (num) {
40 | if (num == [NSNull null]) return nil;
41 | return num;
42 | }
43 |
44 | // hex number
45 | int sign = 0;
46 | if ([str hasPrefix:@"0x"]) sign = 1;
47 | else if ([str hasPrefix:@"-0x"]) sign = -1;
48 | if (sign != 0) {
49 | NSScanner *scan = [NSScanner scannerWithString:str];
50 | unsigned num = -1;
51 | BOOL suc = [scan scanHexInt:&num];
52 | if (suc)
53 | return [NSNumber numberWithLong:((long)num * sign)];
54 | else
55 | return nil;
56 | }
57 | // normal number
58 | NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
59 | [formatter setNumberStyle:NSNumberFormatterDecimalStyle];
60 | return [formatter numberFromString:string];
61 | }
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/Foundation/NSObject+YYAddForARC.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+YYAddForARC.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 13/12/15.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | /**
15 | Debug method for NSObject when using ARC.
16 | */
17 | @interface NSObject (YYAddForARC)
18 |
19 | /// Same as `retain`
20 | - (instancetype)arcDebugRetain;
21 |
22 | /// Same as `release`
23 | - (oneway void)arcDebugRelease;
24 |
25 | /// Same as `autorelease`
26 | - (instancetype)arcDebugAutorelease;
27 |
28 | /// Same as `retainCount`
29 | - (NSUInteger)arcDebugRetainCount;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/Foundation/NSObject+YYAddForARC.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+YYAddForARC.m
3 | // YYKit
4 | //
5 | // Created by ibireme on 13/12/15.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import "NSObject+YYAddForARC.h"
13 |
14 | @interface NSObject_YYAddForARC : NSObject @end
15 | @implementation NSObject_YYAddForARC @end
16 |
17 | #if __has_feature(objc_arc)
18 | #error This file must be compiled without ARC. Specify the -fno-objc-arc flag to this file.
19 | #endif
20 |
21 |
22 | @implementation NSObject (YYAddForARC)
23 |
24 | - (instancetype)arcDebugRetain {
25 | return [self retain];
26 | }
27 |
28 | - (oneway void)arcDebugRelease {
29 | [self release];
30 | }
31 |
32 | - (instancetype)arcDebugAutorelease {
33 | return [self autorelease];
34 | }
35 |
36 | - (NSUInteger)arcDebugRetainCount {
37 | return [self retainCount];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/Foundation/NSObject+YYAddForKVO.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+YYAddForKVO.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/10/15.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | Observer with block (KVO).
18 | */
19 | @interface NSObject (YYAddForKVO)
20 |
21 | /**
22 | Registers a block to receive KVO notifications for the specified key-path
23 | relative to the receiver.
24 |
25 | @discussion The block and block captured objects are retained. Call
26 | `removeObserverBlocksForKeyPath:` or `removeObserverBlocks` to release.
27 |
28 | @param keyPath The key path, relative to the receiver, of the property to
29 | observe. This value must not be nil.
30 |
31 | @param block The block to register for KVO notifications.
32 | */
33 | - (void)addObserverBlockForKeyPath:(NSString*)keyPath block:(void (^)(id _Nonnull obj, _Nullable id oldVal, _Nullable id newVal))block;
34 |
35 | /**
36 | Stops all blocks (associated by `addObserverBlockForKeyPath:block:`) from
37 | receiving change notifications for the property specified by a given key-path
38 | relative to the receiver, and release these blocks.
39 |
40 | @param keyPath A key-path, relative to the receiver, for which blocks is
41 | registered to receive KVO change notifications.
42 | */
43 | - (void)removeObserverBlocksForKeyPath:(NSString*)keyPath;
44 |
45 | /**
46 | Stops all blocks (associated by `addObserverBlockForKeyPath:block:`) from
47 | receiving change notifications, and release these blocks.
48 | */
49 | - (void)removeObserverBlocks;
50 |
51 | @end
52 |
53 | NS_ASSUME_NONNULL_END
54 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/Foundation/NSThread+YYAdd.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSThread+YYAdd.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 15/7/3.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | @interface NSThread (YYAdd)
15 |
16 | /**
17 | Add an autorelease pool to current runloop for current thread.
18 |
19 | @discussion If you create your own thread (NSThread/pthread), and you use
20 | runloop to manage your task, you may use this method to add an autorelease pool
21 | to the runloop. Its behavior is the same as the main thread's autorelease pool.
22 | */
23 | + (void)addAutoreleasePoolToCurrentRunloop;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/Foundation/NSTimer+YYAdd.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSTimer+YYAdd.m
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/15/11.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import "NSTimer+YYAdd.h"
13 | #import "YYKitMacro.h"
14 |
15 | YYSYNTH_DUMMY_CLASS(NSTimer_YYAdd)
16 |
17 |
18 | @implementation NSTimer (YYAdd)
19 |
20 | + (void)_yy_ExecBlock:(NSTimer *)timer {
21 | if ([timer userInfo]) {
22 | void (^block)(NSTimer *timer) = (void (^)(NSTimer *timer))[timer userInfo];
23 | block(timer);
24 | }
25 | }
26 |
27 | + (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)seconds block:(void (^)(NSTimer *timer))block repeats:(BOOL)repeats {
28 | return [NSTimer scheduledTimerWithTimeInterval:seconds target:self selector:@selector(_yy_ExecBlock:) userInfo:[block copy] repeats:repeats];
29 | }
30 |
31 | + (NSTimer *)timerWithTimeInterval:(NSTimeInterval)seconds block:(void (^)(NSTimer *timer))block repeats:(BOOL)repeats {
32 | return [NSTimer timerWithTimeInterval:seconds target:self selector:@selector(_yy_ExecBlock:) userInfo:[block copy] repeats:repeats];
33 | }
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/UIKit/UIBarButtonItem+YYAdd.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIBarButtonItem+YYAdd.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 13/10/15.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | Provides extensions for `UIBarButtonItem`.
18 | */
19 | @interface UIBarButtonItem (YYAdd)
20 |
21 | /**
22 | The block that invoked when the item is selected. The objects captured by block
23 | will retained by the ButtonItem.
24 |
25 | @discussion This param is conflict with `target` and `action` property.
26 | Set this will set `target` and `action` property to some internal objects.
27 | */
28 | @property (nullable, nonatomic, copy) void (^actionBlock)(id);
29 |
30 | @end
31 |
32 | NS_ASSUME_NONNULL_END
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/UIKit/UIBarButtonItem+YYAdd.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIBarButtonItem+YYAdd.m
3 | // YYKit
4 | //
5 | // Created by ibireme on 13/10/15.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import "UIBarButtonItem+YYAdd.h"
13 | #import "YYKitMacro.h"
14 | #import
15 |
16 | YYSYNTH_DUMMY_CLASS(UIBarButtonItem_YYAdd)
17 |
18 |
19 | static const int block_key;
20 |
21 | @interface _YYUIBarButtonItemBlockTarget : NSObject
22 |
23 | @property (nonatomic, copy) void (^block)(id sender);
24 |
25 | - (id)initWithBlock:(void (^)(id sender))block;
26 | - (void)invoke:(id)sender;
27 |
28 | @end
29 |
30 | @implementation _YYUIBarButtonItemBlockTarget
31 |
32 | - (id)initWithBlock:(void (^)(id sender))block{
33 | self = [super init];
34 | if (self) {
35 | _block = [block copy];
36 | }
37 | return self;
38 | }
39 |
40 | - (void)invoke:(id)sender {
41 | if (self.block) self.block(sender);
42 | }
43 |
44 | @end
45 |
46 |
47 | @implementation UIBarButtonItem (YYAdd)
48 |
49 | - (void)setActionBlock:(void (^)(id sender))block {
50 | _YYUIBarButtonItemBlockTarget *target = [[_YYUIBarButtonItemBlockTarget alloc] initWithBlock:block];
51 | objc_setAssociatedObject(self, &block_key, target, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
52 |
53 | [self setTarget:target];
54 | [self setAction:@selector(invoke:)];
55 | }
56 |
57 | - (void (^)(id)) actionBlock {
58 | _YYUIBarButtonItemBlockTarget *target = objc_getAssociatedObject(self, &block_key);
59 | return target.block;
60 | }
61 |
62 | @end
63 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/UIKit/UIBezierPath+YYAdd.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIBezierPath+YYAdd.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/10/30.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | Provides extensions for `UIBezierPath`.
18 | */
19 | @interface UIBezierPath (YYAdd)
20 |
21 | /**
22 | Creates and returns a new UIBezierPath object initialized with the text glyphs
23 | generated from the specified font.
24 |
25 | @discussion It doesnot support apple emoji. If you want get emoji image, try
26 | [UIImage imageWithEmoji:size:] in `UIImage(YYAdd)`.
27 |
28 | @param text The text to generate glyph path.
29 | @param font The font to generate glyph path.
30 |
31 | @return A new path object with the text and font, or nil if an error occurs.
32 | */
33 | + (nullable UIBezierPath *)bezierPathWithText:(NSString *)text font:(UIFont *)font;
34 |
35 | @end
36 |
37 | NS_ASSUME_NONNULL_END
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/UIKit/UIBezierPath+YYAdd.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIBezierPath+YYAdd.m
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/10/30.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import "UIBezierPath+YYAdd.h"
13 | #import "UIFont+YYAdd.h"
14 | #import
15 | #import "YYKitMacro.h"
16 |
17 | YYSYNTH_DUMMY_CLASS(UIBezierPath_YYAdd)
18 |
19 |
20 | @implementation UIBezierPath (YYAdd)
21 |
22 | + (UIBezierPath *)bezierPathWithText:(NSString *)text font:(UIFont *)font {
23 | CTFontRef ctFont = font.CTFontRef;
24 | if (!ctFont) return nil;
25 | NSDictionary *attrs = @{ (__bridge id)kCTFontAttributeName:(__bridge id)ctFont };
26 | NSAttributedString *attrString = [[NSAttributedString alloc] initWithString:text attributes:attrs];
27 | CFRelease(ctFont);
28 |
29 | CTLineRef line = CTLineCreateWithAttributedString((__bridge CFTypeRef)attrString);
30 | if (!line) return nil;
31 |
32 | CGMutablePathRef cgPath = CGPathCreateMutable();
33 | CFArrayRef runs = CTLineGetGlyphRuns(line);
34 | for (CFIndex iRun = 0, iRunMax = CFArrayGetCount(runs); iRun < iRunMax; iRun++) {
35 | CTRunRef run = (CTRunRef)CFArrayGetValueAtIndex(runs, iRun);
36 | CTFontRef runFont = CFDictionaryGetValue(CTRunGetAttributes(run), kCTFontAttributeName);
37 |
38 | for (CFIndex iGlyph = 0, iGlyphMax = CTRunGetGlyphCount(run); iGlyph < iGlyphMax; iGlyph++) {
39 | CFRange glyphRange = CFRangeMake(iGlyph, 1);
40 | CGGlyph glyph;
41 | CGPoint position;
42 | CTRunGetGlyphs(run, glyphRange, &glyph);
43 | CTRunGetPositions(run, glyphRange, &position);
44 |
45 | CGPathRef glyphPath = CTFontCreatePathForGlyph(runFont, glyph, NULL);
46 | if (glyphPath) {
47 | CGAffineTransform transform = CGAffineTransformMakeTranslation(position.x, position.y);
48 | CGPathAddPath(cgPath, &transform, glyphPath);
49 | CGPathRelease(glyphPath);
50 | }
51 | }
52 | }
53 | UIBezierPath *path = [UIBezierPath bezierPathWithCGPath:cgPath];
54 | CGRect boundingBox = CGPathGetPathBoundingBox(cgPath);
55 | CFRelease(cgPath);
56 | CFRelease(line);
57 |
58 | [path applyTransform:CGAffineTransformMakeScale(1.0, -1.0)];
59 | [path applyTransform:CGAffineTransformMakeTranslation(0.0, boundingBox.size.height)];
60 |
61 | return path;
62 | }
63 |
64 | @end
65 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/UIKit/UIGestureRecognizer+YYAdd.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIGestureRecognizer+YYAdd.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 13/10/13.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | Provides extensions for `UIGestureRecognizer`.
18 | */
19 | @interface UIGestureRecognizer (YYAdd)
20 |
21 | /**
22 | Initializes an allocated gesture-recognizer object with a action block.
23 |
24 | @param block An action block that to handle the gesture recognized by the
25 | receiver. nil is invalid. It is retained by the gesture.
26 |
27 | @return An initialized instance of a concrete UIGestureRecognizer subclass or
28 | nil if an error occurred in the attempt to initialize the object.
29 | */
30 | - (instancetype)initWithActionBlock:(void (^)(id sender))block;
31 |
32 | /**
33 | Adds an action block to a gesture-recognizer object. It is retained by the
34 | gesture.
35 |
36 | @param block A block invoked by the action message. nil is not a valid value.
37 | */
38 | - (void)addActionBlock:(void (^)(id sender))block;
39 |
40 | /**
41 | Remove all action blocks.
42 | */
43 | - (void)removeAllActionBlocks;
44 |
45 | @end
46 |
47 | NS_ASSUME_NONNULL_END
48 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/UIKit/UIGestureRecognizer+YYAdd.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIGestureRecognizer+YYAdd.m
3 | // YYKit
4 | //
5 | // Created by ibireme on 13/10/13.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import "UIGestureRecognizer+YYAdd.h"
13 | #import "YYKitMacro.h"
14 | #import
15 |
16 | static const int block_key;
17 |
18 | @interface _YYUIGestureRecognizerBlockTarget : NSObject
19 |
20 | @property (nonatomic, copy) void (^block)(id sender);
21 |
22 | - (id)initWithBlock:(void (^)(id sender))block;
23 | - (void)invoke:(id)sender;
24 |
25 | @end
26 |
27 | @implementation _YYUIGestureRecognizerBlockTarget
28 |
29 | - (id)initWithBlock:(void (^)(id sender))block{
30 | self = [super init];
31 | if (self) {
32 | _block = [block copy];
33 | }
34 | return self;
35 | }
36 |
37 | - (void)invoke:(id)sender {
38 | if (_block) _block(sender);
39 | }
40 |
41 | @end
42 |
43 |
44 |
45 |
46 | @implementation UIGestureRecognizer (YYAdd)
47 |
48 | - (instancetype)initWithActionBlock:(void (^)(id sender))block {
49 | self = [self init];
50 | [self addActionBlock:block];
51 | return self;
52 | }
53 |
54 | - (void)addActionBlock:(void (^)(id sender))block {
55 | _YYUIGestureRecognizerBlockTarget *target = [[_YYUIGestureRecognizerBlockTarget alloc] initWithBlock:block];
56 | [self addTarget:target action:@selector(invoke:)];
57 | NSMutableArray *targets = [self _yy_allUIGestureRecognizerBlockTargets];
58 | [targets addObject:target];
59 | }
60 |
61 | - (void)removeAllActionBlocks{
62 | NSMutableArray *targets = [self _yy_allUIGestureRecognizerBlockTargets];
63 | [targets enumerateObjectsUsingBlock:^(id target, NSUInteger idx, BOOL *stop) {
64 | [self removeTarget:target action:@selector(invoke:)];
65 | }];
66 | [targets removeAllObjects];
67 | }
68 |
69 | - (NSMutableArray *)_yy_allUIGestureRecognizerBlockTargets {
70 | NSMutableArray *targets = objc_getAssociatedObject(self, &block_key);
71 | if (!targets) {
72 | targets = [NSMutableArray array];
73 | objc_setAssociatedObject(self, &block_key, targets, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
74 | }
75 | return targets;
76 | }
77 |
78 | @end
79 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/UIKit/UIScreen+YYAdd.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIScreen+YYAdd.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 13/4/5.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | Provides extensions for `UIScreen`.
18 | */
19 | @interface UIScreen (YYAdd)
20 |
21 | /**
22 | Main screen's scale
23 |
24 | @return screen's scale
25 | */
26 | + (CGFloat)screenScale;
27 |
28 | /**
29 | Returns the bounds of the screen for the current device orientation.
30 |
31 | @return A rect indicating the bounds of the screen.
32 | @see boundsForOrientation:
33 | */
34 | - (CGRect)currentBounds NS_EXTENSION_UNAVAILABLE_IOS("");
35 |
36 | /**
37 | Returns the bounds of the screen for a given device orientation.
38 | `UIScreen`'s `bounds` method always returns the bounds of the
39 | screen of it in the portrait orientation.
40 |
41 | @param orientation The orientation to get the screen's bounds.
42 | @return A rect indicating the bounds of the screen.
43 | @see currentBounds
44 | */
45 | - (CGRect)boundsForOrientation:(UIInterfaceOrientation)orientation;
46 |
47 | /**
48 | The screen's real size in pixel (width is always smaller than height).
49 | This value may not be very accurate in an unknown device, or simulator.
50 | e.g. (768,1024)
51 | */
52 | @property (nonatomic, readonly) CGSize sizeInPixel;
53 |
54 | /**
55 | The screen's PPI.
56 | This value may not be very accurate in an unknown device, or simulator.
57 | Default value is 96.
58 | */
59 | @property (nonatomic, readonly) CGFloat pixelsPerInch;
60 |
61 | @end
62 |
63 | NS_ASSUME_NONNULL_END
64 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/UIKit/UIScrollView+YYAdd.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIScrollView+YYAdd.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 13/4/5.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | Provides extensions for `UIScrollView`.
18 | */
19 | @interface UIScrollView (YYAdd)
20 |
21 | /**
22 | Scroll content to top with animation.
23 | */
24 | - (void)scrollToTop;
25 |
26 | /**
27 | Scroll content to bottom with animation.
28 | */
29 | - (void)scrollToBottom;
30 |
31 | /**
32 | Scroll content to left with animation.
33 | */
34 | - (void)scrollToLeft;
35 |
36 | /**
37 | Scroll content to right with animation.
38 | */
39 | - (void)scrollToRight;
40 |
41 | /**
42 | Scroll content to top.
43 |
44 | @param animated Use animation.
45 | */
46 | - (void)scrollToTopAnimated:(BOOL)animated;
47 |
48 | /**
49 | Scroll content to bottom.
50 |
51 | @param animated Use animation.
52 | */
53 | - (void)scrollToBottomAnimated:(BOOL)animated;
54 |
55 | /**
56 | Scroll content to left.
57 |
58 | @param animated Use animation.
59 | */
60 | - (void)scrollToLeftAnimated:(BOOL)animated;
61 |
62 | /**
63 | Scroll content to right.
64 |
65 | @param animated Use animation.
66 | */
67 | - (void)scrollToRightAnimated:(BOOL)animated;
68 |
69 | @end
70 |
71 | NS_ASSUME_NONNULL_END
72 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/UIKit/UIScrollView+YYAdd.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIScrollView+YYAdd.m
3 | // YYKit
4 | //
5 | // Created by ibireme on 13/4/5.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import "UIScrollView+YYAdd.h"
13 | #import "YYKitMacro.h"
14 |
15 | YYSYNTH_DUMMY_CLASS(UIScrollView_YYAdd)
16 |
17 |
18 | @implementation UIScrollView (YYAdd)
19 |
20 | - (void)scrollToTop {
21 | [self scrollToTopAnimated:YES];
22 | }
23 |
24 | - (void)scrollToBottom {
25 | [self scrollToBottomAnimated:YES];
26 | }
27 |
28 | - (void)scrollToLeft {
29 | [self scrollToLeftAnimated:YES];
30 | }
31 |
32 | - (void)scrollToRight {
33 | [self scrollToRightAnimated:YES];
34 | }
35 |
36 | - (void)scrollToTopAnimated:(BOOL)animated {
37 | CGPoint off = self.contentOffset;
38 | off.y = 0 - self.contentInset.top;
39 | [self setContentOffset:off animated:animated];
40 | }
41 |
42 | - (void)scrollToBottomAnimated:(BOOL)animated {
43 | CGPoint off = self.contentOffset;
44 | off.y = self.contentSize.height - self.bounds.size.height + self.contentInset.bottom;
45 | [self setContentOffset:off animated:animated];
46 | }
47 |
48 | - (void)scrollToLeftAnimated:(BOOL)animated {
49 | CGPoint off = self.contentOffset;
50 | off.x = 0 - self.contentInset.left;
51 | [self setContentOffset:off animated:animated];
52 | }
53 |
54 | - (void)scrollToRightAnimated:(BOOL)animated {
55 | CGPoint off = self.contentOffset;
56 | off.x = self.contentSize.width - self.bounds.size.width + self.contentInset.right;
57 | [self setContentOffset:off animated:animated];
58 | }
59 |
60 | @end
61 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/UIKit/UITextField+YYAdd.h:
--------------------------------------------------------------------------------
1 | //
2 | // UITextField+YYAdd.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/5/12.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | Provides extensions for `UITextField`.
18 | */
19 | @interface UITextField (YYAdd)
20 |
21 | /**
22 | Set all text selected.
23 | */
24 | - (void)selectAllText;
25 |
26 | /**
27 | Set text in range selected.
28 |
29 | @param range The range of selected text in a document.
30 | */
31 | - (void)setSelectedRange:(NSRange)range;
32 |
33 | @end
34 |
35 | NS_ASSUME_NONNULL_END
36 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Base/UIKit/UITextField+YYAdd.m:
--------------------------------------------------------------------------------
1 | //
2 | // UITextField+YYAdd.m
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/5/12.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import "UITextField+YYAdd.h"
13 | #import "YYKitMacro.h"
14 |
15 | YYSYNTH_DUMMY_CLASS(UITextField_YYAdd)
16 |
17 |
18 | @implementation UITextField (YYAdd)
19 |
20 | - (void)selectAllText {
21 | UITextRange *range = [self textRangeFromPosition:self.beginningOfDocument toPosition:self.endOfDocument];
22 | [self setSelectedTextRange:range];
23 | }
24 |
25 | - (void)setSelectedRange:(NSRange)range {
26 | UITextPosition *beginning = self.beginningOfDocument;
27 | UITextPosition *startPosition = [self positionFromPosition:beginning offset:range.location];
28 | UITextPosition *endPosition = [self positionFromPosition:beginning offset:NSMaxRange(range)];
29 | UITextRange *selectionRange = [self textRangeFromPosition:startPosition toPosition:endPosition];
30 | [self setSelectedTextRange:selectionRange];
31 | }
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Image/Categories/_YYWebImageSetter.h:
--------------------------------------------------------------------------------
1 | //
2 | // _YYWebImageSetter.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 15/7/15.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #if __has_include()
13 | #import
14 | #else
15 | #import "YYWebImageManager.h"
16 | #endif
17 |
18 | NS_ASSUME_NONNULL_BEGIN
19 |
20 | extern NSString *const _YYWebImageFadeAnimationKey;
21 | extern const NSTimeInterval _YYWebImageFadeTime;
22 | extern const NSTimeInterval _YYWebImageProgressiveFadeTime;
23 |
24 | /**
25 | Private class used by web image categories.
26 | Typically, you should not use this class directly.
27 | */
28 | @interface _YYWebImageSetter : NSObject
29 | /// Current image url.
30 | @property (nullable, nonatomic, readonly) NSURL *imageURL;
31 | /// Current sentinel.
32 | @property (nonatomic, readonly) int32_t sentinel;
33 |
34 | /// Create new operation for web image and return a sentinel value.
35 | - (int32_t)setOperationWithSentinel:(int32_t)sentinel
36 | url:(nullable NSURL *)imageURL
37 | options:(YYWebImageOptions)options
38 | manager:(YYWebImageManager *)manager
39 | progress:(nullable YYWebImageProgressBlock)progress
40 | transform:(nullable YYWebImageTransformBlock)transform
41 | completion:(nullable YYWebImageCompletionBlock)completion;
42 |
43 | /// Cancel and return a sentinel value. The imageURL will be set to nil.
44 | - (int32_t)cancel;
45 |
46 | /// Cancel and return a sentinel value. The imageURL will be set to new value.
47 | - (int32_t)cancelWithNewURL:(nullable NSURL *)imageURL;
48 |
49 | /// A queue to set operation.
50 | + (dispatch_queue_t)setterQueue;
51 |
52 | @end
53 |
54 | NS_ASSUME_NONNULL_END
55 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Text/Component/YYTextContainerView.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYTextContainerView.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 15/4/21.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | #if __has_include()
15 | #import
16 | #else
17 | #import "YYTextLayout.h"
18 | #endif
19 |
20 | NS_ASSUME_NONNULL_BEGIN
21 |
22 | /**
23 | A simple view to diaplay `YYTextLayout`.
24 |
25 | @discussion This view can become first responder. If this view is first responder,
26 | all the action (such as UIMenu's action) would forward to the `hostView` property.
27 | Typically, you should not use this class directly.
28 |
29 | @warning All the methods in this class should be called on main thread.
30 | */
31 | @interface YYTextContainerView : UIView
32 |
33 | /// First responder's aciton will forward to this view.
34 | @property (nullable, nonatomic, weak) UIView *hostView;
35 |
36 | /// Debug option for layout debug. Set this property will let the view redraw it's contents.
37 | @property (nullable, nonatomic, copy) YYTextDebugOption *debugOption;
38 |
39 | /// Text vertical alignment.
40 | @property (nonatomic) YYTextVerticalAlignment textVerticalAlignment;
41 |
42 | /// Text layout. Set this property will let the view redraw it's contents.
43 | @property (nullable, nonatomic, strong) YYTextLayout *layout;
44 |
45 | /// The contents fade animation duration when the layout's contents changed. Default is 0 (no animation).
46 | @property (nonatomic) NSTimeInterval contentsFadeDuration;
47 |
48 | /// Convenience method to set `layout` and `contentsFadeDuration`.
49 | /// @param layout Same as `layout` property.
50 | /// @param fadeDuration Same as `contentsFadeDuration` property.
51 | - (void)setLayout:(nullable YYTextLayout *)layout withFadeDuration:(NSTimeInterval)fadeDuration;
52 |
53 | @end
54 |
55 | NS_ASSUME_NONNULL_END
56 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Text/Component/YYTextEffectWindow.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYTextEffectWindow.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 15/2/25.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | #if __has_include()
15 | #import
16 | #import
17 | #else
18 | #import "YYTextMagnifier.h"
19 | #import "YYTextSelectionView.h"
20 | #endif
21 |
22 | NS_ASSUME_NONNULL_BEGIN
23 |
24 | /**
25 | A window to display magnifier and extra contents for text view.
26 |
27 | @discussion Use `sharedWindow` to get the instance, don't create your own instance.
28 | Typically, you should not use this class directly.
29 | */
30 | @interface YYTextEffectWindow : UIWindow
31 |
32 | /// Returns the shared instance (returns nil in App Extension).
33 | + (nullable instancetype)sharedWindow;
34 |
35 | /// Show the magnifier in this window with a 'popup' animation. @param mag A magnifier.
36 | - (void)showMagnifier:(YYTextMagnifier *)mag;
37 | /// Update the magnifier content and position. @param mag A magnifier.
38 | - (void)moveMagnifier:(YYTextMagnifier *)mag;
39 | /// Remove the magnifier from this window with a 'shrink' animation. @param mag A magnifier.
40 | - (void)hideMagnifier:(YYTextMagnifier *)mag;
41 |
42 |
43 | /// Show the selection dot in this window if the dot is clipped by the selection view.
44 | /// @param selection A selection view.
45 | - (void)showSelectionDot:(YYTextSelectionView *)selection;
46 | /// Remove the selection dot from this window.
47 | /// @param selection A selection view.
48 | - (void)hideSelectionDot:(YYTextSelectionView *)selection;
49 |
50 | @end
51 |
52 | NS_ASSUME_NONNULL_END
53 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Text/Component/YYTextMagnifier.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYTextMagnifier.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 15/2/25.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | #if __has_include()
15 | #import
16 | #else
17 | #import "YYTextAttribute.h"
18 | #endif
19 |
20 | NS_ASSUME_NONNULL_BEGIN
21 |
22 | /// Magnifier type
23 | typedef NS_ENUM(NSInteger, YYTextMagnifierType) {
24 | YYTextMagnifierTypeCaret, ///< Circular magnifier
25 | YYTextMagnifierTypeRanged, ///< Round rectangle magnifier
26 | };
27 |
28 | /**
29 | A magnifier view which can be displayed in `YYTextEffectWindow`.
30 |
31 | @discussion Use `magnifierWithType:` to create instance.
32 | Typically, you should not use this class directly.
33 | */
34 | @interface YYTextMagnifier : UIView
35 |
36 | /// Create a mangifier with the specified type. @param type The magnifier type.
37 | + (id)magnifierWithType:(YYTextMagnifierType)type;
38 |
39 | @property (nonatomic, readonly) YYTextMagnifierType type; ///< Type of magnifier
40 | @property (nonatomic, readonly) CGSize fitSize; ///< The 'best' size for magnifier view.
41 | @property (nonatomic, readonly) CGSize snapshotSize; ///< The 'best' snapshot image size for magnifier.
42 | @property (nullable, nonatomic, strong) UIImage *snapshot; ///< The image in magnifier (readwrite).
43 |
44 | @property (nullable, nonatomic, weak) UIView *hostView; ///< The coordinate based view.
45 | @property (nonatomic) CGPoint hostCaptureCenter; ///< The snapshot capture center in `hostView`.
46 | @property (nonatomic) CGPoint hostPopoverCenter; ///< The popover center in `hostView`.
47 | @property (nonatomic) BOOL hostVerticalForm; ///< The host view is vertical form.
48 | @property (nonatomic) BOOL captureDisabled; ///< A hint for `YYTextEffectWindow` to disable capture.
49 | @property (nonatomic) BOOL captureFadeAnimation; ///< Show fade animation when the snapshot image changed.
50 | @end
51 |
52 | NS_ASSUME_NONNULL_END
53 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Text/String/NSParagraphStyle+YYText.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSParagraphStyle+YYText.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/10/7.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | Provides extensions for `NSParagraphStyle` to work with CoreText.
18 | */
19 | @interface NSParagraphStyle (YYText)
20 |
21 | /**
22 | Creates a new NSParagraphStyle object from the CoreText Style.
23 |
24 | @param CTStyle CoreText Paragraph Style.
25 |
26 | @return a new NSParagraphStyle
27 | */
28 | + (nullable NSParagraphStyle *)styleWithCTStyle:(CTParagraphStyleRef)CTStyle;
29 |
30 | /**
31 | Creates and returns a CoreText Paragraph Style. (need call CFRelease() after used)
32 | */
33 | - (nullable CTParagraphStyleRef)CTStyle CF_RETURNS_RETAINED;
34 |
35 | @end
36 |
37 | NS_ASSUME_NONNULL_END
38 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Text/String/UIPasteboard+YYText.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIPasteboard+YYText.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 15/4/2.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | Extend UIPasteboard to support image and attributed string.
18 | */
19 | @interface UIPasteboard (YYText)
20 |
21 | @property (nullable, nonatomic, copy) NSData *PNGData; ///< PNG file data
22 | @property (nullable, nonatomic, copy) NSData *JPEGData; ///< JPEG file data
23 | @property (nullable, nonatomic, copy) NSData *GIFData; ///< GIF file data
24 | @property (nullable, nonatomic, copy) NSData *WEBPData; ///< WebP file data
25 | @property (nullable, nonatomic, copy) NSData *imageData; ///< image file data
26 |
27 | /// Attributed string,
28 | /// Set this attributed will also set the string property which is copy from the attributed string.
29 | /// If the attributed string contains one or more image, it will also set the `images` property.
30 | @property (nullable, nonatomic, copy) NSAttributedString *attributedString;
31 |
32 | @end
33 |
34 |
35 | /// The name identifying the attributed string in pasteboard.
36 | UIKIT_EXTERN NSString *const YYPasteboardTypeAttributedString;
37 |
38 | /// The UTI Type identifying WebP data in pasteboard.
39 | UIKIT_EXTERN NSString *const YYUTTypeWEBP;
40 |
41 | NS_ASSUME_NONNULL_END
42 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Text/String/YYTextArchiver.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYTextArchiver.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 15/3/16.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | A subclass of `NSKeyedArchiver` which implement `NSKeyedArchiverDelegate` protocol.
18 |
19 | The archiver can encode the object which contains
20 | CGColor/CGImage/CTRunDelegateRef/.. (such as NSAttributedString).
21 | */
22 | @interface YYTextArchiver : NSKeyedArchiver
23 | @end
24 |
25 | /**
26 | A subclass of `NSKeyedUnarchiver` which implement `NSKeyedUnarchiverDelegate`
27 | protocol. The unarchiver can decode the data which is encoded by
28 | `YYTextArchiver` or `NSKeyedArchiver`.
29 | */
30 | @interface YYTextUnarchiver : NSKeyedUnarchiver
31 | @end
32 |
33 | NS_ASSUME_NONNULL_END
34 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Text/String/YYTextRunDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYTextRunDelegate.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/10/14.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 | #import
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | /**
18 | Wrapper for CTRunDelegateRef.
19 |
20 | Example:
21 |
22 | YYTextRunDelegate *delegate = [YYTextRunDelegate new];
23 | delegate.ascent = 20;
24 | delegate.descent = 4;
25 | delegate.width = 20;
26 | CTRunDelegateRef ctRunDelegate = delegate.CTRunDelegate;
27 | if (ctRunDelegate) {
28 | /// add to attributed string
29 | CFRelease(ctRunDelegate);
30 | }
31 |
32 | */
33 | @interface YYTextRunDelegate : NSObject
34 |
35 | /**
36 | Creates and returns the CTRunDelegate.
37 |
38 | @discussion You need call CFRelease() after used.
39 | The CTRunDelegateRef has a strong reference to this YYTextRunDelegate object.
40 | In CoreText, use CTRunDelegateGetRefCon() to get this YYTextRunDelegate object.
41 |
42 | @return The CTRunDelegate object.
43 | */
44 | - (nullable CTRunDelegateRef)CTRunDelegate CF_RETURNS_RETAINED;
45 |
46 | /**
47 | Additional information about the the run delegate.
48 | */
49 | @property (nullable, nonatomic, strong) NSDictionary *userInfo;
50 |
51 | /**
52 | The typographic ascent of glyphs in the run.
53 | */
54 | @property (nonatomic) CGFloat ascent;
55 |
56 | /**
57 | The typographic descent of glyphs in the run.
58 | */
59 | @property (nonatomic) CGFloat descent;
60 |
61 | /**
62 | The typographic width of glyphs in the run.
63 | */
64 | @property (nonatomic) CGFloat width;
65 |
66 | @end
67 |
68 | NS_ASSUME_NONNULL_END
69 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Text/String/YYTextRunDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // YYTextRunDelegate.m
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/10/14.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import "YYTextRunDelegate.h"
13 |
14 | static void DeallocCallback(void *ref) {
15 | YYTextRunDelegate *self = (__bridge_transfer YYTextRunDelegate *)(ref);
16 | self = nil; // release
17 | }
18 |
19 | static CGFloat GetAscentCallback(void *ref) {
20 | YYTextRunDelegate *self = (__bridge YYTextRunDelegate *)(ref);
21 | return self.ascent;
22 | }
23 |
24 | static CGFloat GetDecentCallback(void *ref) {
25 | YYTextRunDelegate *self = (__bridge YYTextRunDelegate *)(ref);
26 | return self.descent;
27 | }
28 |
29 | static CGFloat GetWidthCallback(void *ref) {
30 | YYTextRunDelegate *self = (__bridge YYTextRunDelegate *)(ref);
31 | return self.width;
32 | }
33 |
34 | @implementation YYTextRunDelegate
35 |
36 | - (CTRunDelegateRef)CTRunDelegate CF_RETURNS_RETAINED {
37 | CTRunDelegateCallbacks callbacks;
38 | callbacks.version = kCTRunDelegateCurrentVersion;
39 | callbacks.dealloc = DeallocCallback;
40 | callbacks.getAscent = GetAscentCallback;
41 | callbacks.getDescent = GetDecentCallback;
42 | callbacks.getWidth = GetWidthCallback;
43 | return CTRunDelegateCreate(&callbacks, (__bridge_retained void *)(self.copy));
44 | }
45 |
46 | - (void)encodeWithCoder:(NSCoder *)aCoder {
47 | [aCoder encodeObject:@(_ascent) forKey:@"ascent"];
48 | [aCoder encodeObject:@(_descent) forKey:@"descent"];
49 | [aCoder encodeObject:@(_width) forKey:@"width"];
50 | [aCoder encodeObject:_userInfo forKey:@"userInfo"];
51 | }
52 |
53 | - (id)initWithCoder:(NSCoder *)aDecoder {
54 | self = [super init];
55 | _ascent = ((NSNumber *)[aDecoder decodeObjectForKey:@"ascent"]).floatValue;
56 | _descent = ((NSNumber *)[aDecoder decodeObjectForKey:@"descent"]).floatValue;
57 | _width = ((NSNumber *)[aDecoder decodeObjectForKey:@"width"]).floatValue;
58 | _userInfo = [aDecoder decodeObjectForKey:@"userInfo"];
59 | return self;
60 | }
61 |
62 | - (id)copyWithZone:(NSZone *)zone {
63 | typeof(self) one = [self.class new];
64 | one.ascent = self.ascent;
65 | one.descent = self.descent;
66 | one.width = self.width;
67 | one.userInfo = self.userInfo;
68 | return one;
69 | }
70 |
71 | @end
72 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Utility/YYDispatchQueuePool.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYDispatchQueueManager.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 15/7/18.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | #ifndef YYDispatchQueuePool_h
15 | #define YYDispatchQueuePool_h
16 |
17 | NS_ASSUME_NONNULL_BEGIN
18 |
19 | /**
20 | A dispatch queue pool holds multiple serial queues.
21 | Use this class to control queue's thread count (instead of concurrent queue).
22 | */
23 | @interface YYDispatchQueuePool : NSObject
24 | - (instancetype)init UNAVAILABLE_ATTRIBUTE;
25 | + (instancetype)new UNAVAILABLE_ATTRIBUTE;
26 |
27 | /**
28 | Creates and returns a dispatch queue pool.
29 | @param name The name of the pool.
30 | @param queueCount Maxmium queue count, should in range (1, 32).
31 | @param qos Queue quality of service (QOS).
32 | @return A new pool, or nil if an error occurs.
33 | */
34 | - (instancetype)initWithName:(nullable NSString *)name queueCount:(NSUInteger)queueCount qos:(NSQualityOfService)qos;
35 |
36 | /// Pool's name.
37 | @property (nullable, nonatomic, readonly) NSString *name;
38 |
39 | /// Get a serial queue from pool.
40 | - (dispatch_queue_t)queue;
41 |
42 | + (instancetype)defaultPoolForQOS:(NSQualityOfService)qos;
43 |
44 | @end
45 |
46 | /// Get a serial queue from global queue pool with a specified qos.
47 | extern dispatch_queue_t YYDispatchQueueGetForQOS(NSQualityOfService qos);
48 |
49 | NS_ASSUME_NONNULL_END
50 |
51 | #endif
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Utility/YYGestureRecognizer.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYGestureRecognizer.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/10/26.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /// State of the gesture
17 | typedef NS_ENUM(NSUInteger, YYGestureRecognizerState) {
18 | YYGestureRecognizerStateBegan, ///< gesture start
19 | YYGestureRecognizerStateMoved, ///< gesture moved
20 | YYGestureRecognizerStateEnded, ///< gesture end
21 | YYGestureRecognizerStateCancelled, ///< gesture cancel
22 | };
23 |
24 | /**
25 | A simple UIGestureRecognizer subclass for receive touch events.
26 | */
27 | @interface YYGestureRecognizer : UIGestureRecognizer
28 |
29 | @property (nonatomic, readonly) CGPoint startPoint; ///< start point
30 | @property (nonatomic, readonly) CGPoint lastPoint; ///< last move point.
31 | @property (nonatomic, readonly) CGPoint currentPoint; ///< current move point.
32 |
33 | /// The action block invoked by every gesture event.
34 | @property (nullable, nonatomic, copy) void (^action)(YYGestureRecognizer *gesture, YYGestureRecognizerState state);
35 |
36 | /// Cancel the gesture for current touch.
37 | - (void)cancel;
38 |
39 | @end
40 |
41 | NS_ASSUME_NONNULL_END
42 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Utility/YYGestureRecognizer.m:
--------------------------------------------------------------------------------
1 | //
2 | // YYGestureRecognizer.m
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/10/26.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import "YYGestureRecognizer.h"
13 | #import
14 |
15 | @implementation YYGestureRecognizer
16 |
17 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
18 | self.state = UIGestureRecognizerStateBegan;
19 | _startPoint = [(UITouch *)[touches anyObject] locationInView:self.view];
20 | _lastPoint = _currentPoint;
21 | _currentPoint = _startPoint;
22 | if (_action) _action(self, YYGestureRecognizerStateBegan);
23 | }
24 |
25 | - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
26 | UITouch *touch = (UITouch *)[touches anyObject];
27 | CGPoint currentPoint = [touch locationInView:self.view];
28 | self.state = UIGestureRecognizerStateChanged;
29 | _currentPoint = currentPoint;
30 | if (_action) _action(self, YYGestureRecognizerStateMoved);
31 | _lastPoint = _currentPoint;
32 | }
33 |
34 | - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
35 | self.state = UIGestureRecognizerStateEnded;
36 | if (_action) _action(self, YYGestureRecognizerStateEnded);
37 | }
38 |
39 | - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
40 | self.state = UIGestureRecognizerStateCancelled;
41 | if (_action) _action(self, YYGestureRecognizerStateCancelled);
42 | }
43 |
44 | - (void)reset {
45 | self.state = UIGestureRecognizerStatePossible;
46 | }
47 |
48 | - (void)cancel {
49 | if (self.state == UIGestureRecognizerStateBegan || self.state == UIGestureRecognizerStateChanged) {
50 | self.state = UIGestureRecognizerStateCancelled;
51 | if (_action) _action(self, YYGestureRecognizerStateCancelled);
52 | }
53 | }
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Utility/YYSentinel.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYSentinel.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 15/4/13.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | YYSentinel is a thread safe incrementing counter.
18 | It may be used in some multi-threaded situation.
19 | */
20 | @interface YYSentinel : NSObject
21 |
22 | /// Returns the current value of the counter.
23 | @property (readonly) int32_t value;
24 |
25 | /// Increase the value atomically.
26 | /// @return The new value.
27 | - (int32_t)increase;
28 |
29 | @end
30 |
31 | NS_ASSUME_NONNULL_END
32 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Utility/YYSentinel.m:
--------------------------------------------------------------------------------
1 | //
2 | // YYSentinel.m
3 | // YYKit
4 | //
5 | // Created by ibireme on 15/4/13.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import "YYSentinel.h"
13 | #import
14 |
15 | @implementation YYSentinel {
16 | int32_t _value;
17 | }
18 |
19 | - (int32_t)value {
20 | return _value;
21 | }
22 |
23 | - (int32_t)increase {
24 | return OSAtomicIncrement32(&_value);
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Utility/YYThreadSafeArray.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYThreadSafeArray.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/10/21.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | /**
15 | A simple implementation of thread safe mutable array.
16 |
17 | @discussion Generally, access performance is lower than NSMutableArray,
18 | but higher than using @synchronized, NSLock, or pthread_mutex_t.
19 |
20 | @discussion It's also compatible with the custom methods in `NSArray(YYAdd)`
21 | and `NSMutableArray(YYAdd)`
22 |
23 | @warning Fast enumerate(for..in) and enumerator is not thread safe,
24 | use enumerate using block instead. When enumerate or sort with block/callback,
25 | do *NOT* send message to the array inside the block/callback.
26 | */
27 | @interface YYThreadSafeArray : NSMutableArray
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Utility/YYThreadSafeDictionary.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYThreadSafeDictionary.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/10/21.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | /**
15 | A simple implementation of thread safe mutable dictionary.
16 |
17 | @discussion Generally, access performance is lower than NSMutableDictionary,
18 | but higher than using @synchronized, NSLock, or pthread_mutex_t.
19 |
20 | @discussion It's also compatible with the custom methods in `NSDictionary(YYAdd)`
21 | and `NSMutableDictionary(YYAdd)`
22 |
23 | @warning Fast enumerate(for...in) and enumerator is not thread safe,
24 | use enumerate using block instead. When enumerate or sort with block/callback,
25 | do *NOT* send message to the dictionary inside the block/callback.
26 | */
27 | @interface YYThreadSafeDictionary : NSMutableDictionary
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Utility/YYTimer.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYTimer.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 15/2/7.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | YYTimer is a thread-safe timer based on GCD. It has similar API with `NSTimer`.
18 | YYTimer object differ from NSTimer in a few ways:
19 |
20 | * It use GCD to produce timer tick, and won't be affected by runLoop.
21 | * It make a weak reference to the target, so it can avoid retain cycles.
22 | * It always fire on main thread.
23 |
24 | */
25 | @interface YYTimer : NSObject
26 |
27 | + (YYTimer *)timerWithTimeInterval:(NSTimeInterval)interval
28 | target:(id)target
29 | selector:(SEL)selector
30 | repeats:(BOOL)repeats;
31 |
32 | - (instancetype)initWithFireTime:(NSTimeInterval)start
33 | interval:(NSTimeInterval)interval
34 | target:(id)target
35 | selector:(SEL)selector
36 | repeats:(BOOL)repeats NS_DESIGNATED_INITIALIZER;
37 |
38 | @property (readonly) BOOL repeats;
39 | @property (readonly) NSTimeInterval timeInterval;
40 | @property (readonly, getter=isValid) BOOL valid;
41 |
42 | - (void)invalidate;
43 |
44 | - (void)fire;
45 |
46 | @end
47 |
48 | NS_ASSUME_NONNULL_END
49 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Utility/YYTransaction.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYTransaction.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 15/4/18.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | YYTransaction let you perform a selector once before current runloop sleep.
18 | */
19 | @interface YYTransaction : NSObject
20 |
21 | /**
22 | Creates and returns a transaction with a specified target and selector.
23 |
24 | @param target A specified target, the target is retained until runloop end.
25 | @param selector A selector for target.
26 |
27 | @return A new transaction, or nil if an error occurs.
28 | */
29 | + (YYTransaction *)transactionWithTarget:(id)target selector:(SEL)selector;
30 |
31 | /**
32 | Commit the trancaction to main runloop.
33 |
34 | @discussion It will perform the selector on the target once before main runloop's
35 | current loop sleep. If the same transaction (same target and same selector) has
36 | already commit to runloop in this loop, this method do nothing.
37 | */
38 | - (void)commit;
39 |
40 | @end
41 |
42 | NS_ASSUME_NONNULL_END
43 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Utility/YYWeakProxy.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYWeakProxy.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/10/18.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | A proxy used to hold a weak object.
18 | It can be used to avoid retain cycles, such as the target in NSTimer or CADisplayLink.
19 |
20 | sample code:
21 |
22 | @implementation MyView {
23 | NSTimer *_timer;
24 | }
25 |
26 | - (void)initTimer {
27 | YYWeakProxy *proxy = [YYWeakProxy proxyWithTarget:self];
28 | _timer = [NSTimer timerWithTimeInterval:0.1 target:proxy selector:@selector(tick:) userInfo:nil repeats:YES];
29 | }
30 |
31 | - (void)tick:(NSTimer *)timer {...}
32 | @end
33 | */
34 | @interface YYWeakProxy : NSProxy
35 |
36 | /**
37 | The proxy target.
38 | */
39 | @property (nullable, nonatomic, weak, readonly) id target;
40 |
41 | /**
42 | Creates a new weak proxy for target.
43 |
44 | @param target Target object.
45 |
46 | @return A new proxy object.
47 | */
48 | - (instancetype)initWithTarget:(id)target;
49 |
50 | /**
51 | Creates a new weak proxy for target.
52 |
53 | @param target Target object.
54 |
55 | @return A new proxy object.
56 | */
57 | + (instancetype)proxyWithTarget:(id)target;
58 |
59 | @end
60 |
61 | NS_ASSUME_NONNULL_END
62 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Librarys/YYKit/Utility/YYWeakProxy.m:
--------------------------------------------------------------------------------
1 | //
2 | // YYWeakProxy.m
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/10/18.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import "YYWeakProxy.h"
13 |
14 |
15 | @implementation YYWeakProxy
16 |
17 | - (instancetype)initWithTarget:(id)target {
18 | _target = target;
19 | return self;
20 | }
21 |
22 | + (instancetype)proxyWithTarget:(id)target {
23 | return [[YYWeakProxy alloc] initWithTarget:target];
24 | }
25 |
26 | - (id)forwardingTargetForSelector:(SEL)selector {
27 | return _target;
28 | }
29 |
30 | - (void)forwardInvocation:(NSInvocation *)invocation {
31 | void *null = NULL;
32 | [invocation setReturnValue:&null];
33 | }
34 |
35 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)selector {
36 | return [NSObject instanceMethodSignatureForSelector:@selector(init)];
37 | }
38 |
39 | - (BOOL)respondsToSelector:(SEL)aSelector {
40 | return [_target respondsToSelector:aSelector];
41 | }
42 |
43 | - (BOOL)isEqual:(id)object {
44 | return [_target isEqual:object];
45 | }
46 |
47 | - (NSUInteger)hash {
48 | return [_target hash];
49 | }
50 |
51 | - (Class)superclass {
52 | return [_target superclass];
53 | }
54 |
55 | - (Class)class {
56 | return [_target class];
57 | }
58 |
59 | - (BOOL)isKindOfClass:(Class)aClass {
60 | return [_target isKindOfClass:aClass];
61 | }
62 |
63 | - (BOOL)isMemberOfClass:(Class)aClass {
64 | return [_target isMemberOfClass:aClass];
65 | }
66 |
67 | - (BOOL)conformsToProtocol:(Protocol *)aProtocol {
68 | return [_target conformsToProtocol:aProtocol];
69 | }
70 |
71 | - (BOOL)isProxy {
72 | return YES;
73 | }
74 |
75 | - (NSString *)description {
76 | return [_target description];
77 | }
78 |
79 | - (NSString *)debugDescription {
80 | return [_target debugDescription];
81 | }
82 |
83 | @end
84 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/API/NewsDetailsAPI.h:
--------------------------------------------------------------------------------
1 | //
2 | // NewsDetailsAPI.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "NewsDetailsModel.h"
12 |
13 | #import "NewsDetailsCommentModel.h"
14 |
15 | @interface NewsDetailsAPI : NSObject
16 |
17 | /**
18 | 加载数据
19 |
20 | @param newsId 资讯Id
21 | @param resultBlock 结果回调Block
22 | */
23 | - (void)loadDataWithNewsId:(NSString *)newsId ResultBlock:(void (^)(NewsDetailsModel *model))resultBlock;
24 |
25 | /**
26 | 加载评论数据
27 |
28 | @param page 页数
29 | @param resultBlock 结果回调Block
30 | */
31 | - (void)loadCommentDataWithPage:(NSInteger)page ResultBlock:(void (^)(NSArray *array))resultBlock;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/Cell/NewsDetailsADCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // NewsDetailsADCell.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NewsDetailsADCell : UITableViewCell
12 |
13 | @property (nonatomic , strong ) id model;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/Cell/NewsDetailsCommentCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // NewsDetailsCommentCell.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "NewsDetailsCommentModel.h"
12 |
13 | @interface NewsDetailsCommentCell : UITableViewCell
14 |
15 | @property (nonatomic , strong ) NewsDetailsCommentModel *model;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/Cell/NewsDetailsHeaderFooterView.h:
--------------------------------------------------------------------------------
1 | //
2 | // NewsDetailsHeaderFooterView.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NewsDetailsHeaderFooterView : UITableViewHeaderFooterView
12 |
13 | /**
14 | 设置标题
15 |
16 | @param title 标题
17 | */
18 | - (void)configTitle:(NSString *)title;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/Cell/NewsDetailsHeaderFooterView.m:
--------------------------------------------------------------------------------
1 | //
2 | // NewsDetailsHeaderFooterView.m
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import "NewsDetailsHeaderFooterView.h"
10 |
11 | #import "SDAutoLayout.h"
12 |
13 | @interface NewsDetailsHeaderFooterView ()
14 |
15 | @property (nonatomic , strong ) UILabel *titleLabel;
16 |
17 | @end
18 |
19 | @implementation NewsDetailsHeaderFooterView
20 |
21 | - (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier{
22 |
23 | self = [super initWithReuseIdentifier:reuseIdentifier];
24 |
25 | if (self) {
26 |
27 | // 初始化数据
28 |
29 | [self initData];
30 |
31 | // 初始化视图
32 |
33 | [self initSubView];
34 |
35 | // 设置自动布局
36 |
37 | [self configAutoLayout];
38 |
39 | // 设置主题模式
40 |
41 | [self configTheme];
42 | }
43 |
44 | return self;
45 | }
46 |
47 | #pragma mark - 初始化数据
48 |
49 | - (void)initData{
50 |
51 | self.frame = CGRectMake(0, 0, CGRectGetWidth([[UIScreen mainScreen] bounds]), CGRectGetHeight(self.frame));
52 |
53 | self.clipsToBounds = YES;
54 | }
55 |
56 | #pragma mark - 初始化子视图
57 |
58 | - (void)initSubView{
59 |
60 | // 标题
61 |
62 | _titleLabel = [[UILabel alloc] init];
63 |
64 | _titleLabel.numberOfLines = 1;
65 |
66 | _titleLabel.font = [UIFont systemFontOfSize:18.0f];
67 |
68 | [self.contentView addSubview:_titleLabel];
69 | }
70 |
71 | #pragma mark - 设置自动布局
72 |
73 | - (void)configAutoLayout{
74 |
75 | // 标题
76 |
77 | _titleLabel.sd_layout
78 | .topSpaceToView(self.contentView, 15.0f)
79 | .leftSpaceToView(self.contentView , 15.0f)
80 | .rightSpaceToView(self.contentView , 15.0f)
81 | .heightIs(20);
82 | }
83 |
84 | #pragma mark - 设置主题
85 |
86 | - (void)configTheme{
87 |
88 | self.contentView.lee_theme
89 | .LeeAddBackgroundColor(THEME_DAY, HEX_FFFFFF)
90 | .LeeAddBackgroundColor(THEME_NIGHT, HEX_252525);
91 |
92 | self.titleLabel.lee_theme
93 | .LeeAddTextColor(THEME_DAY , HEX_222222)
94 | .LeeAddTextColor(THEME_NIGHT , HEX_777777);
95 | }
96 |
97 | #pragma mark - 设置标题
98 |
99 | - (void)configTitle:(NSString *)title{
100 |
101 | self.titleLabel.text = title;
102 | }
103 |
104 | @end
105 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/Cell/NewsDetailsPraiseCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // NewsDetailsPraiseCell.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "NewsDetailsModel.h"
12 |
13 | @interface NewsDetailsPraiseCell : UITableViewCell
14 |
15 | @property (nonatomic , strong ) NewsDetailsModel *model;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/Cell/NewsDetailsRelateCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // NewsDetailsRelateCell.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NewsDetailsRelateCell : UITableViewCell
12 |
13 | @property (nonatomic , strong ) id model;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/Cell/NewsDetailsShareCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // NewsDetailsShareCell.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NewsDetailsShareCell : UITableViewCell
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/Cell/NewsDetailsShareCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // NewsDetailsShareCell.m
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import "NewsDetailsShareCell.h"
10 |
11 | @implementation NewsDetailsShareCell
12 |
13 | - (void)awakeFromNib {
14 |
15 | [super awakeFromNib];
16 | }
17 |
18 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
19 |
20 | [super setSelected:selected animated:animated];
21 | }
22 |
23 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
24 |
25 | if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
26 |
27 | // 初始化数据
28 |
29 | [self initData];
30 |
31 | // 初始化视图
32 |
33 | [self initSubView];
34 |
35 | // 设置自动布局
36 |
37 | [self configAutoLayout];
38 |
39 | // 设置主题模式
40 |
41 | [self configTheme];
42 | }
43 |
44 | return self;
45 | }
46 |
47 | #pragma mark - 初始化数据
48 |
49 | - (void)initData{
50 |
51 | self.frame = CGRectMake(0, 0, CGRectGetWidth([[UIScreen mainScreen] bounds]), CGRectGetHeight(self.frame));
52 |
53 | self.selectionStyle = UITableViewCellSelectionStyleNone;
54 | }
55 |
56 | #pragma mark - 初始化子视图
57 |
58 | - (void)initSubView{
59 |
60 | }
61 |
62 | #pragma mark - 设置自动布局
63 |
64 | - (void)configAutoLayout{
65 |
66 | }
67 |
68 | #pragma mark - 设置主题
69 |
70 | - (void)configTheme{
71 |
72 | self.lee_theme
73 | .LeeAddBackgroundColor(THEME_DAY, HEX_FFFFFF)
74 | .LeeAddBackgroundColor(THEME_NIGHT, HEX_252525);
75 |
76 | self.contentView.lee_theme
77 | .LeeAddBackgroundColor(THEME_DAY, HEX_FFFFFF)
78 | .LeeAddBackgroundColor(THEME_NIGHT, HEX_252525);
79 | }
80 |
81 | @end
82 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/Controller/NewsDetailsViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // NewsDetailsViewController.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import "BaseViewController.h"
10 |
11 | @interface NewsDetailsViewController : BaseViewController
12 |
13 | @property (nonatomic , copy ) NSString *newsId;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/File/WebContentStyle.css:
--------------------------------------------------------------------------------
1 |
2 | html{
3 | width:100%;
4 | height:100%;
5 | margin:0 auto;
6 | padding:0;
7 | }
8 |
9 | body{
10 | width:100%;
11 | height:100%;
12 | margin:0 auto;
13 | padding:0;
14 | line-height:1.7;
15 | text-align: center;
16 | background-color:transparent;
17 | word-wrap:break-word;
18 | outline: 0;
19 | -webkit-tap-highlight-color: rgba(0,0,0,0);
20 | -webkit-tap-highlight-color: transparent;
21 | -webkit-touch-callout: none;
22 | -webkit-user-select: none;
23 | overflow-y: scroll;
24 | }
25 |
26 | div.content{
27 | padding:0;
28 | width:auto;
29 | height:auto;
30 | overflow:hidden;
31 | background-color:transparent;
32 | }
33 |
34 | p{
35 | margin-left:15;
36 | margin-right:15;
37 | text-align: left;
38 | }
39 |
40 | div.image{
41 | position:relative;
42 | text-align: center;
43 | vertical-align: middle;
44 | margin:0 auto;
45 | display:inline-block;
46 | width:auto;
47 | height:auto;
48 | }
49 |
50 | img.image{
51 | background-color: #DCDCDC;
52 | text-align:center;
53 | border:0;
54 | padding:0;
55 | }
56 |
57 | div.progress{
58 | z-index:3;
59 | position:absolute;
60 | border:0;
61 | padding:0;
62 | }
63 |
64 | span.load{
65 | position: absolute;
66 | box-sizing: border-box;
67 | width: 80%;
68 | height: 100px;
69 | line-height: 100px;
70 | text-align: center;
71 | font-size: 20px;
72 | font-family: '黑体';
73 | font-weight: bold;
74 | left: 50%;
75 | top: 50%;
76 | margin-top:-50px;
77 | margin-left:-40%;
78 | z-index: 2;
79 | }
80 |
81 | /** 主题样式 */
82 |
83 | html.white{
84 | background-color:#FFFFFF;
85 | color:#252525;
86 | }
87 |
88 | html.black{
89 | background-color:#252525;
90 | color:#777777;
91 | }
92 |
93 | div.image.white{
94 | color: #FFFFFF;
95 | }
96 |
97 | div.image.black{
98 | color: #555555;
99 | }
100 |
101 | img.image.white{
102 | background-color: #DCDCDC;
103 | }
104 |
105 | img.image.black{
106 | background-color: #333333;
107 | }
108 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/File/load_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/NewsDetails/File/load_image.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/File/load_image_gif_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/NewsDetailsDemo/NewsDetails/File/load_image_gif_icon.png
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/Model/NewsDetailsCommentModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // NewsDetailsCommentModel.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/12.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NewsDetailsCommentModel : NSObject
12 |
13 | /**
14 | 评论Id
15 | */
16 | @property (nonatomic , copy ) NSString *commentId;
17 |
18 | /**
19 | 评论人昵称
20 | */
21 | @property (nonatomic , copy ) NSString *nickname;
22 |
23 | /**
24 | 评论内容
25 | */
26 | @property (nonatomic , copy ) NSString *content;
27 |
28 | /**
29 | 评论时间
30 | */
31 | @property (nonatomic , copy ) NSString *time;
32 |
33 | /**
34 | 评论点赞数
35 | */
36 | @property (nonatomic , assign ) NSInteger praiseCount;
37 |
38 | /**
39 | 评论子评论数组
40 | */
41 | @property (nonatomic , strong ) NSArray *subCommentArray;
42 |
43 | #pragma mark - 扩展
44 |
45 | /**
46 | 评论是否已经点赞
47 | */
48 | @property (nonatomic , assign ) BOOL isPraise;
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/Model/NewsDetailsCommentModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // NewsDetailsCommentModel.m
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/12.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import "NewsDetailsCommentModel.h"
10 |
11 | @implementation NewsDetailsCommentModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/Model/NewsDetailsModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // NewsDetailsModel.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NewsDetailsModel : NSObject
12 |
13 | /**
14 | 资讯Id
15 | */
16 | @property (nonatomic , copy ) NSString *newsId;
17 |
18 | /**
19 | 资讯标题
20 | */
21 | @property (nonatomic , copy ) NSString *newsTitle;
22 |
23 | /**
24 | 资讯时间
25 | */
26 | @property (nonatomic , copy ) NSString *newsTime;
27 |
28 | /**
29 | 资讯Html
30 | */
31 | @property (nonatomic , copy ) NSString *newsHtml;
32 |
33 | /**
34 | 相关资讯
35 | */
36 | @property (nonatomic , strong ) NSArray *aboutArray;
37 |
38 | /**
39 | 点赞数
40 | */
41 | @property (nonatomic , assign ) NSInteger praiseCount;
42 |
43 | /**
44 | 不喜欢数
45 | */
46 | @property (nonatomic , assign ) NSInteger dislikeCount;
47 |
48 | #pragma mark - 扩展属性
49 |
50 | /**
51 | 是否点赞
52 | */
53 | @property (nonatomic , assign ) BOOL isPraise;
54 |
55 | /**
56 | 是否不喜欢
57 | */
58 | @property (nonatomic , assign ) BOOL isDislike;
59 |
60 | #pragma mark - 缓存
61 |
62 | + (NewsDetailsModel *)cacheForNewsId:(NSString *)newsId;
63 |
64 | + (void)setCache:(NewsDetailsModel *)model forNewsId:(NSString *)newsId;
65 |
66 | + (void)cacheSizeWithBlock:(void (^)(NSInteger bytes))block;
67 |
68 | + (void)clearCacheForNewsId:(NSString *)newsId;
69 |
70 | + (void)clearAllCacheWithBlock:(void (^)())block;
71 |
72 | @end
73 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/Model/NewsDetailsModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // NewsDetailsModel.m
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import "NewsDetailsModel.h"
10 |
11 | static NSString *const CacheKey = @"NewsDetailsCache";
12 |
13 | @implementation NewsDetailsModel
14 |
15 | - (void)encodeWithCoder:(NSCoder *)aCoder { [self modelEncodeWithCoder:aCoder]; }
16 | - (id)initWithCoder:(NSCoder *)aDecoder { self = [super init]; return [self modelInitWithCoder:aDecoder]; }
17 | - (id)copyWithZone:(NSZone *)zone { return [self modelCopy]; }
18 | - (NSUInteger)hash { return [self modelHash]; }
19 | - (BOOL)isEqual:(id)object { return [self modelIsEqual:object]; }
20 | - (NSString *)description { return [self modelDescription]; }
21 |
22 | #pragma mark - 缓存
23 |
24 | + (NewsDetailsModel *)cacheForNewsId:(NSString *)newsId{
25 |
26 | if (!newsId) return nil;
27 |
28 | YYCache *cache = [YYCache cacheWithName:CacheKey];
29 |
30 | return (NewsDetailsModel *)[cache objectForKey:newsId];
31 | }
32 |
33 | + (void)setCache:(NewsDetailsModel *)model forNewsId:(NSString *)newsId{
34 |
35 | if (!model && !newsId) return;
36 |
37 | YYCache *cache = [YYCache cacheWithName:CacheKey];
38 |
39 | [cache setObject:model forKey:model.newsId];
40 | }
41 |
42 | + (void)cacheSizeWithBlock:(void (^)(NSInteger bytes))block{
43 |
44 | YYCache *cache = [YYCache cacheWithName:CacheKey];
45 |
46 | [cache.diskCache totalCostWithBlock:^(NSInteger totalCost) {
47 |
48 | if (block) block(totalCost);
49 | }];
50 | }
51 |
52 | + (void)clearCacheForNewsId:(NSString *)newsId{
53 |
54 | YYCache *cache = [YYCache cacheWithName:CacheKey];
55 |
56 | [cache removeObjectForKey:newsId];
57 | }
58 |
59 | + (void)clearAllCacheWithBlock:(void (^)())block{
60 |
61 | YYCache *cache = [YYCache cacheWithName:CacheKey];
62 |
63 | [cache removeAllObjectsWithBlock:block];
64 | }
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/NewsDetails/View/NewsDetailsHeaderView.h:
--------------------------------------------------------------------------------
1 | //
2 | // NewsDetailsHeaderView.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/12.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "ContentManager.h"
12 |
13 | #import "NewsDetailsModel.h"
14 |
15 | @interface NewsDetailsHeaderView : UIView
16 |
17 | @property (nonatomic , assign ) ContentImageLoadMode loadMode;
18 |
19 | @property (nonatomic , strong ) NewsDetailsModel *model;
20 |
21 | @property (nonatomic , copy ) void (^loadedFinishBlock)(BOOL);//加载完成Block
22 |
23 | @property (nonatomic , copy ) void (^updateHeightBlock)(NewsDetailsHeaderView *view); //更新高度Block
24 |
25 | - (void)configFontLevel:(NSInteger)level;
26 |
27 | - (void)updateHeight;
28 |
29 | - (void)scroll:(CGPoint)offset;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/PrefixHeader.pch:
--------------------------------------------------------------------------------
1 | //
2 | // PrefixHeader.pch
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #ifndef PrefixHeader_pch
10 | #define PrefixHeader_pch
11 |
12 | // Include any system framework and library headers here that should be included in all compilation units.
13 | // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
14 |
15 | #import "YYKit.h"
16 |
17 | #import "LEETheme.h"
18 |
19 | #import "LEEAlert.h"
20 |
21 |
22 | #import "ThemeConstant.h"
23 |
24 |
25 | #endif /* PrefixHeader_pch */
26 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Setting/Cell/SettingCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // SettingCell.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/20.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "SettingModel.h"
12 |
13 | @interface SettingCell : UITableViewCell
14 |
15 | @property (nonatomic , strong ) SettingModel *model;
16 |
17 | @property (nonatomic , copy ) void (^switchClickBlock)(SettingType, BOOL);
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Setting/Controller/SettingViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SettingViewController.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/20.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import "BaseViewController.h"
10 |
11 | @interface SettingViewController : BaseViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Setting/Model/SettingModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // SettingModel.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/20.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef NS_ENUM(NSInteger, SettingType) {
12 | /** 设置类型 字号 */
13 | SettingTypeFontSize,
14 | /** 设置类型 Wifi */
15 | SettingTypeWifi,
16 | /** 设置类型 缓存 */
17 | SettingTypeCache
18 | };
19 |
20 | @interface SettingModel : NSObject
21 |
22 | /**
23 | 类型
24 | */
25 | @property (nonatomic , assign ) SettingType type;
26 |
27 | /**
28 | 标题
29 | */
30 | @property (nonatomic , strong ) NSString *title;
31 |
32 | /**
33 | 副标题
34 | */
35 | @property (nonatomic , strong ) NSString *subTitle;
36 |
37 | /**
38 | 是否显示箭头
39 | */
40 | @property (nonatomic , assign ) BOOL showAcc;
41 |
42 | /**
43 | 是否显示开关
44 | */
45 | @property (nonatomic , assign ) BOOL showSwitch;
46 |
47 | /**
48 | 开关的值
49 | */
50 | @property (assign , nonatomic ) BOOL switchValue;
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Setting/Model/SettingModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // SettingModel.m
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/20.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import "SettingModel.h"
10 |
11 | @implementation SettingModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/TableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // TableViewCell.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/20.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TableViewCell : UITableViewCell
12 |
13 | @property (nonatomic , strong ) id model;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/Base/BaseViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // BaseViewController.h
3 | // Headlines
4 | //
5 | // Created by 李响 on 2017/1/10.
6 | // Copyright © 2017年 ck. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "SDAutoLayout.h"
12 |
13 | #import "NavigationBar.h"
14 |
15 | #define VIEWSAFEAREAINSETS(view) ({UIEdgeInsets i; if(@available(iOS 11.0, *)) {i = view.safeAreaInsets;} else {i = UIEdgeInsetsZero;} i;})
16 |
17 | typedef NS_ENUM(NSInteger, NavigationBarSubViewTag) {
18 |
19 | NavigationBarSubViewTagBackButton = 1000 , //返回按钮
20 |
21 | NavigationBarSubViewTagTitleLabel , //标题
22 | };
23 |
24 | @interface BaseViewController : UIViewController
25 |
26 | @property (nonatomic , strong ) NavigationBar *navigationBar; //导航栏视图
27 |
28 | @property (nonatomic , assign ) NavigationBarStyleType navigationBarStyleType; //导航栏样式类型
29 |
30 | @property (nonatomic , copy ) void (^backBlock)(); //返回Back (非空是自动添加返回按钮)
31 |
32 | /**
33 | 初始化时导航栏
34 | */
35 | - (void)initNavigationBar;
36 |
37 | /**
38 | 更新标题
39 | */
40 | - (void)updateTitle;
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/Theme/ThemeConstant.h:
--------------------------------------------------------------------------------
1 | //
2 | // ThemeConstant.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #ifndef ThemeConstant_h
10 | #define ThemeConstant_h
11 |
12 | /** TAG */
13 |
14 | #define THEME_DAY @"DAY"
15 |
16 | #define THEME_NIGHT @"NIGHT"
17 |
18 |
19 | /** COLOR HEX */
20 |
21 | #define HEX_FFFFFF @"FFFFFF"
22 |
23 | #define HEX_000000 @"000000"
24 |
25 | #define HEX_222222 @"222222"
26 |
27 | #define HEX_333333 @"333333"
28 |
29 | #define HEX_444444 @"444444"
30 |
31 | #define HEX_555555 @"555555"
32 |
33 | #define HEX_666666 @"666666"
34 |
35 | #define HEX_777777 @"777777"
36 |
37 | #define HEX_888888 @"888888"
38 |
39 | #define HEX_999999 @"999999"
40 |
41 | #define HEX_252525 @"252525"
42 |
43 | #define HEX_303030 @"303030"
44 |
45 | #define HEX_E8E8E8 @"E8E8E8"
46 |
47 | #define HEX_1B1B1B @"1B1B1B"
48 |
49 | #define HEX_BBBBBB @"BBBBBB"
50 |
51 | #define HEX_F3F3F3 @"F3F3F3"
52 |
53 | #define HEX_D7D7D7 @"D7D7D7"
54 |
55 | #define HEX_F8F8F8 @"F8F8F8"
56 |
57 | #endif /* ThemeConstant_h */
58 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/Theme/ThemeManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // ThemeManager.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | @interface ThemeManager : NSObject
13 |
14 | + (void)changeTheme;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/Theme/ThemeManager.m:
--------------------------------------------------------------------------------
1 | //
2 | // ThemeManager.m
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import "ThemeManager.h"
10 |
11 | @implementation ThemeManager
12 |
13 | + (void)changeTheme{
14 |
15 | // 覆盖截图
16 |
17 | UIView *tempView = [[UIApplication sharedApplication].delegate.window snapshotViewAfterScreenUpdates:NO];
18 |
19 | [[UIApplication sharedApplication].delegate.window addSubview:tempView];
20 |
21 | // 切换主题
22 |
23 | if ([[LEETheme currentThemeTag] isEqualToString:THEME_DAY]) {
24 |
25 | [LEETheme startTheme:THEME_NIGHT];
26 |
27 | } else {
28 |
29 | [LEETheme startTheme:THEME_DAY];
30 | }
31 |
32 | // 增加动画 移除覆盖
33 |
34 | [UIView animateWithDuration:1.0f animations:^{
35 |
36 | tempView.alpha = 0.0f;
37 |
38 | } completion:^(BOOL finished) {
39 |
40 | [tempView removeFromSuperview];
41 | }];
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/Tools/WebKitSupport/WebKitSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // WebKitSupport.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/12.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import
12 |
13 | @interface WebKitSupport : NSObject
14 |
15 | @property (nonatomic, strong,readonly) WKProcessPool *processPool;
16 |
17 | + (instancetype)sharedSupport;
18 |
19 | + (NSURLRequest *)fixRequest:(NSURLRequest *)request;
20 |
21 | + (NSURL *)urlAddParams:(NSURL *)url Params:(NSDictionary *)params;
22 |
23 | @end
24 |
25 | @interface NSHTTPCookie (Utils)
26 |
27 | - (NSString *)lee_javascriptString;
28 |
29 | @end
30 |
31 | @interface WeakScriptMessageDelegate : NSObject
32 |
33 | @property (nonatomic , weak ) id scriptDelegate;
34 |
35 | - (instancetype)initWithDelegate:(id)scriptDelegate;
36 |
37 | @end
38 |
39 | @interface WKWebView (CrashHandle)
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/View/FontSizeView/FontSizeView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FontSizeView.h
3 | // MierMilitaryNews
4 | //
5 | // Created by 李响 on 16/7/26.
6 | // Copyright © 2016年 miercn. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FontSizeView : UIView
12 |
13 | @property (nonatomic , copy ) void (^changeBlock)(NSInteger);
14 |
15 | @property (nonatomic , assign ) NSInteger currentIndex; //当前下标
16 |
17 | /** 显示 */
18 |
19 | - (void)show;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/View/HUD/HUD.h:
--------------------------------------------------------------------------------
1 | //
2 | // HUD.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import "MBProgressHUD.h"
10 |
11 | typedef NS_ENUM(NSInteger, HUDStatus) {
12 |
13 | /** 成功 */
14 | HUDStatusSuccess,
15 |
16 | /** 失败 */
17 | HUDStatusError,
18 |
19 | /** 提示 */
20 | HUDStatusInfo,
21 |
22 | /** 星标 */
23 | HUDStatusStar,
24 |
25 | /** 空心星标 */
26 | HUDStatusHollowStar,
27 |
28 | /** 等待 */
29 | HUDStatusWaitting
30 | };
31 |
32 | @interface HUD : MBProgressHUD
33 |
34 | /** 返回一个 HUD 的单例 */
35 | + (instancetype)sharedHUD;
36 |
37 | /** 在 window 上添加一个 HUD */
38 | + (void)showStatus:(HUDStatus)status text:(NSString *)text;
39 |
40 | #pragma mark - 建议使用的方法
41 |
42 | /** 在 window 上添加一个只显示文字的 HUD */
43 | + (void)showMessage:(NSString *)text;
44 |
45 | /** 在 window 上添加一个提示`信息`的 HUD */
46 | + (void)showInfoMsg:(NSString *)text;
47 |
48 | /** 在 window 上添加一个提示`失败`的 HUD */
49 | + (void)showFailure:(NSString *)text;
50 |
51 | /** 在 window 上添加一个提示`成功`的 HUD */
52 | + (void)showSuccess:(NSString *)text;
53 |
54 | /** 在 window 上添加一个提示`收藏成功`的 HUD */
55 | + (void)showAddFavorites:(NSString *)text;
56 |
57 | /** 在 window 上添加一个提示`取消收藏`的 HUD */
58 | + (void)showRemoveFavorites:(NSString *)text;
59 |
60 | /** 在 window 上添加一个提示`等待`的 HUD, 需要手动关闭 */
61 | + (void)showLoading:(NSString *)text;
62 |
63 | /** 手动隐藏 HUD */
64 | + (void)hide;
65 |
66 | @end
67 |
68 |
69 | @interface UIView (HUD)
70 |
71 | /** 在 view 上添加一个 HUD */
72 | - (void)showStatus:(HUDStatus)status text:(NSString *)text;
73 |
74 | #pragma mark - 建议使用的方法
75 |
76 | /** 在 view 上添加一个只显示文字的 HUD */
77 | - (void)showMessage:(NSString *)text;
78 |
79 | /** 在 view 上添加一个提示`信息`的 HUD */
80 | - (void)showInfoMsg:(NSString *)text;
81 |
82 | /** 在 view 上添加一个提示`失败`的 HUD */
83 | - (void)showFailure:(NSString *)text;
84 |
85 | /** 在 view 上添加一个提示`成功`的 HUD */
86 | - (void)showSuccess:(NSString *)text;
87 |
88 | /** 在 view 上添加一个提示`收藏成功`的 HUD */
89 | - (void)showAddFavorites:(NSString *)text;
90 |
91 | /** 在 view 上添加一个提示`取消收藏`的 HUD */
92 | - (void)showRemoveFavorites:(NSString *)text;
93 |
94 | /** 在 view 上添加一个提示`等待`的 HUD, 需要手动关闭 */
95 | - (void)showLoading:(NSString *)text;
96 |
97 | /** 手动隐藏 HUD */
98 | - (void)hide;
99 |
100 | @end
101 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/View/LEECoolButton/LEECoolButton.h:
--------------------------------------------------------------------------------
1 |
2 | /*!
3 | * @header LEECoolButton.h
4 | *
5 | * ┌─┐ ┌───────┐ ┌───────┐ 帅™
6 | * │ │ │ ┌─────┘ │ ┌─────┘
7 | * │ │ │ └─────┐ │ └─────┐
8 | * │ │ │ ┌─────┘ │ ┌─────┘
9 | * │ └─────┐│ └─────┐ │ └─────┐
10 | * └───────┘└───────┘ └───────┘
11 | *
12 | * @brief LEE炫酷按钮
13 | *
14 | * @author LEE
15 | * @copyright Copyright © 2016年 lee. All rights reserved.
16 | * @version V1.0
17 | */
18 |
19 | #import
20 |
21 | @interface LEECoolButton : UIButton
22 |
23 | /** 圆圈颜色 */
24 | @property (nonatomic , strong ) UIColor *circleColor;
25 |
26 | /** 线条颜色 */
27 | @property (nonatomic , strong ) UIColor *lineColor;
28 |
29 | //========================
30 |
31 | /** 选中图片颜色 */
32 | @property (nonatomic , strong ) UIColor *imageColorOn;
33 |
34 | /** 未选中图片颜色 */
35 | @property (nonatomic , strong ) UIColor *imageColorOff;
36 |
37 | //== 图片 与 图片颜色二选一 ==
38 |
39 | /** 选中图片 */
40 | @property (nonatomic , strong ) UIImage *imageOn;
41 |
42 | /** 未选中图片 */
43 | @property (nonatomic , strong ) UIImage *imageOff;
44 |
45 | //========================
46 |
47 | /** 动画时长 */
48 | @property (nonatomic , assign ) double duration;
49 |
50 | /**
51 | * 初始化炫酷按钮
52 | *
53 | * @param image 图片
54 | * @param imageFrame 图片frame
55 | *
56 | * @return 按钮对象
57 | */
58 | + (id)coolButtonWithImage:(UIImage *)image ImageFrame:(CGRect)imageFrame;
59 |
60 | /**
61 | * 选中
62 | */
63 | - (void)select;
64 |
65 | /**
66 | * 未选中
67 | */
68 | - (void)deselect;
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/View/NavigationBar/NavigationBar.h:
--------------------------------------------------------------------------------
1 | //
2 | // NavigationBar.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/9/22.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef NS_ENUM(NSInteger, NavigationBarStyleType) {
12 |
13 | /** 导航栏样式类型 正常 */
14 | NavigationBarStyleTypeNormal = 0,
15 | /** 导航栏样式类型 红色 */
16 | NavigationBarStyleTypeRed,
17 | /** 导航栏样式类型 白色*/
18 | NavigationBarStyleTypeWhite,
19 | };
20 |
21 | @interface NavigationBar : UIView
22 |
23 | @property (nonatomic , strong ) UIView *contentView;
24 |
25 | @property (nonatomic , assign ) NavigationBarStyleType navigationBarStyleType; //导航栏样式类型
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/View/PhotoBrowser/PhotoBrowser.h:
--------------------------------------------------------------------------------
1 | //
2 | // PhotoBrowser.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface PhotoBrowser : NSObject
12 |
13 | /**
14 | 图片Url数组
15 | */
16 | @property (nonatomic , strong ) NSArray *imageUrlArray;
17 |
18 | /**
19 | 当前下标
20 | */
21 | @property (nonatomic , assign ) NSInteger index;
22 |
23 | /**
24 | 图片所属视图 (可选)
25 | */
26 | @property (nonatomic , weak ) UIView *imageView;
27 |
28 | /**
29 | 加载完成回调
30 | */
31 | @property (nonatomic , copy ) void (^loadFinishBlock)(PhotoBrowser *, NSInteger index);
32 |
33 | /**
34 | 长按回调
35 | */
36 | @property (nonatomic , copy ) void (^longClickBlock)(PhotoBrowser *, NSInteger index);
37 |
38 | + (PhotoBrowser *)browser;
39 |
40 | - (void)saveImageWithIndex:(NSInteger)index;
41 |
42 | - (void)show;
43 |
44 | @end
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | @interface PhotoBrowserViewController : UIViewController
63 |
64 | @property (nonatomic , strong ) PhotoBrowser *browser;
65 |
66 | - (void)saveImageWithIndex:(NSInteger)index;
67 |
68 | - (void)show;
69 |
70 | @end
71 |
72 | @interface PhotoBrowserCell : UICollectionViewCell
73 |
74 | @property (nonatomic , strong ) NSURL *url;
75 |
76 | @property (nonatomic , copy ) void (^longClickBlock)();
77 |
78 | @property (nonatomic , copy ) void (^loadFinishBlock)(NSURL *url , UIImage *image);
79 |
80 | @property (nonatomic , copy ) void (^hideBlock)();
81 |
82 | @end
83 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/View/SelectedListView/SelectedListModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // SelectedListModel.h
3 | // LEEAlertDemo
4 | //
5 | // Created by 李响 on 2017/6/4.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SelectedListModel : NSObject
12 |
13 | @property (nonatomic , assign ) NSInteger sid;
14 |
15 | @property (nonatomic , copy ) NSString *title;
16 |
17 | @property (nonatomic , strong ) id context;
18 |
19 | - (instancetype)initWithSid:(NSInteger)sid
20 | Title:(NSString *)title;
21 |
22 | - (instancetype)initWithSid:(NSInteger)sid
23 | Title:(NSString *)title
24 | Context:(id)context;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/View/SelectedListView/SelectedListModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // SelectedListModel.m
3 | // LEEAlertDemo
4 | //
5 | // Created by 李响 on 2017/6/4.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import "SelectedListModel.h"
10 |
11 | @implementation SelectedListModel
12 |
13 | - (instancetype)initWithSid:(NSInteger)sid
14 | Title:(NSString *)title{
15 |
16 | return [[SelectedListModel alloc] initWithSid:sid Title:title Context:nil];
17 | }
18 |
19 | - (instancetype)initWithSid:(NSInteger)sid
20 | Title:(NSString *)title
21 | Context:(id)context{
22 |
23 | self = [super init];
24 |
25 | if (self) {
26 |
27 | _sid = sid;
28 |
29 | _title = title;
30 |
31 | _context = context;
32 | }
33 |
34 | return self;
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/View/SelectedListView/SelectedListView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SelectedListView.h
3 | // LEEAlertDemo
4 | //
5 | // Created by 李响 on 2017/6/4.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "SelectedListModel.h"
12 |
13 | @interface SelectedListView : UITableView
14 |
15 | @property (nonatomic , strong ) NSArray* array;
16 |
17 | /**
18 | 已选中Block
19 | */
20 | @property (nonatomic , copy ) void (^selectedBlock)(NSArray *);
21 |
22 | /**
23 | 选择改变Block (多选情况 当选择改变时调用)
24 | */
25 | @property (nonatomic , copy ) void (^changedBlock)(NSArray *);
26 |
27 | /**
28 | 是否单选
29 | */
30 | @property (nonatomic , assign ) BOOL isSingle;
31 |
32 | /**
33 | 完成选择 (多选会调用selectedBlock回调所选结果)
34 | */
35 | - (void)finish;
36 |
37 | /** 显示 */
38 |
39 | - (void)show;
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/View/ShareView/AllShareView.h:
--------------------------------------------------------------------------------
1 |
2 | /*!
3 | * @header AllShareView.h
4 | * LEEAlertDemo
5 | *
6 | * @brief 全部分享视图
7 | *
8 | * @author 李响
9 | * @copyright Copyright © 2016年 miercn. All rights reserved.
10 | * @version 16/4/19.
11 | */
12 |
13 | #import
14 |
15 | #import "ShareButton.h"
16 |
17 | typedef enum {
18 |
19 | MoreTypeToTheme = 0, //更改按钮类型主题
20 |
21 | MoreTypeToReport, //更多按钮类型举报
22 |
23 | MoreTypeToFontSize, //更多按钮类型字体大小
24 |
25 | MoreTypeToCopyLink, //更改按钮类型复制链接
26 |
27 | } MoreType;
28 |
29 | @interface AllShareView : UIView
30 |
31 | - (instancetype)initWithFrame:(CGRect)frame ShowMore:(BOOL)showMore;
32 |
33 | - (instancetype)initWithFrame:(CGRect)frame ShowMore:(BOOL)showMore ShowReport:(BOOL)showReport;
34 |
35 | @property (nonatomic , copy ) void (^openShareBlock)(ShareType type);
36 |
37 | @property (nonatomic , copy ) void (^openMoreBlock)(MoreType type);
38 |
39 | /** 显示 */
40 |
41 | - (void)show;
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/View/ShareView/ShareButton.h:
--------------------------------------------------------------------------------
1 |
2 | /*!
3 | * @header ShareButton.h
4 | * MierMilitaryNews
5 | *
6 | * @brief 分享按钮
7 | *
8 | * @author 李响
9 | * @copyright Copyright © 2016年 miercn. All rights reserved.
10 | * @version 16/4/19.
11 | */
12 |
13 | #import
14 |
15 | typedef enum {
16 |
17 | ShareTypeToQQFriend = 0,//QQ好友
18 |
19 | ShareTypeToQZone,//QQ空间
20 |
21 | ShareTypeToWechat,//微信好友
22 |
23 | ShareTypeToWechatTimeline,//微信朋友圈
24 |
25 | ShareTypeToSina,//新浪微博
26 |
27 | } ShareType;
28 |
29 | @interface ShareButton : UIButton
30 |
31 | /**
32 | * 上下间距
33 | */
34 | @property (nonatomic , assign ) CGFloat range;
35 |
36 |
37 | /**
38 | * 设置标题图标
39 | *
40 | * @param title 标题
41 | * @param image 图标
42 | */
43 | - (void)configTitle:(NSString *)title Image:(UIImage *)image;
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/View/ShareView/ShareButton.m:
--------------------------------------------------------------------------------
1 |
2 | /*!
3 | * @header ShareButton.m
4 | * MierMilitaryNews
5 | *
6 | * @brief 分享按钮
7 | *
8 | * @author 李响
9 | * @copyright Copyright © 2016年 miercn. All rights reserved.
10 | * @version 16/4/19.
11 | */
12 |
13 | #import "ShareButton.h"
14 |
15 | @implementation ShareButton
16 |
17 | - (instancetype)initWithFrame:(CGRect)frame
18 | {
19 | self = [super initWithFrame:frame];
20 | if (self) {
21 |
22 | _range = 10.0f;
23 |
24 | }
25 | return self;
26 | }
27 |
28 | - (void)setRange:(CGFloat)range{
29 |
30 | _range = range;
31 |
32 | [self layoutSubviews];
33 | }
34 |
35 | - (void)layoutSubviews{
36 |
37 | [super layoutSubviews];
38 |
39 | //图片
40 |
41 | CGPoint center = self.imageView.center;
42 |
43 | center.x = self.frame.size.width/2;
44 |
45 | center.y = self.imageView.frame.size.height/2;
46 |
47 | self.imageView.center = center;
48 |
49 | //修正位置
50 |
51 | CGRect imageFrame = [self imageView].frame;
52 |
53 | imageFrame.origin.y = (self.frame.size.height - imageFrame.size.height - self.titleLabel.frame.size.height - _range ) / 2;
54 |
55 | self.imageView.frame = imageFrame;
56 |
57 | //标题
58 |
59 | CGRect titleFrame = [self titleLabel].frame;
60 |
61 | titleFrame.origin.x = 0;
62 |
63 | titleFrame.origin.y = self.imageView.frame.origin.y + self.imageView.frame.size.height + _range;
64 |
65 | titleFrame.size.width = self.frame.size.width;
66 |
67 | self.titleLabel.frame = titleFrame;
68 |
69 | self.titleLabel.textAlignment = NSTextAlignmentCenter;
70 |
71 | }
72 |
73 | - (void)configTitle:(NSString *)title Image:(UIImage *)image{
74 |
75 | [self setTitle:title forState:UIControlStateNormal];
76 |
77 | [self setImage:image forState:UIControlStateNormal];
78 | }
79 |
80 | @end
81 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/View/YYFPS/YYFPSLabel.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYFPSLabel.h
3 | // YYKitExample
4 | //
5 | // Created by ibireme on 15/9/3.
6 | // Copyright (c) 2015 ibireme. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /**
12 | Show Screen FPS...
13 |
14 | The maximum fps in OSX/iOS Simulator is 60.00.
15 | The maximum fps on iPhone is 59.97.
16 | The maxmium fps on iPad is 60.0.
17 | */
18 | @interface YYFPSLabel : UILabel
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/Utility/View/YYFPS/YYFPSLabel.m:
--------------------------------------------------------------------------------
1 | //
2 | // YYFPSLabel.m
3 | // YYKitExample
4 | //
5 | // Created by ibireme on 15/9/3.
6 | // Copyright (c) 2015 ibireme. All rights reserved.
7 | //
8 |
9 | #import "YYFPSLabel.h"
10 | #import "YYKit.h"
11 |
12 | #define kSize CGSizeMake(55, 20)
13 |
14 | @implementation YYFPSLabel {
15 | CADisplayLink *_link;
16 | NSUInteger _count;
17 | NSTimeInterval _lastTime;
18 | UIFont *_font;
19 | UIFont *_subFont;
20 |
21 | NSTimeInterval _llll;
22 | }
23 |
24 | - (instancetype)initWithFrame:(CGRect)frame {
25 | if (frame.size.width == 0 && frame.size.height == 0) {
26 | frame.size = kSize;
27 | }
28 | self = [super initWithFrame:frame];
29 |
30 | self.layer.cornerRadius = 5;
31 | self.clipsToBounds = YES;
32 | self.textAlignment = NSTextAlignmentCenter;
33 | self.userInteractionEnabled = NO;
34 | self.backgroundColor = [UIColor colorWithWhite:0.000 alpha:0.700];
35 |
36 | _font = [UIFont fontWithName:@"Menlo" size:14];
37 | if (_font) {
38 | _subFont = [UIFont fontWithName:@"Menlo" size:4];
39 | } else {
40 | _font = [UIFont fontWithName:@"Courier" size:14];
41 | _subFont = [UIFont fontWithName:@"Courier" size:4];
42 | }
43 |
44 | _link = [CADisplayLink displayLinkWithTarget:[YYWeakProxy proxyWithTarget:self] selector:@selector(tick:)];
45 | [_link addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
46 | return self;
47 | }
48 |
49 | - (void)dealloc {
50 | [_link invalidate];
51 | }
52 |
53 | - (CGSize)sizeThatFits:(CGSize)size {
54 | return kSize;
55 | }
56 |
57 | - (void)tick:(CADisplayLink *)link {
58 | if (_lastTime == 0) {
59 | _lastTime = link.timestamp;
60 | return;
61 | }
62 |
63 | _count++;
64 | NSTimeInterval delta = link.timestamp - _lastTime;
65 | if (delta < 1) return;
66 | _lastTime = link.timestamp;
67 | float fps = _count / delta;
68 | _count = 0;
69 |
70 | CGFloat progress = fps / 60.0;
71 | UIColor *color = [UIColor colorWithHue:0.27 * (progress - 0.2) saturation:1 brightness:0.9 alpha:1];
72 |
73 | NSMutableAttributedString *text = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%d FPS",(int)round(fps)]];
74 | [text setColor:color range:NSMakeRange(0, text.length - 3)];
75 | [text setColor:[UIColor whiteColor] range:NSMakeRange(text.length - 3, 3)];
76 | text.font = _font;
77 | [text setFont:_subFont range:NSMakeRange(text.length - 4, 1)];
78 |
79 | self.attributedText = text;
80 | }
81 |
82 | @end
83 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "BaseViewController.h"
12 |
13 | @interface ViewController : BaseViewController
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/NewsDetailsDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // NewsDetailsDemo
4 | //
5 | // Created by 李响 on 2017/7/11.
6 | // Copyright © 2017年 lee. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # NewsDetailsDemo
2 | 资讯详情文章页面Demo
3 |
4 | - HTML加载基于WebKit框架.
5 | - 缩略图以及GIF静态图请求基于阿里云OSS.
6 | - 完善的图片加载流程 包括初次加载 加载中 点击加载 加载失败等不同状态的处理 GIF图加载支持进度显示 支持图片持久化缓存 支持仅WIFI加载图片控制等.
7 | - 支持滑动加载和全部加载等模式.
8 | - 图片浏览页加载图片同步更新Webview.
9 | - 支持横竖屏适配.
10 | - 支持日夜间主题切换.
11 | - 支持动态字号调整.
12 | - 支持离线阅读方式 (缓存).
13 |
14 | iOS8以上 最低Xcode版本 9.0
15 |
--------------------------------------------------------------------------------
/Resources/iTunesArtwork:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/Resources/iTunesArtwork
--------------------------------------------------------------------------------
/Resources/iTunesArtwork@2x:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/Resources/iTunesArtwork@2x
--------------------------------------------------------------------------------
/Resources/icon-20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/Resources/icon-20.png
--------------------------------------------------------------------------------
/Resources/icon-20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/Resources/icon-20@2x.png
--------------------------------------------------------------------------------
/Resources/icon-20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/Resources/icon-20@3x.png
--------------------------------------------------------------------------------
/Resources/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/Resources/icon-29.png
--------------------------------------------------------------------------------
/Resources/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/Resources/icon-29@2x.png
--------------------------------------------------------------------------------
/Resources/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/Resources/icon-29@3x.png
--------------------------------------------------------------------------------
/Resources/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/Resources/icon-40.png
--------------------------------------------------------------------------------
/Resources/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/Resources/icon-40@2x.png
--------------------------------------------------------------------------------
/Resources/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/Resources/icon-40@3x.png
--------------------------------------------------------------------------------
/Resources/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/Resources/icon-60@2x.png
--------------------------------------------------------------------------------
/Resources/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/Resources/icon-60@3x.png
--------------------------------------------------------------------------------
/Resources/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/Resources/icon-76.png
--------------------------------------------------------------------------------
/Resources/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/Resources/icon-76@2x.png
--------------------------------------------------------------------------------
/Resources/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/Resources/icon-83.5@2x.png
--------------------------------------------------------------------------------
/Resources/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/Resources/icon.png
--------------------------------------------------------------------------------
/资讯详情内容处理流程.xmind:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lixiang1994/NewsDetailsDemo/7a247e1cc983faa30e131f7499925b2aa6a1e8fb/资讯详情内容处理流程.xmind
--------------------------------------------------------------------------------