├── .DS_Store
├── MYLStockDemo.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
└── xcuserdata
│ └── myl.xcuserdatad
│ └── xcschemes
│ ├── MYLStockDemo.xcscheme
│ └── xcschememanagement.plist
├── MYLStockDemo.xcworkspace
├── contents.xcworkspacedata
└── xcuserdata
│ └── myl.xcuserdatad
│ ├── UserInterfaceState.xcuserstate
│ └── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
├── MYLStockDemo
├── AppDelegate.h
├── AppDelegate.m
├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ └── icon_close.imageset
│ │ ├── Contents.json
│ │ ├── icon_gupiaoxiangqing_close@2x.png
│ │ └── icon_gupiaoxiangqing_close@3x.png
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── Common.h
├── Common.m
├── Info.plist
├── KLineView
│ ├── KLine
│ │ ├── KLineChartView.h
│ │ ├── KLineChartView.m
│ │ ├── KLineTipBoardView.h
│ │ ├── KLineTipBoardView.m
│ │ ├── MATipView.h
│ │ └── MATipView.m
│ ├── KLineListTransformer.h
│ ├── KLineListTransformer.m
│ └── TipViews
│ │ ├── TipBoardView.h
│ │ └── TipBoardView.m
├── KTimeView
│ ├── UIBezierPath+curved.h
│ ├── UIBezierPath+curved.m
│ ├── YKLineChart.h
│ ├── YKLineChartViewBase.h
│ ├── YKLineChartViewBase.m
│ ├── YKLineDataSet.h
│ ├── YKLineDataSet.m
│ ├── YKLineEntity.h
│ ├── YKLineEntity.m
│ ├── YKTimeLineView.h
│ ├── YKTimeLineView.m
│ ├── YKViewBase.h
│ ├── YKViewBase.m
│ └── detail.plist
├── PrefixHeader.pch
├── PublicDefine.h
├── StockChatCell.h
├── StockChatCell.m
├── StockDataModel.h
├── StockDataModel.m
├── ViewController.h
├── ViewController.m
├── WYFigureFiveView.h
├── WYFigureFiveView.m
├── WYHorScreenView.h
├── WYHorScreenView.m
├── WYStockTopBarView.h
├── WYStockTopBarView.m
├── WYUser.h
├── WYUser.m
├── dataSource.plist
└── main.m
├── MYLStockDemoTests
├── Info.plist
└── MYLStockDemoTests.m
├── MYLStockDemoUITests
├── Info.plist
└── MYLStockDemoUITests.m
├── Podfile
├── Podfile.lock
├── Pods
├── Headers
│ ├── Private
│ │ ├── MJExtension
│ │ │ ├── MJExtension.h
│ │ │ ├── MJExtensionConst.h
│ │ │ ├── MJFoundation.h
│ │ │ ├── MJProperty.h
│ │ │ ├── MJPropertyKey.h
│ │ │ ├── MJPropertyType.h
│ │ │ ├── NSObject+MJClass.h
│ │ │ ├── NSObject+MJCoding.h
│ │ │ ├── NSObject+MJKeyValue.h
│ │ │ ├── NSObject+MJProperty.h
│ │ │ └── NSString+MJExtension.h
│ │ ├── MJRefresh
│ │ │ ├── MJRefresh.h
│ │ │ ├── MJRefreshAutoFooter.h
│ │ │ ├── MJRefreshAutoGifFooter.h
│ │ │ ├── MJRefreshAutoNormalFooter.h
│ │ │ ├── MJRefreshAutoStateFooter.h
│ │ │ ├── MJRefreshBackFooter.h
│ │ │ ├── MJRefreshBackGifFooter.h
│ │ │ ├── MJRefreshBackNormalFooter.h
│ │ │ ├── MJRefreshBackStateFooter.h
│ │ │ ├── MJRefreshComponent.h
│ │ │ ├── MJRefreshConst.h
│ │ │ ├── MJRefreshFooter.h
│ │ │ ├── MJRefreshGifHeader.h
│ │ │ ├── MJRefreshHeader.h
│ │ │ ├── MJRefreshNormalHeader.h
│ │ │ ├── MJRefreshStateHeader.h
│ │ │ ├── NSBundle+MJRefresh.h
│ │ │ ├── UIScrollView+MJExtension.h
│ │ │ ├── UIScrollView+MJRefresh.h
│ │ │ └── UIView+MJExtension.h
│ │ ├── Masonry
│ │ │ ├── MASCompositeConstraint.h
│ │ │ ├── MASConstraint+Private.h
│ │ │ ├── MASConstraint.h
│ │ │ ├── MASConstraintMaker.h
│ │ │ ├── MASLayoutConstraint.h
│ │ │ ├── MASUtilities.h
│ │ │ ├── MASViewAttribute.h
│ │ │ ├── MASViewConstraint.h
│ │ │ ├── Masonry.h
│ │ │ ├── NSArray+MASAdditions.h
│ │ │ ├── NSArray+MASShorthandAdditions.h
│ │ │ ├── NSLayoutConstraint+MASDebugAdditions.h
│ │ │ ├── View+MASAdditions.h
│ │ │ ├── View+MASShorthandAdditions.h
│ │ │ └── ViewController+MASAdditions.h
│ │ └── SDAutoLayout
│ │ │ ├── SDAutoLayout.h
│ │ │ ├── UITableView+SDAutoTableViewCellHeight.h
│ │ │ └── UIView+SDAutoLayout.h
│ └── Public
│ │ ├── MJExtension
│ │ ├── MJExtension.h
│ │ ├── MJExtensionConst.h
│ │ ├── MJFoundation.h
│ │ ├── MJProperty.h
│ │ ├── MJPropertyKey.h
│ │ ├── MJPropertyType.h
│ │ ├── NSObject+MJClass.h
│ │ ├── NSObject+MJCoding.h
│ │ ├── NSObject+MJKeyValue.h
│ │ ├── NSObject+MJProperty.h
│ │ └── NSString+MJExtension.h
│ │ ├── MJRefresh
│ │ ├── MJRefresh.h
│ │ ├── MJRefreshAutoFooter.h
│ │ ├── MJRefreshAutoGifFooter.h
│ │ ├── MJRefreshAutoNormalFooter.h
│ │ ├── MJRefreshAutoStateFooter.h
│ │ ├── MJRefreshBackFooter.h
│ │ ├── MJRefreshBackGifFooter.h
│ │ ├── MJRefreshBackNormalFooter.h
│ │ ├── MJRefreshBackStateFooter.h
│ │ ├── MJRefreshComponent.h
│ │ ├── MJRefreshConst.h
│ │ ├── MJRefreshFooter.h
│ │ ├── MJRefreshGifHeader.h
│ │ ├── MJRefreshHeader.h
│ │ ├── MJRefreshNormalHeader.h
│ │ ├── MJRefreshStateHeader.h
│ │ ├── NSBundle+MJRefresh.h
│ │ ├── UIScrollView+MJExtension.h
│ │ ├── UIScrollView+MJRefresh.h
│ │ └── UIView+MJExtension.h
│ │ ├── Masonry
│ │ ├── MASCompositeConstraint.h
│ │ ├── MASConstraint+Private.h
│ │ ├── MASConstraint.h
│ │ ├── MASConstraintMaker.h
│ │ ├── MASLayoutConstraint.h
│ │ ├── MASUtilities.h
│ │ ├── MASViewAttribute.h
│ │ ├── MASViewConstraint.h
│ │ ├── Masonry.h
│ │ ├── NSArray+MASAdditions.h
│ │ ├── NSArray+MASShorthandAdditions.h
│ │ ├── NSLayoutConstraint+MASDebugAdditions.h
│ │ ├── View+MASAdditions.h
│ │ ├── View+MASShorthandAdditions.h
│ │ └── ViewController+MASAdditions.h
│ │ └── SDAutoLayout
│ │ ├── SDAutoLayout.h
│ │ ├── UITableView+SDAutoTableViewCellHeight.h
│ │ └── UIView+SDAutoLayout.h
├── MJExtension
│ ├── LICENSE
│ ├── MJExtension
│ │ ├── MJExtension.h
│ │ ├── MJExtensionConst.h
│ │ ├── MJExtensionConst.m
│ │ ├── MJFoundation.h
│ │ ├── MJFoundation.m
│ │ ├── MJProperty.h
│ │ ├── MJProperty.m
│ │ ├── MJPropertyKey.h
│ │ ├── MJPropertyKey.m
│ │ ├── MJPropertyType.h
│ │ ├── MJPropertyType.m
│ │ ├── NSObject+MJClass.h
│ │ ├── NSObject+MJClass.m
│ │ ├── NSObject+MJCoding.h
│ │ ├── NSObject+MJCoding.m
│ │ ├── NSObject+MJKeyValue.h
│ │ ├── NSObject+MJKeyValue.m
│ │ ├── NSObject+MJProperty.h
│ │ ├── NSObject+MJProperty.m
│ │ ├── NSString+MJExtension.h
│ │ └── NSString+MJExtension.m
│ └── README.md
├── MJRefresh
│ ├── LICENSE
│ ├── MJRefresh
│ │ ├── Base
│ │ │ ├── MJRefreshAutoFooter.h
│ │ │ ├── MJRefreshAutoFooter.m
│ │ │ ├── MJRefreshBackFooter.h
│ │ │ ├── MJRefreshBackFooter.m
│ │ │ ├── MJRefreshComponent.h
│ │ │ ├── MJRefreshComponent.m
│ │ │ ├── MJRefreshFooter.h
│ │ │ ├── MJRefreshFooter.m
│ │ │ ├── MJRefreshHeader.h
│ │ │ └── MJRefreshHeader.m
│ │ ├── Custom
│ │ │ ├── Footer
│ │ │ │ ├── Auto
│ │ │ │ │ ├── MJRefreshAutoGifFooter.h
│ │ │ │ │ ├── MJRefreshAutoGifFooter.m
│ │ │ │ │ ├── MJRefreshAutoNormalFooter.h
│ │ │ │ │ ├── MJRefreshAutoNormalFooter.m
│ │ │ │ │ ├── MJRefreshAutoStateFooter.h
│ │ │ │ │ └── MJRefreshAutoStateFooter.m
│ │ │ │ └── Back
│ │ │ │ │ ├── MJRefreshBackGifFooter.h
│ │ │ │ │ ├── MJRefreshBackGifFooter.m
│ │ │ │ │ ├── MJRefreshBackNormalFooter.h
│ │ │ │ │ ├── MJRefreshBackNormalFooter.m
│ │ │ │ │ ├── MJRefreshBackStateFooter.h
│ │ │ │ │ └── MJRefreshBackStateFooter.m
│ │ │ └── Header
│ │ │ │ ├── MJRefreshGifHeader.h
│ │ │ │ ├── MJRefreshGifHeader.m
│ │ │ │ ├── MJRefreshNormalHeader.h
│ │ │ │ ├── MJRefreshNormalHeader.m
│ │ │ │ ├── MJRefreshStateHeader.h
│ │ │ │ └── MJRefreshStateHeader.m
│ │ ├── MJRefresh.bundle
│ │ │ ├── arrow@2x.png
│ │ │ ├── en.lproj
│ │ │ │ └── Localizable.strings
│ │ │ ├── zh-Hans.lproj
│ │ │ │ └── Localizable.strings
│ │ │ └── zh-Hant.lproj
│ │ │ │ └── Localizable.strings
│ │ ├── MJRefresh.h
│ │ ├── MJRefreshConst.h
│ │ ├── MJRefreshConst.m
│ │ ├── NSBundle+MJRefresh.h
│ │ ├── NSBundle+MJRefresh.m
│ │ ├── UIScrollView+MJExtension.h
│ │ ├── UIScrollView+MJExtension.m
│ │ ├── UIScrollView+MJRefresh.h
│ │ ├── UIScrollView+MJRefresh.m
│ │ ├── UIView+MJExtension.h
│ │ └── UIView+MJExtension.m
│ └── README.md
├── Manifest.lock
├── Masonry
│ ├── LICENSE
│ ├── Masonry
│ │ ├── MASCompositeConstraint.h
│ │ ├── MASCompositeConstraint.m
│ │ ├── MASConstraint+Private.h
│ │ ├── MASConstraint.h
│ │ ├── MASConstraint.m
│ │ ├── MASConstraintMaker.h
│ │ ├── MASConstraintMaker.m
│ │ ├── MASLayoutConstraint.h
│ │ ├── MASLayoutConstraint.m
│ │ ├── MASUtilities.h
│ │ ├── MASViewAttribute.h
│ │ ├── MASViewAttribute.m
│ │ ├── MASViewConstraint.h
│ │ ├── MASViewConstraint.m
│ │ ├── Masonry.h
│ │ ├── NSArray+MASAdditions.h
│ │ ├── NSArray+MASAdditions.m
│ │ ├── NSArray+MASShorthandAdditions.h
│ │ ├── NSLayoutConstraint+MASDebugAdditions.h
│ │ ├── NSLayoutConstraint+MASDebugAdditions.m
│ │ ├── View+MASAdditions.h
│ │ ├── View+MASAdditions.m
│ │ ├── View+MASShorthandAdditions.h
│ │ ├── ViewController+MASAdditions.h
│ │ └── ViewController+MASAdditions.m
│ └── README.md
├── Pods.xcodeproj
│ ├── project.pbxproj
│ └── xcuserdata
│ │ └── myl.xcuserdatad
│ │ └── xcschemes
│ │ ├── MJExtension.xcscheme
│ │ ├── MJRefresh.xcscheme
│ │ ├── Masonry.xcscheme
│ │ ├── Pods-MYLStockDemo.xcscheme
│ │ ├── SDAutoLayout.xcscheme
│ │ └── xcschememanagement.plist
├── SDAutoLayout
│ ├── LICENSE
│ ├── README.md
│ └── SDAutoLayoutDemo
│ │ └── SDAutoLayout
│ │ ├── SDAutoLayout.h
│ │ ├── UITableView+SDAutoTableViewCellHeight.h
│ │ ├── UITableView+SDAutoTableViewCellHeight.m
│ │ ├── UIView+SDAutoLayout.h
│ │ └── UIView+SDAutoLayout.m
└── Target Support Files
│ ├── MJExtension
│ ├── MJExtension-dummy.m
│ ├── MJExtension-prefix.pch
│ └── MJExtension.xcconfig
│ ├── MJRefresh
│ ├── MJRefresh-dummy.m
│ ├── MJRefresh-prefix.pch
│ └── MJRefresh.xcconfig
│ ├── Masonry
│ ├── Masonry-dummy.m
│ ├── Masonry-prefix.pch
│ └── Masonry.xcconfig
│ ├── Pods-MYLStockDemo
│ ├── Pods-MYLStockDemo-acknowledgements.markdown
│ ├── Pods-MYLStockDemo-acknowledgements.plist
│ ├── Pods-MYLStockDemo-dummy.m
│ ├── Pods-MYLStockDemo-frameworks.sh
│ ├── Pods-MYLStockDemo-resources.sh
│ ├── Pods-MYLStockDemo.debug.xcconfig
│ └── Pods-MYLStockDemo.release.xcconfig
│ └── SDAutoLayout
│ ├── SDAutoLayout-dummy.m
│ ├── SDAutoLayout-prefix.pch
│ └── SDAutoLayout.xcconfig
├── README.md
└── image
├── .DS_Store
├── IMG_1850.PNG
├── IMG_1851.PNG
├── IMG_1853.PNG
├── IMG_1874.PNG
├── IMG_1876.PNG
└── gifff.gif
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/myl9361/MYLStockChartDemo/1b8a82186275e9d76c5ac94cbbe059ac437402f7/.DS_Store
--------------------------------------------------------------------------------
/MYLStockDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MYLStockDemo.xcodeproj/xcuserdata/myl.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MYLStockDemo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 23730FC01F39561C00B1B3BD
16 |
17 | primary
18 |
19 |
20 | 23730FD91F39561C00B1B3BD
21 |
22 | primary
23 |
24 |
25 | 23730FE41F39561C00B1B3BD
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/MYLStockDemo.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/MYLStockDemo.xcworkspace/xcuserdata/myl.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/myl9361/MYLStockChartDemo/1b8a82186275e9d76c5ac94cbbe059ac437402f7/MYLStockDemo.xcworkspace/xcuserdata/myl.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/MYLStockDemo.xcworkspace/xcuserdata/myl.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/MYLStockDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // MYLStockDemo
4 | //
5 | // Created by myl on 2017/8/8.
6 | // Copyright © 2017年 myl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/MYLStockDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // MYLStockDemo
4 | //
5 | // Created by myl on 2017/8/8.
6 | // Copyright © 2017年 myl. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 |
24 | - (void)applicationWillResignActive:(UIApplication *)application {
25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
27 | }
28 |
29 |
30 | - (void)applicationDidEnterBackground:(UIApplication *)application {
31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
33 | }
34 |
35 |
36 | - (void)applicationWillEnterForeground:(UIApplication *)application {
37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
38 | }
39 |
40 |
41 | - (void)applicationDidBecomeActive:(UIApplication *)application {
42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
43 | }
44 |
45 |
46 | - (void)applicationWillTerminate:(UIApplication *)application {
47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
48 | }
49 |
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/MYLStockDemo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | }
43 | ],
44 | "info" : {
45 | "version" : 1,
46 | "author" : "xcode"
47 | }
48 | }
--------------------------------------------------------------------------------
/MYLStockDemo/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/MYLStockDemo/Assets.xcassets/icon_close.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "icon_gupiaoxiangqing_close@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "icon_gupiaoxiangqing_close@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/MYLStockDemo/Assets.xcassets/icon_close.imageset/icon_gupiaoxiangqing_close@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/myl9361/MYLStockChartDemo/1b8a82186275e9d76c5ac94cbbe059ac437402f7/MYLStockDemo/Assets.xcassets/icon_close.imageset/icon_gupiaoxiangqing_close@2x.png
--------------------------------------------------------------------------------
/MYLStockDemo/Assets.xcassets/icon_close.imageset/icon_gupiaoxiangqing_close@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/myl9361/MYLStockChartDemo/1b8a82186275e9d76c5ac94cbbe059ac437402f7/MYLStockDemo/Assets.xcassets/icon_close.imageset/icon_gupiaoxiangqing_close@3x.png
--------------------------------------------------------------------------------
/MYLStockDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/MYLStockDemo/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/MYLStockDemo/Common.h:
--------------------------------------------------------------------------------
1 | //
2 | // Common.h
3 | // KuaiDiJinNew
4 | //
5 | // Created by xiaojiali on 2016/11/24.
6 | // Copyright © 2016年 xiaojiali. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "StockDataModel.h"
11 |
12 | typedef void(^loginOutSuccessBlock)();
13 | typedef void(^loginFailBlock)(NSString *errCode);
14 |
15 | @interface Common : NSObject
16 |
17 |
18 | + (NSString*)encrypt:(NSString*)plainText;
19 |
20 | + (NSString*)decrypt:(NSString*)encryptText;
21 |
22 | + (NSString*)getProjectVerson;
23 |
24 | //Layout
25 | + (CGFloat)setWidth:(CGFloat)width;
26 |
27 | + (CGRect)getHeightOfText:(NSString *)text width:(CGFloat)width font:(UIFont *)font;
28 |
29 | //处理股票详情数据
30 |
31 | + (NSArray*)makeStockDetailWithDic:(NSDictionary*)dict Type:(NSInteger)type;
32 |
33 | //json处理
34 | + (NSString *)jsonStringWithObject:(id)responseObject;
35 |
36 | //小数点后始终保持两位 不足补0
37 | + (NSString *)decimalProcessingWithNum:(NSString*)num;
38 |
39 | //亿 万 的单位换算
40 | + (NSString *)unitConversionWithNum:(NSString*)num;
41 |
42 | //港股成交量换算
43 | + (NSString *)unitHKConversionWithNum:(NSString*)num;
44 |
45 | //五档图 成交量处理
46 | + (NSString *)fiveViewMakeWithNum:(NSString *)num;
47 |
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/MYLStockDemo/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 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/MYLStockDemo/KLineView/KLine/KLineTipBoardView.h:
--------------------------------------------------------------------------------
1 | //
2 | // KLineTipBoardView.h
3 | // ChartDemo
4 | //
5 | // Created by xdliu on 16/8/23.
6 | // Copyright © 2016年 taiya. All rights reserved.
7 | //
8 |
9 | #import "TipBoardView.h"
10 |
11 | @interface KLineTipBoardView : TipBoardView
12 |
13 | /**
14 | * 开盘价
15 | */
16 | @property (nonatomic, copy) NSString *open;
17 |
18 | /**
19 | * 收盘价
20 | */
21 | @property (nonatomic, copy) NSString *close;
22 |
23 | /**
24 | * 最高价
25 | */
26 | @property (nonatomic, copy) NSString *high;
27 |
28 | /**
29 | * 最低价
30 | */
31 | @property (nonatomic, copy) NSString *low;
32 |
33 | /**************************************************/
34 | /* 字体颜色 */
35 | /**************************************************/
36 | //提供不一样的字体颜色可供选择, 默认都{白色}
37 |
38 | /**
39 | * 开盘价颜色
40 | */
41 | @property (nonatomic, strong) UIColor *openColor;
42 |
43 | /**
44 | * 收盘价颜色
45 | */
46 | @property (nonatomic, strong) UIColor *closeColor;
47 |
48 | /**
49 | * 最高价颜色
50 | */
51 | @property (nonatomic, strong) UIColor *highColor;
52 |
53 | /**
54 | * 最低价颜色
55 | */
56 | @property (nonatomic, strong) UIColor *lowColor;
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/MYLStockDemo/KLineView/KLine/KLineTipBoardView.m:
--------------------------------------------------------------------------------
1 | //
2 | // KLineTipBoardView.m
3 | // ChartDemo
4 | //
5 | // Created by xdliu on 16/8/23.
6 | // Copyright © 2016年 taiya. All rights reserved.
7 | //
8 |
9 | #import "KLineTipBoardView.h"
10 |
11 | @implementation KLineTipBoardView
12 |
13 | #pragma mark - life cycle
14 |
15 | - (id)init {
16 | if (self = [super init]) {
17 | [self _setup];
18 | }
19 | return self;
20 | }
21 |
22 | - (id)initWithCoder:(NSCoder *)aDecoder {
23 | if (self = [super initWithCoder:aDecoder]) {
24 | [self _setup];
25 | }
26 | return self;
27 | }
28 |
29 | - (id)initWithFrame:(CGRect)frame {
30 | if (self = [super initWithFrame:frame]) {
31 | [self _setup];
32 | }
33 | return self;
34 | }
35 |
36 | - (void)_setup {
37 | self.strockColor = kCustomRedColor;
38 | self.triangleWidth = 5.0;
39 | self.radius = 4.0;
40 | self.hideDuration = 2.5;
41 |
42 | self.open = @"0.0";
43 | self.close = @"0.0";
44 | self.high = @"0.0";
45 | self.low = @"0.0";
46 |
47 | self.openColor = [UIColor colorWithWhite:0.15 alpha:1.0];
48 | self.closeColor = [UIColor colorWithWhite:0.15 alpha:1.0];
49 | self.highColor = [UIColor colorWithWhite:0.15 alpha:1.0];
50 | self.lowColor = [UIColor colorWithWhite:0.15 alpha:1.0];
51 |
52 | self.font = [UIFont systemFontOfSize:8.0f];
53 | }
54 |
55 | - (void)drawRect:(CGRect)rect {
56 | [super drawRect:rect];
57 |
58 | [self drawInContext];
59 |
60 | [self drawText];
61 | }
62 |
63 | - (void)drawText {
64 | NSArray *titles = @[[@"开盘价:" stringByAppendingString:self.open], [@"收盘价:" stringByAppendingString:self.close], [@"最高价:" stringByAppendingString:self.high], [@"最低价:" stringByAppendingString:self.low]];
65 | NSArray *colors = @[self.openColor, self.closeColor, self.highColor, self.lowColor];
66 |
67 | CGFloat padding = (self.frame.size.height - 2*self.font.lineHeight) / 3.0;
68 |
69 | for (int i = 0; i < 4; i ++) {
70 | NSAttributedString *attString = [[NSAttributedString alloc] initWithString:titles[i] attributes:@{NSFontAttributeName:self.font, NSForegroundColorAttributeName:colors[i]}];
71 | CGFloat originY = i == 0 || i == 1 ? padding - 2 : padding*2 + 4 + self.font.lineHeight;
72 | CGFloat originX = i == 0 || i == 2 ? self.triangleWidth + 2 : (self.frame.size.width - self.triangleWidth - 4 - 2)/2.0 + self.triangleWidth + 2.0;
73 | [attString drawInRect:CGRectMake(originX, originY, self.frame.size.width, self.font.lineHeight)];
74 | }
75 | }
76 |
77 | @end
78 |
--------------------------------------------------------------------------------
/MYLStockDemo/KLineView/KLine/MATipView.h:
--------------------------------------------------------------------------------
1 | //
2 | // MATipView.h
3 | // ChartDemo
4 | //
5 | // Created by xdliu on 16/8/21.
6 | // Copyright © 2016年 taiya. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MATipView : UIView
12 |
13 | @property (nonatomic, strong) UIFont *font;
14 |
15 | @property (nonatomic, strong) UIColor *minAvgPriceColor;
16 |
17 | @property (nonatomic, strong) UIColor *midAvgPriceColor;
18 |
19 | @property (nonatomic, strong) UIColor *maxAvgPriceColor;
20 |
21 | @property (nonatomic, copy) NSString *minAvgPrice;
22 |
23 | @property (nonatomic, copy) NSString *midAvgPrice;
24 |
25 | @property (nonatomic, copy) NSString *maxAvgPrice;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/MYLStockDemo/KLineView/KLine/MATipView.m:
--------------------------------------------------------------------------------
1 | //
2 | // MATipView.m
3 | // ChartDemo
4 | //
5 | // Created by xdliu on 16/8/21.
6 | // Copyright © 2016年 taiya. All rights reserved.
7 | //
8 |
9 | #import "MATipView.h"
10 | #import
11 |
12 |
13 | @interface MATipView ()
14 |
15 | @property (nonatomic, strong) UILabel *minAvgPriceLbl;
16 |
17 | @property (nonatomic, strong) UILabel *midAvgPriceLbl;
18 |
19 | @property (nonatomic, strong) UILabel *maxAvgPriceLbl;
20 |
21 | @end
22 |
23 | @implementation MATipView
24 |
25 | - (id)init {
26 | if (self = [super init]) {
27 | [self setup];
28 | [self addPageSubviews];
29 | [self layoutPageSubviews];
30 | }
31 | return self;
32 | }
33 |
34 | - (id)initWithCoder:(NSCoder *)aDecoder {
35 | if (self = [super initWithCoder:aDecoder]) {
36 | [self setup];
37 | [self addPageSubviews];
38 | [self layoutPageSubviews];
39 | }
40 | return self;
41 | }
42 |
43 | - (id)initWithFrame:(CGRect)frame {
44 | if (self = [super initWithFrame:frame]) {
45 | [self setup];
46 | [self addPageSubviews];
47 | [self layoutPageSubviews];
48 | }
49 | return self;
50 | }
51 |
52 | - (void)setup {
53 | self.font = [UIFont systemFontOfSize:10.0f];
54 |
55 | self.minAvgPriceColor = Color_FromRGB(0x019ffd);
56 | self.midAvgPriceColor = Color_FromRGB(0xff9900);
57 | self.maxAvgPriceColor = Color_FromRGB(0xff00ff);
58 | }
59 |
60 | - (void)addPageSubviews {
61 | [self addSubview:self.minAvgPriceLbl];
62 | [self addSubview:self.midAvgPriceLbl];
63 | [self addSubview:self.maxAvgPriceLbl];
64 | }
65 |
66 | - (void)layoutPageSubviews {
67 | [self.minAvgPriceLbl mas_makeConstraints:^(MASConstraintMaker *make) {
68 | make.leading.equalTo(@5.0f);
69 | make.centerY.equalTo(self.mas_centerY);
70 | }];
71 |
72 | [self.midAvgPriceLbl mas_makeConstraints:^(MASConstraintMaker *make) {
73 | make.centerX.equalTo(self.mas_centerX);
74 | make.centerY.equalTo(self.mas_centerY);
75 | }];
76 |
77 | [self.maxAvgPriceLbl mas_makeConstraints:^(MASConstraintMaker *make) {
78 | make.trailing.equalTo(self.mas_trailing).with.offset(-5.0f);
79 | make.centerY.equalTo(self.mas_centerY);
80 | }];
81 | }
82 |
83 | #pragma mark - getters
84 |
85 | - (UILabel *)minAvgPriceLbl {
86 | if (!_minAvgPriceLbl) {
87 | _minAvgPriceLbl = [UILabel new];
88 | _minAvgPriceLbl.font = self.font;
89 | _minAvgPriceLbl.textColor = self.minAvgPriceColor;
90 | }
91 | return _minAvgPriceLbl;
92 | }
93 |
94 | - (UILabel *)midAvgPriceLbl {
95 | if (!_midAvgPriceLbl) {
96 | _midAvgPriceLbl = [UILabel new];
97 | _midAvgPriceLbl.font = self.font;
98 | _midAvgPriceLbl.textColor = self.midAvgPriceColor;
99 | }
100 | return _midAvgPriceLbl;
101 | }
102 |
103 | - (UILabel *)maxAvgPriceLbl {
104 | if (!_maxAvgPriceLbl) {
105 | _maxAvgPriceLbl = [UILabel new];
106 | _maxAvgPriceLbl.font = self.font;
107 | _maxAvgPriceLbl.textColor = self.maxAvgPriceColor;
108 | }
109 | return _maxAvgPriceLbl;
110 | }
111 |
112 | #pragma mark - setters
113 |
114 | - (void)setMinAvgPrice:(NSString *)minAvgPrice {
115 | _minAvgPriceLbl.text = minAvgPrice == nil || minAvgPrice.length == 0 ? @"MA5:0.00" : minAvgPrice;
116 | }
117 |
118 | - (void)setMidAvgPrice:(NSString *)midAvgPrice {
119 | _midAvgPriceLbl.text = midAvgPrice == nil || midAvgPrice.length == 0 ? @"MA10:0.00" : midAvgPrice;
120 | }
121 |
122 | - (void)setMaxAvgPrice:(NSString *)maxAvgPrice {
123 | _maxAvgPriceLbl.text = maxAvgPrice == nil || maxAvgPrice.length == 0 ? @"MA20:0.00" : maxAvgPrice;
124 | }
125 |
126 | @end
127 |
--------------------------------------------------------------------------------
/MYLStockDemo/KLineView/KLineListTransformer.h:
--------------------------------------------------------------------------------
1 | //
2 | // KLineListTransformer.h
3 | // ChartDemo
4 | //
5 | // Created by xdliu on 16/8/12.
6 | // Copyright © 2016年 taiya. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | extern NSString *const kCandlerstickChartsContext;
13 | extern NSString *const kCandlerstickChartsDate;
14 | extern NSString *const kCandlerstickChartsMaxHigh;
15 | extern NSString *const kCandlerstickChartsMinLow;
16 | extern NSString *const kCandlerstickChartsMaxVol;
17 | extern NSString *const kCandlerstickChartsMinVol;
18 | extern NSString *const kCandlerstickChartsRSI;
19 | /**
20 | * extern key 可修改为Entity
21 | */
22 | @interface KLineListTransformer : NSObject
23 |
24 | + (instancetype)sharedInstance;
25 |
26 | - (id)managerTransformData:(NSArray*)data;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/MYLStockDemo/KLineView/TipViews/TipBoardView.h:
--------------------------------------------------------------------------------
1 | //
2 | // TipBoardView.h
3 | // ChartDemo
4 | //
5 | // Created by xdliu on 16/8/16.
6 | // Copyright © 2016年 taiya. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TipBoardView : UIView
12 |
13 | @property (nonatomic, strong) UIColor *strockColor;
14 |
15 | @property (nonatomic, strong) UIColor *fillColor;
16 |
17 | /**
18 | * 三角形宽度
19 | */
20 | @property (nonatomic, assign) CGFloat triangleWidth;
21 |
22 | /**
23 | * 圆角弧度
24 | */
25 | @property (nonatomic, assign) CGFloat radius;
26 |
27 | /**
28 | * 字体, 默认系统字体,大小 10
29 | */
30 | @property (nonatomic, strong) UIFont *font;
31 |
32 | /**
33 | * 隐藏时间, 默认3s
34 | */
35 | @property (nonatomic, assign) CGFloat hideDuration;
36 |
37 | /**
38 | * 画背景图
39 | */
40 | - (void)drawInContext;
41 |
42 | - (void)showWithTipPoint:(CGPoint)point;
43 |
44 | - (void)hide;
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/MYLStockDemo/KTimeView/UIBezierPath+curved.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIBezierPath+curved.h
3 | // MPPlot
4 | //
5 | // Created by Alex Manzella on 22/05/14.
6 | // Copyright (c) 2014 mpow. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIBezierPath (curved)
12 |
13 | - (UIBezierPath*)smoothedPathWithGranularity:(NSInteger)granularity;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/MYLStockDemo/KTimeView/UIBezierPath+curved.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIBezierPath+curved.m
3 | // MPPlot
4 | //
5 | // Created by Alex Manzella on 22/05/14.
6 | // Copyright (c) 2014 mpow. All rights reserved.
7 | //
8 |
9 | #import "UIBezierPath+curved.h"
10 |
11 | // Based on code from Erica Sadun
12 | void getPointsFromBezier(void *info, const CGPathElement *element);
13 | NSArray *pointsFromBezierPath(UIBezierPath *bpath);
14 |
15 | #define VALUE(_INDEX_) [NSValue valueWithCGPoint:points[_INDEX_]]
16 | #define POINT(_INDEX_) [(NSValue *)[points objectAtIndex:_INDEX_] CGPointValue]
17 |
18 | @implementation UIBezierPath (curved)
19 |
20 | // Get points from Bezier Curve
21 | void getPointsFromBezier(void *info, const CGPathElement *element)
22 | {
23 | NSMutableArray *bezierPoints = (__bridge NSMutableArray *)info;
24 | // Retrieve the path element type and its points
25 | CGPathElementType type = element->type;
26 | CGPoint *points = element->points;
27 |
28 | // Add the points if they're available (per type)
29 | if (type != kCGPathElementCloseSubpath)
30 | {
31 | [bezierPoints addObject:VALUE(0)];
32 | if ((type != kCGPathElementAddLineToPoint) &&
33 | (type != kCGPathElementMoveToPoint))
34 | [bezierPoints addObject:VALUE(1)];
35 | }
36 | if (type == kCGPathElementAddCurveToPoint)
37 | [bezierPoints addObject:VALUE(2)];
38 | }
39 |
40 | NSArray *pointsFromBezierPath(UIBezierPath *bpath)
41 | {
42 | NSMutableArray *points = [NSMutableArray array];
43 | CGPathApply(bpath.CGPath, (__bridge void *)points, getPointsFromBezier);
44 | return points;
45 | }
46 |
47 | - (UIBezierPath*)smoothedPathWithGranularity:(NSInteger)granularity;
48 | {
49 | NSMutableArray *points = [pointsFromBezierPath(self) mutableCopy];
50 |
51 | if (points.count < 4) return [self copy];
52 |
53 | // Add control points to make the math make sense
54 | [points insertObject:[points objectAtIndex:0] atIndex:0];
55 | [points addObject:[points lastObject]];
56 |
57 | UIBezierPath *smoothedPath = [self copy];
58 | [smoothedPath removeAllPoints];
59 | [smoothedPath moveToPoint:POINT(0)];
60 |
61 | for (NSUInteger index = 1; index < points.count - 2; index++)
62 | {
63 | CGPoint p0 = POINT(index - 1);
64 | CGPoint p1 = POINT(index);
65 | CGPoint p2 = POINT(index + 1);
66 | CGPoint p3 = POINT(index + 2);
67 |
68 | // now add n points starting at p1 + dx/dy up until p2 using Catmull-Rom splines
69 | for (int i = 1; i < granularity; i++)
70 | {
71 | float t = (float) i * (1.0f / (float) granularity);
72 | float tt = t * t;
73 | float ttt = tt * t;
74 |
75 | CGPoint pi; // intermediate point
76 | pi.x = 0.5 * (2*p1.x+(p2.x-p0.x)*t + (2*p0.x-5*p1.x+4*p2.x-p3.x)*tt + (3*p1.x-p0.x-3*p2.x+p3.x)*ttt);
77 | pi.y = 0.5 * (2*p1.y+(p2.y-p0.y)*t + (2*p0.y-5*p1.y+4*p2.y-p3.y)*tt + (3*p1.y-p0.y-3*p2.y+p3.y)*ttt);
78 | [smoothedPath addLineToPoint:pi];
79 | }
80 |
81 | // Now add p2
82 | [smoothedPath addLineToPoint:p2];
83 | }
84 |
85 | // finish by adding the last point
86 | [smoothedPath addLineToPoint:POINT(points.count - 1)];
87 |
88 | return smoothedPath;
89 | }
90 |
91 | @end
92 |
--------------------------------------------------------------------------------
/MYLStockDemo/KTimeView/YKLineChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // YKLineChart.h
3 | // YKLineChartView
4 | //
5 | // Created by chenyk on 15/12/11.
6 | // Copyright © 2015年 chenyk. All rights reserved.
7 | // https://github.com/chenyk0317/YKLineChartView
8 |
9 |
10 | #import "YKLineEntity.h"
11 | #import "YKLineDataSet.h"
12 | #import "YKTimeLineView.h"
13 |
14 |
--------------------------------------------------------------------------------
/MYLStockDemo/KTimeView/YKLineChartViewBase.h:
--------------------------------------------------------------------------------
1 | //
2 | // YKLineChartViewBase.h
3 | // YKLineChartView
4 | //
5 | // Created by chenyk on 15/12/9.
6 | // Copyright © 2015年 chenyk. All rights reserved.
7 | // https://github.com/chenyk0317/YKLineChartView
8 |
9 | #import
10 | #import "YKViewBase.h"
11 |
12 |
13 | @protocol YKLineChartViewDelegate
14 |
15 | @optional
16 | - (void)chartValueSelected:(YKViewBase *)chartView entry:(id)entry entryIndex:(NSInteger)entryIndex;
17 | - (void)chartValueNothingSelected:(YKViewBase *)chartView;
18 |
19 | - (void)chartKlineScrollLeft:(YKViewBase *)chartView;
20 |
21 |
22 | @end
23 |
24 | @interface YKLineChartViewBase : YKViewBase
25 |
26 |
27 | @property (nonatomic,assign) CGFloat uperChartHeightScale;
28 | @property (nonatomic,assign) CGFloat xAxisHeitht;
29 |
30 | @property (nonatomic,strong) UIColor *gridBackgroundColor;
31 | @property (nonatomic,strong) UIColor *borderColor;
32 | @property (nonatomic,assign) CGFloat borderWidth;
33 |
34 |
35 | @property (nonatomic,assign)CGFloat maxPrice;
36 | @property (nonatomic,assign)CGFloat minPrice;
37 | @property (nonatomic,assign)CGFloat maxVolume;
38 | @property (nonatomic,assign)CGFloat candleCoordsScale;
39 | @property (nonatomic,assign)CGFloat volumeCoordsScale;
40 |
41 | @property (nonatomic,assign)NSInteger highlightLineCurrentIndex;
42 | @property (nonatomic,assign)CGPoint highlightLineCurrentPoint;
43 | @property (nonatomic,assign)BOOL highlightLineCurrentEnabled;
44 |
45 | @property (nonatomic,strong)NSDictionary * leftYAxisAttributedDic;
46 | @property (nonatomic,strong)NSDictionary * xAxisAttributedDic;
47 | @property (nonatomic,strong)NSDictionary * highlightAttributedDic;
48 | @property (nonatomic,strong)NSDictionary * defaultAttributedDic;
49 |
50 | @property (nonatomic,assign)BOOL highlightLineShowEnabled;
51 | @property (nonatomic,assign)BOOL scrollEnabled;
52 | @property (nonatomic,assign)BOOL zoomEnabled;
53 |
54 | @property (nonatomic,assign)BOOL leftYAxisIsInChart;
55 | @property (nonatomic,assign)BOOL rightYAxisDrawEnabled;
56 |
57 | @property (nonatomic,assign)id delegate;
58 |
59 |
60 | @property (nonatomic,assign)BOOL isETF;
61 |
62 |
63 | - (void)drawline:(CGContextRef)context
64 | startPoint:(CGPoint)startPoint
65 | stopPoint:(CGPoint)stopPoint
66 | color:(UIColor *)color
67 | lineWidth:(CGFloat)lineWitdth;
68 |
69 | - (void)drawLabelPrice:(CGContextRef)context;
70 |
71 | //圆点
72 | -(void)drawCiclyPoint:(CGContextRef)context
73 | point:(CGPoint)point
74 | radius:(CGFloat)radius
75 | color:(UIColor*)color;
76 | - (void)drawHighlighted:(CGContextRef)context
77 | point:(CGPoint)point
78 | idex:(NSInteger)idex
79 | value:(id)value
80 | color:(UIColor *)color
81 | lineWidth:(CGFloat)lineWidth;
82 |
83 |
84 | - (void)drawLabel:(CGContextRef)context
85 | attributesText:(NSAttributedString *)attributesText
86 | rect:(CGRect)rect;
87 |
88 | - (void)drawRect:(CGContextRef)context
89 | rect:(CGRect)rect
90 | color:(UIColor*)color;
91 |
92 |
93 | - (void)drawGridBackground:(CGContextRef)context
94 | rect:(CGRect)rect;
95 |
96 |
97 |
98 | @end
99 |
--------------------------------------------------------------------------------
/MYLStockDemo/KTimeView/YKLineDataSet.h:
--------------------------------------------------------------------------------
1 | //
2 | // YKLineDataSet.h
3 | // YKLineChartView
4 | //
5 | // Created by chenyk on 15/12/9.
6 | // Copyright © 2015年 chenyk. All rights reserved.
7 | // https://github.com/chenyk0317/YKLineChartView
8 |
9 | #import
10 | #import
11 |
12 | @interface YKTimeDataset : NSObject
13 | @property (nonatomic,strong)NSMutableArray * data;
14 | @property (nonatomic,strong)NSMutableArray * dateArr;
15 | @property (nonatomic,assign)CGFloat highlightLineWidth;
16 | @property (nonatomic,strong)UIColor * highlightLineColor;
17 | @property (nonatomic,assign)CGFloat lineWidth;
18 | @property (nonatomic,strong)UIColor * priceLineCorlor;
19 | @property (nonatomic,strong)UIColor * avgLineCorlor;
20 |
21 | @property (nonatomic,strong)UIColor * volumeRiseColor;
22 | @property (nonatomic,strong)UIColor * volumeFallColor;
23 | @property (nonatomic,strong)UIColor * volumeTieColor;
24 |
25 | @property (nonatomic,assign)BOOL drawFilledEnabled;
26 | @property (nonatomic,strong)UIColor * fillStartColor;
27 | @property (nonatomic,strong)UIColor * fillStopColor;
28 | @property (nonatomic,assign)CGFloat fillAlpha;
29 |
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/MYLStockDemo/KTimeView/YKLineDataSet.m:
--------------------------------------------------------------------------------
1 | //
2 | // YKLineDataSet.m
3 | // YKLineChartView
4 | //
5 | // Created by chenyk on 15/12/9.
6 | // Copyright © 2015年 chenyk. All rights reserved.
7 | // https://github.com/chenyk0317/YKLineChartView
8 |
9 | #import "YKLineDataSet.h"
10 |
11 | @implementation YKTimeDataset
12 |
13 |
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/MYLStockDemo/KTimeView/YKLineEntity.h:
--------------------------------------------------------------------------------
1 | //
2 | // YKLineEntity.h
3 | // YKLineChartView
4 | //
5 | // Created by chenyk on 15/12/9.
6 | // Copyright © 2015年 chenyk. All rights reserved.
7 | // https://github.com/chenyk0317/YKLineChartView
8 |
9 | #import
10 | #import
11 | @interface YKLineEntity : NSObject
12 | @property (nonatomic,assign)CGFloat open;
13 | @property (nonatomic,assign)CGFloat high;
14 | @property (nonatomic,assign)CGFloat low;
15 | @property (nonatomic,assign)CGFloat close;
16 | @property (nonatomic,assign)NSInteger index;
17 | @property (nonatomic,strong)NSString * date;
18 |
19 | @property (nonatomic,assign)CGFloat volume;
20 | @property (nonatomic,assign)CGFloat ma5;
21 | @property (nonatomic,assign)CGFloat ma10;
22 | @property (nonatomic,assign)CGFloat ma20;
23 | @property (nonatomic,assign)CGFloat preClosePx;
24 | @property (nonatomic,strong)NSString * rate;
25 |
26 | @end
27 |
28 |
29 | @interface YKTimeLineEntity : NSObject
30 | @property (nonatomic,strong)NSString * currtTime;
31 | @property (nonatomic,assign)CGFloat preClosePx;
32 | @property (nonatomic,assign)CGFloat avgPirce;
33 | @property (nonatomic,assign)CGFloat lastPirce;
34 | @property (nonatomic,assign)CGFloat totalVolume;
35 | @property (nonatomic,assign)CGFloat volume;
36 | @property (nonatomic,assign)CGFloat trade;
37 | @property (nonatomic,strong)NSString * rate;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/MYLStockDemo/KTimeView/YKLineEntity.m:
--------------------------------------------------------------------------------
1 | //
2 | // YKLineEntity.m
3 | // YKLineChartView
4 | //
5 | // Created by chenyk on 15/12/9.
6 | // Copyright © 2015年 chenyk. All rights reserved.
7 | // https://github.com/chenyk0317/YKLineChartView
8 |
9 | #import "YKLineEntity.h"
10 |
11 | @implementation YKLineEntity
12 |
13 | @end
14 |
15 | @implementation YKTimeLineEntity
16 |
17 |
18 |
19 | @end
--------------------------------------------------------------------------------
/MYLStockDemo/KTimeView/YKTimeLineView.h:
--------------------------------------------------------------------------------
1 | //
2 | // YKTimeLineView.h
3 | // YKLineChartView
4 | //
5 | // Created by chenyk on 15/12/10.
6 | // Copyright © 2015年 chenyk. All rights reserved.
7 | // https://github.com/chenyk0317/YKLineChartView
8 |
9 | #import "YKLineChartViewBase.h"
10 | #import "YKLineDataSet.h"
11 |
12 | @interface YKTimeLineView : YKLineChartViewBase
13 |
14 |
15 | @property (nonatomic,assign)CGFloat offsetMaxPrice;
16 | @property (nonatomic,assign)NSInteger countOfTimes;
17 |
18 | @property (nonatomic,assign)BOOL endPointShowEnabled;
19 | @property (nonatomic,assign)BOOL isDrawAvgEnabled;
20 | @property (nonatomic,assign)BOOL isShowHorScreen;
21 |
22 |
23 | - (void)setupData:(YKTimeDataset *)dataSet;
24 | @end
25 |
--------------------------------------------------------------------------------
/MYLStockDemo/KTimeView/YKViewBase.h:
--------------------------------------------------------------------------------
1 | //
2 | // YKViewBase.h
3 | // YKLineChartView
4 | //
5 | // Created by chenyk on 15/12/10.
6 | // Copyright © 2015年 chenyk. All rights reserved.
7 | // https://github.com/chenyk0317/YKLineChartView
8 |
9 | #import
10 | /**
11 | * @author LiuK, 16-05-16 17:05:55
12 | *
13 | * 1、修复view在autolayout下计算Frame的BUG
14 | */
15 | @interface YKViewBase : UIView
16 | @property (nonatomic,assign) CGRect contentRect;
17 | @property (nonatomic,assign) CGFloat chartHeight;
18 | @property (nonatomic,assign) CGFloat chartWidth;
19 |
20 |
21 |
22 |
23 | - (void)setupChartOffsetWithLeft:(CGFloat)left
24 | top:(CGFloat)top
25 | right:(CGFloat)right
26 | bottom:(CGFloat)bottom;
27 |
28 | - (void)notifyDataSetChanged;
29 |
30 | - (void)notifyDeviceOrientationChanged;
31 | - (BOOL)isInBoundsX:(CGFloat)x;
32 |
33 | - (BOOL)isInBoundsY:(CGFloat)y;
34 |
35 | - (BOOL)isInBoundsX:(CGFloat)x
36 | y:(CGFloat)y;
37 |
38 | - (BOOL)isInBoundsLeft:(CGFloat)x;
39 | - (BOOL)isInBoundsRight:(CGFloat)x;
40 |
41 | - (BOOL)isInBoundsTop:(CGFloat)y;
42 |
43 | - (BOOL)isInBoundsBottom:(CGFloat)y;
44 |
45 | - (CGFloat)contentTop;
46 | - (CGFloat)contentLeft;
47 | - (CGFloat)contentRight;
48 | - (CGFloat)contentBottom;
49 | - (CGFloat)contentWidth;
50 | - (CGFloat)contentHeight;
51 | @end
52 |
--------------------------------------------------------------------------------
/MYLStockDemo/KTimeView/detail.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | detailData
6 |
7 | code
8 | 200
9 | msg
10 | everytrade ok
11 | result
12 |
13 |
14 | price
15 | 496.58
16 | time
17 | 14:59:59
18 | tradeNum
19 | 3
20 | type
21 | E
22 |
23 |
24 | price
25 | 496.60
26 | time
27 | 14:59:56
28 | tradeNum
29 | 1
30 | type
31 | E
32 |
33 |
34 | price
35 | 496.20
36 | time
37 | 14:59:53
38 | tradeNum
39 | 15
40 | type
41 | S
42 |
43 |
44 | price
45 | 496.50
46 | time
47 | 14:59:50
48 | tradeNum
49 | 5
50 | type
51 | S
52 |
53 |
54 | price
55 | 496.50
56 | time
57 | 14:59:47
58 | tradeNum
59 | 2
60 | type
61 | S
62 |
63 |
64 | price
65 | 496.79
66 | time
67 | 14:59:44
68 | tradeNum
69 | 3
70 | type
71 | B
72 |
73 |
74 | price
75 | 496.42
76 | time
77 | 14:59:41
78 | tradeNum
79 | 17
80 | type
81 | S
82 |
83 |
84 | price
85 | 496.47
86 | time
87 | 14:59:38
88 | tradeNum
89 | 5
90 | type
91 | S
92 |
93 |
94 | price
95 | 496.50
96 | time
97 | 14:59:35
98 | tradeNum
99 | 1
100 | type
101 | B
102 |
103 |
104 | price
105 | 496.66
106 | time
107 | 14:59:32
108 | tradeNum
109 | 2
110 | type
111 | B
112 |
113 |
114 |
115 |
116 |
117 |
--------------------------------------------------------------------------------
/MYLStockDemo/PrefixHeader.pch:
--------------------------------------------------------------------------------
1 | //
2 | // PrefixHeader.pch
3 | // MYLStockDemo
4 | //
5 | // Created by myl on 2017/8/8.
6 | // Copyright © 2017年 myl. All rights reserved.
7 | //
8 |
9 | #ifndef PrefixHeader_pch
10 | #define PrefixHeader_pch
11 |
12 | // Include any system framework and library headers here that should be included in all compilation units.
13 | // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
14 |
15 | #endif /* PrefixHeader_pch */
16 |
17 | #import "PublicDefine.h"
18 |
--------------------------------------------------------------------------------
/MYLStockDemo/PublicDefine.h:
--------------------------------------------------------------------------------
1 | //
2 | // PublicDefine.h
3 | // HXCamouflageCalculator
4 | //
5 | // Created by 黄轩 on 16/10/17.
6 | // Copyright © 2016年 黄轩. All rights reserved.
7 | //
8 |
9 | #ifndef PublicDefine_h
10 | #define PublicDefine_h
11 |
12 | #import
13 | #import "Common.h"
14 | #import "StockDataModel.h"
15 | #import "YKLineChart.h"
16 | #import "MJExtension.h"
17 | #import "SDAutoLayout.h"
18 | #import "MJRefresh.h"
19 | #import "WYUser.h"
20 | #define WEAKSELF(weakSelf) __weak __typeof(&*self)weakSelf = self;
21 |
22 | #define STOCK_NUM @"600004"
23 |
24 | //返回安全的字符串
25 | #define kSafeString(str) str.length > 0 ? str : @""
26 |
27 | //状态栏高度
28 | #define STATUS_BAR_HEIGHT 20
29 | //NavBar高度
30 | #define NAVIGATION_BAR_HEIGHT 44
31 | //状态栏 + 导航栏 高度
32 | #define STATUS_AND_NAVIGATION_HEIGHT ((STATUS_BAR_HEIGHT) + (NAVIGATION_BAR_HEIGHT))
33 |
34 | //屏幕 rect
35 | #define SCREEN_RECT ([UIScreen mainScreen].bounds)
36 |
37 | #define CONTENT_HEIGHT (kScreenHeight - NAVIGATION_BAR_HEIGHT - STATUS_BAR_HEIGHT)
38 |
39 | #define WH_SCALE(a) [Common setWidth:a]
40 |
41 | //屏幕分辨率
42 | #define SCREEN_RESOLUTION (kScreenWidth * kScreenHeight * ([UIScreen mainScreen].scale))
43 |
44 | #define kScreenWidth ([UIScreen mainScreen].bounds.size.width)
45 | #define kScreenHeight ([[UIScreen mainScreen] bounds].size.height)
46 |
47 | #define UIColorFromHexA(hexValue, a) [UIColor colorWithRed:(((hexValue & 0xFF0000) >> 16))/255.0f green:(((hexValue & 0xFF00) >> 8))/255.0f blue:((hexValue & 0xFF))/255.0f alpha:a]
48 | #define UIColorFromHex(hexValue) UIColorFromHexA(hexValue, 1.0f)
49 |
50 | #define Color_FromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
51 |
52 | #define Color(r,g,b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1.0]
53 |
54 | //NSUserDefaults
55 | #define DefaultsObjectAndKey(object,key) [[NSUserDefaults standardUserDefaults] setObject:object forKey:key]
56 | #define Defaults_ObjectKey(key) [[NSUserDefaults standardUserDefaults] objectForKey:key]
57 | #define DefaultsRemoveKey(key) [[NSUserDefaults standardUserDefaults] removeObjectForKey:key]
58 | #define DefaultSynchronize [[NSUserDefaults standardUserDefaults] synchronize]
59 |
60 | // Image
61 | #define WYIMAGE(bundleResourceName) [UIImage imageNamed:(bundleResourceName)]
62 |
63 | // Font
64 | #define WYFONT_NAMED(fontName, fontSize) [UIFont fontWithName:fontName size:fontSize]
65 | #define WYFONT_SIZED(fontSize) [UIFont systemFontOfSize:fontSize*(kScreenWidth / 375)]
66 | #define WYFONT_BOLD_SIZE(fontSize) [UIFont boldSystemFontOfSize:fontSize*(kScreenWidth / 375)]
67 |
68 |
69 |
70 | #define kCustomRedColor Color_FromRGB(0xe43337)
71 |
72 | #define kCustomBlueColor Color_FromRGB(0x58ca69)
73 |
74 | #define kCustomBlackColor Color_FromRGB(0x333333)
75 |
76 |
77 |
78 | #endif /* PublicDefine_h */
79 |
--------------------------------------------------------------------------------
/MYLStockDemo/StockChatCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // StockChatCell.h
3 | // MYLStockDemo
4 | //
5 | // Created by myl on 2017/8/8.
6 | // Copyright © 2017年 myl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface StockChatCell : UITableViewCell
12 |
13 | @property (nonatomic ,assign)NSInteger selecIndex;//topbar的索引
14 |
15 | @property (nonatomic, strong)NSMutableArray *kIineDataArr;
16 |
17 | @property (nonatomic, strong)StockDataModel *stock;
18 |
19 | @property (nonatomic, assign)BOOL isHaveFigFive;//是否需要五档图
20 |
21 | //添加数据
22 | - (void)addDataWithKIineDataArr:(NSMutableArray *)kIineDataArr;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/MYLStockDemo/StockDataModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // MIDataModel.h
3 | // MIKLine
4 | //
5 | // Created by maia on 16/9/9.
6 | // Copyright © 2016年 Maia. All rights reserved.
7 | //
8 |
9 | #import
10 | enum StockType{
11 | StockTypeHS = 0, // 深沪
12 | StockTypeHK = 1, // 港股
13 | };
14 | @interface StockDataModel : NSObject
15 |
16 | //--------阿里云----------
17 | @property (nonatomic,strong)NSArray * pricesell;//卖盘价1、2、3、4、5
18 | @property (nonatomic,strong)NSArray * volsell;//卖盘量1、2、3、4、5
19 | @property (nonatomic,strong)NSArray * pricebuy;//买盘价1、2、3、4、5.
20 | @property (nonatomic,strong)NSArray * volbuy;//买盘量1、2、3、4、5
21 | @property (nonatomic,strong)NSMutableArray *timeDetailArr;//明细数组
22 |
23 |
24 | @property (nonatomic,strong)NSString *todayMax;//今日最高价
25 | @property (nonatomic,strong)NSString *highLimit;//涨停价
26 | @property (nonatomic,strong)NSString *buy5_n;//买五
27 | @property (nonatomic,strong)NSString *buy2_n;//买二
28 | @property (nonatomic,strong)NSString *tradeNum;//成交量(股,不是手)
29 | @property (nonatomic,strong)NSString *buy2_m;//买二报价
30 | @property (nonatomic,strong)NSString *buy5_m;//买五报价
31 | @property (nonatomic,strong)NSString *currcapital;
32 | @property (nonatomic,strong)NSString *sell3_m;//卖三报价
33 | @property (nonatomic,strong)NSString *openPrice;//今日开盘价
34 | @property (nonatomic,strong)NSString *buy3_m;//买三报价
35 | @property (nonatomic,strong)NSString *buy4_m;//买四报价
36 | @property (nonatomic,strong)NSString *circulation_value;//流通市值,亿元
37 | @property (nonatomic,strong)NSString *buy4_n;//买四
38 | @property (nonatomic,strong)NSString *date;//日期
39 | @property (nonatomic,strong)NSString *sell5_n;//卖五
40 | @property (nonatomic,strong)NSString *buy3_n;//买三
41 | @property (nonatomic,strong)NSString *all_value;//总市值,亿元
42 | @property (nonatomic,strong)NSString *sell5_m;//卖五报价
43 | @property (nonatomic,strong)NSString *time;//刷新时间
44 | @property (nonatomic,strong)NSString *turnover;//换手率
45 | @property (nonatomic,strong)NSString *sell3_n;//卖三
46 | @property (nonatomic,strong)NSString *name;//上证指数
47 | @property (nonatomic,strong)NSString *sell4_n;//卖四
48 | @property (nonatomic,strong)NSString *downLimit;//跌停价
49 | @property (nonatomic,strong)NSString *sell4_m;//卖四报价
50 | @property (nonatomic,strong)NSString *tradeAmount;//成交金额(元)
51 | @property (nonatomic,strong)NSString *swing;//振幅
52 | @property (nonatomic,strong)NSString *totalcapital;//总股本,万股
53 | @property (nonatomic,strong)NSString *diff_rate;//涨跌幅度
54 | @property (nonatomic,strong)NSString *yestodayClosePrice;//昨日收盘价
55 | @property (nonatomic,strong)NSString *sell1_n;//卖一
56 | @property (nonatomic,strong)NSString *todayMin;//今日最低价
57 | @property (nonatomic,strong)NSString *sell1_m;//卖一报价
58 | @property (nonatomic,strong)NSString *max52;//52周最高价
59 | @property (nonatomic,strong)NSString *diff_money;//涨跌金额
60 | @property (nonatomic,strong)NSString *code;//sh000001
61 | @property (nonatomic,strong)NSString *nowPrice;//当前价
62 | @property (nonatomic,strong)NSString *nowprice;//自选 当前价
63 | @property (nonatomic,strong)NSString *sell2_m;//卖二
64 | @property (nonatomic,strong)NSString *min52;//52周最低价
65 | @property (nonatomic,strong)NSString *sell2_n;//卖二
66 | @property (nonatomic,strong)NSString *buy1_m;//买一报价(金额,元)
67 | @property (nonatomic,strong)NSString *pe;//市盈率(TTM,动态)
68 | @property (nonatomic,strong)NSString *buy1_n;//买一数量(股)
69 | @property (nonatomic,strong)NSString *market;
70 | @property (nonatomic,strong)NSString *pb;//市净率
71 | @property (nonatomic,strong)NSString *remark;//市净率
72 |
73 | @end
74 |
--------------------------------------------------------------------------------
/MYLStockDemo/StockDataModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // MIDataModel.m
3 | // MIKLine
4 | //
5 | // Created by maia on 16/9/9.
6 | // Copyright © 2016年 Maia. All rights reserved.
7 | //
8 |
9 | #import "StockDataModel.h"
10 |
11 | @implementation StockDataModel
12 |
13 |
14 |
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/MYLStockDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // MYLStockDemo
4 | //
5 | // Created by myl on 2017/8/8.
6 | // Copyright © 2017年 myl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/MYLStockDemo/WYFigureFiveView.h:
--------------------------------------------------------------------------------
1 | //
2 | // WYFigureFiveView.h
3 | // WYStock
4 | //
5 | // Created by myl on 2017/5/16.
6 | // Copyright © 2017年 myl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface WYFigureFiveView : UIView
12 |
13 | @property (nonatomic,strong)StockDataModel *stock;
14 |
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/MYLStockDemo/WYHorScreenView.h:
--------------------------------------------------------------------------------
1 | //
2 | // WYHorScreenView.h
3 | // WYStock
4 | //
5 | // Created by myl on 2017/5/11.
6 | // Copyright © 2017年 myl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface WYHorScreenView : UIView
12 |
13 | @property (nonatomic,strong)StockDataModel *stock;
14 |
15 | @property (nonatomic, assign)BOOL isHaveFigFive;//是否显示五挡图
16 |
17 | - (id)initWithFrame:(CGRect)frame SelecIndex:(NSInteger)selectIndex;
18 |
19 | - (void)getDataWithSelectIndex:(NSInteger)selectIndex;
20 | @end
21 |
--------------------------------------------------------------------------------
/MYLStockDemo/WYStockTopBarView.h:
--------------------------------------------------------------------------------
1 | //
2 | // WYStockTopBarView.h
3 | // WYStock
4 | //
5 | // Created by myl on 2017/4/14.
6 | // Copyright © 2017年 myl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface WYStockTopBarView : UIView
12 |
13 | typedef void(^block)(NSInteger index);
14 |
15 | @property (nonatomic ,strong)block clickBlock;
16 | @property (nonatomic ,assign)NSInteger lastTag;
17 |
18 | - (instancetype)initWithFrame:(CGRect)frame SelecIndex:(NSInteger)selectIndex titleArr:(NSArray*)titleArr;
19 |
20 | - (void)selectClick:(block)block;
21 |
22 | - (void)btnClick:(UIButton*)sender;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/MYLStockDemo/WYStockTopBarView.m:
--------------------------------------------------------------------------------
1 | //
2 | // WYStockTopBarView.m
3 | // WYStock
4 | //
5 | // Created by myl on 2017/4/14.
6 | // Copyright © 2017年 myl. All rights reserved.
7 | //
8 |
9 | #import "WYStockTopBarView.h"
10 |
11 | #define LINE_TAG 47854
12 | #define BTN_TAG 4785474
13 | @implementation WYStockTopBarView
14 |
15 |
16 | - (instancetype)initWithFrame:(CGRect)frame SelecIndex:(NSInteger)selectIndex titleArr:(NSArray*)titleArr{
17 |
18 | self = [super initWithFrame:frame];
19 |
20 | if (self) {
21 |
22 | self.backgroundColor = [UIColor whiteColor];
23 |
24 | UIView *bgView = [[UIView alloc]init];
25 | bgView.backgroundColor = [UIColor clearColor];
26 | [self addSubview:bgView];
27 |
28 |
29 | NSMutableArray *temp = [[NSMutableArray alloc]init];
30 |
31 | for (int i = 0; i
10 |
11 | @interface WYUser : NSObject
12 |
13 | //--------------------------------------
14 | /*
15 | 记录用户个人信息的单例类
16 | */
17 |
18 |
19 | /*
20 | 记录从变横屏前面是,五档还是明细,让横屏展示的跟竖屏统一 0 五档 1 明细
21 | */
22 | @property (nonatomic, assign)NSInteger fiveType;
23 |
24 | + (instancetype)sharedInstance;
25 |
26 |
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/MYLStockDemo/WYUser.m:
--------------------------------------------------------------------------------
1 | //
2 | // WYUser.m
3 | // WYStock
4 | //
5 | // Created by myl on 2017/5/26.
6 | // Copyright © 2017年 myl. All rights reserved.
7 | //
8 |
9 | #import "WYUser.h"
10 |
11 | @implementation WYUser
12 |
13 |
14 | + (instancetype)sharedInstance {
15 | static id instance;
16 | static dispatch_once_t onceToken;
17 | dispatch_once(&onceToken, ^{
18 | instance = [[self alloc] init];
19 |
20 | });
21 | return instance;
22 | }
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/MYLStockDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // MYLStockDemo
4 | //
5 | // Created by myl on 2017/8/8.
6 | // Copyright © 2017年 myl. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/MYLStockDemoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/MYLStockDemoTests/MYLStockDemoTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // MYLStockDemoTests.m
3 | // MYLStockDemoTests
4 | //
5 | // Created by myl on 2017/8/8.
6 | // Copyright © 2017年 myl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MYLStockDemoTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation MYLStockDemoTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/MYLStockDemoUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/MYLStockDemoUITests/MYLStockDemoUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // MYLStockDemoUITests.m
3 | // MYLStockDemoUITests
4 | //
5 | // Created by myl on 2017/8/8.
6 | // Copyright © 2017年 myl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MYLStockDemoUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation MYLStockDemoUITests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 |
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 |
22 | // In UI tests it is usually best to stop immediately when a failure occurs.
23 | self.continueAfterFailure = NO;
24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
25 | [[[XCUIApplication alloc] init] launch];
26 |
27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
28 | }
29 |
30 | - (void)tearDown {
31 | // Put teardown code here. This method is called after the invocation of each test method in the class.
32 | [super tearDown];
33 | }
34 |
35 | - (void)testExample {
36 | // Use recording to get started writing UI tests.
37 | // Use XCTAssert and related functions to verify your tests produce the correct results.
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, ‘8.0’
2 |
3 | target 'MYLStockDemo' do
4 |
5 | pod 'SDAutoLayout','~> 2.1.7'
6 | pod 'Masonry'
7 | pod 'MJExtension'
8 | pod 'MJRefresh'
9 | end
10 |
--------------------------------------------------------------------------------
/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Masonry (1.0.2)
3 | - MJExtension (3.0.13)
4 | - MJRefresh (3.1.12)
5 | - SDAutoLayout (2.1.7)
6 |
7 | DEPENDENCIES:
8 | - Masonry
9 | - MJExtension
10 | - MJRefresh
11 | - SDAutoLayout (~> 2.1.7)
12 |
13 | SPEC CHECKSUMS:
14 | Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e
15 | MJExtension: 5932755f451458eefa24239358817f8d291240c7
16 | MJRefresh: b96cdb21c4aa75a7b07654311ab2f315c497e806
17 | SDAutoLayout: e9b36d04b8c0b504762a04d76fbbe5108944297a
18 |
19 | PODFILE CHECKSUM: 2c979bdad7986e428dd7f79456f459fee7eca375
20 |
21 | COCOAPODS: 1.2.1.rc.1
22 |
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJExtension/MJExtension.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/MJExtension.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJExtension/MJExtensionConst.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/MJExtensionConst.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJExtension/MJFoundation.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/MJFoundation.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJExtension/MJProperty.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/MJProperty.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJExtension/MJPropertyKey.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/MJPropertyKey.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJExtension/MJPropertyType.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/MJPropertyType.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJExtension/NSObject+MJClass.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/NSObject+MJClass.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJExtension/NSObject+MJCoding.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/NSObject+MJCoding.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJExtension/NSObject+MJKeyValue.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/NSObject+MJKeyValue.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJExtension/NSObject+MJProperty.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/NSObject+MJProperty.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJExtension/NSString+MJExtension.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/NSString+MJExtension.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/MJRefresh.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/MJRefresh.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/MJRefreshAutoFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Base/MJRefreshAutoFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/MJRefreshAutoGifFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/MJRefreshAutoNormalFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/MJRefreshAutoStateFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/MJRefreshBackFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Base/MJRefreshBackFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/MJRefreshBackGifFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/MJRefreshBackNormalFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/MJRefreshBackStateFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/MJRefreshComponent.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Base/MJRefreshComponent.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/MJRefreshConst.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/MJRefreshConst.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/MJRefreshFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Base/MJRefreshFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/MJRefreshGifHeader.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Header/MJRefreshGifHeader.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/MJRefreshHeader.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Base/MJRefreshHeader.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/MJRefreshNormalHeader.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Header/MJRefreshNormalHeader.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/MJRefreshStateHeader.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Header/MJRefreshStateHeader.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/NSBundle+MJRefresh.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/NSBundle+MJRefresh.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/UIScrollView+MJExtension.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/UIScrollView+MJExtension.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/UIScrollView+MJRefresh.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/UIScrollView+MJRefresh.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/MJRefresh/UIView+MJExtension.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/UIView+MJExtension.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASCompositeConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASCompositeConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASConstraint+Private.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraint+Private.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASConstraintMaker.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraintMaker.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASLayoutConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASLayoutConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASUtilities.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASUtilities.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASViewAttribute.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASViewAttribute.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASViewConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASViewConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/Masonry.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/Masonry.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/NSArray+MASAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/NSArray+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/NSLayoutConstraint+MASDebugAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/View+MASAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/View+MASAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/View+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/ViewController+MASAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDAutoLayout/SDAutoLayout.h:
--------------------------------------------------------------------------------
1 | ../../../SDAutoLayout/SDAutoLayoutDemo/SDAutoLayout/SDAutoLayout.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDAutoLayout/UITableView+SDAutoTableViewCellHeight.h:
--------------------------------------------------------------------------------
1 | ../../../SDAutoLayout/SDAutoLayoutDemo/SDAutoLayout/UITableView+SDAutoTableViewCellHeight.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDAutoLayout/UIView+SDAutoLayout.h:
--------------------------------------------------------------------------------
1 | ../../../SDAutoLayout/SDAutoLayoutDemo/SDAutoLayout/UIView+SDAutoLayout.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJExtension/MJExtension.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/MJExtension.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJExtension/MJExtensionConst.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/MJExtensionConst.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJExtension/MJFoundation.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/MJFoundation.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJExtension/MJProperty.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/MJProperty.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJExtension/MJPropertyKey.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/MJPropertyKey.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJExtension/MJPropertyType.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/MJPropertyType.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJExtension/NSObject+MJClass.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/NSObject+MJClass.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJExtension/NSObject+MJCoding.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/NSObject+MJCoding.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJExtension/NSObject+MJKeyValue.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/NSObject+MJKeyValue.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJExtension/NSObject+MJProperty.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/NSObject+MJProperty.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJExtension/NSString+MJExtension.h:
--------------------------------------------------------------------------------
1 | ../../../MJExtension/MJExtension/NSString+MJExtension.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/MJRefresh.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/MJRefresh.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/MJRefreshAutoFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Base/MJRefreshAutoFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/MJRefreshAutoGifFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/MJRefreshAutoNormalFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/MJRefreshAutoStateFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/MJRefreshBackFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Base/MJRefreshBackFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/MJRefreshBackGifFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/MJRefreshBackNormalFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/MJRefreshBackStateFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/MJRefreshComponent.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Base/MJRefreshComponent.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/MJRefreshConst.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/MJRefreshConst.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/MJRefreshFooter.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Base/MJRefreshFooter.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/MJRefreshGifHeader.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Header/MJRefreshGifHeader.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/MJRefreshHeader.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Base/MJRefreshHeader.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/MJRefreshNormalHeader.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Header/MJRefreshNormalHeader.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/MJRefreshStateHeader.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/Custom/Header/MJRefreshStateHeader.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/NSBundle+MJRefresh.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/NSBundle+MJRefresh.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/UIScrollView+MJExtension.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/UIScrollView+MJExtension.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/UIScrollView+MJRefresh.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/UIScrollView+MJRefresh.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MJRefresh/UIView+MJExtension.h:
--------------------------------------------------------------------------------
1 | ../../../MJRefresh/MJRefresh/UIView+MJExtension.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASCompositeConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASCompositeConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASConstraint+Private.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraint+Private.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASConstraintMaker.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraintMaker.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASLayoutConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASLayoutConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASUtilities.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASUtilities.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASViewAttribute.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASViewAttribute.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASViewConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASViewConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/Masonry.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/Masonry.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/NSArray+MASAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/NSArray+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/NSLayoutConstraint+MASDebugAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/View+MASAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/View+MASAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/View+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/ViewController+MASAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDAutoLayout/SDAutoLayout.h:
--------------------------------------------------------------------------------
1 | ../../../SDAutoLayout/SDAutoLayoutDemo/SDAutoLayout/SDAutoLayout.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDAutoLayout/UITableView+SDAutoTableViewCellHeight.h:
--------------------------------------------------------------------------------
1 | ../../../SDAutoLayout/SDAutoLayoutDemo/SDAutoLayout/UITableView+SDAutoTableViewCellHeight.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDAutoLayout/UIView+SDAutoLayout.h:
--------------------------------------------------------------------------------
1 | ../../../SDAutoLayout/SDAutoLayoutDemo/SDAutoLayout/UIView+SDAutoLayout.h
--------------------------------------------------------------------------------
/Pods/MJExtension/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013-2015 MJExtension (https://github.com/CoderMJLee/MJExtension)
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/MJExtension/MJExtension/MJExtension.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJExtension.h
3 | // MJExtension
4 | //
5 | // Created by mj on 14-1-15.
6 | // Copyright (c) 2014年 小码哥. All rights reserved.
7 | // 代码地址:https://github.com/CoderMJLee/MJExtension
8 | // 代码地址:http://code4app.com/ios/%E5%AD%97%E5%85%B8-JSON-%E4%B8%8E%E6%A8%A1%E5%9E%8B%E7%9A%84%E8%BD%AC%E6%8D%A2/5339992a933bf062608b4c57
9 |
10 | #import "NSObject+MJCoding.h"
11 | #import "NSObject+MJProperty.h"
12 | #import "NSObject+MJClass.h"
13 | #import "NSObject+MJKeyValue.h"
14 | #import "NSString+MJExtension.h"
15 | #import "MJExtensionConst.h"
--------------------------------------------------------------------------------
/Pods/MJExtension/MJExtension/MJExtensionConst.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __MJExtensionConst__H__
3 | #define __MJExtensionConst__H__
4 |
5 | #import
6 |
7 | // 过期
8 | #define MJExtensionDeprecated(instead) NS_DEPRECATED(2_0, 2_0, 2_0, 2_0, instead)
9 |
10 | // 构建错误
11 | #define MJExtensionBuildError(clazz, msg) \
12 | NSError *error = [NSError errorWithDomain:msg code:250 userInfo:nil]; \
13 | [clazz setMj_error:error];
14 |
15 | // 日志输出
16 | #ifdef DEBUG
17 | #define MJExtensionLog(...) NSLog(__VA_ARGS__)
18 | #else
19 | #define MJExtensionLog(...)
20 | #endif
21 |
22 | /**
23 | * 断言
24 | * @param condition 条件
25 | * @param returnValue 返回值
26 | */
27 | #define MJExtensionAssertError(condition, returnValue, clazz, msg) \
28 | [clazz setMj_error:nil]; \
29 | if ((condition) == NO) { \
30 | MJExtensionBuildError(clazz, msg); \
31 | return returnValue;\
32 | }
33 |
34 | #define MJExtensionAssert2(condition, returnValue) \
35 | if ((condition) == NO) return returnValue;
36 |
37 | /**
38 | * 断言
39 | * @param condition 条件
40 | */
41 | #define MJExtensionAssert(condition) MJExtensionAssert2(condition, )
42 |
43 | /**
44 | * 断言
45 | * @param param 参数
46 | * @param returnValue 返回值
47 | */
48 | #define MJExtensionAssertParamNotNil2(param, returnValue) \
49 | MJExtensionAssert2((param) != nil, returnValue)
50 |
51 | /**
52 | * 断言
53 | * @param param 参数
54 | */
55 | #define MJExtensionAssertParamNotNil(param) MJExtensionAssertParamNotNil2(param, )
56 |
57 | /**
58 | * 打印所有的属性
59 | */
60 | #define MJLogAllIvars \
61 | -(NSString *)description \
62 | { \
63 | return [self mj_keyValues].description; \
64 | }
65 | #define MJExtensionLogAllProperties MJLogAllIvars
66 |
67 | /**
68 | * 类型(属性类型)
69 | */
70 | extern NSString *const MJPropertyTypeInt;
71 | extern NSString *const MJPropertyTypeShort;
72 | extern NSString *const MJPropertyTypeFloat;
73 | extern NSString *const MJPropertyTypeDouble;
74 | extern NSString *const MJPropertyTypeLong;
75 | extern NSString *const MJPropertyTypeLongLong;
76 | extern NSString *const MJPropertyTypeChar;
77 | extern NSString *const MJPropertyTypeBOOL1;
78 | extern NSString *const MJPropertyTypeBOOL2;
79 | extern NSString *const MJPropertyTypePointer;
80 |
81 | extern NSString *const MJPropertyTypeIvar;
82 | extern NSString *const MJPropertyTypeMethod;
83 | extern NSString *const MJPropertyTypeBlock;
84 | extern NSString *const MJPropertyTypeClass;
85 | extern NSString *const MJPropertyTypeSEL;
86 | extern NSString *const MJPropertyTypeId;
87 |
88 | #endif
--------------------------------------------------------------------------------
/Pods/MJExtension/MJExtension/MJExtensionConst.m:
--------------------------------------------------------------------------------
1 | #ifndef __MJExtensionConst__M__
2 | #define __MJExtensionConst__M__
3 |
4 | #import
5 |
6 | /**
7 | * 成员变量类型(属性类型)
8 | */
9 | NSString *const MJPropertyTypeInt = @"i";
10 | NSString *const MJPropertyTypeShort = @"s";
11 | NSString *const MJPropertyTypeFloat = @"f";
12 | NSString *const MJPropertyTypeDouble = @"d";
13 | NSString *const MJPropertyTypeLong = @"l";
14 | NSString *const MJPropertyTypeLongLong = @"q";
15 | NSString *const MJPropertyTypeChar = @"c";
16 | NSString *const MJPropertyTypeBOOL1 = @"c";
17 | NSString *const MJPropertyTypeBOOL2 = @"b";
18 | NSString *const MJPropertyTypePointer = @"*";
19 |
20 | NSString *const MJPropertyTypeIvar = @"^{objc_ivar=}";
21 | NSString *const MJPropertyTypeMethod = @"^{objc_method=}";
22 | NSString *const MJPropertyTypeBlock = @"@?";
23 | NSString *const MJPropertyTypeClass = @"#";
24 | NSString *const MJPropertyTypeSEL = @":";
25 | NSString *const MJPropertyTypeId = @"@";
26 |
27 | #endif
--------------------------------------------------------------------------------
/Pods/MJExtension/MJExtension/MJFoundation.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJFoundation.h
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 14/7/16.
6 | // Copyright (c) 2014年 小码哥. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MJFoundation : NSObject
12 | + (BOOL)isClassFromFoundation:(Class)c;
13 | @end
14 |
--------------------------------------------------------------------------------
/Pods/MJExtension/MJExtension/MJFoundation.m:
--------------------------------------------------------------------------------
1 | //
2 | // MJFoundation.m
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 14/7/16.
6 | // Copyright (c) 2014年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJFoundation.h"
10 | #import "MJExtensionConst.h"
11 | #import
12 |
13 | static NSSet *foundationClasses_;
14 |
15 | @implementation MJFoundation
16 |
17 | + (NSSet *)foundationClasses
18 | {
19 | if (foundationClasses_ == nil) {
20 | // 集合中没有NSObject,因为几乎所有的类都是继承自NSObject,具体是不是NSObject需要特殊判断
21 | foundationClasses_ = [NSSet setWithObjects:
22 | [NSURL class],
23 | [NSDate class],
24 | [NSValue class],
25 | [NSData class],
26 | [NSError class],
27 | [NSArray class],
28 | [NSDictionary class],
29 | [NSString class],
30 | [NSAttributedString class], nil];
31 | }
32 | return foundationClasses_;
33 | }
34 |
35 | + (BOOL)isClassFromFoundation:(Class)c
36 | {
37 | if (c == [NSObject class] || c == [NSManagedObject class]) return YES;
38 |
39 | __block BOOL result = NO;
40 | [[self foundationClasses] enumerateObjectsUsingBlock:^(Class foundationClass, BOOL *stop) {
41 | if ([c isSubclassOfClass:foundationClass]) {
42 | result = YES;
43 | *stop = YES;
44 | }
45 | }];
46 | return result;
47 | }
48 | @end
49 |
--------------------------------------------------------------------------------
/Pods/MJExtension/MJExtension/MJProperty.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJProperty.h
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 15/4/17.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | // 包装一个成员属性
8 |
9 | #import
10 | #import
11 | #import "MJPropertyType.h"
12 | #import "MJPropertyKey.h"
13 |
14 | /**
15 | * 包装一个成员
16 | */
17 | @interface MJProperty : NSObject
18 | /** 成员属性 */
19 | @property (nonatomic, assign) objc_property_t property;
20 | /** 成员属性的名字 */
21 | @property (nonatomic, readonly) NSString *name;
22 |
23 | /** 成员属性的类型 */
24 | @property (nonatomic, readonly) MJPropertyType *type;
25 | /** 成员属性来源于哪个类(可能是父类) */
26 | @property (nonatomic, assign) Class srcClass;
27 |
28 | /**** 同一个成员属性 - 父类和子类的行为可能不一致(originKey、propertyKeys、objectClassInArray) ****/
29 | /** 设置最原始的key */
30 | - (void)setOriginKey:(id)originKey forClass:(Class)c;
31 | /** 对应着字典中的多级key(里面存放的数组,数组里面都是MJPropertyKey对象) */
32 | - (NSArray *)propertyKeysForClass:(Class)c;
33 |
34 | /** 模型数组中的模型类型 */
35 | - (void)setObjectClassInArray:(Class)objectClass forClass:(Class)c;
36 | - (Class)objectClassInArrayForClass:(Class)c;
37 | /**** 同一个成员变量 - 父类和子类的行为可能不一致(key、keys、objectClassInArray) ****/
38 |
39 | /**
40 | * 设置object的成员变量值
41 | */
42 | - (void)setValue:(id)value forObject:(id)object;
43 | /**
44 | * 得到object的成员属性值
45 | */
46 | - (id)valueForObject:(id)object;
47 |
48 | /**
49 | * 初始化
50 | */
51 | + (instancetype)cachedPropertyWithProperty:(objc_property_t)property;
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/Pods/MJExtension/MJExtension/MJPropertyKey.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJPropertyKey.h
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 15/8/11.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef enum {
12 | MJPropertyKeyTypeDictionary = 0, // 字典的key
13 | MJPropertyKeyTypeArray // 数组的key
14 | } MJPropertyKeyType;
15 |
16 | /**
17 | * 属性的key
18 | */
19 | @interface MJPropertyKey : NSObject
20 | /** key的名字 */
21 | @property (copy, nonatomic) NSString *name;
22 | /** key的种类,可能是@"10",可能是@"age" */
23 | @property (assign, nonatomic) MJPropertyKeyType type;
24 |
25 | /**
26 | * 根据当前的key,也就是name,从object(字典或者数组)中取值
27 | */
28 | - (id)valueInObject:(id)object;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Pods/MJExtension/MJExtension/MJPropertyKey.m:
--------------------------------------------------------------------------------
1 | //
2 | // MJPropertyKey.m
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 15/8/11.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJPropertyKey.h"
10 |
11 | @implementation MJPropertyKey
12 |
13 | - (id)valueInObject:(id)object
14 | {
15 | if ([object isKindOfClass:[NSDictionary class]] && self.type == MJPropertyKeyTypeDictionary) {
16 | return object[self.name];
17 | } else if ([object isKindOfClass:[NSArray class]] && self.type == MJPropertyKeyTypeArray) {
18 | NSArray *array = object;
19 | NSUInteger index = self.name.intValue;
20 | if (index < array.count) return array[index];
21 | return nil;
22 | }
23 | return nil;
24 | }
25 | @end
26 |
--------------------------------------------------------------------------------
/Pods/MJExtension/MJExtension/MJPropertyType.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJPropertyType.h
3 | // MJExtension
4 | //
5 | // Created by mj on 14-1-15.
6 | // Copyright (c) 2014年 小码哥. All rights reserved.
7 | // 包装一种类型
8 |
9 | #import
10 |
11 | /**
12 | * 包装一种类型
13 | */
14 | @interface MJPropertyType : NSObject
15 | /** 类型标识符 */
16 | @property (nonatomic, copy) NSString *code;
17 |
18 | /** 是否为id类型 */
19 | @property (nonatomic, readonly, getter=isIdType) BOOL idType;
20 |
21 | /** 是否为基本数字类型:int、float等 */
22 | @property (nonatomic, readonly, getter=isNumberType) BOOL numberType;
23 |
24 | /** 是否为BOOL类型 */
25 | @property (nonatomic, readonly, getter=isBoolType) BOOL boolType;
26 |
27 | /** 对象类型(如果是基本数据类型,此值为nil) */
28 | @property (nonatomic, readonly) Class typeClass;
29 |
30 | /** 类型是否来自于Foundation框架,比如NSString、NSArray */
31 | @property (nonatomic, readonly, getter = isFromFoundation) BOOL fromFoundation;
32 | /** 类型是否不支持KVC */
33 | @property (nonatomic, readonly, getter = isKVCDisabled) BOOL KVCDisabled;
34 |
35 | /**
36 | * 获得缓存的类型对象
37 | */
38 | + (instancetype)cachedTypeWithCode:(NSString *)code;
39 | @end
--------------------------------------------------------------------------------
/Pods/MJExtension/MJExtension/MJPropertyType.m:
--------------------------------------------------------------------------------
1 | //
2 | // MJPropertyType.m
3 | // MJExtension
4 | //
5 | // Created by mj on 14-1-15.
6 | // Copyright (c) 2014年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJPropertyType.h"
10 | #import "MJExtension.h"
11 | #import "MJFoundation.h"
12 | #import "MJExtensionConst.h"
13 |
14 | @implementation MJPropertyType
15 |
16 | static NSMutableDictionary *types_;
17 | + (void)initialize
18 | {
19 | types_ = [NSMutableDictionary dictionary];
20 | }
21 |
22 | + (instancetype)cachedTypeWithCode:(NSString *)code
23 | {
24 | MJExtensionAssertParamNotNil2(code, nil);
25 | @synchronized (self) {
26 | MJPropertyType *type = types_[code];
27 | if (type == nil) {
28 | type = [[self alloc] init];
29 | type.code = code;
30 | types_[code] = type;
31 | }
32 | return type;
33 | }
34 | }
35 |
36 | #pragma mark - 公共方法
37 | - (void)setCode:(NSString *)code
38 | {
39 | _code = code;
40 |
41 | MJExtensionAssertParamNotNil(code);
42 |
43 | if ([code isEqualToString:MJPropertyTypeId]) {
44 | _idType = YES;
45 | } else if (code.length == 0) {
46 | _KVCDisabled = YES;
47 | } else if (code.length > 3 && [code hasPrefix:@"@\""]) {
48 | // 去掉@"和",截取中间的类型名称
49 | _code = [code substringWithRange:NSMakeRange(2, code.length - 3)];
50 | _typeClass = NSClassFromString(_code);
51 | _fromFoundation = [MJFoundation isClassFromFoundation:_typeClass];
52 | _numberType = [_typeClass isSubclassOfClass:[NSNumber class]];
53 |
54 | } else if ([code isEqualToString:MJPropertyTypeSEL] ||
55 | [code isEqualToString:MJPropertyTypeIvar] ||
56 | [code isEqualToString:MJPropertyTypeMethod]) {
57 | _KVCDisabled = YES;
58 | }
59 |
60 | // 是否为数字类型
61 | NSString *lowerCode = _code.lowercaseString;
62 | NSArray *numberTypes = @[MJPropertyTypeInt, MJPropertyTypeShort, MJPropertyTypeBOOL1, MJPropertyTypeBOOL2, MJPropertyTypeFloat, MJPropertyTypeDouble, MJPropertyTypeLong, MJPropertyTypeLongLong, MJPropertyTypeChar];
63 | if ([numberTypes containsObject:lowerCode]) {
64 | _numberType = YES;
65 |
66 | if ([lowerCode isEqualToString:MJPropertyTypeBOOL1]
67 | || [lowerCode isEqualToString:MJPropertyTypeBOOL2]) {
68 | _boolType = YES;
69 | }
70 | }
71 | }
72 | @end
73 |
--------------------------------------------------------------------------------
/Pods/MJExtension/MJExtension/NSObject+MJClass.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+MJClass.h
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 15/8/11.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /**
12 | * 遍历所有类的block(父类)
13 | */
14 | typedef void (^MJClassesEnumeration)(Class c, BOOL *stop);
15 |
16 | /** 这个数组中的属性名才会进行字典和模型的转换 */
17 | typedef NSArray * (^MJAllowedPropertyNames)();
18 | /** 这个数组中的属性名才会进行归档 */
19 | typedef NSArray * (^MJAllowedCodingPropertyNames)();
20 |
21 | /** 这个数组中的属性名将会被忽略:不进行字典和模型的转换 */
22 | typedef NSArray * (^MJIgnoredPropertyNames)();
23 | /** 这个数组中的属性名将会被忽略:不进行归档 */
24 | typedef NSArray * (^MJIgnoredCodingPropertyNames)();
25 |
26 | /**
27 | * 类相关的扩展
28 | */
29 | @interface NSObject (MJClass)
30 | /**
31 | * 遍历所有的类
32 | */
33 | + (void)mj_enumerateClasses:(MJClassesEnumeration)enumeration;
34 | + (void)mj_enumerateAllClasses:(MJClassesEnumeration)enumeration;
35 |
36 | #pragma mark - 属性白名单配置
37 | /**
38 | * 这个数组中的属性名才会进行字典和模型的转换
39 | *
40 | * @param allowedPropertyNames 这个数组中的属性名才会进行字典和模型的转换
41 | */
42 | + (void)mj_setupAllowedPropertyNames:(MJAllowedPropertyNames)allowedPropertyNames;
43 |
44 | /**
45 | * 这个数组中的属性名才会进行字典和模型的转换
46 | */
47 | + (NSMutableArray *)mj_totalAllowedPropertyNames;
48 |
49 | #pragma mark - 属性黑名单配置
50 | /**
51 | * 这个数组中的属性名将会被忽略:不进行字典和模型的转换
52 | *
53 | * @param ignoredPropertyNames 这个数组中的属性名将会被忽略:不进行字典和模型的转换
54 | */
55 | + (void)mj_setupIgnoredPropertyNames:(MJIgnoredPropertyNames)ignoredPropertyNames;
56 |
57 | /**
58 | * 这个数组中的属性名将会被忽略:不进行字典和模型的转换
59 | */
60 | + (NSMutableArray *)mj_totalIgnoredPropertyNames;
61 |
62 | #pragma mark - 归档属性白名单配置
63 | /**
64 | * 这个数组中的属性名才会进行归档
65 | *
66 | * @param allowedCodingPropertyNames 这个数组中的属性名才会进行归档
67 | */
68 | + (void)mj_setupAllowedCodingPropertyNames:(MJAllowedCodingPropertyNames)allowedCodingPropertyNames;
69 |
70 | /**
71 | * 这个数组中的属性名才会进行字典和模型的转换
72 | */
73 | + (NSMutableArray *)mj_totalAllowedCodingPropertyNames;
74 |
75 | #pragma mark - 归档属性黑名单配置
76 | /**
77 | * 这个数组中的属性名将会被忽略:不进行归档
78 | *
79 | * @param ignoredCodingPropertyNames 这个数组中的属性名将会被忽略:不进行归档
80 | */
81 | + (void)mj_setupIgnoredCodingPropertyNames:(MJIgnoredCodingPropertyNames)ignoredCodingPropertyNames;
82 |
83 | /**
84 | * 这个数组中的属性名将会被忽略:不进行归档
85 | */
86 | + (NSMutableArray *)mj_totalIgnoredCodingPropertyNames;
87 |
88 | #pragma mark - 内部使用
89 | + (void)mj_setupBlockReturnValue:(id (^)())block key:(const char *)key;
90 | @end
91 |
--------------------------------------------------------------------------------
/Pods/MJExtension/MJExtension/NSObject+MJCoding.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+MJCoding.h
3 | // MJExtension
4 | //
5 | // Created by mj on 14-1-15.
6 | // Copyright (c) 2014年 小码哥. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MJExtensionConst.h"
11 |
12 | /**
13 | * Codeing协议
14 | */
15 | @protocol MJCoding
16 | @optional
17 | /**
18 | * 这个数组中的属性名才会进行归档
19 | */
20 | + (NSArray *)mj_allowedCodingPropertyNames;
21 | /**
22 | * 这个数组中的属性名将会被忽略:不进行归档
23 | */
24 | + (NSArray *)mj_ignoredCodingPropertyNames;
25 | @end
26 |
27 | @interface NSObject (MJCoding)
28 | /**
29 | * 解码(从文件中解析对象)
30 | */
31 | - (void)mj_decode:(NSCoder *)decoder;
32 | /**
33 | * 编码(将对象写入文件中)
34 | */
35 | - (void)mj_encode:(NSCoder *)encoder;
36 | @end
37 |
38 | /**
39 | 归档的实现
40 | */
41 | #define MJCodingImplementation \
42 | - (id)initWithCoder:(NSCoder *)decoder \
43 | { \
44 | if (self = [super init]) { \
45 | [self mj_decode:decoder]; \
46 | } \
47 | return self; \
48 | } \
49 | \
50 | - (void)encodeWithCoder:(NSCoder *)encoder \
51 | { \
52 | [self mj_encode:encoder]; \
53 | }
54 |
55 | #define MJExtensionCodingImplementation MJCodingImplementation
--------------------------------------------------------------------------------
/Pods/MJExtension/MJExtension/NSObject+MJCoding.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+MJCoding.m
3 | // MJExtension
4 | //
5 | // Created by mj on 14-1-15.
6 | // Copyright (c) 2014年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "NSObject+MJCoding.h"
10 | #import "NSObject+MJClass.h"
11 | #import "NSObject+MJProperty.h"
12 | #import "MJProperty.h"
13 |
14 | @implementation NSObject (MJCoding)
15 |
16 | - (void)mj_encode:(NSCoder *)encoder
17 | {
18 | Class clazz = [self class];
19 |
20 | NSArray *allowedCodingPropertyNames = [clazz mj_totalAllowedCodingPropertyNames];
21 | NSArray *ignoredCodingPropertyNames = [clazz mj_totalIgnoredCodingPropertyNames];
22 |
23 | [clazz mj_enumerateProperties:^(MJProperty *property, BOOL *stop) {
24 | // 检测是否被忽略
25 | if (allowedCodingPropertyNames.count && ![allowedCodingPropertyNames containsObject:property.name]) return;
26 | if ([ignoredCodingPropertyNames containsObject:property.name]) return;
27 |
28 | id value = [property valueForObject:self];
29 | if (value == nil) return;
30 | [encoder encodeObject:value forKey:property.name];
31 | }];
32 | }
33 |
34 | - (void)mj_decode:(NSCoder *)decoder
35 | {
36 | Class clazz = [self class];
37 |
38 | NSArray *allowedCodingPropertyNames = [clazz mj_totalAllowedCodingPropertyNames];
39 | NSArray *ignoredCodingPropertyNames = [clazz mj_totalIgnoredCodingPropertyNames];
40 |
41 | [clazz mj_enumerateProperties:^(MJProperty *property, BOOL *stop) {
42 | // 检测是否被忽略
43 | if (allowedCodingPropertyNames.count && ![allowedCodingPropertyNames containsObject:property.name]) return;
44 | if ([ignoredCodingPropertyNames containsObject:property.name]) return;
45 |
46 | id value = [decoder decodeObjectForKey:property.name];
47 | if (value == nil) { // 兼容以前的MJExtension版本
48 | value = [decoder decodeObjectForKey:[@"_" stringByAppendingString:property.name]];
49 | }
50 | if (value == nil) return;
51 | [property setValue:value forObject:self];
52 | }];
53 | }
54 | @end
55 |
--------------------------------------------------------------------------------
/Pods/MJExtension/MJExtension/NSObject+MJProperty.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+MJProperty.h
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 15/4/17.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MJExtensionConst.h"
11 |
12 | @class MJProperty;
13 |
14 | /**
15 | * 遍历成员变量用的block
16 | *
17 | * @param property 成员的包装对象
18 | * @param stop YES代表停止遍历,NO代表继续遍历
19 | */
20 | typedef void (^MJPropertiesEnumeration)(MJProperty *property, BOOL *stop);
21 |
22 | /** 将属性名换为其他key去字典中取值 */
23 | typedef NSDictionary * (^MJReplacedKeyFromPropertyName)();
24 | typedef id (^MJReplacedKeyFromPropertyName121)(NSString *propertyName);
25 | /** 数组中需要转换的模型类 */
26 | typedef NSDictionary * (^MJObjectClassInArray)();
27 | /** 用于过滤字典中的值 */
28 | typedef id (^MJNewValueFromOldValue)(id object, id oldValue, MJProperty *property);
29 |
30 | /**
31 | * 成员属性相关的扩展
32 | */
33 | @interface NSObject (MJProperty)
34 | #pragma mark - 遍历
35 | /**
36 | * 遍历所有的成员
37 | */
38 | + (void)mj_enumerateProperties:(MJPropertiesEnumeration)enumeration;
39 |
40 | #pragma mark - 新值配置
41 | /**
42 | * 用于过滤字典中的值
43 | *
44 | * @param newValueFormOldValue 用于过滤字典中的值
45 | */
46 | + (void)mj_setupNewValueFromOldValue:(MJNewValueFromOldValue)newValueFormOldValue;
47 | + (id)mj_getNewValueFromObject:(__unsafe_unretained id)object oldValue:(__unsafe_unretained id)oldValue property:(__unsafe_unretained MJProperty *)property;
48 |
49 | #pragma mark - key配置
50 | /**
51 | * 将属性名换为其他key去字典中取值
52 | *
53 | * @param replacedKeyFromPropertyName 将属性名换为其他key去字典中取值
54 | */
55 | + (void)mj_setupReplacedKeyFromPropertyName:(MJReplacedKeyFromPropertyName)replacedKeyFromPropertyName;
56 | /**
57 | * 将属性名换为其他key去字典中取值
58 | *
59 | * @param replacedKeyFromPropertyName121 将属性名换为其他key去字典中取值
60 | */
61 | + (void)mj_setupReplacedKeyFromPropertyName121:(MJReplacedKeyFromPropertyName121)replacedKeyFromPropertyName121;
62 |
63 | #pragma mark - array model class配置
64 | /**
65 | * 数组中需要转换的模型类
66 | *
67 | * @param objectClassInArray 数组中需要转换的模型类
68 | */
69 | + (void)mj_setupObjectClassInArray:(MJObjectClassInArray)objectClassInArray;
70 | @end
71 |
72 | @interface NSObject (MJPropertyDeprecated_v_2_5_16)
73 | + (void)enumerateProperties:(MJPropertiesEnumeration)enumeration MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
74 | + (void)setupNewValueFromOldValue:(MJNewValueFromOldValue)newValueFormOldValue MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
75 | + (id)getNewValueFromObject:(__unsafe_unretained id)object oldValue:(__unsafe_unretained id)oldValue property:(__unsafe_unretained MJProperty *)property MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
76 | + (void)setupReplacedKeyFromPropertyName:(MJReplacedKeyFromPropertyName)replacedKeyFromPropertyName MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
77 | + (void)setupReplacedKeyFromPropertyName121:(MJReplacedKeyFromPropertyName121)replacedKeyFromPropertyName121 MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
78 | + (void)setupObjectClassInArray:(MJObjectClassInArray)objectClassInArray MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
79 | @end
--------------------------------------------------------------------------------
/Pods/MJExtension/MJExtension/NSString+MJExtension.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+MJExtension.h
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 15/6/7.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MJExtensionConst.h"
11 |
12 | @interface NSString (MJExtension)
13 | /**
14 | * 驼峰转下划线(loveYou -> love_you)
15 | */
16 | - (NSString *)mj_underlineFromCamel;
17 | /**
18 | * 下划线转驼峰(love_you -> loveYou)
19 | */
20 | - (NSString *)mj_camelFromUnderline;
21 | /**
22 | * 首字母变大写
23 | */
24 | - (NSString *)mj_firstCharUpper;
25 | /**
26 | * 首字母变小写
27 | */
28 | - (NSString *)mj_firstCharLower;
29 |
30 | - (BOOL)mj_isPureInt;
31 |
32 | - (NSURL *)mj_url;
33 | @end
34 |
35 | @interface NSString (MJExtensionDeprecated_v_2_5_16)
36 | - (NSString *)underlineFromCamel MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
37 | - (NSString *)camelFromUnderline MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
38 | - (NSString *)firstCharUpper MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
39 | - (NSString *)firstCharLower MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
40 | - (BOOL)isPureInt MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
41 | - (NSURL *)url MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
42 | @end
43 |
--------------------------------------------------------------------------------
/Pods/MJExtension/MJExtension/NSString+MJExtension.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+MJExtension.m
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 15/6/7.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "NSString+MJExtension.h"
10 |
11 | @implementation NSString (MJExtension)
12 | - (NSString *)mj_underlineFromCamel
13 | {
14 | if (self.length == 0) return self;
15 | NSMutableString *string = [NSMutableString string];
16 | for (NSUInteger i = 0; i= 2) [string appendString:[cmp substringFromIndex:1]];
40 | } else {
41 | [string appendString:cmp];
42 | }
43 | }
44 | return string;
45 | }
46 |
47 | - (NSString *)mj_firstCharLower
48 | {
49 | if (self.length == 0) return self;
50 | NSMutableString *string = [NSMutableString string];
51 | [string appendString:[NSString stringWithFormat:@"%c", [self characterAtIndex:0]].lowercaseString];
52 | if (self.length >= 2) [string appendString:[self substringFromIndex:1]];
53 | return string;
54 | }
55 |
56 | - (NSString *)mj_firstCharUpper
57 | {
58 | if (self.length == 0) return self;
59 | NSMutableString *string = [NSMutableString string];
60 | [string appendString:[NSString stringWithFormat:@"%c", [self characterAtIndex:0]].uppercaseString];
61 | if (self.length >= 2) [string appendString:[self substringFromIndex:1]];
62 | return string;
63 | }
64 |
65 | - (BOOL)mj_isPureInt
66 | {
67 | NSScanner *scan = [NSScanner scannerWithString:self];
68 | int val;
69 | return [scan scanInt:&val] && [scan isAtEnd];
70 | }
71 |
72 | - (NSURL *)mj_url
73 | {
74 | // [self stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"!$&'()*+,-./:;=?@_~%#[]"]];
75 | #pragma clang diagnostic push
76 | #pragma clang diagnostic ignored"-Wdeprecated-declarations"
77 | return [NSURL URLWithString:(NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)self, (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]", NULL,kCFStringEncodingUTF8))];
78 | #pragma clang diagnostic pop
79 | }
80 | @end
81 |
82 | @implementation NSString (MJExtensionDeprecated_v_2_5_16)
83 | - (NSString *)underlineFromCamel
84 | {
85 | return self.mj_underlineFromCamel;
86 | }
87 |
88 | - (NSString *)camelFromUnderline
89 | {
90 | return self.mj_camelFromUnderline;
91 | }
92 |
93 | - (NSString *)firstCharLower
94 | {
95 | return self.mj_firstCharLower;
96 | }
97 |
98 | - (NSString *)firstCharUpper
99 | {
100 | return self.mj_firstCharUpper;
101 | }
102 |
103 | - (BOOL)isPureInt
104 | {
105 | return self.mj_isPureInt;
106 | }
107 |
108 | - (NSURL *)url
109 | {
110 | return self.mj_url;
111 | }
112 | @end
113 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013-2015 MJRefresh (https://github.com/CoderMJLee/MJRefresh)
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/MJRefresh/MJRefresh/Base/MJRefreshAutoFooter.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshAutoFooter.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshFooter.h"
10 |
11 | @interface MJRefreshAutoFooter : MJRefreshFooter
12 | /** 是否自动刷新(默认为YES) */
13 | @property (assign, nonatomic, getter=isAutomaticallyRefresh) BOOL automaticallyRefresh;
14 |
15 | /** 当底部控件出现多少时就自动刷新(默认为1.0,也就是底部控件完全出现时,才会自动刷新) */
16 | @property (assign, nonatomic) CGFloat appearencePercentTriggerAutoRefresh MJRefreshDeprecated("请使用triggerAutomaticallyRefreshPercent属性");
17 |
18 | /** 当底部控件出现多少时就自动刷新(默认为1.0,也就是底部控件完全出现时,才会自动刷新) */
19 | @property (assign, nonatomic) CGFloat triggerAutomaticallyRefreshPercent;
20 | @end
21 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Base/MJRefreshBackFooter.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshBackFooter.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshFooter.h"
10 |
11 | @interface MJRefreshBackFooter : MJRefreshFooter
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Base/MJRefreshComponent.h:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | // MJRefreshComponent.h
4 | // MJRefreshExample
5 | //
6 | // Created by MJ Lee on 15/3/4.
7 | // Copyright (c) 2015年 小码哥. All rights reserved.
8 | // 刷新控件的基类
9 |
10 | #import
11 | #import "MJRefreshConst.h"
12 | #import "UIView+MJExtension.h"
13 | #import "UIScrollView+MJExtension.h"
14 | #import "UIScrollView+MJRefresh.h"
15 | #import "NSBundle+MJRefresh.h"
16 |
17 | /** 刷新控件的状态 */
18 | typedef NS_ENUM(NSInteger, MJRefreshState) {
19 | /** 普通闲置状态 */
20 | MJRefreshStateIdle = 1,
21 | /** 松开就可以进行刷新的状态 */
22 | MJRefreshStatePulling,
23 | /** 正在刷新中的状态 */
24 | MJRefreshStateRefreshing,
25 | /** 即将刷新的状态 */
26 | MJRefreshStateWillRefresh,
27 | /** 所有数据加载完毕,没有更多的数据了 */
28 | MJRefreshStateNoMoreData
29 | };
30 |
31 | /** 进入刷新状态的回调 */
32 | typedef void (^MJRefreshComponentRefreshingBlock)();
33 | /** 开始刷新后的回调(进入刷新状态后的回调) */
34 | typedef void (^MJRefreshComponentbeginRefreshingCompletionBlock)();
35 | /** 结束刷新后的回调 */
36 | typedef void (^MJRefreshComponentEndRefreshingCompletionBlock)();
37 |
38 | /** 刷新控件的基类 */
39 | @interface MJRefreshComponent : UIView
40 | {
41 | /** 记录scrollView刚开始的inset */
42 | UIEdgeInsets _scrollViewOriginalInset;
43 | /** 父控件 */
44 | __weak UIScrollView *_scrollView;
45 | }
46 | #pragma mark - 刷新回调
47 | /** 正在刷新的回调 */
48 | @property (copy, nonatomic) MJRefreshComponentRefreshingBlock refreshingBlock;
49 | /** 设置回调对象和回调方法 */
50 | - (void)setRefreshingTarget:(id)target refreshingAction:(SEL)action;
51 |
52 | /** 回调对象 */
53 | @property (weak, nonatomic) id refreshingTarget;
54 | /** 回调方法 */
55 | @property (assign, nonatomic) SEL refreshingAction;
56 | /** 触发回调(交给子类去调用) */
57 | - (void)executeRefreshingCallback;
58 |
59 | #pragma mark - 刷新状态控制
60 | /** 进入刷新状态 */
61 | - (void)beginRefreshing;
62 | - (void)beginRefreshingWithCompletionBlock:(void (^)())completionBlock;
63 | /** 开始刷新后的回调(进入刷新状态后的回调) */
64 | @property (copy, nonatomic) MJRefreshComponentbeginRefreshingCompletionBlock beginRefreshingCompletionBlock;
65 | /** 结束刷新的回调 */
66 | @property (copy, nonatomic) MJRefreshComponentEndRefreshingCompletionBlock endRefreshingCompletionBlock;
67 | /** 结束刷新状态 */
68 | - (void)endRefreshing;
69 | - (void)endRefreshingWithCompletionBlock:(void (^)())completionBlock;
70 | /** 是否正在刷新 */
71 | - (BOOL)isRefreshing;
72 | /** 刷新状态 一般交给子类内部实现 */
73 | @property (assign, nonatomic) MJRefreshState state;
74 |
75 | #pragma mark - 交给子类去访问
76 | /** 记录scrollView刚开始的inset */
77 | @property (assign, nonatomic, readonly) UIEdgeInsets scrollViewOriginalInset;
78 | /** 父控件 */
79 | @property (weak, nonatomic, readonly) UIScrollView *scrollView;
80 |
81 | #pragma mark - 交给子类们去实现
82 | /** 初始化 */
83 | - (void)prepare NS_REQUIRES_SUPER;
84 | /** 摆放子控件frame */
85 | - (void)placeSubviews NS_REQUIRES_SUPER;
86 | /** 当scrollView的contentOffset发生改变的时候调用 */
87 | - (void)scrollViewContentOffsetDidChange:(NSDictionary *)change NS_REQUIRES_SUPER;
88 | /** 当scrollView的contentSize发生改变的时候调用 */
89 | - (void)scrollViewContentSizeDidChange:(NSDictionary *)change NS_REQUIRES_SUPER;
90 | /** 当scrollView的拖拽状态发生改变的时候调用 */
91 | - (void)scrollViewPanStateDidChange:(NSDictionary *)change NS_REQUIRES_SUPER;
92 |
93 |
94 | #pragma mark - 其他
95 | /** 拉拽的百分比(交给子类重写) */
96 | @property (assign, nonatomic) CGFloat pullingPercent;
97 | /** 根据拖拽比例自动切换透明度 */
98 | @property (assign, nonatomic, getter=isAutoChangeAlpha) BOOL autoChangeAlpha MJRefreshDeprecated("请使用automaticallyChangeAlpha属性");
99 | /** 根据拖拽比例自动切换透明度 */
100 | @property (assign, nonatomic, getter=isAutomaticallyChangeAlpha) BOOL automaticallyChangeAlpha;
101 | @end
102 |
103 | @interface UILabel(MJRefresh)
104 | + (instancetype)mj_label;
105 | - (CGFloat)mj_textWith;
106 | @end
107 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Base/MJRefreshFooter.h:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | // MJRefreshFooter.h
4 | // MJRefreshExample
5 | //
6 | // Created by MJ Lee on 15/3/5.
7 | // Copyright (c) 2015年 小码哥. All rights reserved.
8 | // 上拉刷新控件
9 |
10 | #import "MJRefreshComponent.h"
11 |
12 | @interface MJRefreshFooter : MJRefreshComponent
13 | /** 创建footer */
14 | + (instancetype)footerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock;
15 | /** 创建footer */
16 | + (instancetype)footerWithRefreshingTarget:(id)target refreshingAction:(SEL)action;
17 |
18 | /** 提示没有更多的数据 */
19 | - (void)endRefreshingWithNoMoreData;
20 | - (void)noticeNoMoreData MJRefreshDeprecated("使用endRefreshingWithNoMoreData");
21 |
22 | /** 重置没有更多的数据(消除没有更多数据的状态) */
23 | - (void)resetNoMoreData;
24 |
25 | /** 忽略多少scrollView的contentInset的bottom */
26 | @property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetBottom;
27 |
28 | /** 自动根据有无数据来显示和隐藏(有数据就显示,没有数据隐藏。默认是NO) */
29 | @property (assign, nonatomic, getter=isAutomaticallyHidden) BOOL automaticallyHidden;
30 | @end
31 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Base/MJRefreshFooter.m:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | // MJRefreshFooter.m
4 | // MJRefreshExample
5 | //
6 | // Created by MJ Lee on 15/3/5.
7 | // Copyright (c) 2015年 小码哥. All rights reserved.
8 | //
9 |
10 | #import "MJRefreshFooter.h"
11 |
12 | @interface MJRefreshFooter()
13 |
14 | @end
15 |
16 | @implementation MJRefreshFooter
17 | #pragma mark - 构造方法
18 | + (instancetype)footerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock
19 | {
20 | MJRefreshFooter *cmp = [[self alloc] init];
21 | cmp.refreshingBlock = refreshingBlock;
22 | return cmp;
23 | }
24 | + (instancetype)footerWithRefreshingTarget:(id)target refreshingAction:(SEL)action
25 | {
26 | MJRefreshFooter *cmp = [[self alloc] init];
27 | [cmp setRefreshingTarget:target refreshingAction:action];
28 | return cmp;
29 | }
30 |
31 | #pragma mark - 重写父类的方法
32 | - (void)prepare
33 | {
34 | [super prepare];
35 |
36 | // 设置自己的高度
37 | self.mj_h = MJRefreshFooterHeight;
38 |
39 | // 默认不会自动隐藏
40 | self.automaticallyHidden = NO;
41 | }
42 |
43 | - (void)willMoveToSuperview:(UIView *)newSuperview
44 | {
45 | [super willMoveToSuperview:newSuperview];
46 |
47 | if (newSuperview) {
48 | // 监听scrollView数据的变化
49 | if ([self.scrollView isKindOfClass:[UITableView class]] || [self.scrollView isKindOfClass:[UICollectionView class]]) {
50 | [self.scrollView setMj_reloadDataBlock:^(NSInteger totalDataCount) {
51 | if (self.isAutomaticallyHidden) {
52 | self.hidden = (totalDataCount == 0);
53 | }
54 | }];
55 | }
56 | }
57 | }
58 |
59 | #pragma mark - 公共方法
60 | - (void)endRefreshingWithNoMoreData
61 | {
62 | self.state = MJRefreshStateNoMoreData;
63 | }
64 |
65 | - (void)noticeNoMoreData
66 | {
67 | [self endRefreshingWithNoMoreData];
68 | }
69 |
70 | - (void)resetNoMoreData
71 | {
72 | self.state = MJRefreshStateIdle;
73 | }
74 | @end
75 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Base/MJRefreshHeader.h:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | // MJRefreshHeader.h
4 | // MJRefreshExample
5 | //
6 | // Created by MJ Lee on 15/3/4.
7 | // Copyright (c) 2015年 小码哥. All rights reserved.
8 | // 下拉刷新控件:负责监控用户下拉的状态
9 |
10 | #import "MJRefreshComponent.h"
11 |
12 | @interface MJRefreshHeader : MJRefreshComponent
13 | /** 创建header */
14 | + (instancetype)headerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock;
15 | /** 创建header */
16 | + (instancetype)headerWithRefreshingTarget:(id)target refreshingAction:(SEL)action;
17 |
18 | /** 这个key用来存储上一次下拉刷新成功的时间 */
19 | @property (copy, nonatomic) NSString *lastUpdatedTimeKey;
20 | /** 上一次下拉刷新成功的时间 */
21 | @property (strong, nonatomic, readonly) NSDate *lastUpdatedTime;
22 |
23 | /** 忽略多少scrollView的contentInset的top */
24 | @property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetTop;
25 | @end
26 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshAutoGifFooter.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshAutoStateFooter.h"
10 |
11 | @interface MJRefreshAutoGifFooter : MJRefreshAutoStateFooter
12 | @property (weak, nonatomic, readonly) UIImageView *gifView;
13 |
14 | /** 设置state状态下的动画图片images 动画持续时间duration*/
15 | - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state;
16 | - (void)setImages:(NSArray *)images forState:(MJRefreshState)state;
17 | @end
18 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.m:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshAutoGifFooter.m
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshAutoGifFooter.h"
10 |
11 | @interface MJRefreshAutoGifFooter()
12 | {
13 | __unsafe_unretained UIImageView *_gifView;
14 | }
15 | /** 所有状态对应的动画图片 */
16 | @property (strong, nonatomic) NSMutableDictionary *stateImages;
17 | /** 所有状态对应的动画时间 */
18 | @property (strong, nonatomic) NSMutableDictionary *stateDurations;
19 | @end
20 |
21 | @implementation MJRefreshAutoGifFooter
22 | #pragma mark - 懒加载
23 | - (UIImageView *)gifView
24 | {
25 | if (!_gifView) {
26 | UIImageView *gifView = [[UIImageView alloc] init];
27 | [self addSubview:_gifView = gifView];
28 | }
29 | return _gifView;
30 | }
31 |
32 | - (NSMutableDictionary *)stateImages
33 | {
34 | if (!_stateImages) {
35 | self.stateImages = [NSMutableDictionary dictionary];
36 | }
37 | return _stateImages;
38 | }
39 |
40 | - (NSMutableDictionary *)stateDurations
41 | {
42 | if (!_stateDurations) {
43 | self.stateDurations = [NSMutableDictionary dictionary];
44 | }
45 | return _stateDurations;
46 | }
47 |
48 | #pragma mark - 公共方法
49 | - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state
50 | {
51 | if (images == nil) return;
52 |
53 | self.stateImages[@(state)] = images;
54 | self.stateDurations[@(state)] = @(duration);
55 |
56 | /* 根据图片设置控件的高度 */
57 | UIImage *image = [images firstObject];
58 | if (image.size.height > self.mj_h) {
59 | self.mj_h = image.size.height;
60 | }
61 | }
62 |
63 | - (void)setImages:(NSArray *)images forState:(MJRefreshState)state
64 | {
65 | [self setImages:images duration:images.count * 0.1 forState:state];
66 | }
67 |
68 | #pragma mark - 实现父类的方法
69 | - (void)prepare
70 | {
71 | [super prepare];
72 |
73 | // 初始化间距
74 | self.labelLeftInset = 20;
75 | }
76 |
77 | - (void)placeSubviews
78 | {
79 | [super placeSubviews];
80 |
81 | if (self.gifView.constraints.count) return;
82 |
83 | self.gifView.frame = self.bounds;
84 | if (self.isRefreshingTitleHidden) {
85 | self.gifView.contentMode = UIViewContentModeCenter;
86 | } else {
87 | self.gifView.contentMode = UIViewContentModeRight;
88 | self.gifView.mj_w = self.mj_w * 0.5 - self.labelLeftInset - self.stateLabel.mj_textWith * 0.5;
89 | }
90 | }
91 |
92 | - (void)setState:(MJRefreshState)state
93 | {
94 | MJRefreshCheckState
95 |
96 | // 根据状态做事情
97 | if (state == MJRefreshStateRefreshing) {
98 | NSArray *images = self.stateImages[@(state)];
99 | if (images.count == 0) return;
100 | [self.gifView stopAnimating];
101 |
102 | self.gifView.hidden = NO;
103 | if (images.count == 1) { // 单张图片
104 | self.gifView.image = [images lastObject];
105 | } else { // 多张图片
106 | self.gifView.animationImages = images;
107 | self.gifView.animationDuration = [self.stateDurations[@(state)] doubleValue];
108 | [self.gifView startAnimating];
109 | }
110 | } else if (state == MJRefreshStateNoMoreData || state == MJRefreshStateIdle) {
111 | [self.gifView stopAnimating];
112 | self.gifView.hidden = YES;
113 | }
114 | }
115 | @end
116 |
117 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshAutoNormalFooter.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshAutoStateFooter.h"
10 |
11 | @interface MJRefreshAutoNormalFooter : MJRefreshAutoStateFooter
12 | /** 菊花的样式 */
13 | @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle;
14 | @end
15 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.m:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshAutoNormalFooter.m
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshAutoNormalFooter.h"
10 |
11 | @interface MJRefreshAutoNormalFooter()
12 | @property (weak, nonatomic) UIActivityIndicatorView *loadingView;
13 | @end
14 |
15 | @implementation MJRefreshAutoNormalFooter
16 | #pragma mark - 懒加载子控件
17 | - (UIActivityIndicatorView *)loadingView
18 | {
19 | if (!_loadingView) {
20 | UIActivityIndicatorView *loadingView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:self.activityIndicatorViewStyle];
21 | loadingView.hidesWhenStopped = YES;
22 | [self addSubview:_loadingView = loadingView];
23 | }
24 | return _loadingView;
25 | }
26 |
27 | - (void)setActivityIndicatorViewStyle:(UIActivityIndicatorViewStyle)activityIndicatorViewStyle
28 | {
29 | _activityIndicatorViewStyle = activityIndicatorViewStyle;
30 |
31 | self.loadingView = nil;
32 | [self setNeedsLayout];
33 | }
34 | #pragma mark - 重写父类的方法
35 | - (void)prepare
36 | {
37 | [super prepare];
38 |
39 | self.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;
40 | }
41 |
42 | - (void)placeSubviews
43 | {
44 | [super placeSubviews];
45 |
46 | if (self.loadingView.constraints.count) return;
47 |
48 | // 圈圈
49 | CGFloat loadingCenterX = self.mj_w * 0.5;
50 | if (!self.isRefreshingTitleHidden) {
51 | loadingCenterX -= self.stateLabel.mj_textWith * 0.5 + self.labelLeftInset;
52 | }
53 | CGFloat loadingCenterY = self.mj_h * 0.5;
54 | self.loadingView.center = CGPointMake(loadingCenterX, loadingCenterY);
55 | }
56 |
57 | - (void)setState:(MJRefreshState)state
58 | {
59 | MJRefreshCheckState
60 |
61 | // 根据状态做事情
62 | if (state == MJRefreshStateNoMoreData || state == MJRefreshStateIdle) {
63 | [self.loadingView stopAnimating];
64 | } else if (state == MJRefreshStateRefreshing) {
65 | [self.loadingView startAnimating];
66 | }
67 | }
68 |
69 | @end
70 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshAutoStateFooter.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/6/13.
6 | // Copyright © 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshAutoFooter.h"
10 |
11 | @interface MJRefreshAutoStateFooter : MJRefreshAutoFooter
12 | /** 文字距离圈圈、箭头的距离 */
13 | @property (assign, nonatomic) CGFloat labelLeftInset;
14 | /** 显示刷新状态的label */
15 | @property (weak, nonatomic, readonly) UILabel *stateLabel;
16 |
17 | /** 设置state状态下的文字 */
18 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state;
19 |
20 | /** 隐藏刷新状态的文字 */
21 | @property (assign, nonatomic, getter=isRefreshingTitleHidden) BOOL refreshingTitleHidden;
22 | @end
23 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.m:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshAutoStateFooter.m
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/6/13.
6 | // Copyright © 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshAutoStateFooter.h"
10 |
11 | @interface MJRefreshAutoStateFooter()
12 | {
13 | /** 显示刷新状态的label */
14 | __unsafe_unretained UILabel *_stateLabel;
15 | }
16 | /** 所有状态对应的文字 */
17 | @property (strong, nonatomic) NSMutableDictionary *stateTitles;
18 | @end
19 |
20 | @implementation MJRefreshAutoStateFooter
21 | #pragma mark - 懒加载
22 | - (NSMutableDictionary *)stateTitles
23 | {
24 | if (!_stateTitles) {
25 | self.stateTitles = [NSMutableDictionary dictionary];
26 | }
27 | return _stateTitles;
28 | }
29 |
30 | - (UILabel *)stateLabel
31 | {
32 | if (!_stateLabel) {
33 | [self addSubview:_stateLabel = [UILabel mj_label]];
34 | }
35 | return _stateLabel;
36 | }
37 |
38 | #pragma mark - 公共方法
39 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state
40 | {
41 | if (title == nil) return;
42 | self.stateTitles[@(state)] = title;
43 | self.stateLabel.text = self.stateTitles[@(self.state)];
44 | }
45 |
46 | #pragma mark - 私有方法
47 | - (void)stateLabelClick
48 | {
49 | if (self.state == MJRefreshStateIdle) {
50 | [self beginRefreshing];
51 | }
52 | }
53 |
54 | #pragma mark - 重写父类的方法
55 | - (void)prepare
56 | {
57 | [super prepare];
58 |
59 | // 初始化间距
60 | self.labelLeftInset = MJRefreshLabelLeftInset;
61 |
62 | // 初始化文字
63 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshAutoFooterIdleText] forState:MJRefreshStateIdle];
64 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshAutoFooterRefreshingText] forState:MJRefreshStateRefreshing];
65 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshAutoFooterNoMoreDataText] forState:MJRefreshStateNoMoreData];
66 |
67 | // 监听label
68 | self.stateLabel.userInteractionEnabled = YES;
69 | [self.stateLabel addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(stateLabelClick)]];
70 | }
71 |
72 | - (void)placeSubviews
73 | {
74 | [super placeSubviews];
75 |
76 | if (self.stateLabel.constraints.count) return;
77 |
78 | // 状态标签
79 | self.stateLabel.frame = self.bounds;
80 | }
81 |
82 | - (void)setState:(MJRefreshState)state
83 | {
84 | MJRefreshCheckState
85 |
86 | if (self.isRefreshingTitleHidden && state == MJRefreshStateRefreshing) {
87 | self.stateLabel.text = nil;
88 | } else {
89 | self.stateLabel.text = self.stateTitles[@(state)];
90 | }
91 | }
92 | @end
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshBackGifFooter.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshBackStateFooter.h"
10 |
11 | @interface MJRefreshBackGifFooter : MJRefreshBackStateFooter
12 | @property (weak, nonatomic, readonly) UIImageView *gifView;
13 |
14 | /** 设置state状态下的动画图片images 动画持续时间duration*/
15 | - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state;
16 | - (void)setImages:(NSArray *)images forState:(MJRefreshState)state;
17 | @end
18 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.m:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshBackGifFooter.m
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshBackGifFooter.h"
10 |
11 | @interface MJRefreshBackGifFooter()
12 | {
13 | __unsafe_unretained UIImageView *_gifView;
14 | }
15 | /** 所有状态对应的动画图片 */
16 | @property (strong, nonatomic) NSMutableDictionary *stateImages;
17 | /** 所有状态对应的动画时间 */
18 | @property (strong, nonatomic) NSMutableDictionary *stateDurations;
19 | @end
20 |
21 | @implementation MJRefreshBackGifFooter
22 | #pragma mark - 懒加载
23 | - (UIImageView *)gifView
24 | {
25 | if (!_gifView) {
26 | UIImageView *gifView = [[UIImageView alloc] init];
27 | [self addSubview:_gifView = gifView];
28 | }
29 | return _gifView;
30 | }
31 |
32 | - (NSMutableDictionary *)stateImages
33 | {
34 | if (!_stateImages) {
35 | self.stateImages = [NSMutableDictionary dictionary];
36 | }
37 | return _stateImages;
38 | }
39 |
40 | - (NSMutableDictionary *)stateDurations
41 | {
42 | if (!_stateDurations) {
43 | self.stateDurations = [NSMutableDictionary dictionary];
44 | }
45 | return _stateDurations;
46 | }
47 |
48 | #pragma mark - 公共方法
49 | - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state
50 | {
51 | if (images == nil) return;
52 |
53 | self.stateImages[@(state)] = images;
54 | self.stateDurations[@(state)] = @(duration);
55 |
56 | /* 根据图片设置控件的高度 */
57 | UIImage *image = [images firstObject];
58 | if (image.size.height > self.mj_h) {
59 | self.mj_h = image.size.height;
60 | }
61 | }
62 |
63 | - (void)setImages:(NSArray *)images forState:(MJRefreshState)state
64 | {
65 | [self setImages:images duration:images.count * 0.1 forState:state];
66 | }
67 |
68 | #pragma mark - 实现父类的方法
69 | - (void)prepare
70 | {
71 | [super prepare];
72 |
73 | // 初始化间距
74 | self.labelLeftInset = 20;
75 | }
76 |
77 | - (void)setPullingPercent:(CGFloat)pullingPercent
78 | {
79 | [super setPullingPercent:pullingPercent];
80 | NSArray *images = self.stateImages[@(MJRefreshStateIdle)];
81 | if (self.state != MJRefreshStateIdle || images.count == 0) return;
82 | [self.gifView stopAnimating];
83 | NSUInteger index = images.count * pullingPercent;
84 | if (index >= images.count) index = images.count - 1;
85 | self.gifView.image = images[index];
86 | }
87 |
88 | - (void)placeSubviews
89 | {
90 | [super placeSubviews];
91 |
92 | if (self.gifView.constraints.count) return;
93 |
94 | self.gifView.frame = self.bounds;
95 | if (self.stateLabel.hidden) {
96 | self.gifView.contentMode = UIViewContentModeCenter;
97 | } else {
98 | self.gifView.contentMode = UIViewContentModeRight;
99 | self.gifView.mj_w = self.mj_w * 0.5 - self.labelLeftInset - self.stateLabel.mj_textWith * 0.5;
100 | }
101 | }
102 |
103 | - (void)setState:(MJRefreshState)state
104 | {
105 | MJRefreshCheckState
106 |
107 | // 根据状态做事情
108 | if (state == MJRefreshStatePulling || state == MJRefreshStateRefreshing) {
109 | NSArray *images = self.stateImages[@(state)];
110 | if (images.count == 0) return;
111 |
112 | self.gifView.hidden = NO;
113 | [self.gifView stopAnimating];
114 | if (images.count == 1) { // 单张图片
115 | self.gifView.image = [images lastObject];
116 | } else { // 多张图片
117 | self.gifView.animationImages = images;
118 | self.gifView.animationDuration = [self.stateDurations[@(state)] doubleValue];
119 | [self.gifView startAnimating];
120 | }
121 | } else if (state == MJRefreshStateIdle) {
122 | self.gifView.hidden = NO;
123 | } else if (state == MJRefreshStateNoMoreData) {
124 | self.gifView.hidden = YES;
125 | }
126 | }
127 | @end
128 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshBackNormalFooter.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshBackStateFooter.h"
10 |
11 | @interface MJRefreshBackNormalFooter : MJRefreshBackStateFooter
12 | @property (weak, nonatomic, readonly) UIImageView *arrowView;
13 | /** 菊花的样式 */
14 | @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle;
15 | @end
16 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.m:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshBackNormalFooter.m
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshBackNormalFooter.h"
10 | #import "NSBundle+MJRefresh.h"
11 |
12 | @interface MJRefreshBackNormalFooter()
13 | {
14 | __unsafe_unretained UIImageView *_arrowView;
15 | }
16 | @property (weak, nonatomic) UIActivityIndicatorView *loadingView;
17 | @end
18 |
19 | @implementation MJRefreshBackNormalFooter
20 | #pragma mark - 懒加载子控件
21 | - (UIImageView *)arrowView
22 | {
23 | if (!_arrowView) {
24 | UIImageView *arrowView = [[UIImageView alloc] initWithImage:[NSBundle mj_arrowImage]];
25 | [self addSubview:_arrowView = arrowView];
26 | }
27 | return _arrowView;
28 | }
29 |
30 |
31 | - (UIActivityIndicatorView *)loadingView
32 | {
33 | if (!_loadingView) {
34 | UIActivityIndicatorView *loadingView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:self.activityIndicatorViewStyle];
35 | loadingView.hidesWhenStopped = YES;
36 | [self addSubview:_loadingView = loadingView];
37 | }
38 | return _loadingView;
39 | }
40 |
41 | - (void)setActivityIndicatorViewStyle:(UIActivityIndicatorViewStyle)activityIndicatorViewStyle
42 | {
43 | _activityIndicatorViewStyle = activityIndicatorViewStyle;
44 |
45 | self.loadingView = nil;
46 | [self setNeedsLayout];
47 | }
48 | #pragma mark - 重写父类的方法
49 | - (void)prepare
50 | {
51 | [super prepare];
52 |
53 | self.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;
54 | }
55 |
56 | - (void)placeSubviews
57 | {
58 | [super placeSubviews];
59 |
60 | // 箭头的中心点
61 | CGFloat arrowCenterX = self.mj_w * 0.5;
62 | if (!self.stateLabel.hidden) {
63 | arrowCenterX -= self.labelLeftInset + self.stateLabel.mj_textWith * 0.5;
64 | }
65 | CGFloat arrowCenterY = self.mj_h * 0.5;
66 | CGPoint arrowCenter = CGPointMake(arrowCenterX, arrowCenterY);
67 |
68 | // 箭头
69 | if (self.arrowView.constraints.count == 0) {
70 | self.arrowView.mj_size = self.arrowView.image.size;
71 | self.arrowView.center = arrowCenter;
72 | }
73 |
74 | // 圈圈
75 | if (self.loadingView.constraints.count == 0) {
76 | self.loadingView.center = arrowCenter;
77 | }
78 |
79 | self.arrowView.tintColor = self.stateLabel.textColor;
80 | }
81 |
82 | - (void)setState:(MJRefreshState)state
83 | {
84 | MJRefreshCheckState
85 |
86 | // 根据状态做事情
87 | if (state == MJRefreshStateIdle) {
88 | if (oldState == MJRefreshStateRefreshing) {
89 | self.arrowView.transform = CGAffineTransformMakeRotation(0.000001 - M_PI);
90 | [UIView animateWithDuration:MJRefreshSlowAnimationDuration animations:^{
91 | self.loadingView.alpha = 0.0;
92 | } completion:^(BOOL finished) {
93 | self.loadingView.alpha = 1.0;
94 | [self.loadingView stopAnimating];
95 |
96 | self.arrowView.hidden = NO;
97 | }];
98 | } else {
99 | self.arrowView.hidden = NO;
100 | [self.loadingView stopAnimating];
101 | [UIView animateWithDuration:MJRefreshFastAnimationDuration animations:^{
102 | self.arrowView.transform = CGAffineTransformMakeRotation(0.000001 - M_PI);
103 | }];
104 | }
105 | } else if (state == MJRefreshStatePulling) {
106 | self.arrowView.hidden = NO;
107 | [self.loadingView stopAnimating];
108 | [UIView animateWithDuration:MJRefreshFastAnimationDuration animations:^{
109 | self.arrowView.transform = CGAffineTransformIdentity;
110 | }];
111 | } else if (state == MJRefreshStateRefreshing) {
112 | self.arrowView.hidden = YES;
113 | [self.loadingView startAnimating];
114 | } else if (state == MJRefreshStateNoMoreData) {
115 | self.arrowView.hidden = YES;
116 | [self.loadingView stopAnimating];
117 | }
118 | }
119 |
120 | @end
121 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshBackStateFooter.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/6/13.
6 | // Copyright © 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshBackFooter.h"
10 |
11 | @interface MJRefreshBackStateFooter : MJRefreshBackFooter
12 | /** 文字距离圈圈、箭头的距离 */
13 | @property (assign, nonatomic) CGFloat labelLeftInset;
14 | /** 显示刷新状态的label */
15 | @property (weak, nonatomic, readonly) UILabel *stateLabel;
16 | /** 设置state状态下的文字 */
17 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state;
18 |
19 | /** 获取state状态下的title */
20 | - (NSString *)titleForState:(MJRefreshState)state;
21 | @end
22 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.m:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshBackStateFooter.m
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/6/13.
6 | // Copyright © 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshBackStateFooter.h"
10 |
11 | @interface MJRefreshBackStateFooter()
12 | {
13 | /** 显示刷新状态的label */
14 | __unsafe_unretained UILabel *_stateLabel;
15 | }
16 | /** 所有状态对应的文字 */
17 | @property (strong, nonatomic) NSMutableDictionary *stateTitles;
18 | @end
19 |
20 | @implementation MJRefreshBackStateFooter
21 | #pragma mark - 懒加载
22 | - (NSMutableDictionary *)stateTitles
23 | {
24 | if (!_stateTitles) {
25 | self.stateTitles = [NSMutableDictionary dictionary];
26 | }
27 | return _stateTitles;
28 | }
29 |
30 | - (UILabel *)stateLabel
31 | {
32 | if (!_stateLabel) {
33 | [self addSubview:_stateLabel = [UILabel mj_label]];
34 | }
35 | return _stateLabel;
36 | }
37 |
38 | #pragma mark - 公共方法
39 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state
40 | {
41 | if (title == nil) return;
42 | self.stateTitles[@(state)] = title;
43 | self.stateLabel.text = self.stateTitles[@(self.state)];
44 | }
45 |
46 | - (NSString *)titleForState:(MJRefreshState)state {
47 | return self.stateTitles[@(state)];
48 | }
49 |
50 | #pragma mark - 重写父类的方法
51 | - (void)prepare
52 | {
53 | [super prepare];
54 |
55 | // 初始化间距
56 | self.labelLeftInset = MJRefreshLabelLeftInset;
57 |
58 | // 初始化文字
59 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterIdleText] forState:MJRefreshStateIdle];
60 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterPullingText] forState:MJRefreshStatePulling];
61 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterRefreshingText] forState:MJRefreshStateRefreshing];
62 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterNoMoreDataText] forState:MJRefreshStateNoMoreData];
63 | }
64 |
65 | - (void)placeSubviews
66 | {
67 | [super placeSubviews];
68 |
69 | if (self.stateLabel.constraints.count) return;
70 |
71 | // 状态标签
72 | self.stateLabel.frame = self.bounds;
73 | }
74 |
75 | - (void)setState:(MJRefreshState)state
76 | {
77 | MJRefreshCheckState
78 |
79 | // 设置状态文字
80 | self.stateLabel.text = self.stateTitles[@(state)];
81 | }
82 | @end
83 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshGifHeader.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshGifHeader.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshStateHeader.h"
10 |
11 | @interface MJRefreshGifHeader : MJRefreshStateHeader
12 | @property (weak, nonatomic, readonly) UIImageView *gifView;
13 |
14 | /** 设置state状态下的动画图片images 动画持续时间duration*/
15 | - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state;
16 | - (void)setImages:(NSArray *)images forState:(MJRefreshState)state;
17 | @end
18 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshNormalHeader.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshNormalHeader.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshStateHeader.h"
10 |
11 | @interface MJRefreshNormalHeader : MJRefreshStateHeader
12 | @property (weak, nonatomic, readonly) UIImageView *arrowView;
13 | /** 菊花的样式 */
14 | @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle;
15 | @end
16 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshStateHeader.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshStateHeader.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 15/4/24.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJRefreshHeader.h"
10 |
11 | @interface MJRefreshStateHeader : MJRefreshHeader
12 | #pragma mark - 刷新时间相关
13 | /** 利用这个block来决定显示的更新时间文字 */
14 | @property (copy, nonatomic) NSString *(^lastUpdatedTimeText)(NSDate *lastUpdatedTime);
15 | /** 显示上一次刷新时间的label */
16 | @property (weak, nonatomic, readonly) UILabel *lastUpdatedTimeLabel;
17 |
18 | #pragma mark - 状态相关
19 | /** 文字距离圈圈、箭头的距离 */
20 | @property (assign, nonatomic) CGFloat labelLeftInset;
21 | /** 显示刷新状态的label */
22 | @property (weak, nonatomic, readonly) UILabel *stateLabel;
23 | /** 设置state状态下的文字 */
24 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state;
25 | @end
26 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/arrow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/myl9361/MYLStockChartDemo/1b8a82186275e9d76c5ac94cbbe059ac437402f7/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/arrow@2x.png
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/en.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/myl9361/MYLStockChartDemo/1b8a82186275e9d76c5ac94cbbe059ac437402f7/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/en.lproj/Localizable.strings
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/zh-Hans.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/myl9361/MYLStockChartDemo/1b8a82186275e9d76c5ac94cbbe059ac437402f7/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/zh-Hans.lproj/Localizable.strings
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/zh-Hant.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | "MJRefreshHeaderIdleText" = "下拉可以刷新";
2 | "MJRefreshHeaderPullingText" = "鬆開立即刷新";
3 | "MJRefreshHeaderRefreshingText" = "正在刷新數據中...";
4 |
5 | "MJRefreshAutoFooterIdleText" = "點擊或上拉加載更多";
6 | "MJRefreshAutoFooterRefreshingText" = "正在加載更多的數據...";
7 | "MJRefreshAutoFooterNoMoreDataText" = "已經全部加載完畢";
8 |
9 | "MJRefreshBackFooterIdleText" = "上拉可以加載更多";
10 | "MJRefreshBackFooterPullingText" = "鬆開立即加載更多";
11 | "MJRefreshBackFooterRefreshingText" = "正在加載更多的數據...";
12 | "MJRefreshBackFooterNoMoreDataText" = "已經全部加載完畢";
13 |
14 | "MJRefreshHeaderLastTimeText" = "最後更新:";
15 | "MJRefreshHeaderDateTodayText" = "今天";
16 | "MJRefreshHeaderNoneLastDateText" = "無記錄";
17 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/MJRefresh.h:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 |
4 | #import "UIScrollView+MJRefresh.h"
5 | #import "UIScrollView+MJExtension.h"
6 | #import "UIView+MJExtension.h"
7 |
8 | #import "MJRefreshNormalHeader.h"
9 | #import "MJRefreshGifHeader.h"
10 |
11 | #import "MJRefreshBackNormalFooter.h"
12 | #import "MJRefreshBackGifFooter.h"
13 | #import "MJRefreshAutoNormalFooter.h"
14 | #import "MJRefreshAutoGifFooter.h"
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/MJRefreshConst.h:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | #import
4 | #import
5 |
6 | // 弱引用
7 | #define MJWeakSelf __weak typeof(self) weakSelf = self;
8 |
9 | // 日志输出
10 | #ifdef DEBUG
11 | #define MJRefreshLog(...) NSLog(__VA_ARGS__)
12 | #else
13 | #define MJRefreshLog(...)
14 | #endif
15 |
16 | // 过期提醒
17 | #define MJRefreshDeprecated(instead) NS_DEPRECATED(2_0, 2_0, 2_0, 2_0, instead)
18 |
19 | // 运行时objc_msgSend
20 | #define MJRefreshMsgSend(...) ((void (*)(void *, SEL, UIView *))objc_msgSend)(__VA_ARGS__)
21 | #define MJRefreshMsgTarget(target) (__bridge void *)(target)
22 |
23 | // RGB颜色
24 | #define MJRefreshColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
25 |
26 | // 文字颜色
27 | #define MJRefreshLabelTextColor MJRefreshColor(90, 90, 90)
28 |
29 | // 字体大小
30 | #define MJRefreshLabelFont [UIFont boldSystemFontOfSize:14]
31 |
32 | // 常量
33 | UIKIT_EXTERN const CGFloat MJRefreshLabelLeftInset;
34 | UIKIT_EXTERN const CGFloat MJRefreshHeaderHeight;
35 | UIKIT_EXTERN const CGFloat MJRefreshFooterHeight;
36 | UIKIT_EXTERN const CGFloat MJRefreshFastAnimationDuration;
37 | UIKIT_EXTERN const CGFloat MJRefreshSlowAnimationDuration;
38 |
39 | UIKIT_EXTERN NSString *const MJRefreshKeyPathContentOffset;
40 | UIKIT_EXTERN NSString *const MJRefreshKeyPathContentSize;
41 | UIKIT_EXTERN NSString *const MJRefreshKeyPathContentInset;
42 | UIKIT_EXTERN NSString *const MJRefreshKeyPathPanState;
43 |
44 | UIKIT_EXTERN NSString *const MJRefreshHeaderLastUpdatedTimeKey;
45 |
46 | UIKIT_EXTERN NSString *const MJRefreshHeaderIdleText;
47 | UIKIT_EXTERN NSString *const MJRefreshHeaderPullingText;
48 | UIKIT_EXTERN NSString *const MJRefreshHeaderRefreshingText;
49 |
50 | UIKIT_EXTERN NSString *const MJRefreshAutoFooterIdleText;
51 | UIKIT_EXTERN NSString *const MJRefreshAutoFooterRefreshingText;
52 | UIKIT_EXTERN NSString *const MJRefreshAutoFooterNoMoreDataText;
53 |
54 | UIKIT_EXTERN NSString *const MJRefreshBackFooterIdleText;
55 | UIKIT_EXTERN NSString *const MJRefreshBackFooterPullingText;
56 | UIKIT_EXTERN NSString *const MJRefreshBackFooterRefreshingText;
57 | UIKIT_EXTERN NSString *const MJRefreshBackFooterNoMoreDataText;
58 |
59 | UIKIT_EXTERN NSString *const MJRefreshHeaderLastTimeText;
60 | UIKIT_EXTERN NSString *const MJRefreshHeaderDateTodayText;
61 | UIKIT_EXTERN NSString *const MJRefreshHeaderNoneLastDateText;
62 |
63 | // 状态检查
64 | #define MJRefreshCheckState \
65 | MJRefreshState oldState = self.state; \
66 | if (state == oldState) return; \
67 | [super setState:state];
68 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/MJRefreshConst.m:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | #import
4 |
5 | const CGFloat MJRefreshLabelLeftInset = 25;
6 | const CGFloat MJRefreshHeaderHeight = 54.0;
7 | const CGFloat MJRefreshFooterHeight = 44.0;
8 | const CGFloat MJRefreshFastAnimationDuration = 0.25;
9 | const CGFloat MJRefreshSlowAnimationDuration = 0.4;
10 |
11 | NSString *const MJRefreshKeyPathContentOffset = @"contentOffset";
12 | NSString *const MJRefreshKeyPathContentInset = @"contentInset";
13 | NSString *const MJRefreshKeyPathContentSize = @"contentSize";
14 | NSString *const MJRefreshKeyPathPanState = @"state";
15 |
16 | NSString *const MJRefreshHeaderLastUpdatedTimeKey = @"MJRefreshHeaderLastUpdatedTimeKey";
17 |
18 | NSString *const MJRefreshHeaderIdleText = @"MJRefreshHeaderIdleText";
19 | NSString *const MJRefreshHeaderPullingText = @"MJRefreshHeaderPullingText";
20 | NSString *const MJRefreshHeaderRefreshingText = @"MJRefreshHeaderRefreshingText";
21 |
22 | NSString *const MJRefreshAutoFooterIdleText = @"MJRefreshAutoFooterIdleText";
23 | NSString *const MJRefreshAutoFooterRefreshingText = @"MJRefreshAutoFooterRefreshingText";
24 | NSString *const MJRefreshAutoFooterNoMoreDataText = @"MJRefreshAutoFooterNoMoreDataText";
25 |
26 | NSString *const MJRefreshBackFooterIdleText = @"MJRefreshBackFooterIdleText";
27 | NSString *const MJRefreshBackFooterPullingText = @"MJRefreshBackFooterPullingText";
28 | NSString *const MJRefreshBackFooterRefreshingText = @"MJRefreshBackFooterRefreshingText";
29 | NSString *const MJRefreshBackFooterNoMoreDataText = @"MJRefreshBackFooterNoMoreDataText";
30 |
31 | NSString *const MJRefreshHeaderLastTimeText = @"MJRefreshHeaderLastTimeText";
32 | NSString *const MJRefreshHeaderDateTodayText = @"MJRefreshHeaderDateTodayText";
33 | NSString *const MJRefreshHeaderNoneLastDateText = @"MJRefreshHeaderNoneLastDateText";
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/NSBundle+MJRefresh.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSBundle+MJRefresh.h
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 16/6/13.
6 | // Copyright © 2016年 小码哥. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSBundle (MJRefresh)
12 | + (instancetype)mj_refreshBundle;
13 | + (UIImage *)mj_arrowImage;
14 | + (NSString *)mj_localizedStringForKey:(NSString *)key value:(NSString *)value;
15 | + (NSString *)mj_localizedStringForKey:(NSString *)key;
16 | @end
17 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/NSBundle+MJRefresh.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSBundle+MJRefresh.m
3 | // MJRefreshExample
4 | //
5 | // Created by MJ Lee on 16/6/13.
6 | // Copyright © 2016年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "NSBundle+MJRefresh.h"
10 | #import "MJRefreshComponent.h"
11 |
12 | @implementation NSBundle (MJRefresh)
13 | + (instancetype)mj_refreshBundle
14 | {
15 | static NSBundle *refreshBundle = nil;
16 | if (refreshBundle == nil) {
17 | // 这里不使用mainBundle是为了适配pod 1.x和0.x
18 | refreshBundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:[MJRefreshComponent class]] pathForResource:@"MJRefresh" ofType:@"bundle"]];
19 | }
20 | return refreshBundle;
21 | }
22 |
23 | + (UIImage *)mj_arrowImage
24 | {
25 | static UIImage *arrowImage = nil;
26 | if (arrowImage == nil) {
27 | arrowImage = [[UIImage imageWithContentsOfFile:[[self mj_refreshBundle] pathForResource:@"arrow@2x" ofType:@"png"]] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
28 | }
29 | return arrowImage;
30 | }
31 |
32 | + (NSString *)mj_localizedStringForKey:(NSString *)key
33 | {
34 | return [self mj_localizedStringForKey:key value:nil];
35 | }
36 |
37 | + (NSString *)mj_localizedStringForKey:(NSString *)key value:(NSString *)value
38 | {
39 | static NSBundle *bundle = nil;
40 | if (bundle == nil) {
41 | // (iOS获取的语言字符串比较不稳定)目前框架只处理en、zh-Hans、zh-Hant三种情况,其他按照系统默认处理
42 | NSString *language = [NSLocale preferredLanguages].firstObject;
43 | if ([language hasPrefix:@"en"]) {
44 | language = @"en";
45 | } else if ([language hasPrefix:@"zh"]) {
46 | if ([language rangeOfString:@"Hans"].location != NSNotFound) {
47 | language = @"zh-Hans"; // 简体中文
48 | } else { // zh-Hant\zh-HK\zh-TW
49 | language = @"zh-Hant"; // 繁體中文
50 | }
51 | } else {
52 | language = @"en";
53 | }
54 |
55 | // 从MJRefresh.bundle中查找资源
56 | bundle = [NSBundle bundleWithPath:[[NSBundle mj_refreshBundle] pathForResource:language ofType:@"lproj"]];
57 | }
58 | value = [bundle localizedStringForKey:key value:value table:nil];
59 | return [[NSBundle mainBundle] localizedStringForKey:key value:value table:nil];
60 | }
61 | @end
62 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/UIScrollView+MJExtension.h:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | // UIScrollView+Extension.h
4 | // MJRefreshExample
5 | //
6 | // Created by MJ Lee on 14-5-28.
7 | // Copyright (c) 2014年 小码哥. All rights reserved.
8 | //
9 |
10 | #import
11 |
12 | @interface UIScrollView (MJExtension)
13 | @property (assign, nonatomic) CGFloat mj_insetT;
14 | @property (assign, nonatomic) CGFloat mj_insetB;
15 | @property (assign, nonatomic) CGFloat mj_insetL;
16 | @property (assign, nonatomic) CGFloat mj_insetR;
17 |
18 | @property (assign, nonatomic) CGFloat mj_offsetX;
19 | @property (assign, nonatomic) CGFloat mj_offsetY;
20 |
21 | @property (assign, nonatomic) CGFloat mj_contentW;
22 | @property (assign, nonatomic) CGFloat mj_contentH;
23 | @end
24 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/UIScrollView+MJExtension.m:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | // UIScrollView+Extension.m
4 | // MJRefreshExample
5 | //
6 | // Created by MJ Lee on 14-5-28.
7 | // Copyright (c) 2014年 小码哥. All rights reserved.
8 | //
9 |
10 | #import "UIScrollView+MJExtension.h"
11 | #import
12 |
13 | @implementation UIScrollView (MJExtension)
14 |
15 | - (void)setMj_insetT:(CGFloat)mj_insetT
16 | {
17 | UIEdgeInsets inset = self.contentInset;
18 | inset.top = mj_insetT;
19 | self.contentInset = inset;
20 | }
21 |
22 | - (CGFloat)mj_insetT
23 | {
24 | return self.contentInset.top;
25 | }
26 |
27 | - (void)setMj_insetB:(CGFloat)mj_insetB
28 | {
29 | UIEdgeInsets inset = self.contentInset;
30 | inset.bottom = mj_insetB;
31 | self.contentInset = inset;
32 | }
33 |
34 | - (CGFloat)mj_insetB
35 | {
36 | return self.contentInset.bottom;
37 | }
38 |
39 | - (void)setMj_insetL:(CGFloat)mj_insetL
40 | {
41 | UIEdgeInsets inset = self.contentInset;
42 | inset.left = mj_insetL;
43 | self.contentInset = inset;
44 | }
45 |
46 | - (CGFloat)mj_insetL
47 | {
48 | return self.contentInset.left;
49 | }
50 |
51 | - (void)setMj_insetR:(CGFloat)mj_insetR
52 | {
53 | UIEdgeInsets inset = self.contentInset;
54 | inset.right = mj_insetR;
55 | self.contentInset = inset;
56 | }
57 |
58 | - (CGFloat)mj_insetR
59 | {
60 | return self.contentInset.right;
61 | }
62 |
63 | - (void)setMj_offsetX:(CGFloat)mj_offsetX
64 | {
65 | CGPoint offset = self.contentOffset;
66 | offset.x = mj_offsetX;
67 | self.contentOffset = offset;
68 | }
69 |
70 | - (CGFloat)mj_offsetX
71 | {
72 | return self.contentOffset.x;
73 | }
74 |
75 | - (void)setMj_offsetY:(CGFloat)mj_offsetY
76 | {
77 | CGPoint offset = self.contentOffset;
78 | offset.y = mj_offsetY;
79 | self.contentOffset = offset;
80 | }
81 |
82 | - (CGFloat)mj_offsetY
83 | {
84 | return self.contentOffset.y;
85 | }
86 |
87 | - (void)setMj_contentW:(CGFloat)mj_contentW
88 | {
89 | CGSize size = self.contentSize;
90 | size.width = mj_contentW;
91 | self.contentSize = size;
92 | }
93 |
94 | - (CGFloat)mj_contentW
95 | {
96 | return self.contentSize.width;
97 | }
98 |
99 | - (void)setMj_contentH:(CGFloat)mj_contentH
100 | {
101 | CGSize size = self.contentSize;
102 | size.height = mj_contentH;
103 | self.contentSize = size;
104 | }
105 |
106 | - (CGFloat)mj_contentH
107 | {
108 | return self.contentSize.height;
109 | }
110 | @end
111 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/UIScrollView+MJRefresh.h:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | // UIScrollView+MJRefresh.h
4 | // MJRefreshExample
5 | //
6 | // Created by MJ Lee on 15/3/4.
7 | // Copyright (c) 2015年 小码哥. All rights reserved.
8 | // 给ScrollView增加下拉刷新、上拉刷新的功能
9 |
10 | #import
11 | #import "MJRefreshConst.h"
12 |
13 | @class MJRefreshHeader, MJRefreshFooter;
14 |
15 | @interface UIScrollView (MJRefresh)
16 | /** 下拉刷新控件 */
17 | @property (strong, nonatomic) MJRefreshHeader *mj_header;
18 | @property (strong, nonatomic) MJRefreshHeader *header MJRefreshDeprecated("使用mj_header");
19 | /** 上拉刷新控件 */
20 | @property (strong, nonatomic) MJRefreshFooter *mj_footer;
21 | @property (strong, nonatomic) MJRefreshFooter *footer MJRefreshDeprecated("使用mj_footer");
22 |
23 | #pragma mark - other
24 | - (NSInteger)mj_totalDataCount;
25 | @property (copy, nonatomic) void (^mj_reloadDataBlock)(NSInteger totalDataCount);
26 | @end
27 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/UIView+MJExtension.h:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | // UIView+Extension.h
4 | // MJRefreshExample
5 | //
6 | // Created by MJ Lee on 14-5-28.
7 | // Copyright (c) 2014年 小码哥. All rights reserved.
8 | //
9 |
10 | #import
11 |
12 | @interface UIView (MJExtension)
13 | @property (assign, nonatomic) CGFloat mj_x;
14 | @property (assign, nonatomic) CGFloat mj_y;
15 | @property (assign, nonatomic) CGFloat mj_w;
16 | @property (assign, nonatomic) CGFloat mj_h;
17 | @property (assign, nonatomic) CGSize mj_size;
18 | @property (assign, nonatomic) CGPoint mj_origin;
19 | @end
20 |
--------------------------------------------------------------------------------
/Pods/MJRefresh/MJRefresh/UIView+MJExtension.m:
--------------------------------------------------------------------------------
1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh
2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
3 | // UIView+Extension.m
4 | // MJRefreshExample
5 | //
6 | // Created by MJ Lee on 14-5-28.
7 | // Copyright (c) 2014年 小码哥. All rights reserved.
8 | //
9 |
10 | #import "UIView+MJExtension.h"
11 |
12 | @implementation UIView (MJExtension)
13 | - (void)setMj_x:(CGFloat)mj_x
14 | {
15 | CGRect frame = self.frame;
16 | frame.origin.x = mj_x;
17 | self.frame = frame;
18 | }
19 |
20 | - (CGFloat)mj_x
21 | {
22 | return self.frame.origin.x;
23 | }
24 |
25 | - (void)setMj_y:(CGFloat)mj_y
26 | {
27 | CGRect frame = self.frame;
28 | frame.origin.y = mj_y;
29 | self.frame = frame;
30 | }
31 |
32 | - (CGFloat)mj_y
33 | {
34 | return self.frame.origin.y;
35 | }
36 |
37 | - (void)setMj_w:(CGFloat)mj_w
38 | {
39 | CGRect frame = self.frame;
40 | frame.size.width = mj_w;
41 | self.frame = frame;
42 | }
43 |
44 | - (CGFloat)mj_w
45 | {
46 | return self.frame.size.width;
47 | }
48 |
49 | - (void)setMj_h:(CGFloat)mj_h
50 | {
51 | CGRect frame = self.frame;
52 | frame.size.height = mj_h;
53 | self.frame = frame;
54 | }
55 |
56 | - (CGFloat)mj_h
57 | {
58 | return self.frame.size.height;
59 | }
60 |
61 | - (void)setMj_size:(CGSize)mj_size
62 | {
63 | CGRect frame = self.frame;
64 | frame.size = mj_size;
65 | self.frame = frame;
66 | }
67 |
68 | - (CGSize)mj_size
69 | {
70 | return self.frame.size;
71 | }
72 |
73 | - (void)setMj_origin:(CGPoint)mj_origin
74 | {
75 | CGRect frame = self.frame;
76 | frame.origin = mj_origin;
77 | self.frame = frame;
78 | }
79 |
80 | - (CGPoint)mj_origin
81 | {
82 | return self.frame.origin;
83 | }
84 | @end
85 |
--------------------------------------------------------------------------------
/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Masonry (1.0.2)
3 | - MJExtension (3.0.13)
4 | - MJRefresh (3.1.12)
5 | - SDAutoLayout (2.1.7)
6 |
7 | DEPENDENCIES:
8 | - Masonry
9 | - MJExtension
10 | - MJRefresh
11 | - SDAutoLayout (~> 2.1.7)
12 |
13 | SPEC CHECKSUMS:
14 | Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e
15 | MJExtension: 5932755f451458eefa24239358817f8d291240c7
16 | MJRefresh: b96cdb21c4aa75a7b07654311ab2f315c497e806
17 | SDAutoLayout: e9b36d04b8c0b504762a04d76fbbe5108944297a
18 |
19 | PODFILE CHECKSUM: 2c979bdad7986e428dd7f79456f459fee7eca375
20 |
21 | COCOAPODS: 1.2.1.rc.1
22 |
--------------------------------------------------------------------------------
/Pods/Masonry/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry
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.
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASCompositeConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASCompositeConstraint.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 21/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASConstraint.h"
10 | #import "MASUtilities.h"
11 |
12 | /**
13 | * A group of MASConstraint objects
14 | */
15 | @interface MASCompositeConstraint : MASConstraint
16 |
17 | /**
18 | * Creates a composite with a predefined array of children
19 | *
20 | * @param children child MASConstraints
21 | *
22 | * @return a composite constraint
23 | */
24 | - (id)initWithChildren:(NSArray *)children;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASConstraint+Private.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASConstraint+Private.h
3 | // Masonry
4 | //
5 | // Created by Nick Tymchenko on 29/04/14.
6 | // Copyright (c) 2014 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASConstraint.h"
10 |
11 | @protocol MASConstraintDelegate;
12 |
13 |
14 | @interface MASConstraint ()
15 |
16 | /**
17 | * Whether or not to check for an existing constraint instead of adding constraint
18 | */
19 | @property (nonatomic, assign) BOOL updateExisting;
20 |
21 | /**
22 | * Usually MASConstraintMaker but could be a parent MASConstraint
23 | */
24 | @property (nonatomic, weak) id delegate;
25 |
26 | /**
27 | * Based on a provided value type, is equal to calling:
28 | * NSNumber - setOffset:
29 | * NSValue with CGPoint - setPointOffset:
30 | * NSValue with CGSize - setSizeOffset:
31 | * NSValue with MASEdgeInsets - setInsets:
32 | */
33 | - (void)setLayoutConstantWithValue:(NSValue *)value;
34 |
35 | @end
36 |
37 |
38 | @interface MASConstraint (Abstract)
39 |
40 | /**
41 | * Sets the constraint relation to given NSLayoutRelation
42 | * returns a block which accepts one of the following:
43 | * MASViewAttribute, UIView, NSValue, NSArray
44 | * see readme for more details.
45 | */
46 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation;
47 |
48 | /**
49 | * Override to set a custom chaining behaviour
50 | */
51 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute;
52 |
53 | @end
54 |
55 |
56 | @protocol MASConstraintDelegate
57 |
58 | /**
59 | * Notifies the delegate when the constraint needs to be replaced with another constraint. For example
60 | * A MASViewConstraint may turn into a MASCompositeConstraint when an array is passed to one of the equality blocks
61 | */
62 | - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint;
63 |
64 | - (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute;
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASLayoutConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASLayoutConstraint.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASUtilities.h"
10 |
11 | /**
12 | * When you are debugging or printing the constraints attached to a view this subclass
13 | * makes it easier to identify which constraints have been created via Masonry
14 | */
15 | @interface MASLayoutConstraint : NSLayoutConstraint
16 |
17 | /**
18 | * a key to associate with this constraint
19 | */
20 | @property (nonatomic, strong) id mas_key;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASLayoutConstraint.m:
--------------------------------------------------------------------------------
1 | //
2 | // MASLayoutConstraint.m
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASLayoutConstraint.h"
10 |
11 | @implementation MASLayoutConstraint
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASViewAttribute.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASAttribute.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 21/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASUtilities.h"
10 |
11 | /**
12 | * An immutable tuple which stores the view and the related NSLayoutAttribute.
13 | * Describes part of either the left or right hand side of a constraint equation
14 | */
15 | @interface MASViewAttribute : NSObject
16 |
17 | /**
18 | * The view which the reciever relates to. Can be nil if item is not a view.
19 | */
20 | @property (nonatomic, weak, readonly) MAS_VIEW *view;
21 |
22 | /**
23 | * The item which the reciever relates to.
24 | */
25 | @property (nonatomic, weak, readonly) id item;
26 |
27 | /**
28 | * The attribute which the reciever relates to
29 | */
30 | @property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute;
31 |
32 | /**
33 | * Convenience initializer.
34 | */
35 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute;
36 |
37 | /**
38 | * The designated initializer.
39 | */
40 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute;
41 |
42 | /**
43 | * Determine whether the layoutAttribute is a size attribute
44 | *
45 | * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight
46 | */
47 | - (BOOL)isSizeAttribute;
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASViewAttribute.m:
--------------------------------------------------------------------------------
1 | //
2 | // MASAttribute.m
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 21/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASViewAttribute.h"
10 |
11 | @implementation MASViewAttribute
12 |
13 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute {
14 | self = [self initWithView:view item:view layoutAttribute:layoutAttribute];
15 | return self;
16 | }
17 |
18 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute {
19 | self = [super init];
20 | if (!self) return nil;
21 |
22 | _view = view;
23 | _item = item;
24 | _layoutAttribute = layoutAttribute;
25 |
26 | return self;
27 | }
28 |
29 | - (BOOL)isSizeAttribute {
30 | return self.layoutAttribute == NSLayoutAttributeWidth
31 | || self.layoutAttribute == NSLayoutAttributeHeight;
32 | }
33 |
34 | - (BOOL)isEqual:(MASViewAttribute *)viewAttribute {
35 | if ([viewAttribute isKindOfClass:self.class]) {
36 | return self.view == viewAttribute.view
37 | && self.layoutAttribute == viewAttribute.layoutAttribute;
38 | }
39 | return [super isEqual:viewAttribute];
40 | }
41 |
42 | - (NSUInteger)hash {
43 | return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute;
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASViewConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASConstraint.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 20/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASViewAttribute.h"
10 | #import "MASConstraint.h"
11 | #import "MASLayoutConstraint.h"
12 | #import "MASUtilities.h"
13 |
14 | /**
15 | * A single constraint.
16 | * Contains the attributes neccessary for creating a NSLayoutConstraint and adding it to the appropriate view
17 | */
18 | @interface MASViewConstraint : MASConstraint
19 |
20 | /**
21 | * First item/view and first attribute of the NSLayoutConstraint
22 | */
23 | @property (nonatomic, strong, readonly) MASViewAttribute *firstViewAttribute;
24 |
25 | /**
26 | * Second item/view and second attribute of the NSLayoutConstraint
27 | */
28 | @property (nonatomic, strong, readonly) MASViewAttribute *secondViewAttribute;
29 |
30 | /**
31 | * initialises the MASViewConstraint with the first part of the equation
32 | *
33 | * @param firstViewAttribute view.mas_left, view.mas_width etc.
34 | *
35 | * @return a new view constraint
36 | */
37 | - (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute;
38 |
39 | /**
40 | * Returns all MASViewConstraints installed with this view as a first item.
41 | *
42 | * @param view A view to retrieve constraints for.
43 | *
44 | * @return An array of MASViewConstraints.
45 | */
46 | + (NSArray *)installedConstraintsForView:(MAS_VIEW *)view;
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/Masonry.h:
--------------------------------------------------------------------------------
1 | //
2 | // Masonry.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 20/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for Masonry.
12 | FOUNDATION_EXPORT double MasonryVersionNumber;
13 |
14 | //! Project version string for Masonry.
15 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[];
16 |
17 | #import "MASUtilities.h"
18 | #import "View+MASAdditions.h"
19 | #import "View+MASShorthandAdditions.h"
20 | #import "ViewController+MASAdditions.h"
21 | #import "NSArray+MASAdditions.h"
22 | #import "NSArray+MASShorthandAdditions.h"
23 | #import "MASConstraint.h"
24 | #import "MASCompositeConstraint.h"
25 | #import "MASViewAttribute.h"
26 | #import "MASViewConstraint.h"
27 | #import "MASConstraintMaker.h"
28 | #import "MASLayoutConstraint.h"
29 | #import "NSLayoutConstraint+MASDebugAdditions.h"
30 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/NSArray+MASAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+MASAdditions.h
3 | //
4 | //
5 | // Created by Daniel Hammond on 11/26/13.
6 | //
7 | //
8 |
9 | #import "MASUtilities.h"
10 | #import "MASConstraintMaker.h"
11 | #import "MASViewAttribute.h"
12 |
13 | typedef NS_ENUM(NSUInteger, MASAxisType) {
14 | MASAxisTypeHorizontal,
15 | MASAxisTypeVertical
16 | };
17 |
18 | @interface NSArray (MASAdditions)
19 |
20 | /**
21 | * Creates a MASConstraintMaker with each view in the callee.
22 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing on each view
23 | *
24 | * @param block scope within which you can build up the constraints which you wish to apply to each view.
25 | *
26 | * @return Array of created MASConstraints
27 | */
28 | - (NSArray *)mas_makeConstraints:(void (^)(MASConstraintMaker *make))block;
29 |
30 | /**
31 | * Creates a MASConstraintMaker with each view in the callee.
32 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view.
33 | * If an existing constraint exists then it will be updated instead.
34 | *
35 | * @param block scope within which you can build up the constraints which you wish to apply to each view.
36 | *
37 | * @return Array of created/updated MASConstraints
38 | */
39 | - (NSArray *)mas_updateConstraints:(void (^)(MASConstraintMaker *make))block;
40 |
41 | /**
42 | * Creates a MASConstraintMaker with each view in the callee.
43 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view.
44 | * All constraints previously installed for the views will be removed.
45 | *
46 | * @param block scope within which you can build up the constraints which you wish to apply to each view.
47 | *
48 | * @return Array of created/updated MASConstraints
49 | */
50 | - (NSArray *)mas_remakeConstraints:(void (^)(MASConstraintMaker *make))block;
51 |
52 | /**
53 | * distribute with fixed spacing
54 | *
55 | * @param axisType which axis to distribute items along
56 | * @param fixedSpacing the spacing between each item
57 | * @param leadSpacing the spacing before the first item and the container
58 | * @param tailSpacing the spacing after the last item and the container
59 | */
60 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing;
61 |
62 | /**
63 | * distribute with fixed item size
64 | *
65 | * @param axisType which axis to distribute items along
66 | * @param fixedItemLength the fixed length of each item
67 | * @param leadSpacing the spacing before the first item and the container
68 | * @param tailSpacing the spacing after the last item and the container
69 | */
70 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing;
71 |
72 | @end
73 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+MASShorthandAdditions.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 22/07/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "NSArray+MASAdditions.h"
10 |
11 | #ifdef MAS_SHORTHAND
12 |
13 | /**
14 | * Shorthand array additions without the 'mas_' prefixes,
15 | * only enabled if MAS_SHORTHAND is defined
16 | */
17 | @interface NSArray (MASShorthandAdditions)
18 |
19 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block;
20 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block;
21 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block;
22 |
23 | @end
24 |
25 | @implementation NSArray (MASShorthandAdditions)
26 |
27 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block {
28 | return [self mas_makeConstraints:block];
29 | }
30 |
31 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block {
32 | return [self mas_updateConstraints:block];
33 | }
34 |
35 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block {
36 | return [self mas_remakeConstraints:block];
37 | }
38 |
39 | @end
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSLayoutConstraint+MASDebugAdditions.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASUtilities.h"
10 |
11 | /**
12 | * makes debug and log output of NSLayoutConstraints more readable
13 | */
14 | @interface NSLayoutConstraint (MASDebugAdditions)
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/ViewController+MASAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+MASAdditions.h
3 | // Masonry
4 | //
5 | // Created by Craig Siemens on 2015-06-23.
6 | //
7 | //
8 |
9 | #import "MASUtilities.h"
10 | #import "MASConstraintMaker.h"
11 | #import "MASViewAttribute.h"
12 |
13 | #ifdef MAS_VIEW_CONTROLLER
14 |
15 | @interface MAS_VIEW_CONTROLLER (MASAdditions)
16 |
17 | /**
18 | * following properties return a new MASViewAttribute with appropriate UILayoutGuide and NSLayoutAttribute
19 | */
20 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide;
21 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide;
22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideTop;
23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideBottom;
24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideTop;
25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideBottom;
26 |
27 |
28 | @end
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/ViewController+MASAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+MASAdditions.m
3 | // Masonry
4 | //
5 | // Created by Craig Siemens on 2015-06-23.
6 | //
7 | //
8 |
9 | #import "ViewController+MASAdditions.h"
10 |
11 | #ifdef MAS_VIEW_CONTROLLER
12 |
13 | @implementation MAS_VIEW_CONTROLLER (MASAdditions)
14 |
15 | - (MASViewAttribute *)mas_topLayoutGuide {
16 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
17 | }
18 | - (MASViewAttribute *)mas_topLayoutGuideTop {
19 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeTop];
20 | }
21 | - (MASViewAttribute *)mas_topLayoutGuideBottom {
22 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
23 | }
24 |
25 | - (MASViewAttribute *)mas_bottomLayoutGuide {
26 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
27 | }
28 | - (MASViewAttribute *)mas_bottomLayoutGuideTop {
29 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
30 | }
31 | - (MASViewAttribute *)mas_bottomLayoutGuideBottom {
32 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
33 | }
34 |
35 |
36 |
37 | @end
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/myl.xcuserdatad/xcschemes/MJExtension.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/myl.xcuserdatad/xcschemes/MJRefresh.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/myl.xcuserdatad/xcschemes/Masonry.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/myl.xcuserdatad/xcschemes/Pods-MYLStockDemo.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/myl.xcuserdatad/xcschemes/SDAutoLayout.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/myl.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MJExtension.xcscheme
8 |
9 | isShown
10 |
11 |
12 | MJRefresh.xcscheme
13 |
14 | isShown
15 |
16 |
17 | Masonry.xcscheme
18 |
19 | isShown
20 |
21 |
22 | Pods-MYLStockDemo.xcscheme
23 |
24 | isShown
25 |
26 |
27 | SDAutoLayout.xcscheme
28 |
29 | isShown
30 |
31 |
32 |
33 | SuppressBuildableAutocreation
34 |
35 | 04CF549EBEEE7BC87AEAE35397184D94
36 |
37 | primary
38 |
39 |
40 | 178E76702F89407F486F5D8CBA3330AB
41 |
42 | primary
43 |
44 |
45 | 364D39CD89955BC9DD287F42A04D583C
46 |
47 | primary
48 |
49 |
50 | 9DC8D9E02903E93BD0B2FEC9D846EA20
51 |
52 | primary
53 |
54 |
55 | A316B54C67E947D23CECD230FA5BFAEF
56 |
57 | primary
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/Pods/SDAutoLayout/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 GSD_iOS
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/SDAutoLayout/SDAutoLayoutDemo/SDAutoLayout/SDAutoLayout.h:
--------------------------------------------------------------------------------
1 | //
2 | // SDAutoLayout.h
3 | // SDAutoLayoutDemo
4 | //
5 | // Created by gsd on 16/6/27.
6 | // Copyright © 2016年 gsd. All rights reserved.
7 | //
8 |
9 |
10 | /*
11 |
12 | SDAutoLayout
13 | 版本:2.1.7
14 | 发布:2016.08.12
15 |
16 | */
17 |
18 | #ifndef SDAutoLayout_h
19 | #define SDAutoLayout_h
20 |
21 | #import "UIView+SDAutoLayout.h"
22 | #import "UITableView+SDAutoTableViewCellHeight.h"
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/MJExtension/MJExtension-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_MJExtension : NSObject
3 | @end
4 | @implementation PodsDummy_MJExtension
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/MJExtension/MJExtension-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/MJExtension/MJExtension.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/MJExtension
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MJExtension" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/SDAutoLayout"
4 | PODS_BUILD_DIR = $BUILD_DIR
5 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
6 | PODS_ROOT = ${SRCROOT}
7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/MJExtension
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/MJRefresh/MJRefresh-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_MJRefresh : NSObject
3 | @end
4 | @implementation PodsDummy_MJRefresh
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/MJRefresh/MJRefresh-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/MJRefresh/MJRefresh.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/MJRefresh
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MJRefresh" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/SDAutoLayout"
4 | PODS_BUILD_DIR = $BUILD_DIR
5 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
6 | PODS_ROOT = ${SRCROOT}
7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/MJRefresh
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Masonry/Masonry-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Masonry : NSObject
3 | @end
4 | @implementation PodsDummy_Masonry
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Masonry/Masonry-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Masonry/Masonry.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Masonry
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/SDAutoLayout"
4 | OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit"
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry
9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
10 | SKIP_INSTALL = YES
11 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-MYLStockDemo/Pods-MYLStockDemo-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_MYLStockDemo : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_MYLStockDemo
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-MYLStockDemo/Pods-MYLStockDemo-frameworks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
6 |
7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
8 |
9 | install_framework()
10 | {
11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
12 | local source="${BUILT_PRODUCTS_DIR}/$1"
13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
15 | elif [ -r "$1" ]; then
16 | local source="$1"
17 | fi
18 |
19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
20 |
21 | if [ -L "${source}" ]; then
22 | echo "Symlinked..."
23 | source="$(readlink "${source}")"
24 | fi
25 |
26 | # use filter instead of exclude so missing patterns dont' throw errors
27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
29 |
30 | local basename
31 | basename="$(basename -s .framework "$1")"
32 | binary="${destination}/${basename}.framework/${basename}"
33 | if ! [ -r "$binary" ]; then
34 | binary="${destination}/${basename}"
35 | fi
36 |
37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device
38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
39 | strip_invalid_archs "$binary"
40 | fi
41 |
42 | # Resign the code if required by the build settings to avoid unstable apps
43 | code_sign_if_enabled "${destination}/$(basename "$1")"
44 |
45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
47 | local swift_runtime_libs
48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
49 | for lib in $swift_runtime_libs; do
50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
52 | code_sign_if_enabled "${destination}/${lib}"
53 | done
54 | fi
55 | }
56 |
57 | # Signs a framework with the provided identity
58 | code_sign_if_enabled() {
59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
60 | # Use the current code_sign_identitiy
61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'"
63 |
64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
65 | code_sign_cmd="$code_sign_cmd &"
66 | fi
67 | echo "$code_sign_cmd"
68 | eval "$code_sign_cmd"
69 | fi
70 | }
71 |
72 | # Strip invalid architectures
73 | strip_invalid_archs() {
74 | binary="$1"
75 | # Get architectures for current file
76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
77 | stripped=""
78 | for arch in $archs; do
79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then
80 | # Strip non-valid architectures in-place
81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1
82 | stripped="$stripped $arch"
83 | fi
84 | done
85 | if [[ "$stripped" ]]; then
86 | echo "Stripped $binary of architectures:$stripped"
87 | fi
88 | }
89 |
90 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
91 | wait
92 | fi
93 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-MYLStockDemo/Pods-MYLStockDemo.debug.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/SDAutoLayout"
3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MJExtension" "$PODS_CONFIGURATION_BUILD_DIR/MJRefresh" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" "$PODS_CONFIGURATION_BUILD_DIR/SDAutoLayout"
4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/MJExtension" -isystem "${PODS_ROOT}/Headers/Public/MJRefresh" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/SDAutoLayout"
5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"MJExtension" -l"MJRefresh" -l"Masonry" -l"SDAutoLayout" -framework "Foundation" -framework "UIKit"
6 | PODS_BUILD_DIR = $BUILD_DIR
7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
9 | PODS_ROOT = ${SRCROOT}/Pods
10 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-MYLStockDemo/Pods-MYLStockDemo.release.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/SDAutoLayout"
3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MJExtension" "$PODS_CONFIGURATION_BUILD_DIR/MJRefresh" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" "$PODS_CONFIGURATION_BUILD_DIR/SDAutoLayout"
4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/MJExtension" -isystem "${PODS_ROOT}/Headers/Public/MJRefresh" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/SDAutoLayout"
5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"MJExtension" -l"MJRefresh" -l"Masonry" -l"SDAutoLayout" -framework "Foundation" -framework "UIKit"
6 | PODS_BUILD_DIR = $BUILD_DIR
7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
9 | PODS_ROOT = ${SRCROOT}/Pods
10 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/SDAutoLayout/SDAutoLayout-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_SDAutoLayout : NSObject
3 | @end
4 | @implementation PodsDummy_SDAutoLayout
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/SDAutoLayout/SDAutoLayout-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/SDAutoLayout/SDAutoLayout.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SDAutoLayout
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SDAutoLayout" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/SDAutoLayout"
4 | PODS_BUILD_DIR = $BUILD_DIR
5 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
6 | PODS_ROOT = ${SRCROOT}
7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SDAutoLayout
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # MYLStockDemo
2 | ### 描述
3 | 一个在别的第三方基础上完成的,包含分时图(五档明细图)、五日图、k线图(蜡烛图) 的项目,可横屏 、十字线拖动 ma5 、ma10、ma20 vol macd kdj rsi 等计算和绘制,基本满足股票类app 页面的实现
4 | ### 效果图
5 |
6 | 
7 | 
8 | 
9 | 
10 | 
11 | 
12 |
--------------------------------------------------------------------------------
/image/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/myl9361/MYLStockChartDemo/1b8a82186275e9d76c5ac94cbbe059ac437402f7/image/.DS_Store
--------------------------------------------------------------------------------
/image/IMG_1850.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/myl9361/MYLStockChartDemo/1b8a82186275e9d76c5ac94cbbe059ac437402f7/image/IMG_1850.PNG
--------------------------------------------------------------------------------
/image/IMG_1851.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/myl9361/MYLStockChartDemo/1b8a82186275e9d76c5ac94cbbe059ac437402f7/image/IMG_1851.PNG
--------------------------------------------------------------------------------
/image/IMG_1853.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/myl9361/MYLStockChartDemo/1b8a82186275e9d76c5ac94cbbe059ac437402f7/image/IMG_1853.PNG
--------------------------------------------------------------------------------
/image/IMG_1874.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/myl9361/MYLStockChartDemo/1b8a82186275e9d76c5ac94cbbe059ac437402f7/image/IMG_1874.PNG
--------------------------------------------------------------------------------
/image/IMG_1876.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/myl9361/MYLStockChartDemo/1b8a82186275e9d76c5ac94cbbe059ac437402f7/image/IMG_1876.PNG
--------------------------------------------------------------------------------
/image/gifff.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/myl9361/MYLStockChartDemo/1b8a82186275e9d76c5ac94cbbe059ac437402f7/image/gifff.gif
--------------------------------------------------------------------------------