├── 3d-touch-screenshot.gif
├── CNPPopupController
├── CNPPopupController.h
└── CNPPopupController.m
├── PKRevealController
├── PKRevealController.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── SUN.xcuserdatad
│ │ └── xcschemes
│ │ ├── PKRevealController.xcscheme
│ │ └── xcschememanagement.plist
└── PKRevealController
│ ├── Categories
│ ├── CAAnimation+PKIdentifier.h
│ ├── CAAnimation+PKIdentifier.m
│ ├── CALayer+PKConvenienceAnimations.h
│ ├── CALayer+PKConvenienceAnimations.m
│ ├── NSObject+PKBlocks.h
│ ├── NSObject+PKBlocks.m
│ ├── UIViewController+PKRevealController.h
│ └── UIViewController+PKRevealController.m
│ ├── Classes
│ ├── PKRevealControllerView.h
│ └── PKRevealControllerView.m
│ ├── Modules
│ ├── PKLayerAnimator
│ │ ├── PKAnimating.h
│ │ ├── PKAnimation.h
│ │ ├── PKAnimation.m
│ │ ├── PKLayerAnimator.h
│ │ ├── PKLayerAnimator.m
│ │ ├── PKSequentialAnimation.h
│ │ └── PKSequentialAnimation.m
│ └── PKLog
│ │ ├── PKLog.h
│ │ └── PKLog.m
│ ├── Other Sources
│ └── PKRevealController-Prefix.pch
│ ├── PKRevealController.h
│ └── PKRevealController.m
├── Podfile
├── Podfile.lock
├── Pods
├── Alamofire
│ ├── LICENSE
│ ├── README.md
│ └── Source
│ │ ├── AFError.swift
│ │ ├── Alamofire.swift
│ │ ├── DispatchQueue+Alamofire.swift
│ │ ├── MultipartFormData.swift
│ │ ├── NetworkReachabilityManager.swift
│ │ ├── Notifications.swift
│ │ ├── ParameterEncoding.swift
│ │ ├── Request.swift
│ │ ├── Response.swift
│ │ ├── ResponseSerialization.swift
│ │ ├── Result.swift
│ │ ├── ServerTrustPolicy.swift
│ │ ├── SessionDelegate.swift
│ │ ├── SessionManager.swift
│ │ ├── TaskDelegate.swift
│ │ ├── Timeline.swift
│ │ └── Validation.swift
├── Kingfisher
│ ├── LICENSE
│ ├── README.md
│ └── Sources
│ │ ├── AnimatedImageView.swift
│ │ ├── Box.swift
│ │ ├── CacheSerializer.swift
│ │ ├── Filter.swift
│ │ ├── Image.swift
│ │ ├── ImageCache.swift
│ │ ├── ImageDownloader.swift
│ │ ├── ImagePrefetcher.swift
│ │ ├── ImageProcessor.swift
│ │ ├── ImageTransition.swift
│ │ ├── ImageView+Kingfisher.swift
│ │ ├── Indicator.swift
│ │ ├── Kingfisher.h
│ │ ├── KingfisherManager.swift
│ │ ├── KingfisherOptionsInfo.swift
│ │ ├── RequrstModifier.swift
│ │ ├── Resource.swift
│ │ ├── String+MD5.swift
│ │ ├── ThreadHelper.swift
│ │ └── UIButton+Kingfisher.swift
├── Manifest.lock
├── Pods.xcodeproj
│ ├── project.pbxproj
│ └── xcuserdata
│ │ └── SUN.xcuserdatad
│ │ └── xcschemes
│ │ ├── Alamofire.xcscheme
│ │ ├── Kingfisher.xcscheme
│ │ ├── Pods-ZhiHuDaily-Swift.xcscheme
│ │ ├── SwiftyJSON3.xcscheme
│ │ └── xcschememanagement.plist
├── SwiftyJSON3
│ ├── LICENSE
│ ├── README.md
│ └── Source
│ │ └── SwiftyJSON.swift
└── Target Support Files
│ ├── Alamofire
│ ├── Alamofire-dummy.m
│ ├── Alamofire-prefix.pch
│ ├── Alamofire-umbrella.h
│ ├── Alamofire.modulemap
│ ├── Alamofire.xcconfig
│ └── Info.plist
│ ├── Kingfisher
│ ├── Info.plist
│ ├── Kingfisher-dummy.m
│ ├── Kingfisher-prefix.pch
│ ├── Kingfisher-umbrella.h
│ ├── Kingfisher.modulemap
│ └── Kingfisher.xcconfig
│ ├── Pods-ZhiHuDaily-Swift
│ ├── Info.plist
│ ├── Pods-ZhiHuDaily-Swift-acknowledgements.markdown
│ ├── Pods-ZhiHuDaily-Swift-acknowledgements.plist
│ ├── Pods-ZhiHuDaily-Swift-dummy.m
│ ├── Pods-ZhiHuDaily-Swift-frameworks.sh
│ ├── Pods-ZhiHuDaily-Swift-resources.sh
│ ├── Pods-ZhiHuDaily-Swift-umbrella.h
│ ├── Pods-ZhiHuDaily-Swift.debug.xcconfig
│ ├── Pods-ZhiHuDaily-Swift.modulemap
│ └── Pods-ZhiHuDaily-Swift.release.xcconfig
│ └── SwiftyJSON3
│ ├── Info.plist
│ ├── SwiftyJSON3-dummy.m
│ ├── SwiftyJSON3-prefix.pch
│ ├── SwiftyJSON3-umbrella.h
│ ├── SwiftyJSON3.modulemap
│ └── SwiftyJSON3.xcconfig
├── README.md
├── ZhiHuDaily-Swift.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── ZhiHuDaily-Swift.xccheckout
│ └── xcuserdata
│ │ └── SUN.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── xcuserdata
│ └── SUN.xcuserdatad
│ ├── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes
│ ├── ZhiHuDaily-Swift.xcscheme
│ └── xcschememanagement.plist
├── ZhiHuDaily-Swift.xcworkspace
├── contents.xcworkspacedata
└── xcuserdata
│ └── SUN.xcuserdatad
│ ├── UserInterfaceState.xcuserstate
│ └── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
├── ZhiHuDaily-Swift
├── AppDelegate.swift
├── AppException.swift
├── Base.lproj
│ └── Main.storyboard
├── CommentControl.swift
├── CommentSectionTitleView.swift
├── CommentSectionTitleView.xib
├── CommentVO.swift
├── CommonListTableViewCell.swift
├── CommonListTableViewCell.xib
├── CommonViewController.swift
├── Constant.swift
├── CustomWebView.swift
├── EmptyCommentTableViewCell.swift
├── EmptyCommentTableViewCell.xib
├── FilletImageView.swift
├── HttpControl.swift
├── Images.xcassets
│ ├── AppIcon.appiconset
│ │ ├── AppIcon29x29@2x~ipad-1.png
│ │ ├── AppIcon29x29@2x~ipad.png
│ │ ├── AppIcon29x29@3x.png
│ │ ├── AppIcon29x29~ipad.png
│ │ ├── AppIcon40x40@2x.png
│ │ ├── AppIcon40x40@2x~ipad.png
│ │ ├── AppIcon40x40@3x.png
│ │ ├── AppIcon40x40~ipad.png
│ │ ├── AppIcon60x60@2x.png
│ │ ├── AppIcon60x60@3x.png
│ │ ├── AppIcon76x76@2x~ipad.png
│ │ ├── AppIcon76x76~ipad.png
│ │ └── Contents.json
│ ├── Back_White.imageset
│ │ ├── Back_White@2x.png
│ │ └── Contents.json
│ ├── Comment_Empty.imageset
│ │ ├── Comment_Empty@2x.png
│ │ └── Contents.json
│ ├── Comment_Icon_Back.imageset
│ │ ├── Comment_Icon_Back@2x.png
│ │ └── Contents.json
│ ├── Comment_Icon_Back_Highlight.imageset
│ │ ├── Comment_Icon_Back_Highlight@2x.png
│ │ └── Contents.json
│ ├── Comment_Icon_Compose.imageset
│ │ ├── Comment_Icon_Compose@2x.png
│ │ └── Contents.json
│ ├── Comment_Icon_Fold.imageset
│ │ ├── Comment_Icon_Fold@2x.png
│ │ └── Contents.json
│ ├── Comment_Icon_Fold_Selected.imageset
│ │ ├── Comment_Icon_Fold_Selected@2x.png
│ │ └── Contents.json
│ ├── Comment_Line.imageset
│ │ ├── Comment_Line.png
│ │ └── Contents.json
│ ├── Comment_Share_Sina.imageset
│ │ ├── Comment_Share_Sina@2x.png
│ │ └── Contents.json
│ ├── Comment_Share_Tencent.imageset
│ │ ├── Comment_Share_Tencent@2x.png
│ │ └── Contents.json
│ ├── Comment_Vote.imageset
│ │ ├── Comment_Vote@2x.png
│ │ └── Contents.json
│ ├── Comment_Voted.imageset
│ │ ├── Comment_Voted@2x.png
│ │ └── Contents.json
│ ├── Contents.json
│ ├── Dark_Menu_Mask.imageset
│ │ ├── Contents.json
│ │ └── Dark_Menu_Mask@2x.png
│ ├── Highlight.imageset
│ │ ├── Contents.json
│ │ └── Highlight@2x.png
│ ├── Home_Arrow.imageset
│ │ ├── Contents.json
│ │ └── Home_Arrow@2x.png
│ ├── Home_Image_Mask.imageset
│ │ ├── Contents.json
│ │ └── Home_Image_Mask@2x.png
│ ├── Home_Image_Mask_Plus.imageset
│ │ ├── Contents.json
│ │ └── Home_Image_Mask_Plus@2x.png
│ ├── Homescreen_Icon.imageset
│ │ ├── Contents.json
│ │ ├── Homescreen_Icon120@2x.png
│ │ └── Homescreen_Icon@2x.png
│ ├── Image_Preview.imageset
│ │ ├── Contents.json
│ │ └── Image_Preview@2x.png
│ ├── Menu_Dark.imageset
│ │ ├── Contents.json
│ │ └── Menu_Dark@2x.png
│ ├── Menu_Download.imageset
│ │ ├── Contents.json
│ │ └── Menu_Download@2x.png
│ ├── Menu_Enter.imageset
│ │ ├── Contents.json
│ │ └── Menu_Enter@2x.png
│ ├── Menu_Follow-1.imageset
│ │ ├── Contents.json
│ │ └── Menu_Follow@2x.png
│ ├── Menu_Follow.imageset
│ │ ├── Contents.json
│ │ └── Menu_Follow@2x.png
│ ├── Menu_Icon_Collect.imageset
│ │ ├── Contents.json
│ │ └── Menu_Icon_Collect@2x.png
│ ├── Menu_Icon_Home.imageset
│ │ ├── Contents.json
│ │ └── Menu_Icon_Home@2x.png
│ ├── Menu_Icon_Message.imageset
│ │ ├── Contents.json
│ │ └── Menu_Icon_Message@2x.png
│ ├── Menu_Icon_Setting.imageset
│ │ ├── Contents.json
│ │ └── Menu_Icon_Setting@2x.png
│ ├── Menu_Mask.imageset
│ │ ├── Contents.json
│ │ └── Menu_Mask@2x.png
│ ├── News_Image_Mask.imageset
│ │ ├── Contents.json
│ │ └── News_Image_Mask@2x.png
│ ├── News_Navigation_Arrow.imageset
│ │ ├── Contents.json
│ │ ├── News_Navigation_Arrow@2x.png
│ │ └── News_Navigation_Arrow@3x.png
│ ├── News_Navigation_Arrow_Highlight.imageset
│ │ ├── Contents.json
│ │ ├── News_Navigation_Arrow_Highlight@2x.png
│ │ └── News_Navigation_Arrow_Highlight@3x.png
│ ├── News_Navigation_Comment.imageset
│ │ ├── Contents.json
│ │ ├── News_Navigation_Comment@2x.png
│ │ └── News_Navigation_Comment@3x.png
│ ├── News_Navigation_Comment_Highlight.imageset
│ │ ├── Contents.json
│ │ ├── News_Navigation_Comment_Highlight@2x.png
│ │ └── News_Navigation_Comment_Highlight@3x.png
│ ├── News_Navigation_Next.imageset
│ │ ├── Contents.json
│ │ ├── News_Navigation_Next@2x.png
│ │ └── News_Navigation_Next@3x.png
│ ├── News_Navigation_Next_Highlight.imageset
│ │ ├── Contents.json
│ │ ├── News_Navigation_Next_Highlight@2x.png
│ │ └── News_Navigation_Next_Highlight@3x.png
│ ├── News_Navigation_Share.imageset
│ │ ├── Contents.json
│ │ ├── News_Navigation_Share@2x.png
│ │ └── News_Navigation_Share@3x.png
│ ├── News_Navigation_Share_Highlight.imageset
│ │ ├── Contents.json
│ │ ├── News_Navigation_Share_Highlight@2x.png
│ │ └── News_Navigation_Share_Highlight@3x.png
│ ├── News_Navigation_Unnext.imageset
│ │ ├── Contents.json
│ │ ├── News_Navigation_Unnext@2x.png
│ │ └── News_Navigation_Unnext@3x.png
│ ├── News_Navigation_Vote.imageset
│ │ ├── Contents.json
│ │ ├── News_Navigation_Vote@2x.png
│ │ └── News_Navigation_Vote@3x.png
│ ├── News_Navigation_Voted.imageset
│ │ ├── Contents.json
│ │ ├── News_Navigation_Voted@2x.png
│ │ └── News_Navigation_Voted@3x.png
│ ├── Setting_Avatar.imageset
│ │ ├── Contents.json
│ │ ├── Setting_Avatar@2x-1.png
│ │ └── Setting_Avatar@2x.png
│ ├── Share_Copylink.imageset
│ │ ├── Contents.json
│ │ └── Share_Copylink@2x.png
│ ├── Share_Email.imageset
│ │ ├── Contents.json
│ │ └── Share_Email@2x.png
│ ├── Share_Evernote.imageset
│ │ ├── Contents.json
│ │ └── Share_Evernote@2x.png
│ ├── Share_Instapaper.imageset
│ │ ├── Contents.json
│ │ └── Share_Instapaper@2x.png
│ ├── Share_Message.imageset
│ │ ├── Contents.json
│ │ └── Share_Message@2x.png
│ ├── Share_QQ.imageset
│ │ ├── Contents.json
│ │ └── Share_QQ@2x.png
│ ├── Share_Renren.imageset
│ │ ├── Contents.json
│ │ └── Share_Renren@2x.png
│ ├── Share_Sina.imageset
│ │ ├── Contents.json
│ │ └── Share_Sina@2x.png
│ ├── Share_Tencent.imageset
│ │ ├── Contents.json
│ │ └── Share_Tencent@2x.png
│ ├── Share_WeChat.imageset
│ │ ├── Contents.json
│ │ └── Share_WeChat@2x.png
│ ├── Share_WeChat_Moments.imageset
│ │ ├── Contents.json
│ │ └── Share_WeChat_Moments@2x.png
│ ├── Share_YoudaoNote.imageset
│ │ ├── Contents.json
│ │ └── Share_YoudaoNote@2x.png
│ ├── Splash_Logo_Plus.imageset
│ │ ├── Contents.json
│ │ ├── Splash_Logo_Plus@2x-1.png
│ │ ├── Splash_Logo_Plus@2x-2.png
│ │ └── Splash_Logo_Plus@2x.png
│ ├── Splash_Plus.imageset
│ │ ├── Contents.json
│ │ ├── Splash_Plus@2x-1.png
│ │ └── Splash_Plus@2x.png
│ ├── ToolBar_Shadow.imageset
│ │ ├── Contents.json
│ │ └── ToolBar_Shadow@2x.png
│ ├── ZHAnswerViewBack.imageset
│ │ ├── Contents.json
│ │ └── ZHAnswerViewBack@2x.png
│ ├── ZHAnswerViewBackIcon.imageset
│ │ ├── Contents.json
│ │ └── ZHAnswerViewBackIcon@2x.png
│ ├── ZHAnswerViewBack_Top.imageset
│ │ ├── Contents.json
│ │ └── ZHAnswerViewBack_Top@2x.png
│ ├── ZHAnswerViewPrevIcon.imageset
│ │ ├── Contents.json
│ │ └── ZHAnswerViewPrevIcon@2x.png
│ ├── ZHAnswerViewPrevIcon_Bottom.imageset
│ │ ├── Contents.json
│ │ └── ZHAnswerViewPrevIcon_Bottom@2x.png
│ └── avator.imageset
│ │ ├── Contents.json
│ │ └── avator.jpeg
├── Info.plist
├── KYCircularProgress.swift
├── LaunchImageViewController.swift
├── LaunchScreen.storyboard
├── LeftViewController.swift
├── MainNewsListControl.swift
├── MainTitleViewController.swift
├── NSURLSession+SynchronousTask.swift
├── NavigationControllerDelegate.swift
├── NewsDetailControl.swift
├── NewsDetailVO.swift
├── NewsDetailViewController.swift
├── NewsListTableViewCell.swift
├── NewsListTableViewCell.xib
├── NewsListVO.swift
├── NormalPopAnimation.swift
├── NumberScrollAnimatedView.swift
├── ObjectiveCBridge.h
├── RecommenderControl.swift
├── RecommenderDetailViewController.swift
├── RecommenderTableViewCell.swift
├── RecommenderTableViewCell.xib
├── RecommendersListViewController.swift
├── RecommendersVO.swift
├── RecommendersView.swift
├── RecommendersView.xib
├── RefreshBottomView.swift
├── RefreshControl.swift
├── RefreshControlDelegate.swift
├── RefreshViewDelegate.swift
├── SharePopupView.swift
├── SharePopupView.xib
├── SideMenuTableViewCell.swift
├── SideMenuTableViewCell.xib
├── SlideScrollView.swift
├── ThemeVO.swift
├── ThemesListControl.swift
├── ViewController.swift
├── WriteCommentViewController.swift
├── ZanButton.swift
└── ZhiHuDaily_Swift.xcdatamodeld
│ └── ZhiHuDaily_Swift.xcdatamodel
│ └── contents
├── ZhiHuDaily-SwiftTests
├── Info.plist
└── ZhiHuDaily_SwiftTests.swift
├── screenshot-new.gif
└── screenshot.gif
/3d-touch-screenshot.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/3d-touch-screenshot.gif
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController.xcodeproj/xcuserdata/SUN.xcuserdatad/xcschemes/PKRevealController.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
45 |
46 |
52 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
70 |
71 |
72 |
73 |
75 |
76 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController.xcodeproj/xcuserdata/SUN.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | PKRevealController.xcscheme
8 |
9 | orderHint
10 | 1
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | F9621E7A1815246000469E41
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController/Categories/CAAnimation+PKIdentifier.h:
--------------------------------------------------------------------------------
1 | /*
2 | PKRevealController > CAAnimation+PKIdentifier.h
3 | Copyright (c) 2013 zuui.org (Philip Kluz). All rights reserved.
4 |
5 | The MIT License (MIT)
6 |
7 | Copyright (c) 2013 Philip Kluz
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of
10 | this software and associated documentation files (the "Software"), to deal in
11 | the Software without restriction, including without limitation the rights to
12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13 | the Software, and to permit persons to whom the Software is furnished to do so,
14 | subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 | */
26 |
27 | #import
28 |
29 | @interface CAAnimation (PKIdentifier)
30 |
31 | #pragma mark - Properties
32 | @property (nonatomic, assign, readwrite) NSInteger pk_identifier;
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController/Categories/CAAnimation+PKIdentifier.m:
--------------------------------------------------------------------------------
1 | /*
2 | PKRevealController > CAAnimation+PKIdentifier.m
3 | Copyright (c) 2013 zuui.org (Philip Kluz). All rights reserved.
4 |
5 | The MIT License (MIT)
6 |
7 | Copyright (c) 2013 Philip Kluz
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of
10 | this software and associated documentation files (the "Software"), to deal in
11 | the Software without restriction, including without limitation the rights to
12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13 | the Software, and to permit persons to whom the Software is furnished to do so,
14 | subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 | */
26 |
27 | #import "CAAnimation+PKIdentifier.h"
28 | #import
29 |
30 | @implementation CAAnimation (PKIdentifier)
31 |
32 | static char identifierKey;
33 |
34 | - (void)setPk_identifier:(NSInteger)pk_identifier
35 | {
36 | objc_setAssociatedObject(self, &identifierKey, [NSNumber numberWithInteger:pk_identifier], OBJC_ASSOCIATION_ASSIGN);
37 | }
38 |
39 | - (NSInteger)pk_identifier
40 | {
41 | return [objc_getAssociatedObject(self, &identifierKey) integerValue];
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController/Categories/CALayer+PKConvenienceAnimations.h:
--------------------------------------------------------------------------------
1 | /*
2 | PKRevealController > CALayer+PKConvenienceAnimations.h
3 | Copyright (c) 2013 zuui.org (Philip Kluz). All rights reserved.
4 |
5 | The MIT License (MIT)
6 |
7 | Copyright (c) 2013 Philip Kluz
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of
10 | this software and associated documentation files (the "Software"), to deal in
11 | the Software without restriction, including without limitation the rights to
12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13 | the Software, and to permit persons to whom the Software is furnished to do so,
14 | subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 | */
26 |
27 | #import
28 | #import
29 |
30 | @interface CALayer (PKConvenienceAnimations)
31 |
32 | #pragma mark - Methods
33 |
34 | + (CABasicAnimation *)animationFromAlpha:(CGFloat)fromValue
35 | toAlpha:(CGFloat)toValue
36 | timingFunction:(CAMediaTimingFunction *)timingFunction
37 | duration:(NSTimeInterval)duration;
38 |
39 | + (CABasicAnimation *)animationFromTransformation:(CATransform3D)fromTransformation
40 | toTransformation:(CATransform3D)toTransformation
41 | timingFunction:(CAMediaTimingFunction *)timingFunction
42 | duration:(NSTimeInterval)duration;
43 |
44 |
45 | + (CABasicAnimation *)animationFromPosition:(CGPoint)fromPosition
46 | toPosition:(CGPoint)toPosition
47 | timingFunction:(CAMediaTimingFunction *)timingFunction
48 | duration:(NSTimeInterval)duration;
49 |
50 | - (void)animateToAlpha:(CGFloat)value
51 | timingFunction:(CAMediaTimingFunction *)timingFunction
52 | duration:(NSTimeInterval)duration
53 | alterModel:(BOOL)alterModel;
54 |
55 | - (void)animateToTransform:(CATransform3D)toTransform
56 | timingFunction:(CAMediaTimingFunction *)timingFunction
57 | duration:(NSTimeInterval)duration
58 | alterModel:(BOOL)alterModel;
59 |
60 | - (void)animateToPoint:(CGPoint)toPoint
61 | timingFunction:(CAMediaTimingFunction *)timingFunction
62 | duration:(NSTimeInterval)duration
63 | alterModel:(BOOL)alterModel;
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController/Categories/NSObject+PKBlocks.h:
--------------------------------------------------------------------------------
1 | /*
2 | PKRevealController > NSObject+PKBlocks.h
3 | Copyright (c) 2013 zuui.org (Philip Kluz). All rights reserved.
4 |
5 | The MIT License (MIT)
6 |
7 | Copyright (c) 2013 Philip Kluz
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of
10 | this software and associated documentation files (the "Software"), to deal in
11 | the Software without restriction, including without limitation the rights to
12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13 | the Software, and to permit persons to whom the Software is furnished to do so,
14 | subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 | */
26 |
27 | #import
28 |
29 | @interface NSObject (PKBlocks)
30 |
31 | #pragma mark - Methods
32 | - (void)pk_performBlock:(void(^)(void))block onMainThread:(BOOL)mainThread;
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController/Categories/NSObject+PKBlocks.m:
--------------------------------------------------------------------------------
1 | /*
2 | PKRevealController > NSObject+PKBlocks.m
3 | Copyright (c) 2013 zuui.org (Philip Kluz). All rights reserved.
4 |
5 | The MIT License (MIT)
6 |
7 | Copyright (c) 2013 Philip Kluz
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of
10 | this software and associated documentation files (the "Software"), to deal in
11 | the Software without restriction, including without limitation the rights to
12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13 | the Software, and to permit persons to whom the Software is furnished to do so,
14 | subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 | */
26 |
27 | #import "NSObject+PKBlocks.h"
28 |
29 | @implementation NSObject (PKBlocks)
30 |
31 | - (void)pk_performBlock:(void(^)(void))block onMainThread:(BOOL)mainThread
32 | {
33 | if (!block) return;
34 |
35 | if (mainThread)
36 | {
37 | if ([NSThread isMainThread])
38 | {
39 | block();
40 | }
41 | else
42 | {
43 | dispatch_async(dispatch_get_main_queue(), block);
44 | }
45 | }
46 | else
47 | {
48 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block);
49 | }
50 | }
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController/Categories/UIViewController+PKRevealController.h:
--------------------------------------------------------------------------------
1 | /*
2 | PKRevealController > UIViewController+PKRevealController.h
3 | Copyright (c) 2013 zuui.org (Philip Kluz). All rights reserved.
4 |
5 | The MIT License (MIT)
6 |
7 | Copyright (c) 2013 Philip Kluz
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of
10 | this software and associated documentation files (the "Software"), to deal in
11 | the Software without restriction, including without limitation the rights to
12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13 | the Software, and to permit persons to whom the Software is furnished to do so,
14 | subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 | */
26 |
27 | #import
28 |
29 | @class PKRevealController;
30 |
31 | /*
32 | * This category extends every UIViewController with a revealController property.
33 | * It can be used in the same way as the navigationController property, thus
34 | * allowing simple access from all the relevant controllers, to enable quick and
35 | * easy message forwarding.
36 | */
37 |
38 | @interface UIViewController (PKRevealController)
39 |
40 | #pragma mark - Properties
41 | @property (nonatomic, strong, readwrite) PKRevealController *revealController;
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController/Categories/UIViewController+PKRevealController.m:
--------------------------------------------------------------------------------
1 | /*
2 | PKRevealController > UIViewController+PKRevealController.m
3 | Copyright (c) 2013 zuui.org (Philip Kluz). All rights reserved.
4 |
5 | The MIT License (MIT)
6 |
7 | Copyright (c) 2013 Philip Kluz
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of
10 | this software and associated documentation files (the "Software"), to deal in
11 | the Software without restriction, including without limitation the rights to
12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13 | the Software, and to permit persons to whom the Software is furnished to do so,
14 | subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 | */
26 |
27 | #import "UIViewController+PKRevealController.h"
28 | #import "PKRevealController.h"
29 | #import
30 |
31 | @implementation UIViewController (PKRevealController)
32 |
33 | static char revealControllerKey;
34 |
35 | - (void)setRevealController:(PKRevealController *)revealController
36 | {
37 | objc_setAssociatedObject(self, &revealControllerKey, revealController, OBJC_ASSOCIATION_ASSIGN);
38 | }
39 |
40 | - (PKRevealController *)revealController
41 | {
42 |
43 | PKRevealController *controller = (PKRevealController *)objc_getAssociatedObject(self, &revealControllerKey);
44 |
45 | if (!controller)
46 | {
47 | controller = self.parentViewController.revealController;
48 | }
49 |
50 | return controller;
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController/Classes/PKRevealControllerView.h:
--------------------------------------------------------------------------------
1 | /*
2 | PKRevealController > PKRevealControllerView.h
3 | Copyright (c) 2013 zuui.org (Philip Kluz). All rights reserved.
4 |
5 | The MIT License (MIT)
6 |
7 | Copyright (c) 2013 Philip Kluz
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of
10 | this software and associated documentation files (the "Software"), to deal in
11 | the Software without restriction, including without limitation the rights to
12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13 | the Software, and to permit persons to whom the Software is furnished to do so,
14 | subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 | */
26 |
27 | #import
28 | #import
29 |
30 | @interface PKRevealControllerView : UIView
31 |
32 | #pragma mark - Properties
33 | @property (nonatomic, assign, readwrite, getter = hasShadow) BOOL shadow;
34 | @property (nonatomic, weak, readwrite) UIViewController *viewController;
35 |
36 | #pragma mark - Methods
37 | - (void)updateShadowWithAnimationDuration:(NSTimeInterval)duration;
38 | - (void)setUserInteractionForContainedViewEnabled:(BOOL)userInteractionEnabled;
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController/Modules/PKLayerAnimator/PKAnimating.h:
--------------------------------------------------------------------------------
1 | /*
2 | PKRevealController > PKAnimating.h
3 | Copyright (c) 2013 zuui.org (Philip Kluz). All rights reserved.
4 |
5 | The MIT License (MIT)
6 |
7 | Copyright (c) 2013 Philip Kluz
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of
10 | this software and associated documentation files (the "Software"), to deal in
11 | the Software without restriction, including without limitation the rights to
12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13 | the Software, and to permit persons to whom the Software is furnished to do so,
14 | subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 | */
26 |
27 | #import
28 | #import "CAAnimation+PKIdentifier.h"
29 |
30 | typedef void(^PKAnimationStartBlock)();
31 | typedef void(^PKAnimationCompletionBlock)(BOOL finished);
32 |
33 | @protocol PKAnimating
34 |
35 | @required
36 |
37 | #pragma mark - Properties
38 | @property (nonatomic, weak, readwrite) CALayer *layer;
39 | @property (nonatomic, assign, readwrite, getter = isAnimating) BOOL animating;
40 | @property (nonatomic, copy, readonly) NSString *key;
41 | @property (nonatomic, copy, readwrite) PKAnimationStartBlock startHandler;
42 | @property (nonatomic, copy, readwrite) PKAnimationCompletionBlock completionHandler;
43 |
44 | #pragma mark - Methods
45 | - (void)startAnimationOnLayer:(CALayer *)layer;
46 | - (void)stopAnimation;
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController/Modules/PKLayerAnimator/PKAnimation.h:
--------------------------------------------------------------------------------
1 | /*
2 | PKRevealController > PKAnimation.h
3 | Copyright (c) 2013 zuui.org (Philip Kluz). All rights reserved.
4 |
5 | The MIT License (MIT)
6 |
7 | Copyright (c) 2013 Philip Kluz
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of
10 | this software and associated documentation files (the "Software"), to deal in
11 | the Software without restriction, including without limitation the rights to
12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13 | the Software, and to permit persons to whom the Software is furnished to do so,
14 | subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 | */
26 |
27 | #import
28 | #import
29 | #import "PKAnimating.h"
30 |
31 | @interface PKAnimation : CABasicAnimation
32 |
33 | #pragma mark - Properties
34 | @property (nonatomic, assign, readwrite) NSInteger identifier;
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController/Modules/PKLayerAnimator/PKLayerAnimator.h:
--------------------------------------------------------------------------------
1 | /*
2 | PKRevealController > PKLayerAnimator.h
3 | Copyright (c) 2013 zuui.org (Philip Kluz). All rights reserved.
4 |
5 | The MIT License (MIT)
6 |
7 | Copyright (c) 2013 Philip Kluz
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of
10 | this software and associated documentation files (the "Software"), to deal in
11 | the Software without restriction, including without limitation the rights to
12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13 | the Software, and to permit persons to whom the Software is furnished to do so,
14 | subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 | */
26 |
27 | #import
28 | #import
29 | #import "PKAnimation.h"
30 | #import "PKSequentialAnimation.h"
31 |
32 | @interface PKLayerAnimator : NSObject
33 |
34 | #pragma mark - Properties
35 | @property (nonatomic, strong, readonly) CALayer *layer;
36 |
37 | #pragma mark - Methods
38 | + (instancetype)animatorForLayer:(CALayer *)layer;
39 |
40 | - (void)addAnimation:(PKAnimation *)animation forKey:(NSString *)key;
41 | - (void)addSequentialAnimation:(PKSequentialAnimation *)animation forKey:(NSString *)key;
42 |
43 | - (void)startAnimationForKey:(NSString *)key;
44 | - (void)stopAnimationForKey:(NSString *)key;
45 | - (void)stopAndRemoveAllAnimations;
46 |
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController/Modules/PKLayerAnimator/PKLayerAnimator.m:
--------------------------------------------------------------------------------
1 | /*
2 | PKRevealController > PKLayerAnimator.m
3 | Copyright (c) 2013 zuui.org (Philip Kluz). All rights reserved.
4 |
5 | The MIT License (MIT)
6 |
7 | Copyright (c) 2013 Philip Kluz
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of
10 | this software and associated documentation files (the "Software"), to deal in
11 | the Software without restriction, including without limitation the rights to
12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13 | the Software, and to permit persons to whom the Software is furnished to do so,
14 | subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 | */
26 |
27 | #import "PKLayerAnimator.h"
28 | #import "CALayer+PKConvenienceAnimations.h"
29 | #import "NSObject+PKBlocks.h"
30 |
31 | @interface PKLayerAnimator ()
32 |
33 | #pragma mark - Properties
34 | @property (nonatomic, strong, readwrite) CALayer *layer;
35 | @property (nonatomic, strong, readwrite) NSMutableDictionary *animations;
36 |
37 | @end
38 |
39 | @implementation PKLayerAnimator
40 |
41 | #pragma mark - Initialization
42 |
43 | + (instancetype)animatorForLayer:(CALayer *)layer
44 | {
45 | return [[[self class] alloc] initWithLayer:layer];
46 | }
47 |
48 | - (instancetype)initWithLayer:(CALayer *)layer
49 | {
50 | self = [super init];
51 |
52 | if (self)
53 | {
54 | self.layer = layer;
55 | self.animations = [NSMutableDictionary dictionary];
56 | }
57 |
58 | return self;
59 | }
60 |
61 | #pragma mark - API
62 |
63 | - (void)addAnimation:(PKAnimation *)animation forKey:(NSString *)key
64 | {
65 | [self.animations setObject:animation forKey:key];
66 | }
67 |
68 | - (void)addSequentialAnimation:(PKSequentialAnimation *)animation forKey:(NSString *)key
69 | {
70 | [self.animations setObject:animation forKey:key];
71 | }
72 |
73 | - (void)startAnimationForKey:(NSString *)key
74 | {
75 | id animation = [self.animations objectForKey:key];
76 | [animation startAnimationOnLayer:self.layer];
77 | }
78 |
79 | - (void)stopAnimationForKey:(NSString *)key
80 | {
81 | id animation = [self.animations objectForKey:key];
82 | [animation stopAnimation];
83 | }
84 |
85 | - (void)stopAndRemoveAllAnimations
86 | {
87 | @synchronized (self)
88 | {
89 | for (NSString *key in self.animations.keyEnumerator)
90 | {
91 | [self stopAnimationForKey:key];
92 | }
93 |
94 | [self.animations removeAllObjects];
95 | }
96 | }
97 |
98 | @end
99 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController/Modules/PKLayerAnimator/PKSequentialAnimation.h:
--------------------------------------------------------------------------------
1 | /*
2 | PKRevealController > PKSequentialAnimation.h
3 | Copyright (c) 2013 zuui.org (Philip Kluz). All rights reserved.
4 |
5 | The MIT License (MIT)
6 |
7 | Copyright (c) 2013 Philip Kluz
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of
10 | this software and associated documentation files (the "Software"), to deal in
11 | the Software without restriction, including without limitation the rights to
12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13 | the Software, and to permit persons to whom the Software is furnished to do so,
14 | subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 | */
26 |
27 | #import "PKAnimation.h"
28 | #import "PKAnimating.h"
29 |
30 | typedef void(^PKSequentialAnimationProgressBlock)(NSValue *fromValue, NSValue *toValue, NSUInteger index);
31 |
32 | @interface PKSequentialAnimation : NSObject
33 |
34 | #pragma mark - Properties
35 | @property (nonatomic, copy, readwrite) PKSequentialAnimationProgressBlock progressHandler;
36 |
37 | #pragma mark - Methods
38 | + (instancetype)animationForKeyPath:(NSString *)keyPath
39 | values:(NSArray *)values
40 | duration:(NSTimeInterval)duration;
41 |
42 | + (instancetype)animationForKeyPath:(NSString *)keyPath
43 | values:(NSArray *)values
44 | duration:(NSTimeInterval)duration
45 | progress:(PKSequentialAnimationProgressBlock)progress
46 | completion:(PKAnimationCompletionBlock)completion;
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController/Modules/PKLog/PKLog.h:
--------------------------------------------------------------------------------
1 | /*
2 | PKRevealController > PKLog.h
3 | Copyright (c) 2013 zuui.org (Philip Kluz). All rights reserved.
4 |
5 | The MIT License (MIT)
6 |
7 | Copyright (c) 2013 Philip Kluz
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of
10 | this software and associated documentation files (the "Software"), to deal in
11 | the Software without restriction, including without limitation the rights to
12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13 | the Software, and to permit persons to whom the Software is furnished to do so,
14 | subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 | */
26 |
27 | #import
28 |
29 | FOUNDATION_EXTERN void PKLog(NSString *format, ...);
30 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController/Modules/PKLog/PKLog.m:
--------------------------------------------------------------------------------
1 | /*
2 | PKRevealController > PKLog.m
3 | Copyright (c) 2013 zuui.org (Philip Kluz). All rights reserved.
4 |
5 | The MIT License (MIT)
6 |
7 | Copyright (c) 2013 Philip Kluz
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of
10 | this software and associated documentation files (the "Software"), to deal in
11 | the Software without restriction, including without limitation the rights to
12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13 | the Software, and to permit persons to whom the Software is furnished to do so,
14 | subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 | */
26 |
27 | #import "PKLog.h"
28 | #import
29 |
30 | #pragma clang diagnostic push
31 | #pragma clang diagnostic ignored "-Wunused-macros"
32 |
33 | #define STACK_IDX 0
34 | #define FRAMEWORK_IDX 1
35 | #define MEMORY_ADDR_IDX 2
36 | #define CLASS_CALLER_IDX 3
37 | #define FUNCTION_CALLER_IDX 4
38 | #define LINE_CALLER_IDX 5
39 |
40 | #pragma clang diagnostic pop
41 |
42 | void PKLog(NSString *format, ...)
43 | {
44 | #ifdef DEBUG
45 | if (format)
46 | {
47 | NSString *sourceString = [[NSThread callStackSymbols] objectAtIndex:1];
48 | NSCharacterSet *separatorSet = [NSCharacterSet characterSetWithCharactersInString:@" -[]+?.,"];
49 | NSMutableArray *array = [NSMutableArray arrayWithArray:[sourceString componentsSeparatedByCharactersInSet:separatorSet]];
50 | [array removeObject:@""];
51 |
52 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
53 | [dateFormatter setLocale:[NSLocale currentLocale]];
54 | [dateFormatter setDateFormat: @"yyyy-MM-dd HH:mm:ss:SSS"];
55 |
56 | va_list argumentList;
57 | va_start(argumentList, format);
58 |
59 | NSString *formattedString = [[NSString alloc] initWithFormat:format arguments:argumentList];
60 |
61 | const char *class = [[array objectAtIndex:CLASS_CALLER_IDX] UTF8String];
62 | const char *line = [[array objectAtIndex:LINE_CALLER_IDX] UTF8String];
63 | const char *formattedCString = [[formattedString stringByReplacingOccurrencesOfString:@"%%" withString:@"%%%%"] UTF8String];
64 | const char *dateTime = [[dateFormatter stringFromDate:[NSDate date]] UTF8String];
65 |
66 | printf("%s [%s:%s] - %s\n", dateTime, class, line, formattedCString);
67 |
68 | va_end(argumentList);
69 | }
70 | #endif
71 | }
72 |
--------------------------------------------------------------------------------
/PKRevealController/PKRevealController/Other Sources/PKRevealController-Prefix.pch:
--------------------------------------------------------------------------------
1 | /*
2 | PKRevealController > PKRevealController-Prefix.pch
3 | Copyright (c) 2013 zuui.org (Philip Kluz). All rights reserved.
4 |
5 | The MIT License (MIT)
6 |
7 | Copyright (c) 2013 Philip Kluz
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of
10 | this software and associated documentation files (the "Software"), to deal in
11 | the Software without restriction, including without limitation the rights to
12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13 | the Software, and to permit persons to whom the Software is furnished to do so,
14 | subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 | */
26 |
27 | #ifdef __OBJC__
28 | #import
29 | #endif
30 |
--------------------------------------------------------------------------------
/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios,9.0
2 |
3 | use_frameworks!
4 |
5 | target 'ZhiHuDaily-Swift' do
6 | pod 'Alamofire'
7 | pod 'SwiftyJSON3', '~> 3.0.0-beta.1'
8 | pod 'Kingfisher', '3.0.1'
9 | end
10 |
11 |
--------------------------------------------------------------------------------
/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Alamofire (4.0.0)
3 | - Kingfisher (3.0.1)
4 | - SwiftyJSON3 (3.0.0-beta.1)
5 |
6 | DEPENDENCIES:
7 | - Alamofire
8 | - Kingfisher (= 3.0.1)
9 | - SwiftyJSON3 (~> 3.0.0-beta.1)
10 |
11 | SPEC CHECKSUMS:
12 | Alamofire: fef59f00388f267e52d9b432aa5d93dc97190f14
13 | Kingfisher: d5a491b45ea453d90a31bd2c0831d5243e73a73f
14 | SwiftyJSON3: 4c41512a8b35fd58b2ec904f65aa7254e4a8abd4
15 |
16 | PODFILE CHECKSUM: 4cb8d03d5d7fd25561868c856cc7ea698c565549
17 |
18 | COCOAPODS: 1.1.0.beta.2
19 |
--------------------------------------------------------------------------------
/Pods/Alamofire/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DispatchQueue+Alamofire.swift
3 | //
4 | // Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | import Dispatch
26 |
27 | extension DispatchQueue {
28 | static var userInteractive: DispatchQueue { return DispatchQueue.global(qos: .userInteractive) }
29 | static var userInitiated: DispatchQueue { return DispatchQueue.global(qos: .userInitiated) }
30 | static var utility: DispatchQueue { return DispatchQueue.global(qos: .utility) }
31 | static var background: DispatchQueue { return DispatchQueue.global(qos: .background) }
32 |
33 | func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) {
34 | asyncAfter(deadline: .now() + delay, execute: closure)
35 | }
36 |
37 | func syncResult(_ closure: () -> T) -> T {
38 | var result: T!
39 | sync { result = closure() }
40 | return result
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Pods/Alamofire/Source/Notifications.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Notifications.swift
3 | //
4 | // Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | import Foundation
26 |
27 | extension Notification.Name {
28 | /// Used as a namespace for all `URLSessionTask` related notifications.
29 | public struct Task {
30 | /// Posted when a `URLSessionTask` is resumed. The notification `object` contains the resumed `URLSessionTask`.
31 | public static let DidResume = Notification.Name(rawValue: "org.alamofire.notification.name.task.didResume")
32 |
33 | /// Posted when a `URLSessionTask` is suspended. The notification `object` contains the suspended `URLSessionTask`.
34 | public static let DidSuspend = Notification.Name(rawValue: "org.alamofire.notification.name.task.didSuspend")
35 |
36 | /// Posted when a `URLSessionTask` is cancelled. The notification `object` contains the cancelled `URLSessionTask`.
37 | public static let DidCancel = Notification.Name(rawValue: "org.alamofire.notification.name.task.didCancel")
38 |
39 | /// Posted when a `URLSessionTask` is completed. The notification `object` contains the completed `URLSessionTask`.
40 | public static let DidComplete = Notification.Name(rawValue: "org.alamofire.notification.name.task.didComplete")
41 | }
42 | }
43 |
44 | // MARK: -
45 |
46 | extension Notification {
47 | /// Used as a namespace for all `Notification` user info dictionary keys.
48 | public struct Key {
49 | /// User info dictionary key representing the `URLSessionTask` associated with the notification.
50 | public static let Task = "org.alamofire.notification.key.task"
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Pods/Kingfisher/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Wei Wang
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/Pods/Kingfisher/Sources/Box.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Box.swift
3 | // Kingfisher
4 | //
5 | // Created by WANG WEI on 2016/09/12.
6 | // Copyright © 2016年 Wei Wang. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class Box {
12 | let value: T
13 | init(value: T) {
14 | self.value = value
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Pods/Kingfisher/Sources/Kingfisher.h:
--------------------------------------------------------------------------------
1 | //
2 | // Kingfisher.h
3 | // Kingfisher
4 | //
5 | // Created by Wei Wang on 15/4/6.
6 | //
7 | // Copyright (c) 2016 Wei Wang
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining a copy
10 | // of this software and associated documentation files (the "Software"), to deal
11 | // in the Software without restriction, including without limitation the rights
12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | // copies of the Software, and to permit persons to whom the Software is
14 | // furnished to do so, subject to the following conditions:
15 | //
16 | // The above copyright notice and this permission notice shall be included in
17 | // all copies or substantial portions of the Software.
18 | //
19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | // THE SOFTWARE.
26 |
27 | #import
28 |
29 | //! Project version number for Kingfisher.
30 | FOUNDATION_EXPORT double KingfisherVersionNumber;
31 |
32 | //! Project version string for Kingfisher.
33 | FOUNDATION_EXPORT const unsigned char KingfisherVersionString[];
34 |
35 | // In this header, you should import all the public headers of your framework using statements like #import
36 |
37 |
38 |
--------------------------------------------------------------------------------
/Pods/Kingfisher/Sources/RequrstModifier.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RequrstModifier.swift
3 | // Kingfisher
4 | //
5 | // Created by Wei Wang on 2016/09/05.
6 | //
7 | // Copyright (c) 2016 Wei Wang
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining a copy
10 | // of this software and associated documentation files (the "Software"), to deal
11 | // in the Software without restriction, including without limitation the rights
12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | // copies of the Software, and to permit persons to whom the Software is
14 | // furnished to do so, subject to the following conditions:
15 | //
16 | // The above copyright notice and this permission notice shall be included in
17 | // all copies or substantial portions of the Software.
18 | //
19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | // THE SOFTWARE.
26 |
27 | import Foundation
28 |
29 | /// Request modifier of image downloader.
30 | public protocol ImageDownloadRequestModifier {
31 | func modified(for request: URLRequest) -> URLRequest?
32 | }
33 |
34 | struct NoModifier: ImageDownloadRequestModifier {
35 | static let `default` = NoModifier()
36 | private init() {}
37 | func modified(for request: URLRequest) -> URLRequest? {
38 | return request
39 | }
40 | }
41 |
42 | public struct AnyModifier: ImageDownloadRequestModifier {
43 |
44 | let block: (URLRequest) -> URLRequest?
45 |
46 | public func modified(for request: URLRequest) -> URLRequest? {
47 | return block(request)
48 | }
49 |
50 | public init(modify: @escaping (URLRequest) -> URLRequest? ) {
51 | block = modify
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Pods/Kingfisher/Sources/Resource.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Resource.swift
3 | // Kingfisher
4 | //
5 | // Created by Wei Wang on 15/4/6.
6 | //
7 | // Copyright (c) 2016 Wei Wang
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining a copy
10 | // of this software and associated documentation files (the "Software"), to deal
11 | // in the Software without restriction, including without limitation the rights
12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | // copies of the Software, and to permit persons to whom the Software is
14 | // furnished to do so, subject to the following conditions:
15 | //
16 | // The above copyright notice and this permission notice shall be included in
17 | // all copies or substantial portions of the Software.
18 | //
19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | // THE SOFTWARE.
26 |
27 | import Foundation
28 |
29 |
30 | /// `Resource` protocol defines how to download and cache a resource from network.
31 | public protocol Resource {
32 | /// The key used in cache.
33 | var cacheKey: String { get }
34 |
35 | /// The target image URL.
36 | var downloadURL: URL { get }
37 | }
38 |
39 | /**
40 | ImageResource is a simple combination of `downloadURL` and `cacheKey`.
41 |
42 | When passed to image view set methods, Kingfisher will try to download the target
43 | image from the `downloadURL`, and then store it with the `cacheKey` as the key in cache.
44 | */
45 | public struct ImageResource: Resource {
46 | /// The key used in cache.
47 | public let cacheKey: String
48 |
49 | /// The target image URL.
50 | public let downloadURL: URL
51 |
52 | /**
53 | Create a resource.
54 |
55 | - parameter downloadURL: The target image URL.
56 | - parameter cacheKey: The cache key. If `nil`, Kingfisher will use the `absoluteString` of `downloadURL` as the key.
57 |
58 | - returns: A resource.
59 | */
60 | public init(downloadURL: URL, cacheKey: String? = nil) {
61 | self.downloadURL = downloadURL
62 | self.cacheKey = cacheKey ?? downloadURL.absoluteString
63 | }
64 | }
65 |
66 | /**
67 | URL conforms to `Resource` in Kingfisher.
68 | The `absoluteString` of this URL is used as `cacheKey`. And the URL itself will be used as `downloadURL`.
69 | If you need customize the url and/or cache key, use `ImageResource` instead.
70 | */
71 | extension URL: Resource {
72 | public var cacheKey: String { return absoluteString }
73 | public var downloadURL: URL { return self }
74 | }
75 |
--------------------------------------------------------------------------------
/Pods/Kingfisher/Sources/ThreadHelper.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ThreadHelper.swift
3 | // Kingfisher
4 | //
5 | // Created by Wei Wang on 15/10/9.
6 | //
7 | // Copyright (c) 2016 Wei Wang
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining a copy
10 | // of this software and associated documentation files (the "Software"), to deal
11 | // in the Software without restriction, including without limitation the rights
12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | // copies of the Software, and to permit persons to whom the Software is
14 | // furnished to do so, subject to the following conditions:
15 | //
16 | // The above copyright notice and this permission notice shall be included in
17 | // all copies or substantial portions of the Software.
18 | //
19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | // THE SOFTWARE.
26 |
27 | import Foundation
28 |
29 | extension DispatchQueue {
30 | // This method will dispatch the `block` to self.
31 | // If `self` is the main queue, and current thread is main thread, the block
32 | // will be invoked immediately instead of being dispatched.
33 | func safeAsync(_ block: @escaping ()->()) {
34 | if self === DispatchQueue.main && Thread.isMainThread {
35 | block()
36 | } else {
37 | async { block() }
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Alamofire (4.0.0)
3 | - Kingfisher (3.0.1)
4 | - SwiftyJSON3 (3.0.0-beta.1)
5 |
6 | DEPENDENCIES:
7 | - Alamofire
8 | - Kingfisher (= 3.0.1)
9 | - SwiftyJSON3 (~> 3.0.0-beta.1)
10 |
11 | SPEC CHECKSUMS:
12 | Alamofire: fef59f00388f267e52d9b432aa5d93dc97190f14
13 | Kingfisher: d5a491b45ea453d90a31bd2c0831d5243e73a73f
14 | SwiftyJSON3: 4c41512a8b35fd58b2ec904f65aa7254e4a8abd4
15 |
16 | PODFILE CHECKSUM: 4cb8d03d5d7fd25561868c856cc7ea698c565549
17 |
18 | COCOAPODS: 1.1.0.beta.2
19 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/SUN.xcuserdatad/xcschemes/Alamofire.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/SUN.xcuserdatad/xcschemes/Kingfisher.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/SUN.xcuserdatad/xcschemes/Pods-ZhiHuDaily-Swift.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
45 |
46 |
52 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
66 |
67 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/SUN.xcuserdatad/xcschemes/SwiftyJSON3.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/SUN.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Alamofire.xcscheme
8 |
9 | isShown
10 |
11 |
12 | Kingfisher.xcscheme
13 |
14 | isShown
15 |
16 |
17 | Pods-ZhiHuDaily-Swift.xcscheme
18 |
19 | isShown
20 |
21 |
22 | SwiftyJSON3.xcscheme
23 |
24 | isShown
25 |
26 |
27 |
28 | SuppressBuildableAutocreation
29 |
30 | 4EE7E86542C387C536BBAACD6800ECC0
31 |
32 | primary
33 |
34 |
35 | 79C040AFDDCE1BCBF6D8B5EB0B85887F
36 |
37 | primary
38 |
39 |
40 | 7AC95C180585586423793FC07026F01C
41 |
42 | primary
43 |
44 |
45 | BDAF27BE15DBEE3F66D84079233BDDFA
46 |
47 | primary
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/Pods/SwiftyJSON3/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Ruoyu Fu
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Alamofire/Alamofire-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Alamofire : NSObject
3 | @end
4 | @implementation PodsDummy_Alamofire
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 |
4 | FOUNDATION_EXPORT double AlamofireVersionNumber;
5 | FOUNDATION_EXPORT const unsigned char AlamofireVersionString[];
6 |
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Alamofire/Alamofire.modulemap:
--------------------------------------------------------------------------------
1 | framework module Alamofire {
2 | umbrella header "Alamofire-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Alamofire/Alamofire.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Alamofire
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public"
4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Alamofire/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 4.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Kingfisher/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 3.0.1
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Kingfisher/Kingfisher-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Kingfisher : NSObject
3 | @end
4 | @implementation PodsDummy_Kingfisher
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Kingfisher/Kingfisher-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Kingfisher/Kingfisher-umbrella.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "Kingfisher.h"
4 |
5 | FOUNDATION_EXPORT double KingfisherVersionNumber;
6 | FOUNDATION_EXPORT const unsigned char KingfisherVersionString[];
7 |
8 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Kingfisher/Kingfisher.modulemap:
--------------------------------------------------------------------------------
1 | framework module Kingfisher {
2 | umbrella header "Kingfisher-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Kingfisher/Kingfisher.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Kingfisher
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public"
4 | OTHER_LDFLAGS = -framework "CFNetwork"
5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
6 | PODS_BUILD_DIR = $BUILD_DIR
7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}
9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
10 | SKIP_INSTALL = YES
11 | SWIFT_VERSION = 3.0
12 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ZhiHuDaily-Swift/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ZhiHuDaily-Swift/Pods-ZhiHuDaily-Swift-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## Alamofire
5 |
6 | Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is
13 | furnished to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in
16 | all copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 | THE SOFTWARE.
25 |
26 |
27 | ## Kingfisher
28 |
29 | The MIT License (MIT)
30 |
31 | Copyright (c) 2015 Wei Wang
32 |
33 | Permission is hereby granted, free of charge, to any person obtaining a copy
34 | of this software and associated documentation files (the "Software"), to deal
35 | in the Software without restriction, including without limitation the rights
36 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
37 | copies of the Software, and to permit persons to whom the Software is
38 | furnished to do so, subject to the following conditions:
39 |
40 | The above copyright notice and this permission notice shall be included in all
41 | copies or substantial portions of the Software.
42 |
43 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
44 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
46 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
47 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
48 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
49 | SOFTWARE.
50 |
51 |
52 |
53 | ## SwiftyJSON3
54 |
55 | The MIT License (MIT)
56 |
57 | Copyright (c) 2014 Ruoyu Fu
58 |
59 | Permission is hereby granted, free of charge, to any person obtaining a copy
60 | of this software and associated documentation files (the "Software"), to deal
61 | in the Software without restriction, including without limitation the rights
62 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
63 | copies of the Software, and to permit persons to whom the Software is
64 | furnished to do so, subject to the following conditions:
65 |
66 | The above copyright notice and this permission notice shall be included in
67 | all copies or substantial portions of the Software.
68 |
69 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
70 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
71 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
72 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
73 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
74 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
75 | THE SOFTWARE.
76 |
77 | Generated by CocoaPods - https://cocoapods.org
78 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ZhiHuDaily-Swift/Pods-ZhiHuDaily-Swift-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_ZhiHuDaily_Swift : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_ZhiHuDaily_Swift
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ZhiHuDaily-Swift/Pods-ZhiHuDaily-Swift-umbrella.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 |
4 | FOUNDATION_EXPORT double Pods_ZhiHuDaily_SwiftVersionNumber;
5 | FOUNDATION_EXPORT const unsigned char Pods_ZhiHuDaily_SwiftVersionString[];
6 |
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ZhiHuDaily-Swift/Pods-ZhiHuDaily-Swift.debug.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Kingfisher" "$PODS_CONFIGURATION_BUILD_DIR/SwiftyJSON3"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Kingfisher/Kingfisher.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftyJSON3/SwiftyJSON3.framework/Headers"
7 | OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Kingfisher" -framework "SwiftyJSON3"
8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
9 | PODS_BUILD_DIR = $BUILD_DIR
10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
11 | PODS_ROOT = ${SRCROOT}/Pods
12 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ZhiHuDaily-Swift/Pods-ZhiHuDaily-Swift.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_ZhiHuDaily_Swift {
2 | umbrella header "Pods-ZhiHuDaily-Swift-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ZhiHuDaily-Swift/Pods-ZhiHuDaily-Swift.release.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Kingfisher" "$PODS_CONFIGURATION_BUILD_DIR/SwiftyJSON3"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Kingfisher/Kingfisher.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftyJSON3/SwiftyJSON3.framework/Headers"
7 | OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Kingfisher" -framework "SwiftyJSON3"
8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
9 | PODS_BUILD_DIR = $BUILD_DIR
10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
11 | PODS_ROOT = ${SRCROOT}/Pods
12 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/SwiftyJSON3/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 3.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/SwiftyJSON3/SwiftyJSON3-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_SwiftyJSON3 : NSObject
3 | @end
4 | @implementation PodsDummy_SwiftyJSON3
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/SwiftyJSON3/SwiftyJSON3-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/SwiftyJSON3/SwiftyJSON3-umbrella.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 |
4 | FOUNDATION_EXPORT double SwiftyJSON3VersionNumber;
5 | FOUNDATION_EXPORT const unsigned char SwiftyJSON3VersionString[];
6 |
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/SwiftyJSON3/SwiftyJSON3.modulemap:
--------------------------------------------------------------------------------
1 | framework module SwiftyJSON3 {
2 | umbrella header "SwiftyJSON3-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/SwiftyJSON3/SwiftyJSON3.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SwiftyJSON3
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public"
4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift.xcodeproj/project.xcworkspace/xcshareddata/ZhiHuDaily-Swift.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 9B05A54F-CAF3-48C9-915D-7449DA327F08
9 | IDESourceControlProjectName
10 | ZhiHuDaily-Swift
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | 65996EB7AE1440C0426744C7A643DC03D33A2C6D
14 | https://git.oschina.net/xycm/ZhiHuDaily-Swift.git
15 |
16 | IDESourceControlProjectPath
17 | ZhiHuDaily-Swift.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | 65996EB7AE1440C0426744C7A643DC03D33A2C6D
21 | ../..
22 |
23 | IDESourceControlProjectURL
24 | https://git.oschina.net/xycm/ZhiHuDaily-Swift.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | 65996EB7AE1440C0426744C7A643DC03D33A2C6D
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | 65996EB7AE1440C0426744C7A643DC03D33A2C6D
36 | IDESourceControlWCCName
37 | ZhiHuDaily-Swift
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift.xcodeproj/project.xcworkspace/xcuserdata/SUN.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift.xcodeproj/project.xcworkspace/xcuserdata/SUN.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift.xcodeproj/xcuserdata/SUN.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift.xcodeproj/xcuserdata/SUN.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | ZhiHuDaily-Swift.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A432D3191B147B9F006D2B0E
16 |
17 | primary
18 |
19 |
20 | A432D3311B147B9F006D2B0E
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift.xcworkspace/xcuserdata/SUN.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift.xcworkspace/xcuserdata/SUN.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift.xcworkspace/xcuserdata/SUN.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/AppException.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppException.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/7/13.
6 | // Copyright © 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | enum AppException : Error {
12 | case other(String)
13 | }
14 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/CommentSectionTitleView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CommentSectionTitleView.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/6/13.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class CommentSectionTitleView: UITableViewHeaderFooterView {
12 |
13 | static var isExpanded = false
14 |
15 | var delegate : CommentSectionTitleViewDelegate?
16 |
17 | /*
18 | // Only override drawRect: if you perform custom drawing.
19 | // An empty implementation adversely affects performance during animation.
20 | override func drawRect(rect: CGRect) {
21 | // Drawing code
22 | }
23 | */
24 | @IBOutlet weak var titleLabel: UILabel!
25 | @IBOutlet weak var expandButton: UIButton!
26 |
27 | override func draw(_ rect: CGRect) {
28 | if CommentSectionTitleView.isExpanded {
29 | self.expandButton.isSelected = true
30 | } else {
31 | self.expandButton.isSelected = false
32 | }
33 | }
34 |
35 | @IBAction func doExpandAction(_ sender: UIButton) {
36 |
37 | if self.expandButton.isSelected {
38 | CommentSectionTitleView.isExpanded = false
39 | delegate?.doSectionCollapse(self)
40 | self.expandButton.isSelected = false
41 | }else {
42 | CommentSectionTitleView.isExpanded = true
43 | delegate?.doSectionExpand(self)
44 | self.expandButton.isSelected = true
45 | }
46 |
47 | }
48 | }
49 |
50 | protocol CommentSectionTitleViewDelegate {
51 |
52 | func doSectionExpand(_ sender:CommentSectionTitleView)
53 |
54 | func doSectionCollapse(_ sender:CommentSectionTitleView)
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/CommentVO.swift:
--------------------------------------------------------------------------------
1 | // 评论的VO
2 | // CommentVO.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/6/11.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 |
12 | class CommentVO {
13 |
14 | /// 作者名
15 | let author : String
16 |
17 | /// 内容
18 | let content : String
19 |
20 | /// 头像
21 | let avatar : String?
22 |
23 | /// 时间
24 | let time : Int
25 |
26 | /// 评论id
27 | let id : Int
28 |
29 | /// 喜欢数
30 | let likes : Int
31 |
32 | var replayTo : RefCommentVO?
33 |
34 | init(author:String,content:String,avatar:String?,time:Int,id:Int,likes:Int = 0){
35 | self.author = author
36 | self.content = content
37 | self.avatar = avatar
38 | self.time = time
39 | self.id = id
40 | self.likes = likes
41 | }
42 |
43 | }
44 |
45 | //关联的评论
46 | class RefCommentVO {
47 |
48 | let content : String
49 |
50 | let status : Int
51 |
52 | let id : Int
53 |
54 | let author : String
55 |
56 | init(errorMsg:String,status:Int = 1){
57 | self.id = 0
58 | self.author = ""
59 | self.content = errorMsg
60 | self.status = status
61 | }
62 |
63 | init(id:Int,author:String,content:String = "抱歉,原点评已经被删除",status:Int = 0) {
64 | self.id = id
65 |
66 | self.author = author
67 |
68 | self.content = content
69 |
70 | self.status = status
71 | }
72 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/CommonListTableViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CommonListTableViewCell.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/6/10.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class CommonListTableViewCell: UITableViewCell {
12 |
13 | var delegate : CommonListTableViewCellDelegate?
14 |
15 | @IBOutlet weak var avatorImage: FilletImageView!
16 | @IBOutlet weak var nameLabel: UILabel!
17 | @IBOutlet weak var contentLabel: UILabel!
18 | @IBOutlet weak var dateLabel: UILabel!
19 | @IBOutlet weak var voteNumberLabel: UILabel!
20 | @IBOutlet weak var expandButton: UIButton!
21 | @IBOutlet weak var replayCommentLabel: UILabel!
22 |
23 | override func awakeFromNib() {
24 | super.awakeFromNib()
25 | // Initialization code
26 | }
27 |
28 | override func setSelected(_ selected: Bool, animated: Bool) {
29 | super.setSelected(selected, animated: animated)
30 |
31 | // Configure the view for the selected state
32 | }
33 |
34 | @IBAction func doExpandAction(_ sender: UIButton) {
35 |
36 | if self.expandButton.isSelected {
37 | delegate?.doCollapse(self)
38 | self.expandButton.isSelected = false
39 | }else {
40 | delegate?.doExpand(self)
41 | self.expandButton.isSelected = true
42 | }
43 |
44 | }
45 | }
46 |
47 | protocol CommonListTableViewCellDelegate{
48 |
49 | func doExpand(_ sender:CommonListTableViewCell)
50 |
51 | func doCollapse(_ sender:CommonListTableViewCell)
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Constant.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Constant.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/5/29.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 |
12 | //主页上得各种高度的变量
13 | /// 100
14 | let TABLE_CELL_HEIGHT : Float = 100
15 | /// 24
16 | let SECTION_HEIGHT:Float = 24
17 | /// 80
18 | let SCROLL_HEIGHT:Float = 80
19 | /// 400
20 | let IMAGE_HEIGHT:Float = IN_WINDOW_HEIGHT+200
21 | /// 200
22 | let IN_WINDOW_HEIGHT:Float = UIScreen.main.bounds.height > 1000 ? 300 : 200
23 | /// 44
24 | let TITLE_HEIGHT:Float = 44
25 |
26 | let FONT_SIZE:CGFloat = UIScreen.main.bounds.height > 1000 ? 20 : 16
27 |
28 | //知乎的各种网址
29 | /// http://news-at.zhihu.com/api/4/start-image/1080*1776
30 | let LAUNCH_IMAGE_URL="http://news-at.zhihu.com/api/4/start-image/1080*1776"
31 | let LATEST_NEWS_URL="http://news-at.zhihu.com/api/4/news/latest"
32 | let SOMEDAY_NEWS_URL = "http://news.at.zhihu.com/api/4/news/before/"
33 | let NEWS_DETAIL_URL = "http://news-at.zhihu.com/api/4/news/"
34 | let NEWS_EXTRA_URL = "http://news-at.zhihu.com/api/4/story-extra/"
35 | let COMMENTS_URL = "http://news-at.zhihu.com/api/4/story/"
36 | let RECOMMENDERS_URL = "http://news-at.zhihu.com/api/4/story/"
37 | let PEOPLE_URL = "http://www.zhihu.com/people/"
38 | let THEME_URL = "http://news-at.zhihu.com/api/4/themes"
39 |
40 | //由于NewsDetailViewController和NavigationControllerDelegate 都需要访问这个转场控制器,而且两个的关系差太远,所以只能写到这作为全局变量了
41 | var interactionController : UIPercentDrivenInteractiveTransition?
42 |
43 | enum PopActionState {
44 | case none
45 | case finish
46 | case cancel
47 | }
48 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/CustomWebView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CustomWebView.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/6/7.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class CustomWebView: UIWebView {
12 |
13 | /*
14 | // Only override drawRect: if you perform custom drawing.
15 | // An empty implementation adversely affects performance during animation.
16 | override func drawRect(rect: CGRect) {
17 | // Drawing code
18 | }
19 | */
20 |
21 | override func scrollViewDidScroll(_ scrollView: UIScrollView) {
22 |
23 | let offsetY = Float(scrollView.contentOffset.y)
24 | let contentHeight = Float(scrollView.contentSize.height)
25 | let frameHeight = Float(scrollView.frame.height)
26 |
27 | //这部分代码是为了 限制下拉滑动的距离的.当到达scrollHeight后,就不允许再继续往下拉了
28 | if -offsetY>SCROLL_HEIGHT{
29 | //表示到顶了,不能再让他滑动了,思路就是让offset一直保持在最大值. 并且 animated 动画要等于false
30 | scrollView.setContentOffset(CGPoint(x: CGFloat(0), y: CGFloat(-SCROLL_HEIGHT)), animated: false)
31 | return
32 | }else if offsetY > contentHeight-frameHeight+SCROLL_HEIGHT {
33 | //表示到底了,不能再让他滑动了,思路就是让offset一直保持在最大值. 并且 animated 动画要等于false
34 | scrollView.setContentOffset(CGPoint(x: CGFloat(0), y: CGFloat(contentHeight-frameHeight+SCROLL_HEIGHT)), animated: false)
35 | return
36 | }
37 |
38 | }
39 |
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/EmptyCommentTableViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // EmptyCommentTableViewCell.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/6/12.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class EmptyCommentTableViewCell: UITableViewCell {
12 |
13 | @IBOutlet weak var emptyImageView: UIImageView!
14 | @IBOutlet weak var heightConstraint: NSLayoutConstraint!
15 |
16 | override func awakeFromNib() {
17 | super.awakeFromNib()
18 | // Initialization code
19 | }
20 |
21 | override func setSelected(_ selected: Bool, animated: Bool) {
22 | super.setSelected(selected, animated: animated)
23 |
24 | // Configure the view for the selected state
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/EmptyCommentTableViewCell.xib:
--------------------------------------------------------------------------------
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 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/FilletImageView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // FilletImageView.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/6/9.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class FilletImageView: UIImageView {
12 |
13 | /*
14 | // Only override drawRect: if you perform custom drawing.
15 | // An empty implementation adversely affects performance during animation.
16 | override func drawRect(rect: CGRect) {
17 | // Drawing code
18 | }
19 | */
20 |
21 | required init?(coder aDecoder: NSCoder) {
22 | super.init(coder: aDecoder)
23 |
24 | //设置圆角
25 | self.clipsToBounds = true
26 |
27 | //self.layer表示的就是整个UI组件的边界或边缘.
28 | //self.frame表示的就是 UI组件的框架. self.frame.size.width表示的就是 UI组件框架的大小的宽
29 | self.layer.cornerRadius = self.frame.size.width / 2
30 |
31 | // //设置边框.边框颜色是白色,透明度70%. 然后边框厚度是4DDI
32 | // self.layer.borderWidth = 4
33 | // self.layer.borderColor = UIColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 0.7).CGColor
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/HttpControl.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HttpControl.swift
3 | // DouBanFM
4 | //
5 | // Created by SUN on 15/4/21.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import Alamofire
11 |
12 | class HttpControl {
13 |
14 | //定义一个回调代理
15 | var delegate:HttpProtocol?
16 |
17 | /**
18 | 接收一个网址,然后回调代理的方法,传回数据
19 |
20 | - parameter url: 网址
21 | */
22 | func onSearch(_ url:String) {
23 | Alamofire.request(url, method: HTTPMethod.get, parameters: nil, encoding: JSONEncoding.default, headers: nil).responseJSON { response in
24 | if let result: Any = response.result.value {
25 | self.delegate?.didRecieveReusults(result)
26 | }
27 |
28 | }
29 |
30 | }
31 | }
32 |
33 | //定义一个http协议
34 |
35 | protocol HttpProtocol {
36 | /**
37 | * 定义了一个协议,接收anyObject. 然后解析处理结果
38 | */
39 | func didRecieveReusults(_ results:Any)
40 | }
41 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x~ipad-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x~ipad-1.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x~ipad.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon29x29@3x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon29x29~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon29x29~ipad.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x~ipad.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon40x40@3x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon40x40~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon40x40~ipad.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon60x60@3x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon76x76@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon76x76@2x~ipad.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon76x76~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/AppIcon76x76~ipad.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "29x29",
5 | "idiom" : "iphone",
6 | "filename" : "AppIcon29x29@2x~ipad.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "29x29",
11 | "idiom" : "iphone",
12 | "filename" : "AppIcon29x29@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "40x40",
17 | "idiom" : "iphone",
18 | "filename" : "AppIcon40x40@2x.png",
19 | "scale" : "2x"
20 | },
21 | {
22 | "size" : "40x40",
23 | "idiom" : "iphone",
24 | "filename" : "AppIcon40x40@3x.png",
25 | "scale" : "3x"
26 | },
27 | {
28 | "size" : "60x60",
29 | "idiom" : "iphone",
30 | "filename" : "AppIcon60x60@2x.png",
31 | "scale" : "2x"
32 | },
33 | {
34 | "size" : "60x60",
35 | "idiom" : "iphone",
36 | "filename" : "AppIcon60x60@3x.png",
37 | "scale" : "3x"
38 | },
39 | {
40 | "size" : "29x29",
41 | "idiom" : "ipad",
42 | "filename" : "AppIcon29x29~ipad.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "29x29",
47 | "idiom" : "ipad",
48 | "filename" : "AppIcon29x29@2x~ipad-1.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "40x40",
53 | "idiom" : "ipad",
54 | "filename" : "AppIcon40x40~ipad.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "40x40",
59 | "idiom" : "ipad",
60 | "filename" : "AppIcon40x40@2x~ipad.png",
61 | "scale" : "2x"
62 | },
63 | {
64 | "size" : "76x76",
65 | "idiom" : "ipad",
66 | "filename" : "AppIcon76x76~ipad.png",
67 | "scale" : "1x"
68 | },
69 | {
70 | "size" : "76x76",
71 | "idiom" : "ipad",
72 | "filename" : "AppIcon76x76@2x~ipad.png",
73 | "scale" : "2x"
74 | },
75 | {
76 | "idiom" : "ipad",
77 | "size" : "83.5x83.5",
78 | "scale" : "2x"
79 | }
80 | ],
81 | "info" : {
82 | "version" : 1,
83 | "author" : "xcode"
84 | }
85 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Back_White.imageset/Back_White@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Back_White.imageset/Back_White@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Back_White.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Back_White@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Empty.imageset/Comment_Empty@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Comment_Empty.imageset/Comment_Empty@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Empty.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Comment_Empty@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Icon_Back.imageset/Comment_Icon_Back@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Comment_Icon_Back.imageset/Comment_Icon_Back@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Icon_Back.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Comment_Icon_Back@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Icon_Back_Highlight.imageset/Comment_Icon_Back_Highlight@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Comment_Icon_Back_Highlight.imageset/Comment_Icon_Back_Highlight@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Icon_Back_Highlight.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Comment_Icon_Back_Highlight@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Icon_Compose.imageset/Comment_Icon_Compose@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Comment_Icon_Compose.imageset/Comment_Icon_Compose@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Icon_Compose.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Comment_Icon_Compose@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Icon_Fold.imageset/Comment_Icon_Fold@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Comment_Icon_Fold.imageset/Comment_Icon_Fold@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Icon_Fold.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Comment_Icon_Fold@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Icon_Fold_Selected.imageset/Comment_Icon_Fold_Selected@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Comment_Icon_Fold_Selected.imageset/Comment_Icon_Fold_Selected@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Icon_Fold_Selected.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Comment_Icon_Fold_Selected@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Line.imageset/Comment_Line.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Comment_Line.imageset/Comment_Line.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Line.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "Comment_Line.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Share_Sina.imageset/Comment_Share_Sina@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Comment_Share_Sina.imageset/Comment_Share_Sina@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Share_Sina.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Comment_Share_Sina@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Share_Tencent.imageset/Comment_Share_Tencent@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Comment_Share_Tencent.imageset/Comment_Share_Tencent@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Share_Tencent.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Comment_Share_Tencent@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Vote.imageset/Comment_Vote@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Comment_Vote.imageset/Comment_Vote@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Vote.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Comment_Vote@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Voted.imageset/Comment_Voted@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Comment_Voted.imageset/Comment_Voted@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Comment_Voted.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Comment_Voted@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Dark_Menu_Mask.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "Dark_Menu_Mask@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Dark_Menu_Mask.imageset/Dark_Menu_Mask@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Dark_Menu_Mask.imageset/Dark_Menu_Mask@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Highlight.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "Highlight@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Highlight.imageset/Highlight@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Highlight.imageset/Highlight@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Home_Arrow.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Home_Arrow@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Home_Arrow.imageset/Home_Arrow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Home_Arrow.imageset/Home_Arrow@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Home_Image_Mask.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Home_Image_Mask@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Home_Image_Mask.imageset/Home_Image_Mask@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Home_Image_Mask.imageset/Home_Image_Mask@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Home_Image_Mask_Plus.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Home_Image_Mask_Plus@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Home_Image_Mask_Plus.imageset/Home_Image_Mask_Plus@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Home_Image_Mask_Plus.imageset/Home_Image_Mask_Plus@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Homescreen_Icon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "Homescreen_Icon120@2x.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "Homescreen_Icon@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Homescreen_Icon.imageset/Homescreen_Icon120@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Homescreen_Icon.imageset/Homescreen_Icon120@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Homescreen_Icon.imageset/Homescreen_Icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Homescreen_Icon.imageset/Homescreen_Icon@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Image_Preview.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Image_Preview@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Image_Preview.imageset/Image_Preview@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Image_Preview.imageset/Image_Preview@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Dark.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "Menu_Dark@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Dark.imageset/Menu_Dark@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Menu_Dark.imageset/Menu_Dark@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Download.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "Menu_Download@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Download.imageset/Menu_Download@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Menu_Download.imageset/Menu_Download@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Enter.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "Menu_Enter@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Enter.imageset/Menu_Enter@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Menu_Enter.imageset/Menu_Enter@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Follow-1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "Menu_Follow@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Follow-1.imageset/Menu_Follow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Menu_Follow-1.imageset/Menu_Follow@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Follow.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Menu_Follow@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Follow.imageset/Menu_Follow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Menu_Follow.imageset/Menu_Follow@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Icon_Collect.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Menu_Icon_Collect@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Icon_Collect.imageset/Menu_Icon_Collect@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Menu_Icon_Collect.imageset/Menu_Icon_Collect@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Icon_Home.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Menu_Icon_Home@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Icon_Home.imageset/Menu_Icon_Home@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Menu_Icon_Home.imageset/Menu_Icon_Home@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Icon_Message.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Menu_Icon_Message@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Icon_Message.imageset/Menu_Icon_Message@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Menu_Icon_Message.imageset/Menu_Icon_Message@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Icon_Setting.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Menu_Icon_Setting@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Icon_Setting.imageset/Menu_Icon_Setting@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Menu_Icon_Setting.imageset/Menu_Icon_Setting@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Mask.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "Menu_Mask@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Menu_Mask.imageset/Menu_Mask@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Menu_Mask.imageset/Menu_Mask@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Image_Mask.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "News_Image_Mask@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Image_Mask.imageset/News_Image_Mask@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Image_Mask.imageset/News_Image_Mask@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Arrow.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "News_Navigation_Arrow@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "News_Navigation_Arrow@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Arrow.imageset/News_Navigation_Arrow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Arrow.imageset/News_Navigation_Arrow@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Arrow.imageset/News_Navigation_Arrow@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Arrow.imageset/News_Navigation_Arrow@3x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Arrow_Highlight.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "News_Navigation_Arrow_Highlight@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "News_Navigation_Arrow_Highlight@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Arrow_Highlight.imageset/News_Navigation_Arrow_Highlight@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Arrow_Highlight.imageset/News_Navigation_Arrow_Highlight@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Arrow_Highlight.imageset/News_Navigation_Arrow_Highlight@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Arrow_Highlight.imageset/News_Navigation_Arrow_Highlight@3x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Comment.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "News_Navigation_Comment@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "News_Navigation_Comment@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Comment.imageset/News_Navigation_Comment@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Comment.imageset/News_Navigation_Comment@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Comment.imageset/News_Navigation_Comment@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Comment.imageset/News_Navigation_Comment@3x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Comment_Highlight.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "News_Navigation_Comment_Highlight@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "News_Navigation_Comment_Highlight@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Comment_Highlight.imageset/News_Navigation_Comment_Highlight@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Comment_Highlight.imageset/News_Navigation_Comment_Highlight@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Comment_Highlight.imageset/News_Navigation_Comment_Highlight@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Comment_Highlight.imageset/News_Navigation_Comment_Highlight@3x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Next.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "News_Navigation_Next@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "News_Navigation_Next@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Next.imageset/News_Navigation_Next@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Next.imageset/News_Navigation_Next@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Next.imageset/News_Navigation_Next@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Next.imageset/News_Navigation_Next@3x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Next_Highlight.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "News_Navigation_Next_Highlight@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "News_Navigation_Next_Highlight@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Next_Highlight.imageset/News_Navigation_Next_Highlight@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Next_Highlight.imageset/News_Navigation_Next_Highlight@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Next_Highlight.imageset/News_Navigation_Next_Highlight@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Next_Highlight.imageset/News_Navigation_Next_Highlight@3x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Share.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "News_Navigation_Share@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "News_Navigation_Share@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Share.imageset/News_Navigation_Share@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Share.imageset/News_Navigation_Share@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Share.imageset/News_Navigation_Share@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Share.imageset/News_Navigation_Share@3x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Share_Highlight.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "News_Navigation_Share_Highlight@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "News_Navigation_Share_Highlight@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Share_Highlight.imageset/News_Navigation_Share_Highlight@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Share_Highlight.imageset/News_Navigation_Share_Highlight@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Share_Highlight.imageset/News_Navigation_Share_Highlight@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Share_Highlight.imageset/News_Navigation_Share_Highlight@3x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Unnext.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "News_Navigation_Unnext@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "News_Navigation_Unnext@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Unnext.imageset/News_Navigation_Unnext@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Unnext.imageset/News_Navigation_Unnext@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Unnext.imageset/News_Navigation_Unnext@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Unnext.imageset/News_Navigation_Unnext@3x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Vote.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "News_Navigation_Vote@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "News_Navigation_Vote@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Vote.imageset/News_Navigation_Vote@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Vote.imageset/News_Navigation_Vote@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Vote.imageset/News_Navigation_Vote@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Vote.imageset/News_Navigation_Vote@3x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Voted.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "News_Navigation_Voted@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "News_Navigation_Voted@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Voted.imageset/News_Navigation_Voted@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Voted.imageset/News_Navigation_Voted@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Voted.imageset/News_Navigation_Voted@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/News_Navigation_Voted.imageset/News_Navigation_Voted@3x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Setting_Avatar.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "Setting_Avatar@2x-1.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "Setting_Avatar@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Setting_Avatar.imageset/Setting_Avatar@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Setting_Avatar.imageset/Setting_Avatar@2x-1.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Setting_Avatar.imageset/Setting_Avatar@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Setting_Avatar.imageset/Setting_Avatar@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_Copylink.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Share_Copylink@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_Copylink.imageset/Share_Copylink@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Share_Copylink.imageset/Share_Copylink@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_Email.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Share_Email@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_Email.imageset/Share_Email@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Share_Email.imageset/Share_Email@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_Evernote.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Share_Evernote@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_Evernote.imageset/Share_Evernote@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Share_Evernote.imageset/Share_Evernote@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_Instapaper.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Share_Instapaper@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_Instapaper.imageset/Share_Instapaper@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Share_Instapaper.imageset/Share_Instapaper@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_Message.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Share_Message@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_Message.imageset/Share_Message@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Share_Message.imageset/Share_Message@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_QQ.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Share_QQ@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_QQ.imageset/Share_QQ@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Share_QQ.imageset/Share_QQ@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_Renren.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Share_Renren@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_Renren.imageset/Share_Renren@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Share_Renren.imageset/Share_Renren@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_Sina.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Share_Sina@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_Sina.imageset/Share_Sina@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Share_Sina.imageset/Share_Sina@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_Tencent.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Share_Tencent@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_Tencent.imageset/Share_Tencent@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Share_Tencent.imageset/Share_Tencent@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_WeChat.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Share_WeChat@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_WeChat.imageset/Share_WeChat@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Share_WeChat.imageset/Share_WeChat@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_WeChat_Moments.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Share_WeChat_Moments@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_WeChat_Moments.imageset/Share_WeChat_Moments@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Share_WeChat_Moments.imageset/Share_WeChat_Moments@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_YoudaoNote.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Share_YoudaoNote@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Share_YoudaoNote.imageset/Share_YoudaoNote@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Share_YoudaoNote.imageset/Share_YoudaoNote@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Splash_Logo_Plus.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "Splash_Logo_Plus@2x-2.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "Splash_Logo_Plus@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "Splash_Logo_Plus@2x-1.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Splash_Logo_Plus.imageset/Splash_Logo_Plus@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Splash_Logo_Plus.imageset/Splash_Logo_Plus@2x-1.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Splash_Logo_Plus.imageset/Splash_Logo_Plus@2x-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Splash_Logo_Plus.imageset/Splash_Logo_Plus@2x-2.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Splash_Logo_Plus.imageset/Splash_Logo_Plus@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Splash_Logo_Plus.imageset/Splash_Logo_Plus@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Splash_Plus.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "Splash_Plus@2x-1.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "Splash_Plus@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Splash_Plus.imageset/Splash_Plus@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Splash_Plus.imageset/Splash_Plus@2x-1.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/Splash_Plus.imageset/Splash_Plus@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/Splash_Plus.imageset/Splash_Plus@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/ToolBar_Shadow.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "ToolBar_Shadow@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/ToolBar_Shadow.imageset/ToolBar_Shadow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/ToolBar_Shadow.imageset/ToolBar_Shadow@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/ZHAnswerViewBack.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "ZHAnswerViewBack@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/ZHAnswerViewBack.imageset/ZHAnswerViewBack@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/ZHAnswerViewBack.imageset/ZHAnswerViewBack@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/ZHAnswerViewBackIcon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "ZHAnswerViewBackIcon@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/ZHAnswerViewBackIcon.imageset/ZHAnswerViewBackIcon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/ZHAnswerViewBackIcon.imageset/ZHAnswerViewBackIcon@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/ZHAnswerViewBack_Top.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "ZHAnswerViewBack_Top@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/ZHAnswerViewBack_Top.imageset/ZHAnswerViewBack_Top@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/ZHAnswerViewBack_Top.imageset/ZHAnswerViewBack_Top@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/ZHAnswerViewPrevIcon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "ZHAnswerViewPrevIcon@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/ZHAnswerViewPrevIcon.imageset/ZHAnswerViewPrevIcon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/ZHAnswerViewPrevIcon.imageset/ZHAnswerViewPrevIcon@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/ZHAnswerViewPrevIcon_Bottom.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "ZHAnswerViewPrevIcon_Bottom@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/ZHAnswerViewPrevIcon_Bottom.imageset/ZHAnswerViewPrevIcon_Bottom@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/ZHAnswerViewPrevIcon_Bottom.imageset/ZHAnswerViewPrevIcon_Bottom@2x.png
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/avator.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "avator.jpeg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Images.xcassets/avator.imageset/avator.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/ZhiHuDaily-Swift/Images.xcassets/avator.imageset/avator.jpeg
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | NSAppTransportSecurity
26 |
27 | NSAllowsArbitraryLoads
28 |
29 |
30 | UILaunchStoryboardName
31 | LaunchScreen
32 | UIMainStoryboardFile
33 | Main
34 | UIRequiredDeviceCapabilities
35 |
36 | armv7
37 |
38 | UIRequiresFullScreen
39 |
40 | UISupportedInterfaceOrientations
41 |
42 | UIInterfaceOrientationPortrait
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 | UISupportedInterfaceOrientations~ipad
47 |
48 | UIInterfaceOrientationPortrait
49 | UIInterfaceOrientationPortraitUpsideDown
50 | UIInterfaceOrientationLandscapeLeft
51 | UIInterfaceOrientationLandscapeRight
52 |
53 | UIViewControllerBasedStatusBarAppearance
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/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 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/NSURLSession+SynchronousTask.swift:
--------------------------------------------------------------------------------
1 | // 由于IOS9 废弃了NSURLConnection.sendSynchronousRequest:returningResponse: 这几个方法,推荐实用NSURLSession来实现.
2 | // 又由于我这里必须实用同步的调用,因此,给NSURLSession写了一个扩展, 增加了两个synchronous同步的方法.
3 | // NSURLSession+SynchronousTask.swift
4 | // ZhiHuDaily-Swift
5 | //
6 | // Created by SUN on 15/7/13.
7 | // Copyright © 2015年 SUN. All rights reserved.
8 | //
9 |
10 | import Foundation
11 |
12 | extension URLSession {
13 |
14 | func sendSynchronousDataTaskWithRequest(_ request:URLRequest) throws -> (URLResponse?,Data?){
15 |
16 | let semaphore:DispatchSemaphore = DispatchSemaphore(value: 0)
17 |
18 | var data:Data? = nil
19 |
20 | var response:URLResponse? = nil
21 |
22 | var error:NSError? = nil
23 |
24 | URLSession.shared.dataTask(with: request, completionHandler: { (taskData, taskResponse, taskError) -> Void in
25 | data = taskData
26 |
27 | if let _response = taskResponse {
28 | response = _response
29 | }
30 |
31 | error = taskError as NSError?
32 |
33 | semaphore.signal();
34 | }) .resume()
35 |
36 | semaphore.wait(timeout: DispatchTime.distantFuture);
37 |
38 | if let _error = error {
39 | //异常
40 | throw AppException.other(_error.description)
41 | }
42 |
43 | return (response,data)
44 | }
45 |
46 | func sendSynchronousDataTaskWithURL(_ url:URL) throws -> (URLResponse?,Data?){
47 | let semaphore:DispatchSemaphore = DispatchSemaphore(value: 0)
48 |
49 | var data:Data? = nil
50 | var response:URLResponse? = nil
51 |
52 | var error:NSError? = nil
53 |
54 | URLSession.shared.dataTask(with: url, completionHandler: { (taskData, taskResponse, taskError) -> Void in
55 | data = taskData
56 | if let _response = taskResponse {
57 | response = _response
58 | }
59 |
60 | error = taskError as NSError?
61 |
62 | semaphore.signal();
63 | }) .resume()
64 |
65 | semaphore.wait(timeout: DispatchTime.distantFuture);
66 |
67 | if let _error = error {
68 | //异常
69 | throw AppException.other(_error.description)
70 | }
71 |
72 | return (response,data)
73 | }
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/NavigationControllerDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NavigationControllerDelegate.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/6/3.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | /**
12 | * 自定义UINavigationControllerDelegate
13 | */
14 | class NavigationControllerDelegate: NSObject,UINavigationControllerDelegate {
15 |
16 | @IBOutlet weak var navigationController: UINavigationController!
17 |
18 | //实例化一个 自定义的Pop 转场动画
19 | let popAnimation : NormalPopAnimation = NormalPopAnimation()
20 |
21 | //====================UINavigationControllerDelegate协议的实现======================================================
22 | //返回动画
23 | func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationControllerOperation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
24 |
25 | if operation == UINavigationControllerOperation.pop {
26 | //如果是返回,就返回特殊的动画. 否则就返回nil,也就是默认动画
27 | return popAnimation
28 | }
29 |
30 | return nil
31 | }
32 |
33 | // 返回 interactionController 也就是转场动画控制器. 注意! 如果 上面的那个方法 navigationController:animationControllerForOperation:fromViewController:toViewController: 返回的是nil. 那么就不会调用这个方法
34 | func navigationController(_ navigationController: UINavigationController, interactionControllerFor animationController: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? {
35 | return interactionController
36 | }
37 |
38 | //====================UINavigationControllerDelegate协议的实现======================================================
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/NewsDetailVO.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NewsDetailVO.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/6/4.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /**
12 | * 新闻详细的对象
13 | */
14 | class NewsDetailVO {
15 |
16 | /// 主要的内容
17 | let body: String?
18 |
19 | /// 图片版权
20 | let imageSource: String?
21 |
22 | /// 标题
23 | let title: String
24 |
25 | /// 图片的URL
26 | let image: String?
27 |
28 | /// 分享地址
29 | let shareUrl: String?
30 |
31 | /// 网页js的url地址
32 | let js: [String]?
33 |
34 | /// 推荐者的头像
35 | let recommenders: [String]?
36 |
37 | /// 无用
38 | let gaPrefix: Int = 0
39 |
40 | /// 新闻类型 内部新闻是0 外联是1
41 | let type: Int
42 |
43 | /// 新闻的ID
44 | let id: Int
45 |
46 | /// 网页的css的url地址
47 | let css: [String]?
48 |
49 | ///栏目对象
50 | let section: Section?
51 |
52 | init(id: Int, title: String, body: String?, image: String?, imageSource: String?, type: Int = 0, css: [String]?, section: Section?, recommenders: [String]?, js: [String]?, shareUrl: String?) {
53 | self.id = id
54 | self.title = title
55 | self.body = body
56 | self.image = image
57 | self.imageSource = imageSource
58 | self.type = type
59 | self.css = css
60 | self.section = section
61 | self.recommenders = recommenders
62 | self.js = js
63 | self.shareUrl = shareUrl
64 | }
65 | }
66 |
67 | /// 表示栏目的对象
68 | struct Section {
69 | let thumbnail: String
70 | let id: Int
71 | let name: String
72 |
73 | init(thumbnail: String, id: Int, name: String) {
74 | self.id = id
75 | self.thumbnail = thumbnail
76 | self.name = name
77 | }
78 | }
79 |
80 | /**
81 | * 新闻的扩展信息
82 | */
83 | struct NewsExtraVO {
84 | let longComments : Int
85 | let popularity : Int
86 | let shortComments : Int
87 | let comments : Int
88 |
89 | init(longComments:Int,popularity:Int,shortComments:Int,comments:Int) {
90 | self.comments = comments
91 | self.longComments = longComments
92 | self.shortComments = shortComments
93 | self.popularity = popularity
94 | }
95 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/NewsListTableViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NewsListTableViewCell.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/6/1.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class NewsListTableViewCell: UITableViewCell {
12 |
13 | @IBOutlet weak var titleLabel: UILabel!
14 |
15 | @IBOutlet weak var newsImageView: UIImageView!
16 |
17 | @IBOutlet weak var multipicLabel: UILabel!
18 |
19 | override func awakeFromNib() {
20 | super.awakeFromNib()
21 | // Initialization code
22 | }
23 |
24 | override func setSelected(_ selected: Bool, animated: Bool) {
25 | super.setSelected(selected, animated: animated)
26 |
27 | // Configure the view for the selected state
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/NewsListVO.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NewsListVO.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/5/30.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /**
12 | * 用于保存新闻列表中的一条信息的Model
13 | */
14 | class NewsVO {
15 |
16 | /// 列表缩略图, 可能没有
17 | let images : [String]?
18 |
19 | /// 标题
20 | let title : String
21 |
22 | /// 类型,作用未知
23 | let type : Int = 0
24 |
25 | /// 新闻ID
26 | let id :Int
27 |
28 | /// 无用
29 | let gaPrefix : Int?
30 |
31 | /// 多图的标志
32 | let multipic : Bool
33 |
34 | /// 是否已读的标志
35 | var alreadyRead = false
36 |
37 | init(id:Int,title:String,images:[String]? = nil,multipic:Bool? = false,gaPrefix:Int? = nil) {
38 | self.id = id
39 | self.title = title
40 | self.images = images
41 | self.multipic = multipic ?? false
42 | self.gaPrefix = gaPrefix
43 | }
44 |
45 | }
46 |
47 | class NewsListVO {
48 |
49 | var date : Int!
50 |
51 | var topNews : [NewsVO]?
52 |
53 | var news : [NewsVO]?
54 |
55 | init(){
56 | }
57 |
58 | init(date:Int,news:[NewsVO]?,topNews:[NewsVO]?){
59 | self.date = date
60 |
61 | self.topNews = topNews
62 |
63 | self.news = news
64 | }
65 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/NormalPopAnimation.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NormalPopAnimation.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/6/3.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | /**
12 | * 自定义 Pop动画
13 | */
14 | class NormalPopAnimation: NSObject,UIViewControllerAnimatedTransitioning {
15 |
16 | func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval {
17 | return 0.4
18 | }
19 |
20 |
21 | // This method can only be a nop if the transition is interactive and not a percentDriven interactive transition.
22 | func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
23 |
24 | let fromViewController = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.from)
25 | let toViewController = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.to)
26 |
27 | let screenBounds = UIScreen.main.bounds
28 |
29 | let initFrame = transitionContext.initialFrame(for: fromViewController!)
30 | let finalFrame = initFrame.offsetBy(dx: screenBounds.size.width, dy: 0)
31 |
32 | let containerView = transitionContext.containerView
33 |
34 | containerView.addSubview((toViewController?.view ?? nil)!)
35 | containerView.sendSubview(toBack: (toViewController?.view ?? nil)!)
36 |
37 | let duration = self.transitionDuration(using: transitionContext)
38 |
39 | UIView.animate(withDuration: duration, animations: { () -> Void in
40 | fromViewController?.view.frame = finalFrame
41 | }, completion: { (finished) -> Void in
42 | transitionContext.completeTransition(!transitionContext.transitionWasCancelled)
43 |
44 | if !transitionContext.transitionWasCancelled {
45 | UIApplication.shared.statusBarStyle = .lightContent
46 | }
47 | })
48 |
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/ObjectiveCBridge.h:
--------------------------------------------------------------------------------
1 | //
2 | // ObjectiveCBridge.h
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/5/26.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | #import "PKRevealController.h"
10 | #import "CNPPopupController.h"
11 |
12 | #ifndef ZhiHuDaily_Swift_ObjectiveCBridge_h
13 | #define ZhiHuDaily_Swift_ObjectiveCBridge_h
14 |
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/RecommenderControl.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RecommenderControl.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/6/15.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import Alamofire
11 | import SwiftyJSON3
12 |
13 | class RecommenderControl {
14 |
15 | /**
16 | 获取一个新闻的推荐者
17 |
18 | - parameter newsId: 新闻Id
19 | - parameter complate: 读取后的操作
20 | */
21 | func getNewsRecommenders(_ newsId:Int,complate:@escaping (_ recommenders:RecommendersVO)->Void,block:((_ error:NSError)->Void)? = nil){
22 |
23 | Alamofire.request(RECOMMENDERS_URL+"\(newsId)/recommenders").responseJSON(options: JSONSerialization.ReadingOptions.mutableContainers) { response in
24 | if let result: Any = response.result.value {
25 | //转换成JSON
26 | let json = JSON(result)
27 |
28 | complate(self.convertJSON2VO(json))
29 | }
30 | }
31 | }
32 |
33 | /**
34 | 把JSON对象转换成VO
35 |
36 | - parameter json:
37 |
38 | - returns:
39 | */
40 | fileprivate func convertJSON2VO(_ json:JSON) -> RecommendersVO{
41 |
42 | let item_count = json["item_count"].int!
43 |
44 | var recommenderVOs:[RecommenderVO] = []
45 | if let items = json["items"].array {
46 | for item in items {
47 | let index = item["index"].int!
48 | let name = item["author"]["name"].string!
49 | var infos : [RecommenderInfoVO] = []
50 | if let recommenders = item["recommenders"].array {
51 | for recommender in recommenders {
52 | let bio = recommender["bio"].string!
53 | let token = recommender["zhihu_url_token"].string!
54 | let id = recommender["id"].int!
55 | let avatar = recommender["avatar"].string!
56 | let name = recommender["name"].string!
57 | infos.append(RecommenderInfoVO(id: id, name: name, token: token, avatar: avatar, bio: bio))
58 | }
59 | }
60 | recommenderVOs.append(RecommenderVO(index: index, author: name, recommenders: infos))
61 | }
62 | }
63 |
64 | let recommendersVO = RecommendersVO(itemCount: item_count, items: recommenderVOs)
65 |
66 | return recommendersVO
67 | }
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/RecommenderDetailViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RecommenderDetailViewController.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/6/15.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class RecommenderDetailViewController: UIViewController {
12 |
13 | @IBOutlet weak var recommenderNameLabel: UILabel!
14 | @IBOutlet weak var recommenderWebView: UIWebView!
15 |
16 | var recommenderName:String?
17 | var recommenderId:Int?
18 | var recommenderToken:String?
19 |
20 | override func viewDidLoad() {
21 | super.viewDidLoad()
22 |
23 | // Do any additional setup after loading the view.
24 | }
25 |
26 | override func didReceiveMemoryWarning() {
27 | super.didReceiveMemoryWarning()
28 | // Dispose of any resources that can be recreated.
29 | }
30 |
31 | override func viewWillAppear(_ animated: Bool) {
32 | recommenderNameLabel.text = "\(recommenderName!) - 知乎"
33 |
34 | recommenderWebView.loadRequest(URLRequest(url: URL(string: PEOPLE_URL+recommenderToken!)!))
35 |
36 | }
37 |
38 | @IBAction func doBackAction(_ sender: AnyObject) {
39 |
40 | self.navigationController?.popViewController(animated: true)
41 | }
42 |
43 | /*
44 | // MARK: - Navigation
45 |
46 | // In a storyboard-based application, you will often want to do a little preparation before navigation
47 | override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
48 | // Get the new view controller using segue.destinationViewController.
49 | // Pass the selected object to the new view controller.
50 | }
51 | */
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/RecommenderTableViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RecommenderTableViewCell.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/6/15.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class RecommenderTableViewCell: UITableViewCell {
12 |
13 | @IBOutlet weak var userAvatorImage: FilletImageView!
14 | @IBOutlet weak var userNameLabel: UILabel!
15 | @IBOutlet weak var userDesLabel: UILabel!
16 | @IBOutlet weak var detailButton: UIButton!
17 |
18 |
19 | override func awakeFromNib() {
20 | super.awakeFromNib()
21 | // Initialization code
22 | }
23 |
24 | override func setSelected(_ selected: Bool, animated: Bool) {
25 | super.setSelected(selected, animated: animated)
26 |
27 | // Configure the view for the selected state
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/RecommendersVO.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ReCommendersVO.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/6/15.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class RecommendersVO {
12 | var itemCount = 0
13 |
14 | var items : [RecommenderVO]?
15 |
16 | init(itemCount:Int,items:[RecommenderVO]?){
17 | self.itemCount = itemCount
18 | self.items = items
19 | }
20 | }
21 |
22 | class RecommenderVO {
23 | var index : Int
24 | var author : String
25 | var recommenders : [RecommenderInfoVO]
26 |
27 | init(index:Int,author:String,recommenders : [RecommenderInfoVO] = []) {
28 | self.index = index
29 | self.author = author
30 | self.recommenders = recommenders
31 | }
32 | }
33 |
34 | class RecommenderInfoVO {
35 | var bio : String
36 | var token : String
37 | var id : Int
38 | var avatar:String
39 | var name:String
40 |
41 | init(id:Int,name:String,token:String,avatar:String,bio:String = ""){
42 | self.id = id
43 | self.name = name
44 | self.token = token
45 | self.avatar = avatar
46 | self.bio = bio
47 | }
48 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/RecommendersView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RecommendersView.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/6/9.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class RecommendersView: UIView {
12 |
13 | /*
14 | // Only override drawRect: if you perform custom drawing.
15 | // An empty implementation adversely affects performance during animation.
16 | override func drawRect(rect: CGRect) {
17 | // Drawing code
18 | }
19 | */
20 |
21 | @IBOutlet weak var image1: UIImageView!
22 | @IBOutlet weak var image2: UIImageView!
23 | @IBOutlet weak var image3: UIImageView!
24 | @IBOutlet weak var image4: UIImageView!
25 | @IBOutlet weak var image5: UIImageView!
26 |
27 | func getImageView(_ index:Int) -> UIImageView? {
28 |
29 | switch index {
30 | case 0: return image1
31 | case 1: return image2
32 | case 2: return image3
33 | case 3: return image4
34 | case 4: return image5
35 | default:
36 | return nil
37 | }
38 |
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/RefreshControlDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RefreshControlDelegate.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/5/29.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /**
12 | * 下拉响应事件的Delegate
13 | */
14 | protocol RefreshControlDelegate {
15 |
16 | /**
17 | * 响应回调事件
18 | * @param refreshControl 响应的控件
19 | * @param direction 事件类型
20 | */
21 | func refreshControl(_ refreshControl:RefreshControl,didEngageRefreshDirection direction:RefreshDirection)
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/RefreshViewDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RefreshViewDelegate.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/5/29.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | protocol RefreshViewDelegate {
12 |
13 | var refreshControl:RefreshControl? {get set}
14 |
15 | /**
16 | 重新设置Layout
17 | */
18 | func resetLayoutSubViews()
19 |
20 | /**
21 | 松开可刷新的动画
22 | */
23 | func canEngageRefresh(_ scrollView:UIScrollView,direction:RefreshDirection)
24 |
25 | /**
26 | 松开返回的动画
27 | */
28 | func didDisengageRefresh(_ scrollView:UIScrollView,direction:RefreshDirection)
29 |
30 | /**
31 | * 是否修改他的 ContentInset
32 | */
33 | func needContentInset(_ direction:RefreshDirection) -> Bool
34 |
35 | /**
36 | 开始刷新的动画
37 | */
38 | func startRefreshing(_ direction:RefreshDirection)
39 |
40 | /**
41 | 结束刷新的动画
42 | */
43 | func finishRefreshing(_ direction:RefreshDirection)
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/SharePopupView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SharePopupView.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/6/16.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class SharePopupView: UIView,UIScrollViewDelegate {
12 |
13 | /*
14 | // Only override drawRect: if you perform custom drawing.
15 | // An empty implementation adversely affects performance during animation.
16 | override func drawRect(rect: CGRect) {
17 | // Drawing code
18 | }
19 | */
20 |
21 | override func draw(_ rect: CGRect) {
22 |
23 | /// 设置scrollView 委托为自己
24 | self.scrollView.delegate = self
25 |
26 | var pageNumber = 0
27 | /// 设置弹出内容的宽度
28 | if rect.width < 600 {
29 | pageNumber = 2
30 | }else {
31 | pageNumber = 1
32 | }
33 |
34 | contentViewWidth.constant = rect.width * CGFloat(pageNumber) - 30
35 |
36 | self.pageControl.numberOfPages = pageNumber
37 |
38 | self.pageControl.hidesForSinglePage = true
39 | }
40 |
41 | @IBOutlet weak var scrollView: UIScrollView!
42 |
43 | @IBOutlet weak var pageControl: UIPageControl!
44 |
45 | @IBOutlet weak var contentViewWidth: NSLayoutConstraint!
46 | @IBOutlet weak var contentView: UIView!
47 |
48 | func scrollViewDidScroll(_ scrollView: UIScrollView) {
49 | //滑动的时候 进行pageControl的控制
50 |
51 | let pageWidth = self.scrollView.frame.size.width
52 |
53 | // 计算页数
54 | let page = floor((self.scrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1
55 |
56 | self.pageControl.currentPage = Int(page)
57 | self.pageControl.updateCurrentPageDisplay()
58 | }
59 |
60 | @IBAction func changeCurrentPage(_ sender: UIPageControl) {
61 | //pageControl的页数变化的时候,反过来控制scrollView的滑动
62 |
63 | let page = pageControl.currentPage
64 |
65 | var width:CGFloat,height:CGFloat
66 |
67 | width = scrollView.frame.size.width
68 | height = scrollView.frame.size.height
69 |
70 | let frame = CGRect(x: width * CGFloat(page), y: 0, width: width, height: height)
71 |
72 | scrollView.scrollRectToVisible(frame, animated: true)
73 | }
74 |
75 | /// 执行取消操作
76 | @IBAction func doCancelAction(_ sender: UIButton) {
77 | if let handel = self.cancelHandel {
78 | handel()
79 | }
80 | }
81 |
82 | /// 取消处理的 闭包.由外部来定义操作
83 | var cancelHandel:(()->Void)?
84 | }
85 |
86 |
87 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/SideMenuTableViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SideMenuTableViewCell.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/10/28.
6 | // Copyright © 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class SideMenuTableViewCell: UITableViewCell {
12 |
13 | @IBOutlet weak var titleLabel: UILabel!
14 |
15 | @IBOutlet weak var arrowImage: UIImageView!
16 |
17 | override func awakeFromNib() {
18 | super.awakeFromNib()
19 | // Initialization code
20 | }
21 |
22 | override func setSelected(_ selected: Bool, animated: Bool) {
23 | super.setSelected(selected, animated: animated)
24 |
25 | // Configure the view for the selected state
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/ThemeVO.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ThemeVO.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/10/30.
6 | // Copyright © 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /// 主题的domain模型
12 | class ThemeVO {
13 |
14 | let color:Int
15 |
16 | let thumbnail:String
17 |
18 | let description:String
19 |
20 | let id:Int
21 |
22 | let name:String
23 |
24 | init(color:Int,thumbnail:String,description:String,id:Int,name:String){
25 | self.color = color
26 | self.thumbnail = thumbnail
27 | self.description = description
28 | self.id = id
29 | self.name = name
30 | }
31 |
32 | }
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/ThemesListControl.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ThemesListControl.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/10/30.
6 | // Copyright © 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import Alamofire
11 | import SwiftyJSON3
12 |
13 | /*
14 | 主页左边的主题获取控制器
15 | */
16 | class ThemesListControl {
17 |
18 | var themes : [ThemeVO] = []
19 |
20 | /**
21 | 加载用户主题列表
22 | */
23 | func loadThemeList(){
24 |
25 | Alamofire.request(THEME_URL).responseJSON(options: JSONSerialization.ReadingOptions.mutableContainers) { response in
26 |
27 | debugPrint(response)
28 |
29 | if let result:Any = response.result.value {
30 | let json = JSON(result)
31 |
32 | //主题列表
33 | let themes:[JSON]? = json["others"].array
34 |
35 | for theme in themes! {
36 | self.themes.append(self.convertJSON2Theme(theme))
37 | }
38 |
39 | }
40 | }
41 | }
42 |
43 | /**
44 | JSON对象和VO对象的转换
45 |
46 | - parameter json:
47 |
48 | - returns:
49 | */
50 | fileprivate func convertJSON2Theme(_ json:JSON) -> ThemeVO {
51 | let color = json["color"].intValue
52 | let thumbnail = json["thumbnail"].stringValue
53 | let description = json["description"].stringValue
54 | let id = json["id"].intValue
55 | let name = json["name"].stringValue
56 |
57 | return ThemeVO(color: color, thumbnail: thumbnail, description: description, id: id, name: name)
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/WriteCommentViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // WriteCommentViewController.swift
3 | // ZhiHuDaily-Swift
4 | //
5 | // Created by SUN on 15/6/14.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class WriteCommentViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 | // Do any additional setup after loading the view.
17 | }
18 |
19 | override func didReceiveMemoryWarning() {
20 | super.didReceiveMemoryWarning()
21 | // Dispose of any resources that can be recreated.
22 | }
23 |
24 | @IBAction func doBackAction(_ sender: UIButton) {
25 | self.dismiss(animated: true, completion: { () -> Void in
26 |
27 | })
28 | }
29 |
30 | /*
31 | // MARK: - Navigation
32 |
33 | // In a storyboard-based application, you will often want to do a little preparation before navigation
34 | override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
35 | // Get the new view controller using segue.destinationViewController.
36 | // Pass the selected object to the new view controller.
37 | }
38 | */
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/ZhiHuDaily-Swift/ZhiHuDaily_Swift.xcdatamodeld/ZhiHuDaily_Swift.xcdatamodel/contents:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ZhiHuDaily-SwiftTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ZhiHuDaily-SwiftTests/ZhiHuDaily_SwiftTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ZhiHuDaily_SwiftTests.swift
3 | // ZhiHuDaily-SwiftTests
4 | //
5 | // Created by SUN on 15/5/26.
6 | // Copyright (c) 2015年 SUN. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class ZhiHuDaily_SwiftTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measure() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/screenshot-new.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/screenshot-new.gif
--------------------------------------------------------------------------------
/screenshot.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sunxiang0918/ZhiHuDaily-Swift/ddf92505a951c2e12d8f6e83981c908ba778174c/screenshot.gif
--------------------------------------------------------------------------------