├── .DS_Store
├── .gitignore
├── HiGo
├── .DS_Store
├── HiGo.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
├── HiGo
│ ├── .DS_Store
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Classes
│ │ ├── .DS_Store
│ │ ├── Car(购物车)
│ │ │ ├── .DS_Store
│ │ │ └── Controller
│ │ │ │ ├── HGCarController.h
│ │ │ │ └── HGCarController.m
│ │ ├── Global(全球购)
│ │ │ ├── .DS_Store
│ │ │ └── Controller
│ │ │ │ ├── HGGlobalController.h
│ │ │ │ └── HGGlobalController.m
│ │ ├── Home(首页)
│ │ │ ├── .DS_Store
│ │ │ ├── Controller
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── HGChoiceController.h
│ │ │ │ ├── HGChoiceController.m
│ │ │ │ ├── HGFindController.h
│ │ │ │ ├── HGFindController.m
│ │ │ │ ├── HGHomeController.h
│ │ │ │ ├── HGHomeController.m
│ │ │ │ ├── HGSpecialController.h
│ │ │ │ └── HGSpecialController.m
│ │ │ ├── HGHttpTool.h
│ │ │ ├── HGHttpTool.m
│ │ │ ├── Model
│ │ │ │ ├── HGCategoryModel.h
│ │ │ │ ├── HGCategoryModel.m
│ │ │ │ ├── HGFindBannerModel.h
│ │ │ │ ├── HGFindBannerModel.m
│ │ │ │ ├── HGFindBannerPicModel.h
│ │ │ │ ├── HGFindBannerPicModel.m
│ │ │ │ ├── HGFindFrameModel.h
│ │ │ │ ├── HGFindFrameModel.m
│ │ │ │ ├── HGFindModel.h
│ │ │ │ ├── HGFindModel.m
│ │ │ │ ├── HGGoodsFrame.h
│ │ │ │ ├── HGGoodsFrame.m
│ │ │ │ ├── HGGoodsImageModel.h
│ │ │ │ ├── HGGoodsImageModel.m
│ │ │ │ ├── HGGoodsInfoModel.h
│ │ │ │ ├── HGGoodsInfoModel.m
│ │ │ │ ├── HGGoodsMainImageModel.h
│ │ │ │ ├── HGGoodsMainImageModel.m
│ │ │ │ ├── HGGoodsModel.h
│ │ │ │ ├── HGGoodsModel.m
│ │ │ │ ├── HGImageModel.h
│ │ │ │ ├── HGImageModel.m
│ │ │ │ ├── HGScrollModel.h
│ │ │ │ ├── HGScrollModel.m
│ │ │ │ ├── HGSpecialMainImageModel.h
│ │ │ │ ├── HGSpecialMainImageModel.m
│ │ │ │ ├── HGSpecialModel.h
│ │ │ │ ├── HGSpecialModel.m
│ │ │ │ ├── HGWaterFlow.h
│ │ │ │ └── HGWaterFlow.m
│ │ │ └── View
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── HGCategoryCell.h
│ │ │ │ ├── HGCategoryCell.m
│ │ │ │ ├── HGCategoryList.h
│ │ │ │ ├── HGCategoryList.m
│ │ │ │ ├── HGChoiceCell.h
│ │ │ │ ├── HGChoiceCell.m
│ │ │ │ ├── HGChoiceShowView.h
│ │ │ │ ├── HGChoiceShowView.m
│ │ │ │ ├── HGFindCell.h
│ │ │ │ ├── HGFindCell.m
│ │ │ │ ├── HGFindHeadView.h
│ │ │ │ ├── HGFindHeadView.m
│ │ │ │ ├── HGFindShowView.h
│ │ │ │ ├── HGFindShowView.m
│ │ │ │ ├── HGList.h
│ │ │ │ ├── HGList.m
│ │ │ │ ├── HGScroll.h
│ │ │ │ ├── HGScroll.m
│ │ │ │ ├── HGScrollCell.h
│ │ │ │ ├── HGScrollCell.m
│ │ │ │ ├── HGSpecialCell.h
│ │ │ │ ├── HGSpecialCell.m
│ │ │ │ ├── HGTitleView.h
│ │ │ │ └── HGTitleView.m
│ │ ├── Main
│ │ │ ├── .DS_Store
│ │ │ ├── Controller
│ │ │ │ ├── HGNavController.h
│ │ │ │ ├── HGNavController.m
│ │ │ │ ├── HGTabbarController.h
│ │ │ │ └── HGTabbarController.m
│ │ │ └── View
│ │ │ │ ├── HGTabButton.h
│ │ │ │ ├── HGTabButton.m
│ │ │ │ ├── HGTabView.h
│ │ │ │ └── HGTabView.m
│ │ ├── Me(我)
│ │ │ ├── .DS_Store
│ │ │ └── Controller
│ │ │ │ ├── HGMeController.h
│ │ │ │ └── HGMeController.m
│ │ ├── Message(消息)
│ │ │ ├── .DS_Store
│ │ │ └── Controller
│ │ │ │ ├── HGMesageController.h
│ │ │ │ └── HGMesageController.m
│ │ └── Other(其它)
│ │ │ ├── .DS_Store
│ │ │ ├── Common
│ │ │ ├── .DS_Store
│ │ │ ├── HGBaseMethod.h
│ │ │ ├── HGBaseMethod.m
│ │ │ ├── HGFmTool.h
│ │ │ └── HGFmTool.m
│ │ │ ├── Lib
│ │ │ ├── .DS_Store
│ │ │ ├── AFNetworking
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── AFHTTPRequestOperation.h
│ │ │ │ ├── AFHTTPRequestOperation.m
│ │ │ │ ├── AFHTTPRequestOperationManager.h
│ │ │ │ ├── AFHTTPRequestOperationManager.m
│ │ │ │ ├── AFHTTPSessionManager.h
│ │ │ │ ├── AFHTTPSessionManager.m
│ │ │ │ ├── AFNetworkReachabilityManager.h
│ │ │ │ ├── AFNetworkReachabilityManager.m
│ │ │ │ ├── AFNetworking.h
│ │ │ │ ├── AFSecurityPolicy.h
│ │ │ │ ├── AFSecurityPolicy.m
│ │ │ │ ├── AFURLConnectionOperation.h
│ │ │ │ ├── AFURLConnectionOperation.m
│ │ │ │ ├── AFURLRequestSerialization.h
│ │ │ │ ├── AFURLRequestSerialization.m
│ │ │ │ ├── AFURLResponseSerialization.h
│ │ │ │ ├── AFURLResponseSerialization.m
│ │ │ │ ├── AFURLSessionManager.h
│ │ │ │ └── AFURLSessionManager.m
│ │ │ ├── MJExtension
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── MJConst.h
│ │ │ │ ├── MJConst.m
│ │ │ │ ├── MJExtension.h
│ │ │ │ ├── MJFoundation.h
│ │ │ │ ├── MJFoundation.m
│ │ │ │ ├── MJProperty.h
│ │ │ │ ├── MJProperty.m
│ │ │ │ ├── MJType.h
│ │ │ │ ├── MJType.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
│ │ │ ├── MJRefresh
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── MJRefresh.bundle
│ │ │ │ │ └── arrow@2x.png
│ │ │ │ ├── MJRefresh.h
│ │ │ │ ├── MJRefreshBaseView.h
│ │ │ │ ├── MJRefreshBaseView.m
│ │ │ │ ├── MJRefreshConst.h
│ │ │ │ ├── MJRefreshConst.m
│ │ │ │ ├── MJRefreshFooterView.h
│ │ │ │ ├── MJRefreshFooterView.m
│ │ │ │ ├── MJRefreshHeaderView.h
│ │ │ │ └── MJRefreshHeaderView.m
│ │ │ └── SDWebImage
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── MKAnnotationView+WebCache.h
│ │ │ │ ├── MKAnnotationView+WebCache.m
│ │ │ │ ├── NSData+ImageContentType.h
│ │ │ │ ├── NSData+ImageContentType.m
│ │ │ │ ├── SDImageCache.h
│ │ │ │ ├── SDImageCache.m
│ │ │ │ ├── SDWebImageCompat.h
│ │ │ │ ├── SDWebImageCompat.m
│ │ │ │ ├── SDWebImageDecoder.h
│ │ │ │ ├── SDWebImageDecoder.m
│ │ │ │ ├── SDWebImageDownloader.h
│ │ │ │ ├── SDWebImageDownloader.m
│ │ │ │ ├── SDWebImageDownloaderOperation.h
│ │ │ │ ├── SDWebImageDownloaderOperation.m
│ │ │ │ ├── SDWebImageManager.h
│ │ │ │ ├── SDWebImageManager.m
│ │ │ │ ├── SDWebImageOperation.h
│ │ │ │ ├── SDWebImagePrefetcher.h
│ │ │ │ ├── SDWebImagePrefetcher.m
│ │ │ │ ├── UIButton+WebCache.h
│ │ │ │ ├── UIButton+WebCache.m
│ │ │ │ ├── UIImage+GIF.h
│ │ │ │ ├── UIImage+GIF.m
│ │ │ │ ├── UIImage+MultiFormat.h
│ │ │ │ ├── UIImage+MultiFormat.m
│ │ │ │ ├── UIImage+WebP.h
│ │ │ │ ├── UIImage+WebP.m
│ │ │ │ ├── UIImageView+HighlightedWebCache.h
│ │ │ │ ├── UIImageView+HighlightedWebCache.m
│ │ │ │ ├── UIImageView+WebCache.h
│ │ │ │ ├── UIImageView+WebCache.m
│ │ │ │ ├── UIView+WebCacheOperation.h
│ │ │ │ └── UIView+WebCacheOperation.m
│ │ │ └── gategory
│ │ │ ├── .DS_Store
│ │ │ ├── UIBarButtonItem+CH.h
│ │ │ ├── UIBarButtonItem+CH.m
│ │ │ ├── UIImage+CH.h
│ │ │ ├── UIImage+CH.m
│ │ │ ├── UIView+MJ.h
│ │ │ └── UIView+MJ.m
│ ├── Images.xcassets
│ │ ├── .DS_Store
│ │ ├── AppIcon.appiconset
│ │ │ ├── AppIcon_Lehe29x29@2x.png
│ │ │ ├── AppIcon_Lehe29x29@3x.png
│ │ │ ├── AppIcon_Lehe40x40@2x.png
│ │ │ ├── AppIcon_Lehe40x40@3x.png
│ │ │ ├── AppIcon_Lehe60x60@2x.png
│ │ │ ├── AppIcon_Lehe60x60@3x.png
│ │ │ └── Contents.json
│ │ ├── LaunchImage.launchimage
│ │ │ ├── 4S_001.png
│ │ │ ├── 5S_001.png
│ │ │ ├── 6P_001.png
│ │ │ ├── 6_001.png
│ │ │ └── Contents.json
│ │ ├── images2
│ │ │ ├── Message.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Message@2x.png
│ │ │ │ └── Message@3x.png
│ │ │ ├── MessageH.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── MessageH@2x.png
│ │ │ │ └── MessageH@3x.png
│ │ │ ├── cart.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── cart@2x.png
│ │ │ │ └── cart@3x.png
│ │ │ ├── cartH.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── cartH@2x.png
│ │ │ │ └── cartH@3x.png
│ │ │ ├── earth.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── earth@2x.png
│ │ │ │ └── earth@3x.png
│ │ │ ├── earthH.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── earthH@2x.png
│ │ │ │ └── earthH@3x.png
│ │ │ ├── heart.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── heart@2x.png
│ │ │ │ └── heart@3x.png
│ │ │ ├── heartH.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── heartH@2x.png
│ │ │ │ └── heartH@3x.png
│ │ │ ├── heart_R.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── heart_R@2x.png
│ │ │ │ └── heart_R@3x.png
│ │ │ ├── heart_n_red.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── heart_n_red@2x.png
│ │ │ │ └── heart_n_red@3x.png
│ │ │ ├── heart_s.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── heart_s@2x.png
│ │ │ │ └── heart_s@3x.png
│ │ │ ├── heart_sH.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── heart_sH@2x.png
│ │ │ │ └── heart_sH@3x.png
│ │ │ ├── heart_w.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── heart_w@2x.png
│ │ │ │ └── heart_w@3x.png
│ │ │ ├── heartss.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── heartss@2x.png
│ │ │ │ └── heartss@3x.png
│ │ │ ├── heartssH.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── heartssH@2x.png
│ │ │ │ └── heartssH@3x.png
│ │ │ ├── heartw.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── heartw@2x.png
│ │ │ │ └── heartw@3x.png
│ │ │ ├── home.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── home@2x.png
│ │ │ │ └── home@3x.png
│ │ │ ├── homeH.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── homeH@2x.png
│ │ │ │ └── homeH@3x.png
│ │ │ ├── imagepicker_cancel_btn_40_40.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── imagepicker_cancel_btn_40_40.png
│ │ │ ├── loading.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── loading.png
│ │ │ ├── search02.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── search02@2x.png
│ │ │ │ └── search02@3x.png
│ │ │ ├── user.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── user@2x.png
│ │ │ │ └── user@3x.png
│ │ │ ├── userH.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── userH@2x.png
│ │ │ │ └── userH@3x.png
│ │ │ └── userL.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── userL@3x.png
│ │ └── test
│ │ │ ├── localG.imageset
│ │ │ ├── Contents.json
│ │ │ ├── localG@2x.png
│ │ │ └── localG@3x.png
│ │ │ ├── localline_gray.imageset
│ │ │ ├── Contents.json
│ │ │ ├── localline_gray@2x.png
│ │ │ └── localline_gray@3x.png
│ │ │ ├── localline_red.imageset
│ │ │ ├── Contents.json
│ │ │ ├── localline_red@2x.png
│ │ │ └── localline_red@3x.png
│ │ │ ├── localss.imageset
│ │ │ ├── Contents.json
│ │ │ ├── localss@2x.png
│ │ │ └── localss@3x.png
│ │ │ ├── one.imageset
│ │ │ ├── Contents.json
│ │ │ └── one.png
│ │ │ ├── three.imageset
│ │ │ ├── Contents.json
│ │ │ └── three.png
│ │ │ └── two.imageset
│ │ │ ├── Contents.json
│ │ │ └── two.png
│ ├── Info.plist
│ ├── PrefixHeader.pch
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── image
│ │ ├── .DS_Store
│ │ ├── 4S_001.png
│ │ ├── 4S_002.png
│ │ ├── 4S_003.png
│ │ ├── 5S_001.png
│ │ ├── 5S_002.png
│ │ ├── 5S_003.png
│ │ ├── 6P_001.png
│ │ ├── 6P_002.png
│ │ ├── 6P_003.png
│ │ ├── 6_001.png
│ │ ├── 6_002.png
│ │ ├── 6_003.png
│ │ ├── AppIcon_Lehe29x29.png
│ │ ├── AppIcon_Lehe29x29@2x.png
│ │ ├── AppIcon_Lehe29x29@2x~ipad.png
│ │ ├── AppIcon_Lehe29x29@3x.png
│ │ ├── AppIcon_Lehe29x29~ipad.png
│ │ ├── AppIcon_Lehe40x40@2x.png
│ │ ├── AppIcon_Lehe40x40@2x~ipad.png
│ │ ├── AppIcon_Lehe40x40@3x.png
│ │ ├── AppIcon_Lehe40x40~ipad.png
│ │ ├── AppIcon_Lehe50x50@2x~ipad.png
│ │ ├── AppIcon_Lehe50x50~ipad.png
│ │ ├── AppIcon_Lehe57x57.png
│ │ ├── AppIcon_Lehe57x57@2x.png
│ │ ├── AppIcon_Lehe60x60@2x.png
│ │ ├── AppIcon_Lehe60x60@3x.png
│ │ ├── AppIcon_Lehe72x72@2x~ipad.png
│ │ ├── AppIcon_Lehe72x72~ipad.png
│ │ ├── AppIcon_Lehe76x76@2x~ipad.png
│ │ └── AppIcon_Lehe76x76~ipad.png
│ ├── main.m
│ ├── newses.plist
│ └── test.plist
└── HiGoTests
│ ├── HiGoTests.m
│ └── Info.plist
├── LICENSE
└── README.md
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/.DS_Store
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | build/
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | xcuserdata
13 | *.xccheckout
14 | *.moved-aside
15 | DerivedData
16 | *.hmap
17 | *.ipa
18 | *.xcuserstate
19 |
20 | # CocoaPods
21 | #
22 | # We recommend against adding the Pods directory to your .gitignore. However
23 | # you should judge for yourself, the pros and cons are mentioned at:
24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
25 | #
26 | #Pods/
27 |
--------------------------------------------------------------------------------
/HiGo/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/HiGo/HiGo/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. 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 |
--------------------------------------------------------------------------------
/HiGo/HiGo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "HGTabbarController.h"
11 |
12 | @interface AppDelegate ()
13 |
14 | @end
15 |
16 | @implementation AppDelegate
17 |
18 |
19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
20 | // Override point for customization after application launch.
21 | self.window=[[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
22 | self.window.backgroundColor=[UIColor whiteColor];
23 | [self.window makeKeyAndVisible]; //设置主窗口 并可见
24 |
25 | HGTabbarController *tab=[[HGTabbarController alloc]init];
26 |
27 | self.window.rootViewController=tab;
28 | return YES;
29 | }
30 |
31 | - (void)applicationWillResignActive:(UIApplication *)application {
32 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
33 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
34 | }
35 |
36 | - (void)applicationDidEnterBackground:(UIApplication *)application {
37 | // 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.
38 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
39 | }
40 |
41 | - (void)applicationWillEnterForeground:(UIApplication *)application {
42 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
43 | }
44 |
45 | - (void)applicationDidBecomeActive:(UIApplication *)application {
46 | // 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.
47 | }
48 |
49 | - (void)applicationWillTerminate:(UIApplication *)application {
50 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/HiGo/HiGo/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 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Classes/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Car(购物车)/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Classes/Car(购物车)/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Car(购物车)/Controller/HGCarController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGCarController.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGCarController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Car(购物车)/Controller/HGCarController.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGCarController.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGCarController.h"
10 |
11 | @interface HGCarController ()
12 |
13 | @end
14 |
15 | @implementation HGCarController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | /*
28 | #pragma mark - Navigation
29 |
30 | // In a storyboard-based application, you will often want to do a little preparation before navigation
31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
32 | // Get the new view controller using [segue destinationViewController].
33 | // Pass the selected object to the new view controller.
34 | }
35 | */
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Global(全球购)/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Classes/Global(全球购)/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Global(全球购)/Controller/HGGlobalController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGGlobalController.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGGlobalController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Global(全球购)/Controller/HGGlobalController.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGGlobalController.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGGlobalController.h"
10 |
11 | @interface HGGlobalController ()
12 |
13 | @end
14 |
15 | @implementation HGGlobalController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | /*
28 | #pragma mark - Navigation
29 |
30 | // In a storyboard-based application, you will often want to do a little preparation before navigation
31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
32 | // Get the new view controller using [segue destinationViewController].
33 | // Pass the selected object to the new view controller.
34 | }
35 | */
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Classes/Home(首页)/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Controller/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Classes/Home(首页)/Controller/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Controller/HGChoiceController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGChoiceController.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGChoiceController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Controller/HGFindController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGFindController.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGFindController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Controller/HGHomeController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGHomeController.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGHomeController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Controller/HGHomeController.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGHomeController.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGHomeController.h"
10 | #import "HGTitleView.h"
11 | #import "HGSpecialController.h"
12 | #import "HGFindController.h"
13 | #import "HGChoiceController.h"
14 |
15 | @interface HGHomeController ()
16 | @property (nonatomic,strong) NSMutableArray *childViews;
17 | @property (nonatomic,weak) UIScrollView *scrollView;
18 | @property (nonatomic,weak) HGTitleView *titView;
19 | @end
20 |
21 | @implementation HGHomeController
22 |
23 |
24 | -(NSMutableArray *)childViews
25 | {
26 | if(!_childViews){
27 | _childViews=[NSMutableArray array];
28 | }
29 | return _childViews;
30 | }
31 | - (void)viewDidLoad {
32 | [super viewDidLoad];
33 | // 1.添加右边导航栏上面的点击按钮
34 | self.navigationItem.rightBarButtonItem=[UIBarButtonItem itemWithIcon:@"search02" highIcon:nil target:self action:@selector(searchGoods)];
35 | //2.添加titleView
36 | [self setupTitleView];
37 | //3.添加滚动视图
38 | [self setupScroll];
39 | }
40 | #pragma mark 添加titleview视图
41 | -(void)setupTitleView
42 | {
43 | HGTitleView *tv=[[HGTitleView alloc]init];
44 | // tv.backgroundColor=[UIColor redColor];
45 | tv.delegate=self;
46 | tv.frame=CGRectMake(0, 0, 200, 30);
47 | self.navigationItem.titleView=tv;
48 | self.titView=tv;
49 | }
50 |
51 | #pragma mark 添加titleView的代理方法
52 | -(void)titleView:(HGTitleView *)titleView scrollToIndex:(NSInteger)tagIndex
53 | {
54 |
55 | [self.scrollView scrollRectToVisible:CGRectMake(ScreenWidth*tagIndex, 0, self.view.width, self.view.height) animated:YES];
56 | }
57 |
58 |
59 |
60 | #pragma mark 添加滚动视图
61 | -(void)setupScroll
62 | {
63 | //1.精选控制器
64 | HGChoiceController *choice=[[HGChoiceController alloc]init];
65 | [self addChildViewController:choice];
66 | //2.发现控制器
67 | HGFindController *find=[[HGFindController alloc]init];
68 | [self addChildViewController:find];
69 | //3.专场控制器
70 | HGSpecialController *special=[[HGSpecialController alloc]init];
71 | [self addChildViewController:special];
72 | //这这几个自控制器的view添加到数组中
73 | [self.childViews addObject:choice.view];
74 | [self.childViews addObject:find.view];
75 | [self.childViews addObject:special.view];
76 |
77 |
78 | UIScrollView *scrollView=[[UIScrollView alloc]initWithFrame:self.view.bounds];
79 | scrollView.delegate=self;
80 | [self.view addSubview:scrollView];
81 | for(int i=0;i
10 |
11 | @interface HGSpecialController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/HGHttpTool.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGHttpTool.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/26.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGHttpTool : NSObject
12 |
13 | +(void)getWirhUrl:(NSString*)url parms:(NSDictionary*)parms success:(void(^)(id json))success failture:(void(^)(id error))failture;
14 |
15 |
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/HGHttpTool.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGHttpTool.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/26.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGHttpTool.h"
10 |
11 | @implementation HGHttpTool
12 |
13 |
14 | +(void)getWirhUrl:(NSString *)url parms:(NSDictionary *)parms success:(void (^)(id))success failture:(void (^)(id))failture
15 | {
16 | [HGBaseMethod get:url parms:parms success:^(id json) {
17 | //缓存数据
18 | NSArray *categoryList= json[@"data"][@"category_list"];
19 | NSArray *tempGoods = json[@"data"][@"goods_list"];
20 |
21 | if(success){
22 | success(json);
23 | }
24 | } failture:^(id json) {
25 | if(failture){
26 | failture(json);
27 | }
28 | }];
29 | }
30 |
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGCategoryModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGCategoryModel.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 | @class HGImageModel;
11 |
12 |
13 | @interface HGCategoryModel : NSObject
14 |
15 |
16 | @property (nonatomic,copy) NSString *name;
17 | @property (nonatomic,copy) NSString *cate_type;
18 | @property (nonatomic,strong) HGImageModel *image;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGCategoryModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGCategoryModel.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGCategoryModel.h"
10 |
11 | @implementation HGCategoryModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGFindBannerModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGFindBannerModel.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class HGFindBannerPicModel;
12 |
13 | @interface HGFindBannerModel : NSObject
14 |
15 | @property (nonatomic,copy) NSString *name;
16 |
17 | @property (nonatomic,strong) HGFindBannerPicModel *banner_pic;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGFindBannerModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGFindBannerModel.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGFindBannerModel.h"
10 |
11 | @implementation HGFindBannerModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGFindBannerPicModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGFindBannerPicModel.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGFindBannerPicModel : NSObject
12 |
13 | @property (nonatomic,assign) CGFloat image_width;
14 | @property (nonatomic,assign) CGFloat image_height;
15 | //image_original
16 | @property (nonatomic,copy) NSString *image_original;
17 | @property (nonatomic,copy) NSString *image_middle;
18 | @property (nonatomic,copy) NSString *image_thumbnail;
19 |
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGFindBannerPicModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGFindBannerPicModel.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGFindBannerPicModel.h"
10 |
11 | @implementation HGFindBannerPicModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGFindFrameModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGFindFrameModel.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/28.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | @class HGFindModel,HGFindBannerModel;
13 |
14 | @interface HGFindFrameModel : NSObject
15 |
16 | @property (nonatomic,strong) HGFindModel *findModel;
17 | @property (nonatomic,strong) HGFindBannerModel *bannerModel;
18 |
19 | @property (nonatomic,assign,readonly) CGRect bannerF;
20 |
21 | @property (nonatomic,assign,readonly) CGRect imageF;
22 | @property (nonatomic,assign,readonly) CGRect descF;
23 | @property (nonatomic,assign,readonly) CGRect priceF;
24 | @property (nonatomic,assign,readonly) CGRect addressF;
25 |
26 |
27 | @property (nonatomic,assign,readonly) CGRect showF;
28 |
29 |
30 | @property (nonatomic,assign,readonly) CGFloat cellH; //单元格的高度
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGFindFrameModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGFindFrameModel.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/28.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGFindFrameModel.h"
10 | #import "HGFindBannerModel.h"
11 | #import "HGFindModel.h"
12 | #import "HGFindBannerPicModel.h"
13 |
14 | #define VMargin 10
15 | #define findLineMargin 5
16 | //单元格的宽度
17 | #define cellW (ScreenWidth-VMargin*3)/2
18 |
19 | @interface HGFindFrameModel ()
20 |
21 | @end
22 |
23 | @implementation HGFindFrameModel
24 |
25 |
26 | #pragma mark 设置广告栏的frame
27 | -(void)setBannerModel:(HGFindBannerModel *)bannerModel
28 | {
29 | _bannerModel=bannerModel;
30 | CGFloat bannerW=bannerModel.banner_pic.image_width;
31 | CGFloat bannerH=bannerModel.banner_pic.image_height;
32 |
33 | CGFloat logoH=cellW/bannerW*bannerH;
34 |
35 | _bannerF=CGRectMake(0, 0, cellW, logoH);
36 | _showF=_bannerF;
37 | _cellH=CGRectGetMaxY(_bannerF);
38 |
39 | }
40 | #pragma mark 设置显示商品的frame
41 | -(void)setFindModel:(HGFindModel *)findModel
42 | {
43 | _findModel=findModel;
44 | //1.设置图片的frame
45 | CGFloat imageX=0;
46 | CGFloat imageY=0;
47 | CGFloat imageW=cellW;
48 | CGFloat imageH=imageW;
49 | _imageF=CGRectMake(imageX, imageY, imageW, imageH);
50 | //2.设置商品的name
51 | CGFloat descX=VMargin;
52 | CGFloat descY=CGRectGetMaxY(_imageF)+VMargin;
53 | CGFloat descW=cellW-VMargin*2;
54 |
55 | NSString *shopname=[self subStrFromFitScreen:findModel.goods_name];
56 |
57 | CGSize finalSize=[shopname boundingRectWithSize:CGSizeMake(descW, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:HGfont(11)} context:nil].size;
58 |
59 | _descF=CGRectMake(descX, descY, descW, finalSize.height);
60 | //self.descLabel.frame=CGRectMake(descX, descY, descW, finalSize.height);
61 | //3.设置价格的frame
62 | CGFloat priceX=VMargin;
63 | CGFloat priceY=CGRectGetMaxY(_descF)+findLineMargin;
64 |
65 | CGSize priceSize=[findModel.goods_display_final_price sizeWithAttributes:@{NSFontAttributeName:HGfont(14)}];
66 |
67 | _priceF=CGRectMake(priceX, priceY, priceSize.width+20, priceSize.height);
68 |
69 | //4.设置商品来源的位置
70 | CGFloat addressX=VMargin;
71 | CGFloat addressY=CGRectGetMaxY(_priceF)+findLineMargin;
72 |
73 | NSString *addressStr=[NSString stringWithFormat:@"%@ %@",findModel.group_info.country,findModel.group_info.city];
74 | CGSize addressSize=[addressStr sizeWithAttributes:@{NSFontAttributeName:HGfont(10)}];
75 | _addressF=CGRectMake(addressX, addressY,addressSize.width+20, addressSize.height);
76 | //5.设置showView的frame
77 | _cellH=CGRectGetMaxY(_addressF)+10;
78 |
79 | _showF=CGRectMake(0, 0, cellW, _cellH);
80 |
81 | }
82 |
83 |
84 |
85 |
86 | -(NSString*)subStrFromFitScreen:(NSString*)str
87 | {
88 | NSString *tempStr=nil;
89 | if(ScreenWidth<=320){
90 | if(str.length>21){
91 | tempStr=[str substringToIndex:21];
92 | }else{
93 | tempStr=str;
94 | }
95 |
96 |
97 | }else if(ScreenWidth<=375 && ScreenWidth>320){
98 | if(str.length>28){
99 | tempStr=[str substringToIndex:28];
100 | }else{
101 | tempStr=str;
102 | }
103 |
104 | }else{
105 | if(str.length>32){
106 | tempStr=[str substringToIndex:32];
107 | }else{
108 | tempStr=str;
109 | }
110 | }
111 |
112 | return tempStr;
113 | }
114 |
115 |
116 |
117 |
118 |
119 | @end
120 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGFindModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGFindModel.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 | @class HGGoodsInfoModel,HGGoodsMainImageModel;
11 |
12 | @interface HGFindModel : NSObject
13 |
14 | @property (nonatomic,copy) NSString *goods_id; //group_id goods_name goods_desc
15 | @property (nonatomic,copy) NSString *group_id;
16 | @property (nonatomic,copy) NSString *goods_name;
17 | @property (nonatomic,copy) NSString *goods_desc;
18 | @property (nonatomic,copy) NSString *goods_display_final_price; //产品的价格
19 | @property (nonatomic,copy) NSString *goods_display_color_name; //产品的颜色
20 |
21 | //分组信息的模型
22 | @property (nonatomic,strong) HGGoodsInfoModel *group_info;
23 |
24 | //主图片的模型
25 | @property (nonatomic,strong) HGGoodsMainImageModel *main_image;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGFindModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGFindModel.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGFindModel.h"
10 |
11 | @implementation HGFindModel
12 |
13 | -(void)setGoods_display_final_price:(NSString *)goods_display_final_price
14 | {
15 | NSString *realPrice=[[goods_display_final_price componentsSeparatedByString:@"."] firstObject];
16 | _goods_display_final_price=realPrice;
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGGoodsFrame.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGGoodsFrame.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #define HGDescFont [UIFont systemFontOfSize:13]
12 |
13 | @class HGGoodsModel;
14 |
15 | @interface HGGoodsFrame : NSObject
16 |
17 | @property (nonatomic,strong) HGGoodsModel *goodsModel;
18 |
19 |
20 | //自定显示view的frame
21 | @property (nonatomic,assign,readonly) CGRect viewR;
22 |
23 | //第一张大图的frame
24 | @property (nonatomic,assign,readonly) CGRect imageF;
25 | //小图片的frame
26 | @property (nonatomic,assign,readonly) CGRect oneSmallF;
27 | @property (nonatomic,assign,readonly) CGRect twoSmallF;
28 | @property (nonatomic,assign,readonly) CGRect threeSmallF;
29 | //描述文字的frame
30 | @property (nonatomic,assign,readonly) CGRect descF;
31 | //地址的frame
32 | @property (nonatomic,assign,readonly) CGRect addressF;
33 |
34 | //表格单元的高度
35 | @property (nonatomic,assign) CGFloat cellH;
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGGoodsFrame.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGGoodsFrame.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGGoodsFrame.h"
10 | #import "HGGoodsImageModel.h"
11 | #import "HGGoodsModel.h"
12 | #import "HGGoodsInfoModel.h"
13 | #import "HGGoodsImageModel.h"
14 |
15 | #define justOneBigImageH 240
16 | #define moreImageH 150
17 | #define smallImageH 100
18 | #define marginW 5
19 |
20 | @implementation HGGoodsFrame
21 |
22 |
23 | -(void)setGoodsModel:(HGGoodsModel *)goodsModel
24 | {
25 | _goodsModel=goodsModel;
26 | //1.显示多张图片
27 | if(goodsModel.goods_image.count<6){
28 | //1.第一张图片的frame
29 | CGFloat imageX=0;
30 | CGFloat imageY=0;
31 | CGFloat imageW=ScreenWidth;
32 | CGFloat imageH=moreImageH;
33 | _imageF=CGRectMake(imageX, imageY, imageW, imageH);
34 | //2.设置小图片的frame
35 | CGFloat smallImgY=CGRectGetMaxY(_imageF)+marginW;
36 | CGFloat smallImgW=(ScreenWidth-marginW*2)/3;
37 | CGFloat smallImgH=smallImageH;
38 | CGFloat oneX=0;
39 | _oneSmallF=CGRectMake(oneX, smallImgY, smallImgW, smallImgH);
40 | //3.第二张小图片
41 | CGFloat twoX=CGRectGetMaxX(_oneSmallF)+marginW;
42 | _twoSmallF=CGRectMake(twoX, smallImgY, smallImgW, smallImgH);
43 | //4.第三章小图片
44 | CGFloat threeX=CGRectGetMaxX(_twoSmallF)+marginW;
45 | _threeSmallF=CGRectMake(threeX, smallImgY, smallImgW, smallImgH);
46 | //5.设置标签文字的frame
47 | CGFloat labelOriginW=ScreenWidth-20;
48 | CGSize finalSize=[goodsModel.goods_name boundingRectWithSize:CGSizeMake(labelOriginW, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:HGDescFont} context:nil].size;
49 |
50 |
51 |
52 | CGFloat descX=10;
53 | CGFloat descY=CGRectGetMaxY(_oneSmallF)+20;
54 | _descF=CGRectMake(descX, descY, finalSize.width, finalSize.height);
55 | //6.设置地址的frame
56 | CGFloat addressX=20;
57 | CGFloat addressY=CGRectGetMaxY(_descF)+5;
58 | _addressF=CGRectMake(addressX, addressY, 120, 20);
59 |
60 | _viewR=CGRectMake(0, 0, ScreenWidth, CGRectGetMaxY(_addressF)+10);
61 | //7.设置单元格的高度
62 | _cellH=CGRectGetMaxY(_viewR)+20;
63 |
64 | }else{ //显示一张图片
65 | //1.第一张图片的frame
66 | CGFloat imageX=0;
67 | CGFloat imageY=0;
68 | CGFloat imageW=ScreenWidth;
69 | CGFloat imageH=justOneBigImageH;
70 | _imageF=CGRectMake(imageX, imageY, imageW, imageH);
71 |
72 | _viewR=CGRectMake(imageX, imageY, imageW, imageH);
73 | _cellH=CGRectGetMaxY(_viewR)+20;
74 |
75 | }
76 |
77 | }
78 |
79 |
80 |
81 |
82 | @end
83 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGGoodsImageModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGGoodsImageModel.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGGoodsImageModel : NSObject
12 |
13 | @property (nonatomic,copy) NSString *image_id;
14 | @property (nonatomic,copy) NSString *image_original;
15 | @property (nonatomic,copy) NSString *image_middle;
16 | @property (nonatomic,copy) NSString *image_thumbnail;
17 | @property (nonatomic,assign) CGFloat image_width;
18 | @property (nonatomic,assign) CGFloat image_height;
19 |
20 |
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGGoodsImageModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGGoodsImageModel.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGGoodsImageModel.h"
10 |
11 | @implementation HGGoodsImageModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGGoodsInfoModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGGoodsInfoModel.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGGoodsInfoModel : NSObject
12 |
13 | @property (nonatomic,copy) NSString *group_name;
14 | @property (nonatomic,copy) NSString *group_header;
15 | @property (nonatomic,copy) NSString *group_desc;
16 | @property (nonatomic,copy) NSString *shop_id;
17 | @property (nonatomic,copy) NSString *country;
18 | @property (nonatomic,copy) NSString *city;
19 | @property (nonatomic,copy) NSString *group_tags;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGGoodsInfoModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGGoodsInfoModel.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGGoodsInfoModel.h"
10 |
11 | @implementation HGGoodsInfoModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGGoodsMainImageModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGGoodsMainImageModel.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGGoodsMainImageModel : NSObject
12 |
13 | @property (nonatomic,copy) NSString *image_id;
14 | @property (nonatomic,copy) NSString *image_original;
15 | @property (nonatomic,copy) NSString *image_middle;
16 | @property (nonatomic,copy) NSString *image_thumbnail;
17 | @property (nonatomic,assign) CGFloat image_width;
18 | @property (nonatomic,assign) CGFloat image_height;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGGoodsMainImageModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGGoodsMainImageModel.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGGoodsMainImageModel.h"
10 |
11 | @implementation HGGoodsMainImageModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGGoodsModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGGoodsModel.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 | @class HGGoodsMainImageModel;
11 | @class HGGoodsInfoModel;
12 | @class HGGoodsImageModel;
13 |
14 | @interface HGGoodsModel : NSObject
15 |
16 | @property (nonatomic,copy) NSString *goods_id; //group_id goods_name goods_desc
17 | @property (nonatomic,copy) NSString *group_id;
18 | @property (nonatomic,copy) NSString *goods_name;
19 | @property (nonatomic,copy) NSString *goods_desc;
20 | @property (nonatomic,copy) NSString *goods_display_final_price; //产品的价格
21 | @property (nonatomic,copy) NSString *goods_display_color_name; //产品的颜色
22 |
23 | //主图片的模型
24 | @property (nonatomic,strong) HGGoodsMainImageModel *main_image;
25 | //分组信息的模型
26 | @property (nonatomic,strong) HGGoodsInfoModel *group_info;
27 |
28 | //这个数组里存放的图片模型 -->HGGoodsImageModel
29 | @property (nonatomic,strong) NSArray *goods_image;
30 |
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGGoodsModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGGoodsModel.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGGoodsModel.h"
10 | #import "HGGoodsImageModel.h"
11 |
12 |
13 |
14 | @implementation HGGoodsModel
15 |
16 |
17 | +(NSDictionary *)objectClassInArray
18 | {
19 |
20 | return @{@"goods_image" : [HGGoodsImageModel class]};
21 | }
22 |
23 |
24 |
25 |
26 |
27 | @end
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGImageModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGImageModel.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGImageModel : NSObject
12 |
13 | @property (nonatomic,copy) NSString *image_id;
14 | @property (nonatomic,assign) CGFloat image_width;
15 | @property (nonatomic,assign) CGFloat image_height;
16 | @property (nonatomic,copy) NSString *image_original;
17 | @property (nonatomic,copy) NSString *image_middle;
18 | @property (nonatomic,copy) NSString *image_thumbnail;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGImageModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGImageModel.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGImageModel.h"
10 |
11 | @implementation HGImageModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGScrollModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGScrollModel.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/26.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGScrollModel : NSObject
12 |
13 | @property (nonatomic,copy) NSString *icon;
14 | @property (nonatomic,copy) NSString *title;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGScrollModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGScrollModel.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/26.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGScrollModel.h"
10 |
11 | @implementation HGScrollModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGSpecialMainImageModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGSpecialMainImageModel.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/28.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGSpecialMainImageModel : NSObject
12 |
13 | @property (nonatomic,copy) NSString *image_id;
14 | @property (nonatomic,copy) NSString *image_original;
15 | @property (nonatomic,copy) NSString *image_middle;
16 | @property (nonatomic,copy) NSString *image_thumbnail;
17 | @property (nonatomic,assign) CGFloat image_width;
18 | @property (nonatomic,assign) CGFloat image_height;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGSpecialMainImageModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGSpecialMainImageModel.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/28.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGSpecialMainImageModel.h"
10 |
11 | @implementation HGSpecialMainImageModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGSpecialModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGSpecialModel.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/28.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class HGSpecialMainImageModel;
12 |
13 | @interface HGSpecialModel : NSObject
14 |
15 | @property (nonatomic,copy) NSString *goods_name;
16 | @property (nonatomic,copy) NSString *goods_desc;
17 | @property (nonatomic,copy) NSString *goods_display_final_price; //产品的价格
18 | @property (nonatomic,copy) NSString *goods_display_color_name; //产品的颜色
19 |
20 | //主图片的模型
21 | @property (nonatomic,strong) HGSpecialMainImageModel *main_image;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGSpecialModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGSpecialModel.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/28.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGSpecialModel.h"
10 |
11 | @implementation HGSpecialModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/Model/HGWaterFlow.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGWaterFlow.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 | @class HGWaterFlow;
11 |
12 | @protocol HGWaterFlowDelegate
13 |
14 | //必须实现
15 | -(CGFloat)waterFlow:(HGWaterFlow*)waterFlow heightForWidth:(CGFloat)width indexPath:(NSIndexPath*)indexPath;
16 |
17 | @end
18 |
19 |
20 | @interface HGWaterFlow : UICollectionViewLayout
21 |
22 | //每一行的间距
23 | @property (nonatomic,assign) CGFloat rowMargin;
24 | //每一列的间距
25 | @property (nonatomic,assign) CGFloat columnMargin;
26 | //四边的距离
27 | @property (nonatomic,assign) UIEdgeInsets sectionInset;
28 | //最大的列数
29 | @property (nonatomic,assign) CGFloat columsCount;
30 |
31 |
32 | @property (nonatomic,weak) iddelegate;
33 |
34 | @end;
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Classes/Home(首页)/View/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGCategoryCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGCategoryCell.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class HGCategoryModel;
12 |
13 | @interface HGCategoryCell : UICollectionViewCell
14 |
15 | @property (nonatomic,strong) HGCategoryModel *cateModel;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGCategoryCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGCategoryCell.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGCategoryCell.h"
10 | #import "HGCategoryModel.h"
11 | #import "HGImageModel.h"
12 |
13 | @interface HGCategoryCell ()
14 |
15 | @property (nonatomic,weak) UIImageView *imageView;
16 | @property (nonatomic,weak) UILabel *labelStr;
17 |
18 | @end
19 |
20 | @implementation HGCategoryCell
21 |
22 | -(instancetype)initWithFrame:(CGRect)frame
23 | {
24 | self=[super initWithFrame:frame];
25 | if(self){
26 | //1.添加collectionview
27 | [self addChildView];
28 | }
29 | return self;
30 | }
31 |
32 | #pragma mark 添加子控件
33 | -(void)addChildView
34 | {
35 | //1.添加图片
36 | UIImageView *imageView=[[UIImageView alloc]init];
37 | imageView.frame=self.bounds;
38 | imageView.layer.cornerRadius=5;
39 | imageView.clipsToBounds=YES;
40 | [self.contentView addSubview:imageView];
41 | self.imageView=imageView;
42 | //2.添加文字标签
43 | UILabel *label=[[UILabel alloc]init];
44 | label.x=0;
45 | label.height=30;
46 | label.width=self.width;
47 | label.y=self.height-label.height;
48 |
49 | label.textColor=[UIColor whiteColor];
50 | label.textAlignment=NSTextAlignmentCenter;
51 | label.font=[UIFont boldSystemFontOfSize:14];
52 | [self.contentView addSubview:label];
53 | self.labelStr=label;
54 | }
55 |
56 | -(void)setCateModel:(HGCategoryModel *)cateModel
57 | {
58 | _cateModel=cateModel;
59 | //NSLog(@"%@ %@",cateModel.name,cateModel.image.image_original);
60 | //设置图片
61 | [self.imageView sd_setImageWithURL:[NSURL URLWithString:cateModel.image.image_original] placeholderImage:[UIImage resizedImage:@"loading"]];
62 | //设置标签的 文字
63 | self.labelStr.text=cateModel.name;
64 |
65 | }
66 |
67 |
68 | @end
69 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGCategoryList.h:
--------------------------------------------------------------------------------
1 | //
2 | // GHCategoryList.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class HGCategoryList;
12 |
13 | @protocol HGCategoryListDelegate
14 |
15 | @optional
16 |
17 | -(void)categoaryList:(HGCategoryList*)categoaryList clickIndex:(NSInteger)clickIndex;
18 |
19 | @end
20 |
21 | @interface HGCategoryList : UIView
22 |
23 | @property (nonatomic,strong) NSArray *data;
24 | @property (nonatomic,weak) id delegate;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGCategoryList.m:
--------------------------------------------------------------------------------
1 | //
2 | // GHCategoryList.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGCategoryList.h"
10 | #import "HGCategoryCell.h"
11 | #import "HGCategoryModel.h"
12 | #import "HGImageModel.h"
13 |
14 | #define CategoryCell @"CategoryCell"
15 |
16 | @interface HGCategoryList ()
17 |
18 | @property (nonatomic,weak) UICollectionView *collectionViiew;
19 |
20 |
21 | @end
22 |
23 | @implementation HGCategoryList
24 |
25 |
26 |
27 | -(instancetype)initWithFrame:(CGRect)frame
28 | {
29 | self=[super initWithFrame:frame];
30 | if(self){
31 | //1.添加collectionview
32 | [self addView];
33 | }
34 | return self;
35 | }
36 |
37 |
38 | #pragma mark 添加collectionView
39 | -(void)addView
40 | {
41 | //1.创建collectinView
42 | UICollectionViewFlowLayout *flow=[[UICollectionViewFlowLayout alloc]init];
43 | flow.minimumLineSpacing=10;
44 | flow.sectionInset=UIEdgeInsetsMake(10, 10, 10, 10);
45 | flow.itemSize=CGSizeMake(80, 80);
46 | flow.scrollDirection=UICollectionViewScrollDirectionHorizontal;
47 |
48 | UICollectionView *collectionView=[[UICollectionView alloc]initWithFrame:self.bounds collectionViewLayout:flow];
49 | [collectionView registerClass:[HGCategoryCell class] forCellWithReuseIdentifier:CategoryCell];
50 | collectionView.backgroundColor=[UIColor whiteColor];
51 | collectionView.delegate=self;
52 | collectionView.dataSource=self;
53 | collectionView.showsHorizontalScrollIndicator=NO;
54 | [self addSubview:collectionView];
55 | self.collectionViiew=collectionView;
56 | }
57 |
58 | #pragma mark 返回多少行
59 | -(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
60 | {
61 | return self.data.count;
62 | }
63 |
64 | #pragma mark 返回cell
65 | -(UICollectionViewCell*)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
66 | {
67 | HGCategoryCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:CategoryCell forIndexPath:indexPath];
68 | HGCategoryModel *cateModel=self.data[indexPath.item];
69 |
70 | cell.cateModel=cateModel;
71 | return cell;
72 | }
73 |
74 | -(void)setData:(NSArray *)data
75 | {
76 | _data=data;
77 | // for(HGCategoryModel *cate in data) {
78 | // NSLog(@"%@ %@",cate.name,cate.image.image_original);
79 | // }
80 | [self.collectionViiew reloadData];
81 | }
82 |
83 |
84 | #pragma mark 点击的方法
85 | -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
86 | {
87 | if([self.delegate respondsToSelector:@selector(categoaryList:clickIndex:)]){
88 | [self.delegate categoaryList:self clickIndex:indexPath.item];
89 | }
90 | }
91 |
92 | @end
93 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGChoiceCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGChoiceCell.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 | @class HGGoodsFrame;
11 |
12 | @interface HGChoiceCell : UITableViewCell
13 |
14 | +(instancetype)cellWithTableView:(UITableView *)tableView indentifier:(NSString *)indentifier;
15 |
16 | @property (nonatomic,strong) HGGoodsFrame *goodsFrame;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGChoiceCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGChoiceCell.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGChoiceCell.h"
10 | #import "HGGoodsFrame.h"
11 | #import "HGChoiceShowView.h"
12 |
13 | @interface HGChoiceCell ()
14 |
15 | @property (nonatomic,weak) HGChoiceShowView *choiceView;
16 |
17 | @end
18 |
19 | @implementation HGChoiceCell
20 |
21 | -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
22 | {
23 | self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
24 |
25 | if(self){
26 | [self addChild];
27 | }
28 | return self;
29 | }
30 |
31 | -(void)addChild
32 | {
33 | HGChoiceShowView *choiceShow=[[HGChoiceShowView alloc]init];
34 | choiceShow.backgroundColor=[UIColor whiteColor];
35 | [self.contentView addSubview:choiceShow];
36 | self.choiceView=choiceShow;
37 |
38 | UIView *v=[[UIView alloc]init];
39 | v.backgroundColor=HGColor(237, 237, 237);
40 | self.backgroundView=v;
41 | //取消选中样式
42 | self.selectionStyle=UITableViewCellSelectionStyleNone;
43 |
44 | }
45 |
46 | +(instancetype)cellWithTableView:(UITableView *)tableView indentifier:(NSString *)indentifier
47 | {
48 | HGChoiceCell *cell=[tableView dequeueReusableCellWithIdentifier:indentifier];
49 | if(cell==nil){
50 | cell=[[HGChoiceCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:indentifier];
51 | }
52 | return cell;
53 | }
54 |
55 |
56 |
57 | -(void)setGoodsFrame:(HGGoodsFrame *)goodsFrame
58 | {
59 | self.choiceView.goodsFrame=goodsFrame;
60 | }
61 |
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGChoiceShowView.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGChoiceShowView.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 | @class HGGoodsFrame;
11 | @interface HGChoiceShowView : UIView
12 |
13 | @property (nonatomic,strong) HGGoodsFrame *goodsFrame;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGFindCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGFindCell.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 | @class HGFindFrameModel;
11 |
12 | @interface HGFindCell : UICollectionViewCell
13 |
14 | @property (nonatomic,strong) HGFindFrameModel *findFrame;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGFindCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGFindCell.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGFindCell.h"
10 | #import "HGFindShowView.h"
11 | #import "HGFindFrameModel.h"
12 |
13 | @interface HGFindCell ()
14 |
15 | @property (nonatomic,weak) HGFindShowView *showV;
16 |
17 | @end
18 |
19 | @implementation HGFindCell
20 |
21 | -(instancetype)initWithFrame:(CGRect)frame
22 | {
23 | self=[super initWithFrame:frame];
24 | if(self){
25 | //添加子控件
26 | [self addChildView];
27 | }
28 | return self;
29 | }
30 |
31 | #pragma mark 添加子控件的方法
32 | -(void)addChildView
33 | {
34 | HGFindShowView *showV=[[HGFindShowView alloc]init];
35 | [self.contentView addSubview:showV];
36 | self.showV=showV;
37 |
38 | }
39 |
40 |
41 | -(void)setFindFrame:(HGFindFrameModel *)findFrame
42 | {
43 | self.showV.findFrame=findFrame;
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGFindHeadView.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGFindHeadView.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/28.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGFindHeadView : UICollectionReusableView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGFindHeadView.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGFindHeadView.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/28.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGFindHeadView.h"
10 |
11 | @implementation HGFindHeadView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGFindShowView.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGFindShowView.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 | @class HGFindFrameModel;
11 |
12 | @interface HGFindShowView : UIView
13 |
14 | @property (nonatomic,strong) HGFindFrameModel *findFrame;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGList.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGList.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGList : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGList.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGList.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/27.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGList.h"
10 |
11 | @implementation HGList
12 |
13 | /*
14 | // Only override drawRect: if you perform custom drawing.
15 | // An empty implementation adversely affects performance during animation.
16 | - (void)drawRect:(CGRect)rect {
17 | // Drawing code
18 | }
19 | */
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGScroll.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGScroll.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/26.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class HGScroll;
12 | @protocol HGScrollDelegate
13 |
14 | @optional
15 |
16 | -(void)scrollClick:(HGScroll*)click clickIndex:(NSInteger)clickIndex;
17 | @end
18 |
19 | @interface HGScroll : UIView
20 |
21 | @property (nonatomic,weak) id delegate;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGScrollCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGScrollCell.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/26.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class HGScrollModel;
12 |
13 | @interface HGScrollCell : UICollectionViewCell
14 |
15 | @property (nonatomic,strong) HGScrollModel *scrollModel;
16 |
17 |
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGScrollCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGScrollCell.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/26.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGScrollCell.h"
10 | #import "HGScrollModel.h"
11 |
12 |
13 | @interface HGScrollCell ()
14 | @property (nonatomic,weak) UIImageView *imageView;
15 |
16 | @end
17 |
18 | @implementation HGScrollCell
19 |
20 | -(instancetype)initWithFrame:(CGRect)frame
21 | {
22 | self=[super initWithFrame:frame];
23 | if(self){
24 | [self addChild];
25 | }
26 | return self;
27 | }
28 |
29 |
30 | -(void)addChild
31 | {
32 | UIImageView *imageView=[[UIImageView alloc]init];
33 | imageView.frame=self.bounds;
34 | imageView.contentMode=UIViewContentModeScaleAspectFill;
35 | imageView.clipsToBounds=YES;
36 | // imageView.autoresizingMask=UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin;
37 | [self.contentView addSubview:imageView];
38 | self.imageView=imageView;
39 |
40 | }
41 |
42 | -(void)setScrollModel:(HGScrollModel *)scrollModel
43 | {
44 | _scrollModel=scrollModel;
45 | //self.imageView.image=[UIImage imageNamed:scrollModel.icon];
46 | [self.imageView sd_setImageWithURL:[NSURL URLWithString:scrollModel.icon] placeholderImage:[UIImage imageNamed:@"loading"]];
47 | }
48 |
49 |
50 |
51 |
52 |
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGSpecialCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGSpecialCell.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/28.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class HGSpecialModel;
12 | @interface HGSpecialCell : UICollectionViewCell
13 |
14 | @property (nonatomic,strong)HGSpecialModel *specialModel;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGSpecialCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGSpecialCell.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/28.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGSpecialCell.h"
10 | #import "HGSpecialModel.h"
11 | #import "HGSpecialMainImageModel.h"
12 |
13 | @interface HGSpecialCell ()
14 | @property (nonatomic,weak) UIImageView *logo;
15 |
16 | @end
17 |
18 | @implementation HGSpecialCell
19 |
20 | -(instancetype)initWithFrame:(CGRect)frame
21 | {
22 | self=[super initWithFrame:frame];
23 | if(self){
24 | [self addChildView];
25 | }
26 | return self;
27 | }
28 |
29 | -(void)addChildView
30 | {
31 | UIImageView *logo=[[UIImageView alloc]initWithFrame:self.bounds];
32 | logo.contentMode=UIViewContentModeScaleAspectFill;
33 | logo.clipsToBounds=YES;
34 | [self.contentView addSubview:logo];
35 | self.logo=logo;
36 | }
37 |
38 |
39 | -(void)setSpecialModel:(HGSpecialModel *)specialModel
40 | {
41 | _specialModel=specialModel;
42 |
43 | NSString *strUrl=specialModel.main_image.image_original;
44 | [self.logo sd_setImageWithURL:[NSURL URLWithString:strUrl] placeholderImage:[UIImage imageNamed:@"loading"]];
45 |
46 | }
47 |
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGTitleView.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGTitleView.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 | @class HGTitleView;
11 | @protocol HGTitleViewDelegate
12 |
13 | @optional
14 | -(void)titleView:(HGTitleView*)titleView scrollToIndex:(NSInteger)tagIndex;
15 |
16 | @end
17 |
18 | @interface HGTitleView : UIView
19 |
20 | @property (nonatomic,weak) iddelegate;
21 |
22 |
23 | -(void)wanerSelected:(NSInteger)tagIndex;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Home(首页)/View/HGTitleView.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGTitleView.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGTitleView.h"
10 |
11 | @interface HGTitleView ()
12 | @property (nonatomic,weak) UIButton *button;
13 | @end
14 |
15 | @implementation HGTitleView
16 |
17 | -(instancetype)initWithFrame:(CGRect)frame
18 | {
19 | self=[super initWithFrame:frame];
20 | if(self){
21 | //添加3个按钮
22 | [self setupButton];
23 | }
24 | return self;
25 | }
26 |
27 | -(void)setupButton
28 | {
29 | [self addButton:@"精选"];
30 | [self addButton:@"发现"];
31 | [self addButton:@"专场"];
32 | }
33 |
34 | -(void)addButton:(NSString*)title
35 | {
36 | UIButton *btn=[[UIButton alloc]init];
37 | btn.titleLabel.font=HGfont(15);
38 | [btn setTitle:title forState:UIControlStateNormal];
39 | [btn setTitleColor:HGColor(75, 75, 75) forState:UIControlStateNormal];
40 | [btn setTitleColor:HGColor(247, 133, 136) forState:UIControlStateSelected];
41 | [btn addTarget:self action:@selector(titleButtonClick:) forControlEvents:UIControlEventTouchUpInside];
42 | [self addSubview:btn];
43 | }
44 |
45 |
46 | -(void)titleButtonClick:(UIButton*)sender
47 | {
48 |
49 | if([self.delegate respondsToSelector:@selector(titleView:scrollToIndex:)]){
50 | [self.delegate titleView:self scrollToIndex:sender.tag];
51 | }
52 |
53 | self.button.selected=NO;
54 | self.button.titleLabel.font=HGfont(15);
55 | sender.selected=YES;
56 | sender.titleLabel.font=HGfont(18);
57 | self.button=sender;
58 | }
59 |
60 | -(void)wanerSelected:(NSInteger)tagIndex
61 | {
62 | self.button.selected=NO;
63 | self.button.titleLabel.font=HGfont(15);
64 | UIButton *btn=self.subviews[tagIndex];
65 | btn.selected=YES;
66 | btn.titleLabel.font=HGfont(18);
67 | self.button=btn;
68 | }
69 |
70 | -(void)layoutSubviews
71 | {
72 | CGFloat btnY=0;
73 | int count=(int)self.subviews.count;
74 | CGFloat btnX=0;
75 | CGFloat btnW=self.width/count;
76 | CGFloat btnH=self.height;
77 | for(int i=0;i
10 |
11 | @interface HGNavController : UINavigationController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Main/Controller/HGNavController.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGNavController.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGNavController.h"
10 |
11 | @interface HGNavController ()
12 |
13 | @end
14 |
15 | @implementation HGNavController
16 |
17 |
18 | +(void)initialize
19 | {
20 | UINavigationBar *navBar=[UINavigationBar appearance];
21 | //[navBar setBackgroundImage:[UIImage resizedImage:@"topbarbg_ios7"] forBarMetrics:UIBarMetricsDefault];
22 | [navBar setTintColor:HGColor(87, 87, 87)];
23 | [navBar setTitleTextAttributes:@{NSForegroundColorAttributeName:HGColor(87, 87, 87)}];
24 | [navBar setBackgroundColor:HGColor(237, 237, 237)];
25 |
26 | navBar.shadowImage=[[UIImage alloc]init]; //隐藏掉导航栏底部的那条线
27 | //2.设置导航栏barButton上面文字的颜色
28 | // UIBarButtonItem *item=[UIBarButtonItem appearance];
29 | // [item setTintColor:[UIColor whiteColor]];
30 | // [item setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]} forState:UIControlStateNormal];
31 |
32 |
33 | }
34 |
35 |
36 |
37 | - (void)viewDidLoad {
38 | [super viewDidLoad];
39 | // Do any additional setup after loading the view.
40 | }
41 |
42 | #pragma mark 当push的时候调用这个方法
43 | -(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
44 | if(self.viewControllers.count>0){
45 | viewController.hidesBottomBarWhenPushed=YES; //当push 的时候隐藏底部兰
46 | }
47 | [super pushViewController:viewController animated:animated];
48 |
49 | }
50 |
51 |
52 |
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Main/Controller/HGTabbarController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGTabbarController.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGTabbarController : UITabBarController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Main/Controller/HGTabbarController.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGTabbarController.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGTabbarController.h"
10 | #import "HGHomeController.h"
11 | #import "HGGlobalController.h"
12 | #import "HGMesageController.h"
13 | #import "HGCarController.h"
14 | #import "HGMeController.h"
15 | #import "HGNavController.h"
16 | #import "HGTabView.h"
17 |
18 | @interface HGTabbarController ()
19 | @property (nonatomic,weak) HGTabView *tabView;
20 | @end
21 |
22 | @implementation HGTabbarController
23 |
24 | -(void)viewWillAppear:(BOOL)animated
25 | {
26 | [super viewWillAppear:animated];
27 | for(UIView *zv in self.tabBar.subviews){
28 | if([zv isKindOfClass:[UIControl class]]){
29 | [zv removeFromSuperview];
30 | }
31 | }
32 |
33 | }
34 |
35 | - (void)viewDidLoad {
36 | [super viewDidLoad];
37 | //1.添加底部自定义的标签栏
38 | [self setupTabBar];
39 | //2.添加子控制器
40 | [self addChildVc];
41 |
42 | }
43 |
44 | #pragma mark 添加底部的标签栏
45 | -(void)setupTabBar
46 | {
47 | HGTabView *tabView=[[HGTabView alloc]initWithFrame:self.tabBar.bounds];
48 | tabView.delegate=self;
49 | [self.tabBar addSubview:tabView];
50 | self.tabView=tabView;
51 |
52 | }
53 | #pragma mark 实现底部标签栏按钮点击的代理方法
54 | -(void)tabView:(HGTabView *)tabView didSelectedFrom:(int)from toIndex:(int)to
55 | {
56 | self.selectedIndex=to;
57 | }
58 | #pragma mark 添加子控制器
59 | -(void)addChildVc
60 | {
61 | //1.添加首页控制器
62 | HGHomeController *home=[[HGHomeController alloc]init];
63 | [self addChildViewController:home title:@"首页" image:@"home" selectedImage:@"homeH"];
64 | //2.全球购
65 | HGGlobalController *global=[[HGGlobalController alloc]init];
66 | [self addChildViewController:global title:@"全球购" image:@"earth" selectedImage:@"earthH"];
67 | //3.消息通知
68 | HGMesageController *message=[[HGMesageController alloc]init];
69 | [self addChildViewController:message title:@"购物信息" image:@"Message" selectedImage:@"MessageH"];
70 | //4.购物车
71 | HGCarController *car=[[HGCarController alloc]init];
72 | [self addChildViewController:car title:@"购物车" image:@"cart" selectedImage:@"cartH"];
73 | //5.我
74 | HGMeController *me=[[HGMeController alloc]init];
75 | [self addChildViewController:me title:@"设置" image:@"user" selectedImage:@"userH"];
76 | }
77 |
78 | #pragma mark 添加子控制器的方法
79 |
80 | -(void)addChildViewController:(UIViewController *)childVc title:(NSString*)title image:(NSString*)image selectedImage:(NSString*)selectedImage
81 | {
82 | childVc.navigationItem.title=title;
83 | childVc.tabBarItem.image=[UIImage imageNamed:image];
84 | childVc.tabBarItem.selectedImage=[UIImage imageNamed:selectedImage];
85 |
86 | HGNavController *nav=[[HGNavController alloc]initWithRootViewController:childVc];
87 |
88 | [self addChildViewController:nav];
89 |
90 | [self.tabView addTabItem:childVc.tabBarItem];
91 |
92 |
93 | }
94 |
95 | - (void)didReceiveMemoryWarning {
96 | [super didReceiveMemoryWarning];
97 |
98 | }
99 |
100 |
101 |
102 | @end
103 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Main/View/HGTabButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGTabButton.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGTabButton : UIButton
12 |
13 | @property (nonatomic,weak)UITabBarItem *item;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Main/View/HGTabButton.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGTabButton.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGTabButton.h"
10 |
11 | @implementation HGTabButton
12 |
13 | -(instancetype)initWithFrame:(CGRect)frame
14 | {
15 | self=[super initWithFrame:frame];
16 | if(self){
17 |
18 | }
19 | return self;
20 | }
21 |
22 | -(void)setHighlighted:(BOOL)highlighted{}
23 |
24 |
25 | -(void)setItem:(UITabBarItem *)item
26 | {
27 | _item=item;
28 | [self setImage:item.image forState:UIControlStateNormal];
29 | [self setImage:item.selectedImage forState:UIControlStateSelected];
30 |
31 | }
32 |
33 |
34 |
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Main/View/HGTabView.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGTabView.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class HGTabView;
12 |
13 |
14 | @protocol HGTabViewDelegate
15 |
16 | @optional
17 | -(void)tabView:(HGTabView*)tabView didSelectedFrom:(int)from toIndex:(int)to;
18 |
19 | @end
20 |
21 | @interface HGTabView : UIView
22 |
23 | -(void)addTabItem:(UITabBarItem*)item;
24 | @property (nonatomic,weak) iddelegate;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Main/View/HGTabView.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGTabView.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGTabView.h"
10 | #import "HGTabButton.h"
11 |
12 | @interface HGTabView ()
13 |
14 | @property (nonatomic,weak) HGTabButton *button;
15 |
16 | @end
17 |
18 | @implementation HGTabView
19 |
20 | -(instancetype)initWithFrame:(CGRect)frame
21 | {
22 | self=[super initWithFrame:frame];
23 | if(self){
24 |
25 | }
26 | return self;
27 | }
28 |
29 |
30 | -(void)addTabItem:(UITabBarItem *)item
31 | {
32 | HGTabButton *tabButton=[[HGTabButton alloc]init];
33 | tabButton.item=item;
34 | [tabButton addTarget:self action:@selector(tabButtonClick:) forControlEvents:UIControlEventTouchUpInside];
35 |
36 | [self addSubview:tabButton];
37 | //如果是第一个的话 就选中
38 | if(self.subviews.count==1){
39 | [self tabButtonClick:tabButton];
40 | }
41 |
42 | }
43 |
44 |
45 | #pragma mark 按钮的点击事件
46 | -(void)tabButtonClick:(HGTabButton*)sender
47 | {
48 |
49 |
50 | if([self.delegate respondsToSelector:@selector(tabView:didSelectedFrom:toIndex:)]){
51 | [self.delegate tabView:self didSelectedFrom:self.button.tag toIndex:sender.tag];
52 | }
53 | self.button.selected=NO;
54 | sender.selected=YES;
55 | self.button=sender;
56 |
57 | }
58 |
59 | -(void)layoutSubviews
60 | {
61 | [super layoutSubviews];
62 | int count=(int)self.subviews.count;
63 | CGFloat btnY=0;
64 | CGFloat btnX=0;
65 | CGFloat btnH=self.height;
66 | CGFloat btnW=ScreenWidth/count;
67 | for(int i=0;i
10 |
11 | @interface HGMeController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Me(我)/Controller/HGMeController.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGMeController.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGMeController.h"
10 |
11 | @interface HGMeController ()
12 |
13 | @end
14 |
15 | @implementation HGMeController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | /*
28 | #pragma mark - Navigation
29 |
30 | // In a storyboard-based application, you will often want to do a little preparation before navigation
31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
32 | // Get the new view controller using [segue destinationViewController].
33 | // Pass the selected object to the new view controller.
34 | }
35 | */
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Message(消息)/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Classes/Message(消息)/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Message(消息)/Controller/HGMesageController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGMesageController.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGMesageController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Message(消息)/Controller/HGMesageController.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGMesageController.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGMesageController.h"
10 |
11 | @interface HGMesageController ()
12 |
13 | @end
14 |
15 | @implementation HGMesageController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | /*
28 | #pragma mark - Navigation
29 |
30 | // In a storyboard-based application, you will often want to do a little preparation before navigation
31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
32 | // Get the new view controller using [segue destinationViewController].
33 | // Pass the selected object to the new view controller.
34 | }
35 | */
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Classes/Other(其它)/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Common/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Classes/Other(其它)/Common/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Common/HGBaseMethod.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGBaseMethod.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/26.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGBaseMethod : NSObject
12 |
13 | //网络请求的GET方法
14 | +(void)get:(NSString*)url parms: (NSDictionary*)parms success:(void(^)(id json)) success failture:(void(^)(id json)) failture;
15 | //网络请求的POST方法
16 | +(void)post:(NSString*)url parms: (NSDictionary*)parms success:(void(^)(id json)) success failture:(void(^)(id json)) failture;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Common/HGBaseMethod.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGBaseMethod.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/26.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGBaseMethod.h"
10 | #import "AFNetworking.h"
11 |
12 | @implementation HGBaseMethod
13 |
14 | +(void)get:(NSString *)url parms:(NSDictionary *)parms success:(void (^)(id))success failture:(void (^)(id))failture
15 | {
16 | AFHTTPRequestOperationManager *manager=[AFHTTPRequestOperationManager manager];
17 |
18 | [manager GET:url parameters:parms success:^(AFHTTPRequestOperation *operation, id responseObject) {
19 | if(success){
20 | success(responseObject); // void(^)(id json)
21 | }
22 | } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
23 | if(failture){
24 | failture(error);
25 | }
26 | }];
27 |
28 | }
29 |
30 | +(void)post:(NSString *)url parms:(NSDictionary *)parms success:(void (^)(id))success failture:(void (^)(id))failture
31 | {
32 | AFHTTPRequestOperationManager *manager=[AFHTTPRequestOperationManager manager];
33 | [manager POST:url parameters:parms success:^(AFHTTPRequestOperation *operation, id responseObject) {
34 | if(success){
35 | success(responseObject);
36 | }
37 | } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
38 | if(failture){
39 | failture(error);
40 | }
41 | }];
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Common/HGFmTool.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGFmTool.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/26.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGFmTool : NSObject
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Common/HGFmTool.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGFmTool.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/26.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "HGFmTool.h"
10 |
11 |
12 |
13 | @implementation HGFmTool
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Classes/Other(其它)/Lib/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/AFNetworking/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Classes/Other(其它)/Lib/AFNetworking/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/AFNetworking/AFNetworking.h:
--------------------------------------------------------------------------------
1 | // AFNetworking.h
2 | //
3 | // Copyright (c) 2013 AFNetworking (http://afnetworking.com/)
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in
13 | // all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | // THE SOFTWARE.
22 |
23 | #import
24 | #import
25 |
26 | #ifndef _AFNETWORKING_
27 | #define _AFNETWORKING_
28 |
29 | #import "AFURLRequestSerialization.h"
30 | #import "AFURLResponseSerialization.h"
31 | #import "AFSecurityPolicy.h"
32 | #import "AFNetworkReachabilityManager.h"
33 |
34 | #import "AFURLConnectionOperation.h"
35 | #import "AFHTTPRequestOperation.h"
36 | #import "AFHTTPRequestOperationManager.h"
37 |
38 | #if ( ( defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || \
39 | ( defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 ) )
40 | #import "AFURLSessionManager.h"
41 | #import "AFHTTPSessionManager.h"
42 | #endif
43 |
44 | #endif /* _AFNETWORKING_ */
45 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/MJExtension/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Classes/Other(其它)/Lib/MJExtension/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/MJExtension/MJConst.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __MJConst__H__
3 | #define __MJConst__H__
4 |
5 | #import
6 |
7 | // 过期
8 | #define MJDeprecated(instead) NS_DEPRECATED(2_0, 2_0, 2_0, 2_0, instead)
9 |
10 | #ifdef DEBUG // 调试状态
11 | // 打开LOG功能
12 | #define MJLog(...) NSLog(__VA_ARGS__)
13 | #else // 发布状态
14 | // 关闭LOG功能
15 | #define MJLog(...)
16 | #endif
17 |
18 | // 构建错误
19 | #define MJBuildError(error, msg) \
20 | if (error) *error = [NSError errorWithDomain:msg code:250 userInfo:nil];
21 |
22 | /**
23 | * 断言
24 | * @param condition 条件
25 | * @param returnValue 返回值
26 | */
27 | #define MJAssertError(condition, returnValue, error, msg) \
28 | if ((condition) == NO) { \
29 | MJBuildError(error, msg); \
30 | return returnValue;\
31 | }
32 |
33 | #define MJAssert2(condition, returnValue) \
34 | if ((condition) == NO) return returnValue;
35 |
36 | /**
37 | * 断言
38 | * @param condition 条件
39 | */
40 | #define MJAssert(condition) MJAssert2(condition, )
41 |
42 | /**
43 | * 断言
44 | * @param param 参数
45 | * @param returnValue 返回值
46 | */
47 | #define MJAssertParamNotNil2(param, returnValue) \
48 | MJAssert2((param) != nil, returnValue)
49 |
50 | /**
51 | * 断言
52 | * @param param 参数
53 | */
54 | #define MJAssertParamNotNil(param) MJAssertParamNotNil2(param, )
55 |
56 | /**
57 | * 打印所有的属性
58 | */
59 | #define MJLogAllIvars \
60 | -(NSString *)description \
61 | { \
62 | return [self keyValues].description; \
63 | }
64 |
65 | /**
66 | * 类型(属性类型)
67 | */
68 | extern NSString *const MJTypeInt;
69 | extern NSString *const MJTypeFloat;
70 | extern NSString *const MJTypeDouble;
71 | extern NSString *const MJTypeLong;
72 | extern NSString *const MJTypeLongLong;
73 | extern NSString *const MJTypeChar;
74 | extern NSString *const MJTypeBOOL;
75 | extern NSString *const MJTypePointer;
76 |
77 | extern NSString *const MJTypeIvar;
78 | extern NSString *const MJTypeMethod;
79 | extern NSString *const MJTypeBlock;
80 | extern NSString *const MJTypeClass;
81 | extern NSString *const MJTypeSEL;
82 | extern NSString *const MJTypeId;
83 |
84 | #endif
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/MJExtension/MJConst.m:
--------------------------------------------------------------------------------
1 | #ifndef __MJConst__M__
2 | #define __MJConst__M__
3 |
4 | #import
5 |
6 | /**
7 | * 成员变量类型(属性类型)
8 | */
9 | NSString *const MJTypeInt = @"i";
10 | NSString *const MJTypeFloat = @"f";
11 | NSString *const MJTypeDouble = @"d";
12 | NSString *const MJTypeLong = @"q";
13 | NSString *const MJTypeLongLong = @"q";
14 | NSString *const MJTypeChar = @"c";
15 | NSString *const MJTypeBOOL = @"c";
16 | NSString *const MJTypePointer = @"*";
17 |
18 | NSString *const MJTypeIvar = @"^{objc_ivar=}";
19 | NSString *const MJTypeMethod = @"^{objc_method=}";
20 | NSString *const MJTypeBlock = @"@?";
21 | NSString *const MJTypeClass = @"#";
22 | NSString *const MJTypeSEL = @":";
23 | NSString *const MJTypeId = @"@";
24 |
25 | #endif
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/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+MJKeyValue.h"
13 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/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 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/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 "MJConst.h"
11 | #import
12 |
13 | static NSSet *_foundationClasses;
14 |
15 | @implementation MJFoundation
16 |
17 | + (void)load
18 | {
19 | _foundationClasses = [NSSet setWithObjects:
20 | [NSObject class],
21 | [NSURL class],
22 | [NSDate class],
23 | [NSNumber class],
24 | [NSDecimalNumber class],
25 | [NSData class],
26 | [NSMutableData class],
27 | [NSArray class],
28 | [NSMutableArray class],
29 | [NSDictionary class],
30 | [NSMutableDictionary class],
31 | [NSManagedObject class],
32 | [NSString class],
33 | [NSMutableString class], nil];
34 | }
35 |
36 | + (BOOL)isClassFromFoundation:(Class)c
37 | {
38 | return [_foundationClasses containsObject:c];
39 | }
40 | @end
41 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/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 | @class MJType;
12 |
13 | /**
14 | * 包装一个成员
15 | */
16 | @interface MJProperty : NSObject
17 | /** 成员属性 */
18 | @property (nonatomic, assign) objc_property_t property;
19 | /** 成员属性名 */
20 | @property (nonatomic, readonly) NSString *name;
21 |
22 | /** 成员变量的类型 */
23 | @property (nonatomic, readonly) MJType *type;
24 | /** 成员来源于哪个类(可能是父类) */
25 | @property (nonatomic, assign) Class srcClass;
26 |
27 | /**** 同一个成员变量 - 父类和子类的行为可能不一致(key、keys、objectClassInArray) ****/
28 | /** 对应着字典中的key */
29 | - (void)setKey:(NSString *)key forClass:(Class)c;
30 | - (NSString *)keyFromClass:(Class)c;
31 |
32 | /** 对应着字典中的多级key */
33 | - (NSArray *)keysFromClass:(Class)c;
34 |
35 | /** 模型数组中的模型类型 */
36 | - (void)setObjectClassInArray:(Class)objectClass forClass:(Class)c;
37 | - (Class)objectClassInArrayFromClass:(Class)c;
38 | /**** 同一个成员变量 - 父类和子类的行为可能不一致(key、keys、objectClassInArray) ****/
39 |
40 | /**
41 | * 设置成员变量的值
42 | */
43 | - (void)setValue:(id)value forObject:(id)object;
44 | /**
45 | * 得到成员变量的值
46 | */
47 | - (id)valueFromObject:(id)object;
48 |
49 | /**
50 | * 初始化
51 | */
52 | + (instancetype)cachedPropertyWithProperty:(objc_property_t)property;
53 | @end
54 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/MJExtension/MJProperty.m:
--------------------------------------------------------------------------------
1 | //
2 | // MJProperty.m
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 15/4/17.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJProperty.h"
10 | #import "MJType.h"
11 | #import "MJFoundation.h"
12 | #import "MJConst.h"
13 |
14 | @interface MJProperty()
15 | @property (strong, nonatomic) NSMutableDictionary *keyDict;
16 | @property (strong, nonatomic) NSMutableDictionary *keysDict;
17 | @property (strong, nonatomic) NSMutableDictionary *objectClassInArrayDict;
18 | @end
19 |
20 | @implementation MJProperty
21 |
22 | - (NSMutableDictionary *)keyDict
23 | {
24 | if (!_keyDict) {
25 | self.keyDict = [NSMutableDictionary dictionary];
26 | }
27 | return _keyDict;
28 | }
29 |
30 | - (NSMutableDictionary *)keysDict
31 | {
32 | if (!_keysDict) {
33 | self.keysDict = [NSMutableDictionary dictionary];
34 | }
35 | return _keysDict;
36 | }
37 |
38 | - (NSMutableDictionary *)objectClassInArrayDict
39 | {
40 | if (!_objectClassInArrayDict) {
41 | self.objectClassInArrayDict = [NSMutableDictionary dictionary];
42 | }
43 | return _objectClassInArrayDict;
44 | }
45 |
46 | + (instancetype)cachedPropertyWithProperty:(objc_property_t)property
47 | {
48 | MJProperty *propertyObj = objc_getAssociatedObject(self, property);
49 | if (propertyObj == nil) {
50 | propertyObj = [[self alloc] init];
51 | propertyObj.property = property;
52 | objc_setAssociatedObject(self, property, propertyObj, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
53 | }
54 | return propertyObj;
55 | }
56 |
57 | - (void)setProperty:(objc_property_t)property
58 | {
59 | _property = property;
60 |
61 | MJAssertParamNotNil(property);
62 |
63 | // 1.属性名
64 | _name = @(property_getName(property));
65 |
66 | // 2.成员类型
67 | NSString *attrs = @(property_getAttributes(property));
68 | NSUInteger loc = 1;
69 | NSUInteger len = [attrs rangeOfString:@","].location - loc;
70 | _type = [MJType cachedTypeWithCode:[attrs substringWithRange:NSMakeRange(loc, len)]];
71 | }
72 |
73 | /**
74 | * 获得成员变量的值
75 | */
76 | - (id)valueFromObject:(id)object
77 | {
78 | if (_type.KVCDisabled) return [NSNull null];
79 | return [object valueForKey:_name];
80 | }
81 |
82 | /**
83 | * 设置成员变量的值
84 | */
85 | - (void)setValue:(id)value forObject:(id)object
86 | {
87 | if (_type.KVCDisabled || value == nil) return;
88 | [object setValue:value forKey:_name];
89 | }
90 |
91 | /** 对应着字典中的key */
92 | - (void)setKey:(NSString *)key forClass:(Class)c
93 | {
94 | if (!key) return;
95 | self.keyDict[NSStringFromClass(c)] = key;
96 | // 如果有多级映射
97 | [self setKeys:[key componentsSeparatedByString:@"."] forClass:c];
98 | }
99 | - (NSString *)keyFromClass:(Class)c
100 | {
101 | return self.keyDict[NSStringFromClass(c)];
102 | }
103 |
104 | /** 对应着字典中的多级key */
105 | - (void)setKeys:(NSArray *)keys forClass:(Class)c
106 | {
107 | if (!keys) return;
108 | self.keysDict[NSStringFromClass(c)] = keys;
109 | }
110 | - (NSArray *)keysFromClass:(Class)c
111 | {
112 | return self.keysDict[NSStringFromClass(c)];
113 | }
114 |
115 | /** 模型数组中的模型类型 */
116 | - (void)setObjectClassInArray:(Class)objectClass forClass:(Class)c
117 | {
118 | if (!objectClass) return;
119 | self.objectClassInArrayDict[NSStringFromClass(c)] = objectClass;
120 | }
121 | - (Class)objectClassInArrayFromClass:(Class)c
122 | {
123 | return self.objectClassInArrayDict[NSStringFromClass(c)];
124 | }
125 | @end
126 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/MJExtension/MJType.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJType.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 | @interface MJType : NSObject
14 | /** 类型标识符 */
15 | @property (nonatomic, copy) NSString *code;
16 |
17 | /** 是否为id类型 */
18 | @property (nonatomic, readonly, getter=isIdType) BOOL idType;
19 |
20 | /** 是否为基本数字类型:int、float等 */
21 | @property (nonatomic, readonly, getter=isNumberType) BOOL numberType;
22 |
23 | /** 对象类型(如果是基本数据类型,此值为nil) */
24 | @property (nonatomic, readonly) Class typeClass;
25 |
26 | /** 类型是否来自于Foundation框架,比如NSString、NSArray */
27 | @property (nonatomic, readonly, getter = isFromFoundation) BOOL fromFoundation;
28 | /** 类型是否不支持KVC */
29 | @property (nonatomic, readonly, getter = isKVCDisabled) BOOL KVCDisabled;
30 |
31 | /**
32 | * 获得缓存的类型对象
33 | */
34 | + (instancetype)cachedTypeWithCode:(NSString *)code;
35 | @end
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/MJExtension/MJType.m:
--------------------------------------------------------------------------------
1 | //
2 | // MJType.m
3 | // MJExtension
4 | //
5 | // Created by mj on 14-1-15.
6 | // Copyright (c) 2014年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJType.h"
10 | #import "MJExtension.h"
11 | #import "MJFoundation.h"
12 | #import "MJConst.h"
13 |
14 | @implementation MJType
15 |
16 | static NSMutableDictionary *_cachedTypes;
17 | + (void)load
18 | {
19 | _cachedTypes = [NSMutableDictionary dictionary];
20 | }
21 |
22 | + (instancetype)cachedTypeWithCode:(NSString *)code
23 | {
24 | MJAssertParamNotNil2(code, nil);
25 |
26 | MJType *type = _cachedTypes[code];
27 | if (type == nil) {
28 | type = [[self alloc] init];
29 | type.code = code;
30 | _cachedTypes[code] = type;
31 | }
32 | return type;
33 | }
34 |
35 | - (void)setCode:(NSString *)code
36 | {
37 | _code = code;
38 |
39 | MJAssertParamNotNil(code);
40 |
41 | if ([code isEqualToString:MJTypeId]) {
42 | _idType = YES;
43 | } else if (code.length == 0) {
44 | _KVCDisabled = YES;
45 | } else if (code.length > 3 && [code hasPrefix:@"@\""]) {
46 | // 去掉@"和",截取中间的类型名称
47 | _code = [code substringWithRange:NSMakeRange(2, code.length - 3)];
48 | _typeClass = NSClassFromString(_code);
49 | _fromFoundation = [MJFoundation isClassFromFoundation:_typeClass];
50 | _numberType = (_typeClass == [NSNumber class] || [_typeClass isSubclassOfClass:[NSNumber class]]);
51 | } else if ([code isEqualToString:MJTypeSEL] ||
52 | [code isEqualToString:MJTypeIvar] ||
53 | [code isEqualToString:MJTypeMethod]) {
54 | _KVCDisabled = YES;
55 | }
56 |
57 | // 是否为数字类型
58 | NSString *lowerCode = _code.lowercaseString;
59 | NSArray *numberTypes = @[MJTypeInt, MJTypeFloat, MJTypeDouble, MJTypeLong, MJTypeChar];
60 | if ([numberTypes containsObject:lowerCode]) {
61 | _numberType = YES;
62 | }
63 | }
64 | @end
65 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/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 | /**
11 | * Codeing协议
12 | */
13 | @protocol MJCoding
14 | @optional
15 | /**
16 | * 这个数组中的属性名才会进行归档
17 | */
18 | + (NSArray *)allowedCodingPropertyNames;
19 | /**
20 | * 这个数组中的属性名将会被忽略:不进行归档
21 | */
22 | + (NSArray *)ignoredCodingPropertyNames;
23 | @end
24 |
25 | @interface NSObject (MJCoding)
26 | /**
27 | * 解码(从文件中解析对象)
28 | */
29 | - (void)decode:(NSCoder *)decoder;
30 | /**
31 | * 编码(将对象写入文件中)
32 | */
33 | - (void)encode:(NSCoder *)encoder;
34 | @end
35 |
36 | /**
37 | 归档的实现
38 | */
39 | #define MJCodingImplementation \
40 | - (id)initWithCoder:(NSCoder *)decoder \
41 | { \
42 | if (self = [super init]) { \
43 | [self decode:decoder]; \
44 | } \
45 | return self; \
46 | } \
47 | \
48 | - (void)encodeWithCoder:(NSCoder *)encoder \
49 | { \
50 | [self encode:encoder]; \
51 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/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+MJProperty.h"
11 | #import "MJProperty.h"
12 |
13 | @implementation NSObject (MJCoding)
14 |
15 | - (void)encode:(NSCoder *)encoder
16 | {
17 | Class class = [self class];
18 |
19 | NSArray *allowedCodingPropertyNames = [class totalAllowedCodingPropertyNames];
20 | NSArray *ignoredCodingPropertyNames = [class totalIgnoredCodingPropertyNames];
21 |
22 | [class enumeratePropertiesWithBlock:^(MJProperty *property, BOOL *stop) {
23 | if (allowedCodingPropertyNames.count && ![allowedCodingPropertyNames containsObject:property.name]) return;
24 | // 检测是否被忽略
25 | if ([ignoredCodingPropertyNames containsObject:property.name]) return;
26 |
27 | id value = [property valueFromObject:self];
28 | if (value == nil) return;
29 | [encoder encodeObject:value forKey:property.name];
30 | }];
31 | }
32 |
33 | - (void)decode:(NSCoder *)decoder
34 | {
35 | Class class = [self class];
36 |
37 | NSArray *allowedCodingPropertyNames = [class totalAllowedCodingPropertyNames];
38 | NSArray *ignoredCodingPropertyNames = [class totalIgnoredCodingPropertyNames];
39 |
40 | [class enumeratePropertiesWithBlock:^(MJProperty *property, BOOL *stop) {
41 | if (allowedCodingPropertyNames.count && ![allowedCodingPropertyNames containsObject:property.name]) return;
42 | // 检测是否被忽略
43 | if ([ignoredCodingPropertyNames containsObject:property.name]) return;
44 |
45 | id value = [decoder decodeObjectForKey:property.name];
46 | if (value == nil) return;
47 | [property setValue:value forObject:self];
48 | }];
49 | }
50 | @end
51 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/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 |
11 | @class MJProperty;
12 |
13 | /**
14 | * 遍历所有类的block(父类)
15 | */
16 | typedef void (^MJClassesBlock)(Class c, BOOL *stop);
17 |
18 | /**
19 | * 遍历成员变量用的block
20 | *
21 | * @param property 成员的包装对象
22 | * @param stop YES代表停止遍历,NO代表继续遍历
23 | */
24 | typedef void (^MJPropertiesBlock)(MJProperty *property, BOOL *stop);
25 |
26 | /** 将属性名换为其他key去字典中取值 */
27 | typedef NSDictionary * (^ReplacedKeyFromPropertyName)();
28 | /** 数组中需要转换的模型类 */
29 | typedef NSDictionary * (^ObjectClassInArray)();
30 |
31 |
32 | /** 这个数组中的属性名才会进行字典和模型的转换 */
33 | typedef NSArray * (^AllowedPropertyNames)();
34 | /** 这个数组中的属性名才会进行归档 */
35 | typedef NSArray * (^AllowedCodingPropertyNames)();
36 |
37 | /** 这个数组中的属性名将会被忽略:不进行字典和模型的转换 */
38 | typedef NSArray * (^IgnoredPropertyNames)();
39 | /** 这个数组中的属性名将会被忽略:不进行归档 */
40 | typedef NSArray * (^IgnoredCodingPropertyNames)();
41 |
42 | @interface NSObject (MJProperty)
43 |
44 | /**
45 | * 遍历所有的成员
46 | */
47 | + (void)enumeratePropertiesWithBlock:(MJPropertiesBlock)block;
48 |
49 | /**
50 | * 遍历所有的类
51 | */
52 | + (void)enumerateClassesWithBlock:(MJClassesBlock)block;
53 |
54 | /**
55 | * 配置模型属性
56 | *
57 | * @param replacedKeyFromPropertyName 将属性名换为其他key去字典中取值
58 | * @param objectClassInArray 数组中需要转换的模型类
59 | */
60 | + (void)setupReplacedKeyFromPropertyName:(ReplacedKeyFromPropertyName)replacedKeyFromPropertyName objectClassInArray:(ObjectClassInArray)objectClassInArray;
61 |
62 | /**
63 | * 配置模型属性
64 | *
65 | * @param replacedKeyFromPropertyName 将属性名换为其他key去字典中取值
66 | */
67 | + (void)setupReplacedKeyFromPropertyName:(ReplacedKeyFromPropertyName)replacedKeyFromPropertyName;
68 |
69 | /**
70 | * 配置模型属性
71 | *
72 | * @param objectClassInArray 数组中需要转换的模型类
73 | */
74 | + (void)setupObjectClassInArray:(ObjectClassInArray)objectClassInArray;
75 |
76 | /**
77 | * 配置模型属性
78 | *
79 | * @param allowedPropertyNames 这个数组中的属性名才会进行字典和模型的转换
80 | */
81 | + (void)setupAllowedPropertyNames:(AllowedPropertyNames)allowedPropertyNames;
82 |
83 | /**
84 | * 这个数组中的属性名才会进行字典和模型的转换
85 | */
86 | + (NSArray *)totalAllowedPropertyNames;
87 |
88 | /**
89 | * 配置模型属性
90 | *
91 | * @param allowedCodingPropertyNames 这个数组中的属性名才会进行归档
92 | */
93 | + (void)setupAllowedCodingPropertyNames:(AllowedCodingPropertyNames)allowedCodingPropertyNames;
94 |
95 | /**
96 | * 这个数组中的属性名才会进行字典和模型的转换
97 | */
98 | + (NSArray *)totalAllowedCodingPropertyNames;
99 |
100 | /**
101 | * 配置模型属性
102 | *
103 | * @param ignoredPropertyNames 这个数组中的属性名将会被忽略:不进行字典和模型的转换
104 | */
105 | + (void)setupIgnoredPropertyNames:(IgnoredPropertyNames)ignoredPropertyNames;
106 |
107 | /**
108 | * 这个数组中的属性名将会被忽略:不进行字典和模型的转换
109 | */
110 | + (NSArray *)totalIgnoredPropertyNames;
111 |
112 | /**
113 | * 配置模型属性
114 | *
115 | * @param ignoredCodingPropertyNames 这个数组中的属性名将会被忽略:不进行归档
116 | */
117 | + (void)setupIgnoredCodingPropertyNames:(IgnoredCodingPropertyNames)ignoredCodingPropertyNames;
118 |
119 | /**
120 | * 这个数组中的属性名将会被忽略:不进行归档
121 | */
122 | + (NSArray *)totalIgnoredCodingPropertyNames;
123 | @end
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/MJExtension/NSString+MJExtension.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+MJExtension.h
3 | // TestTabBar
4 | //
5 | // Created by MJ Lee on 15/4/17.
6 | // Copyright (c) 2015年 Mac Z. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSString (MJExtension)
12 | - (id)JSONObject;
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/MJExtension/NSString+MJExtension.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+MJExtension.m
3 | // TestTabBar
4 | //
5 | // Created by MJ Lee on 15/4/17.
6 | // Copyright (c) 2015年 Mac Z. All rights reserved.
7 | //
8 |
9 | #import "NSString+MJExtension.h"
10 |
11 | @implementation NSString (MJExtension)
12 | - (id)JSONObject
13 | {
14 | return [NSJSONSerialization JSONObjectWithData:[self dataUsingEncoding:NSUTF8StringEncoding] options:kNilOptions error:nil];
15 | }
16 | @end
17 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/MJRefresh/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Classes/Other(其它)/Lib/MJRefresh/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/MJRefresh/MJRefresh.bundle/arrow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Classes/Other(其它)/Lib/MJRefresh/MJRefresh.bundle/arrow@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/MJRefresh/MJRefresh.h:
--------------------------------------------------------------------------------
1 |
2 | #import "MJRefreshFooterView.h"
3 | #import "MJRefreshHeaderView.h"
4 |
5 | /**
6 | MJ友情提示:
7 | 1. 添加头部控件的方法
8 | MJRefreshHeaderView *header = [MJRefreshHeaderView header];
9 | header.scrollView = self.collectionView; // 或者tableView
10 |
11 | 2. 添加尾部控件的方法
12 | MJRefreshFooterView *footer = [MJRefreshFooterView footer];
13 | footer.scrollView = self.collectionView; // 或者tableView
14 |
15 | 3. 监听刷新控件的状态有2种方式:
16 | * 设置delegate,通过代理方法监听(参考MJCollectionViewController.m)
17 | * 设置block,通过block回调监听(参考MJTableViewController.m)
18 |
19 | 4. 可以在MJRefreshConst.h和MJRefreshConst.m文件中自定义显示的文字内容和文字颜色
20 |
21 | 5. 本框架兼容iOS6\iOS7,iPhone\iPad横竖屏
22 |
23 | 6.为了保证内部不泄露,最好在控制器的dealloc中释放占用的内存
24 | - (void)dealloc
25 | {
26 | [_header free];
27 | [_footer free];
28 | }
29 |
30 | 7.自动刷新:调用beginRefreshing可以自动进入下拉刷新状态
31 |
32 | 8.结束刷新
33 | 1> endRefreshing
34 | */
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/MJRefresh/MJRefreshBaseView.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshBaseView.h
3 | // MJRefresh
4 | //
5 | // Created by mj on 13-3-4.
6 | // Copyright (c) 2013年 itcast. All rights reserved.
7 |
8 | #import
9 |
10 | /**
11 | 枚举
12 | */
13 | // 控件的刷新状态
14 | typedef enum {
15 | MJRefreshStatePulling = 1, // 松开就可以进行刷新的状态
16 | MJRefreshStateNormal = 2, // 普通状态
17 | MJRefreshStateRefreshing = 3, // 正在刷新中的状态
18 | MJRefreshStateWillRefreshing = 4
19 | } MJRefreshState;
20 |
21 | // 控件的类型
22 | typedef enum {
23 | MJRefreshViewTypeHeader = -1, // 头部控件
24 | MJRefreshViewTypeFooter = 1 // 尾部控件
25 | } MJRefreshViewType;
26 |
27 | @class MJRefreshBaseView;
28 |
29 | /**
30 | 回调的Block定义
31 | */
32 | // 开始进入刷新状态就会调用
33 | typedef void (^BeginRefreshingBlock)(MJRefreshBaseView *refreshView);
34 | // 刷新完毕就会调用
35 | typedef void (^EndRefreshingBlock)(MJRefreshBaseView *refreshView);
36 | // 刷新状态变更就会调用
37 | typedef void (^RefreshStateChangeBlock)(MJRefreshBaseView *refreshView, MJRefreshState state);
38 |
39 | /**
40 | 代理的协议定义
41 | */
42 | @protocol MJRefreshBaseViewDelegate
43 | @optional
44 | // 开始进入刷新状态就会调用
45 | - (void)refreshViewBeginRefreshing:(MJRefreshBaseView *)refreshView;
46 | // 刷新完毕就会调用
47 | - (void)refreshViewEndRefreshing:(MJRefreshBaseView *)refreshView;
48 | // 刷新状态变更就会调用
49 | - (void)refreshView:(MJRefreshBaseView *)refreshView stateChange:(MJRefreshState)state;
50 | @end
51 |
52 | /**
53 | 类的声明
54 | */
55 | @interface MJRefreshBaseView : UIView
56 | {
57 | // 父控件一开始的contentInset
58 | UIEdgeInsets _scrollViewInitInset;
59 | // 父控件
60 | __weak UIScrollView *_scrollView;
61 |
62 | // 子控件
63 | __weak UILabel *_lastUpdateTimeLabel;
64 | __weak UILabel *_statusLabel;
65 | __weak UIImageView *_arrowImage;
66 | __weak UIActivityIndicatorView *_activityView;
67 |
68 | // 状态
69 | MJRefreshState _state;
70 | }
71 |
72 | // 构造方法
73 | - (instancetype)initWithScrollView:(UIScrollView *)scrollView;
74 | // 设置要显示的父控件
75 | @property (nonatomic, weak) UIScrollView *scrollView;
76 |
77 | // 内部的控件
78 | @property (nonatomic, weak, readonly) UILabel *lastUpdateTimeLabel;
79 | @property (nonatomic, weak, readonly) UILabel *statusLabel;
80 | @property (nonatomic, weak, readonly) UIImageView *arrowImage;
81 |
82 | // Block回调
83 | @property (nonatomic, copy) BeginRefreshingBlock beginRefreshingBlock;
84 | @property (nonatomic, copy) RefreshStateChangeBlock refreshStateChangeBlock;
85 | @property (nonatomic, copy) EndRefreshingBlock endStateChangeBlock;
86 | // 代理
87 | @property (nonatomic, weak) id delegate;
88 |
89 | // 是否正在刷新
90 | @property (nonatomic, readonly, getter=isRefreshing) BOOL refreshing;
91 | // 开始刷新
92 | - (void)beginRefreshing;
93 | // 结束刷新
94 | - (void)endRefreshing;
95 | // 不静止地结束刷新
96 | //- (void)endRefreshingWithoutIdle;
97 | // 结束使用、释放资源
98 | - (void)free;
99 |
100 | /**
101 | 交给子类去实现 和 调用
102 | */
103 | - (void)setState:(MJRefreshState)state;
104 | - (int)totalDataCountInScrollView;
105 | @end
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/MJRefresh/MJRefreshConst.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshConst.h
3 | // MJRefresh
4 | //
5 | // Created by mj on 14-1-3.
6 | // Copyright (c) 2014年 itcast. All rights reserved.
7 | //
8 |
9 | #ifdef DEBUG
10 | #define MJLog(...) NSLog(__VA_ARGS__)
11 | #else
12 | #define MJLog(...)
13 | #endif
14 |
15 | #import
16 | // 文字颜色
17 | #define MJRefreshLabelTextColor [UIColor colorWithRed:150/255.0 green:150/255.0 blue:150/255.0 alpha:1.0]
18 |
19 | extern const CGFloat MJRefreshViewHeight;
20 | extern const CGFloat MJRefreshAnimationDuration;
21 |
22 | extern NSString *const MJRefreshBundleName;
23 | #define kSrcName(file) [MJRefreshBundleName stringByAppendingPathComponent:file]
24 |
25 | extern NSString *const MJRefreshFooterPullToRefresh;
26 | extern NSString *const MJRefreshFooterReleaseToRefresh;
27 | extern NSString *const MJRefreshFooterRefreshing;
28 |
29 | extern NSString *const MJRefreshHeaderPullToRefresh;
30 | extern NSString *const MJRefreshHeaderReleaseToRefresh;
31 | extern NSString *const MJRefreshHeaderRefreshing;
32 | extern NSString *const MJRefreshHeaderTimeKey;
33 |
34 | extern NSString *const MJRefreshContentOffset;
35 | extern NSString *const MJRefreshContentSize;
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/MJRefresh/MJRefreshConst.m:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshConst.m
3 | // MJRefresh
4 | //
5 | // Created by mj on 14-1-3.
6 | // Copyright (c) 2014年 itcast. All rights reserved.
7 | //
8 | #import
9 |
10 | const CGFloat MJRefreshViewHeight = 64.0;
11 | const CGFloat MJRefreshAnimationDuration = 0.25;
12 |
13 | NSString *const MJRefreshBundleName = @"MJRefresh.bundle";
14 |
15 | NSString *const MJRefreshFooterPullToRefresh = @"上拉可以加载更多数据";
16 | NSString *const MJRefreshFooterReleaseToRefresh = @"松开立即加载更多数据";
17 | NSString *const MJRefreshFooterRefreshing = @"努力加载中...";
18 |
19 | NSString *const MJRefreshHeaderPullToRefresh = @"上拉可以刷新";
20 | NSString *const MJRefreshHeaderReleaseToRefresh = @"松开立即刷新";
21 | NSString *const MJRefreshHeaderRefreshing = @"努力加载中...";
22 | NSString *const MJRefreshHeaderTimeKey = @"MJRefreshHeaderView";
23 |
24 | NSString *const MJRefreshContentOffset = @"contentOffset";
25 | NSString *const MJRefreshContentSize = @"contentSize";
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/MJRefresh/MJRefreshFooterView.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshTableFooterView.h
3 | // MJRefresh
4 | //
5 | // Created by mj on 13-2-26.
6 | // Copyright (c) 2013年 itcast. All rights reserved.
7 | // 上拉加载更多
8 |
9 | #import "MJRefreshBaseView.h"
10 |
11 | @interface MJRefreshFooterView : MJRefreshBaseView
12 | + (instancetype)footer;
13 | @end
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/MJRefresh/MJRefreshHeaderView.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJRefreshHeaderView.h
3 | // MJRefresh
4 | //
5 | // Created by mj on 13-2-26.
6 | // Copyright (c) 2013年 itcast. All rights reserved.
7 | // 下拉刷新
8 |
9 | #import "MJRefreshBaseView.h"
10 |
11 | @interface MJRefreshHeaderView : MJRefreshBaseView
12 | + (instancetype)header;
13 | @end
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/MKAnnotationView+WebCache.m:
--------------------------------------------------------------------------------
1 | //
2 | // MKAnnotationView+WebCache.m
3 | // SDWebImage
4 | //
5 | // Created by Olivier Poitrey on 14/03/12.
6 | // Copyright (c) 2012 Dailymotion. All rights reserved.
7 | //
8 |
9 | #import "MKAnnotationView+WebCache.h"
10 | #import "objc/runtime.h"
11 | #import "UIView+WebCacheOperation.h"
12 |
13 | static char imageURLKey;
14 |
15 | @implementation MKAnnotationView (WebCache)
16 |
17 | - (NSURL *)sd_imageURL {
18 | return objc_getAssociatedObject(self, &imageURLKey);
19 | }
20 |
21 | - (void)sd_setImageWithURL:(NSURL *)url {
22 | [self sd_setImageWithURL:url placeholderImage:nil options:0 completed:nil];
23 | }
24 |
25 | - (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder {
26 | [self sd_setImageWithURL:url placeholderImage:placeholder options:0 completed:nil];
27 | }
28 |
29 | - (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options {
30 | [self sd_setImageWithURL:url placeholderImage:placeholder options:options completed:nil];
31 | }
32 |
33 | - (void)sd_setImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock {
34 | [self sd_setImageWithURL:url placeholderImage:nil options:0 completed:completedBlock];
35 | }
36 |
37 | - (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock {
38 | [self sd_setImageWithURL:url placeholderImage:placeholder options:0 completed:completedBlock];
39 | }
40 |
41 | - (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock {
42 | [self sd_cancelCurrentImageLoad];
43 |
44 | objc_setAssociatedObject(self, &imageURLKey, url, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
45 | self.image = placeholder;
46 |
47 | if (url) {
48 | __weak MKAnnotationView *wself = self;
49 | id operation = [SDWebImageManager.sharedManager downloadImageWithURL:url options:options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
50 | if (!wself) return;
51 | dispatch_main_sync_safe(^{
52 | __strong MKAnnotationView *sself = wself;
53 | if (!sself) return;
54 | if (image) {
55 | sself.image = image;
56 | }
57 | if (completedBlock && finished) {
58 | completedBlock(image, error, cacheType, url);
59 | }
60 | });
61 | }];
62 | [self sd_setImageLoadOperation:operation forKey:@"MKAnnotationViewImage"];
63 | } else {
64 | dispatch_main_async_safe(^{
65 | NSError *error = [NSError errorWithDomain:@"SDWebImageErrorDomain" code:-1 userInfo:@{NSLocalizedDescriptionKey : @"Trying to load a nil url"}];
66 | if (completedBlock) {
67 | completedBlock(nil, error, SDImageCacheTypeNone, url);
68 | }
69 | });
70 | }
71 | }
72 |
73 | - (void)sd_cancelCurrentImageLoad {
74 | [self sd_cancelImageLoadOperationWithKey:@"MKAnnotationViewImage"];
75 | }
76 |
77 | @end
78 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/NSData+ImageContentType.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Fabrice Aneche on 06/01/14.
3 | // Copyright (c) 2014 Dailymotion. All rights reserved.
4 | //
5 |
6 | #import
7 |
8 | @interface NSData (ImageContentType)
9 |
10 | /**
11 | * Compute the content type for an image data
12 | *
13 | * @param data the input data
14 | *
15 | * @return the content type as string (i.e. image/jpeg, image/gif)
16 | */
17 | + (NSString *)sd_contentTypeForImageData:(NSData *)data;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/NSData+ImageContentType.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Fabrice Aneche on 06/01/14.
3 | // Copyright (c) 2014 Dailymotion. All rights reserved.
4 | //
5 |
6 | #import "NSData+ImageContentType.h"
7 |
8 |
9 | @implementation NSData (ImageContentType)
10 |
11 | + (NSString *)sd_contentTypeForImageData:(NSData *)data {
12 | uint8_t c;
13 | [data getBytes:&c length:1];
14 | switch (c) {
15 | case 0xFF:
16 | return @"image/jpeg";
17 | case 0x89:
18 | return @"image/png";
19 | case 0x47:
20 | return @"image/gif";
21 | case 0x49:
22 | case 0x4D:
23 | return @"image/tiff";
24 | case 0x52:
25 | // R as RIFF for WEBP
26 | if ([data length] < 12) {
27 | return nil;
28 | }
29 |
30 | NSString *testString = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(0, 12)] encoding:NSASCIIStringEncoding];
31 | if ([testString hasPrefix:@"RIFF"] && [testString hasSuffix:@"WEBP"]) {
32 | return @"image/webp";
33 | }
34 |
35 | return nil;
36 | }
37 | return nil;
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/SDWebImageCompat.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | * (c) Jamie Pinkham
5 | *
6 | * For the full copyright and license information, please view the LICENSE
7 | * file that was distributed with this source code.
8 | */
9 |
10 | #import
11 |
12 | #ifdef __OBJC_GC__
13 | #error SDWebImage does not support Objective-C Garbage Collection
14 | #endif
15 |
16 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_5_0
17 | #error SDWebImage doesn't support Deployement Target version < 5.0
18 | #endif
19 |
20 | #if !TARGET_OS_IPHONE
21 | #import
22 | #ifndef UIImage
23 | #define UIImage NSImage
24 | #endif
25 | #ifndef UIImageView
26 | #define UIImageView NSImageView
27 | #endif
28 | #else
29 |
30 | #import
31 |
32 | #endif
33 |
34 | #ifndef NS_ENUM
35 | #define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
36 | #endif
37 |
38 | #ifndef NS_OPTIONS
39 | #define NS_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type
40 | #endif
41 |
42 | #if OS_OBJECT_USE_OBJC
43 | #undef SDDispatchQueueRelease
44 | #undef SDDispatchQueueSetterSementics
45 | #define SDDispatchQueueRelease(q)
46 | #define SDDispatchQueueSetterSementics strong
47 | #else
48 | #undef SDDispatchQueueRelease
49 | #undef SDDispatchQueueSetterSementics
50 | #define SDDispatchQueueRelease(q) (dispatch_release(q))
51 | #define SDDispatchQueueSetterSementics assign
52 | #endif
53 |
54 | extern UIImage *SDScaledImageForKey(NSString *key, UIImage *image);
55 |
56 | typedef void(^SDWebImageNoParamsBlock)();
57 |
58 | #define dispatch_main_sync_safe(block)\
59 | if ([NSThread isMainThread]) {\
60 | block();\
61 | } else {\
62 | dispatch_sync(dispatch_get_main_queue(), block);\
63 | }
64 |
65 | #define dispatch_main_async_safe(block)\
66 | if ([NSThread isMainThread]) {\
67 | block();\
68 | } else {\
69 | dispatch_async(dispatch_get_main_queue(), block);\
70 | }
71 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/SDWebImageCompat.m:
--------------------------------------------------------------------------------
1 | //
2 | // SDWebImageCompat.m
3 | // SDWebImage
4 | //
5 | // Created by Olivier Poitrey on 11/12/12.
6 | // Copyright (c) 2012 Dailymotion. All rights reserved.
7 | //
8 |
9 | #import "SDWebImageCompat.h"
10 |
11 | #if !__has_feature(objc_arc)
12 | #error SDWebImage is ARC only. Either turn on ARC for the project or use -fobjc-arc flag
13 | #endif
14 |
15 | inline UIImage *SDScaledImageForKey(NSString *key, UIImage *image) {
16 | if (!image) {
17 | return nil;
18 | }
19 |
20 | if ([image.images count] > 0) {
21 | NSMutableArray *scaledImages = [NSMutableArray array];
22 |
23 | for (UIImage *tempImage in image.images) {
24 | [scaledImages addObject:SDScaledImageForKey(key, tempImage)];
25 | }
26 |
27 | return [UIImage animatedImageWithImages:scaledImages duration:image.duration];
28 | }
29 | else {
30 | if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) {
31 | CGFloat scale = 1.0;
32 | if (key.length >= 8) {
33 | // Search @2x. at the end of the string, before a 3 to 4 extension length (only if key len is 8 or more @2x. + 4 len ext)
34 | NSRange range = [key rangeOfString:@"@2x." options:0 range:NSMakeRange(key.length - 8, 5)];
35 | if (range.location != NSNotFound) {
36 | scale = 2.0;
37 | }
38 | }
39 |
40 | UIImage *scaledImage = [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:image.imageOrientation];
41 | image = scaledImage;
42 | }
43 | return image;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/SDWebImageDecoder.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * Created by james on 9/28/11.
6 | *
7 | * For the full copyright and license information, please view the LICENSE
8 | * file that was distributed with this source code.
9 | */
10 |
11 | #import
12 | #import "SDWebImageCompat.h"
13 |
14 | @interface UIImage (ForceDecode)
15 |
16 | + (UIImage *)decodedImageWithImage:(UIImage *)image;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/SDWebImageDecoder.m:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * Created by james on 9/28/11.
6 | *
7 | * For the full copyright and license information, please view the LICENSE
8 | * file that was distributed with this source code.
9 | */
10 |
11 | #import "SDWebImageDecoder.h"
12 |
13 | @implementation UIImage (ForceDecode)
14 |
15 | + (UIImage *)decodedImageWithImage:(UIImage *)image {
16 | if (image.images) {
17 | // Do not decode animated images
18 | return image;
19 | }
20 |
21 | CGImageRef imageRef = image.CGImage;
22 | CGSize imageSize = CGSizeMake(CGImageGetWidth(imageRef), CGImageGetHeight(imageRef));
23 | CGRect imageRect = (CGRect){.origin = CGPointZero, .size = imageSize};
24 |
25 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
26 | CGBitmapInfo bitmapInfo = CGImageGetBitmapInfo(imageRef);
27 |
28 | int infoMask = (bitmapInfo & kCGBitmapAlphaInfoMask);
29 | BOOL anyNonAlpha = (infoMask == kCGImageAlphaNone ||
30 | infoMask == kCGImageAlphaNoneSkipFirst ||
31 | infoMask == kCGImageAlphaNoneSkipLast);
32 |
33 | // CGBitmapContextCreate doesn't support kCGImageAlphaNone with RGB.
34 | // https://developer.apple.com/library/mac/#qa/qa1037/_index.html
35 | if (infoMask == kCGImageAlphaNone && CGColorSpaceGetNumberOfComponents(colorSpace) > 1) {
36 | // Unset the old alpha info.
37 | bitmapInfo &= ~kCGBitmapAlphaInfoMask;
38 |
39 | // Set noneSkipFirst.
40 | bitmapInfo |= kCGImageAlphaNoneSkipFirst;
41 | }
42 | // Some PNGs tell us they have alpha but only 3 components. Odd.
43 | else if (!anyNonAlpha && CGColorSpaceGetNumberOfComponents(colorSpace) == 3) {
44 | // Unset the old alpha info.
45 | bitmapInfo &= ~kCGBitmapAlphaInfoMask;
46 | bitmapInfo |= kCGImageAlphaPremultipliedFirst;
47 | }
48 |
49 | // It calculates the bytes-per-row based on the bitsPerComponent and width arguments.
50 | CGContextRef context = CGBitmapContextCreate(NULL,
51 | imageSize.width,
52 | imageSize.height,
53 | CGImageGetBitsPerComponent(imageRef),
54 | 0,
55 | colorSpace,
56 | bitmapInfo);
57 | CGColorSpaceRelease(colorSpace);
58 |
59 | // If failed, return undecompressed image
60 | if (!context) return image;
61 |
62 | CGContextDrawImage(context, imageRect, imageRef);
63 | CGImageRef decompressedImageRef = CGBitmapContextCreateImage(context);
64 |
65 | CGContextRelease(context);
66 |
67 | UIImage *decompressedImage = [UIImage imageWithCGImage:decompressedImageRef scale:image.scale orientation:image.imageOrientation];
68 | CGImageRelease(decompressedImageRef);
69 | return decompressedImage;
70 | }
71 |
72 | @end
73 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/SDWebImageDownloaderOperation.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import
10 | #import "SDWebImageDownloader.h"
11 | #import "SDWebImageOperation.h"
12 |
13 | @interface SDWebImageDownloaderOperation : NSOperation
14 |
15 | /**
16 | * The request used by the operation's connection.
17 | */
18 | @property (strong, nonatomic, readonly) NSURLRequest *request;
19 |
20 | /**
21 | * Whether the URL connection should consult the credential storage for authenticating the connection. `YES` by default.
22 | *
23 | * This is the value that is returned in the `NSURLConnectionDelegate` method `-connectionShouldUseCredentialStorage:`.
24 | */
25 | @property (nonatomic, assign) BOOL shouldUseCredentialStorage;
26 |
27 | /**
28 | * The credential used for authentication challenges in `-connection:didReceiveAuthenticationChallenge:`.
29 | *
30 | * This will be overridden by any shared credentials that exist for the username or password of the request URL, if present.
31 | */
32 | @property (nonatomic, strong) NSURLCredential *credential;
33 |
34 | /**
35 | * The SDWebImageDownloaderOptions for the receiver.
36 | */
37 | @property (assign, nonatomic, readonly) SDWebImageDownloaderOptions options;
38 |
39 | /**
40 | * Initializes a `SDWebImageDownloaderOperation` object
41 | *
42 | * @see SDWebImageDownloaderOperation
43 | *
44 | * @param request the URL request
45 | * @param options downloader options
46 | * @param progressBlock the block executed when a new chunk of data arrives.
47 | * @note the progress block is executed on a background queue
48 | * @param completedBlock the block executed when the download is done.
49 | * @note the completed block is executed on the main queue for success. If errors are found, there is a chance the block will be executed on a background queue
50 | * @param cancelBlock the block executed if the download (operation) is cancelled
51 | *
52 | * @return the initialized instance
53 | */
54 | - (id)initWithRequest:(NSURLRequest *)request
55 | options:(SDWebImageDownloaderOptions)options
56 | progress:(SDWebImageDownloaderProgressBlock)progressBlock
57 | completed:(SDWebImageDownloaderCompletedBlock)completedBlock
58 | cancelled:(SDWebImageNoParamsBlock)cancelBlock;
59 |
60 | @end
61 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/SDWebImageOperation.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import
10 |
11 | @protocol SDWebImageOperation
12 |
13 | - (void)cancel;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/UIImage+GIF.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+GIF.h
3 | // LBGIFImage
4 | //
5 | // Created by Laurin Brandner on 06.01.12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIImage (GIF)
12 |
13 | + (UIImage *)sd_animatedGIFNamed:(NSString *)name;
14 |
15 | + (UIImage *)sd_animatedGIFWithData:(NSData *)data;
16 |
17 | - (UIImage *)sd_animatedImageByScalingAndCroppingToSize:(CGSize)size;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/UIImage+MultiFormat.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+MultiFormat.h
3 | // SDWebImage
4 | //
5 | // Created by Olivier Poitrey on 07/06/13.
6 | // Copyright (c) 2013 Dailymotion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIImage (MultiFormat)
12 |
13 | + (UIImage *)sd_imageWithData:(NSData *)data;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/UIImage+MultiFormat.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+MultiFormat.m
3 | // SDWebImage
4 | //
5 | // Created by Olivier Poitrey on 07/06/13.
6 | // Copyright (c) 2013 Dailymotion. All rights reserved.
7 | //
8 |
9 | #import "UIImage+MultiFormat.h"
10 | #import "UIImage+GIF.h"
11 | #import "NSData+ImageContentType.h"
12 | #import
13 |
14 | #ifdef SD_WEBP
15 | #import "UIImage+WebP.h"
16 | #endif
17 |
18 | @implementation UIImage (MultiFormat)
19 |
20 | + (UIImage *)sd_imageWithData:(NSData *)data {
21 | UIImage *image;
22 | NSString *imageContentType = [NSData sd_contentTypeForImageData:data];
23 | if ([imageContentType isEqualToString:@"image/gif"]) {
24 | image = [UIImage sd_animatedGIFWithData:data];
25 | }
26 | #ifdef SD_WEBP
27 | else if ([imageContentType isEqualToString:@"image/webp"])
28 | {
29 | image = [UIImage sd_imageWithWebPData:data];
30 | }
31 | #endif
32 | else {
33 | image = [[UIImage alloc] initWithData:data];
34 | UIImageOrientation orientation = [self sd_imageOrientationFromImageData:data];
35 | if (orientation != UIImageOrientationUp) {
36 | image = [UIImage imageWithCGImage:image.CGImage
37 | scale:image.scale
38 | orientation:orientation];
39 | }
40 | }
41 |
42 |
43 | return image;
44 | }
45 |
46 |
47 | +(UIImageOrientation)sd_imageOrientationFromImageData:(NSData *)imageData {
48 | UIImageOrientation result = UIImageOrientationUp;
49 | CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)imageData, NULL);
50 | if (imageSource) {
51 | CFDictionaryRef properties = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, NULL);
52 | if (properties) {
53 | CFTypeRef val;
54 | int exifOrientation;
55 | val = CFDictionaryGetValue(properties, kCGImagePropertyOrientation);
56 | if (val) {
57 | CFNumberGetValue(val, kCFNumberIntType, &exifOrientation);
58 | result = [self sd_exifOrientationToiOSOrientation:exifOrientation];
59 | } // else - if it's not set it remains at up
60 | CFRelease((CFTypeRef) properties);
61 | } else {
62 | //NSLog(@"NO PROPERTIES, FAIL");
63 | }
64 | CFRelease(imageSource);
65 | }
66 | return result;
67 | }
68 |
69 | #pragma mark EXIF orientation tag converter
70 | // Convert an EXIF image orientation to an iOS one.
71 | // reference see here: http://sylvana.net/jpegcrop/exif_orientation.html
72 | + (UIImageOrientation) sd_exifOrientationToiOSOrientation:(int)exifOrientation {
73 | UIImageOrientation orientation = UIImageOrientationUp;
74 | switch (exifOrientation) {
75 | case 1:
76 | orientation = UIImageOrientationUp;
77 | break;
78 |
79 | case 3:
80 | orientation = UIImageOrientationDown;
81 | break;
82 |
83 | case 8:
84 | orientation = UIImageOrientationLeft;
85 | break;
86 |
87 | case 6:
88 | orientation = UIImageOrientationRight;
89 | break;
90 |
91 | case 2:
92 | orientation = UIImageOrientationUpMirrored;
93 | break;
94 |
95 | case 4:
96 | orientation = UIImageOrientationDownMirrored;
97 | break;
98 |
99 | case 5:
100 | orientation = UIImageOrientationLeftMirrored;
101 | break;
102 |
103 | case 7:
104 | orientation = UIImageOrientationRightMirrored;
105 | break;
106 | default:
107 | break;
108 | }
109 | return orientation;
110 | }
111 |
112 |
113 |
114 | @end
115 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/UIImage+WebP.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+WebP.h
3 | // SDWebImage
4 | //
5 | // Created by Olivier Poitrey on 07/06/13.
6 | // Copyright (c) 2013 Dailymotion. All rights reserved.
7 | //
8 |
9 | #ifdef SD_WEBP
10 |
11 | #import
12 |
13 | // Fix for issue #416 Undefined symbols for architecture armv7 since WebP introduction when deploying to device
14 | void WebPInitPremultiplyNEON(void);
15 |
16 | void WebPInitUpsamplersNEON(void);
17 |
18 | void VP8DspInitNEON(void);
19 |
20 | @interface UIImage (WebP)
21 |
22 | + (UIImage *)sd_imageWithWebPData:(NSData *)data;
23 |
24 | @end
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/UIImage+WebP.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+WebP.m
3 | // SDWebImage
4 | //
5 | // Created by Olivier Poitrey on 07/06/13.
6 | // Copyright (c) 2013 Dailymotion. All rights reserved.
7 | //
8 |
9 | #ifdef SD_WEBP
10 | #import "UIImage+WebP.h"
11 | #import "webp/decode.h"
12 |
13 | // Callback for CGDataProviderRelease
14 | static void FreeImageData(void *info, const void *data, size_t size)
15 | {
16 | free((void *)data);
17 | }
18 |
19 | @implementation UIImage (WebP)
20 |
21 | + (UIImage *)sd_imageWithWebPData:(NSData *)data {
22 | WebPDecoderConfig config;
23 | if (!WebPInitDecoderConfig(&config)) {
24 | return nil;
25 | }
26 |
27 | if (WebPGetFeatures(data.bytes, data.length, &config.input) != VP8_STATUS_OK) {
28 | return nil;
29 | }
30 |
31 | config.output.colorspace = config.input.has_alpha ? MODE_rgbA : MODE_RGB;
32 | config.options.use_threads = 1;
33 |
34 | // Decode the WebP image data into a RGBA value array.
35 | if (WebPDecode(data.bytes, data.length, &config) != VP8_STATUS_OK) {
36 | return nil;
37 | }
38 |
39 | int width = config.input.width;
40 | int height = config.input.height;
41 | if (config.options.use_scaling) {
42 | width = config.options.scaled_width;
43 | height = config.options.scaled_height;
44 | }
45 |
46 | // Construct a UIImage from the decoded RGBA value array.
47 | CGDataProviderRef provider =
48 | CGDataProviderCreateWithData(NULL, config.output.u.RGBA.rgba, config.output.u.RGBA.size, FreeImageData);
49 | CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB();
50 | CGBitmapInfo bitmapInfo = config.input.has_alpha ? kCGBitmapByteOrder32Big | kCGImageAlphaPremultipliedLast : 0;
51 | size_t components = config.input.has_alpha ? 4 : 3;
52 | CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault;
53 | CGImageRef imageRef = CGImageCreate(width, height, 8, components * 8, components * width, colorSpaceRef, bitmapInfo, provider, NULL, NO, renderingIntent);
54 |
55 | CGColorSpaceRelease(colorSpaceRef);
56 | CGDataProviderRelease(provider);
57 |
58 | UIImage *image = [[UIImage alloc] initWithCGImage:imageRef];
59 | CGImageRelease(imageRef);
60 |
61 | return image;
62 | }
63 |
64 | @end
65 |
66 | #if !COCOAPODS
67 | // Functions to resolve some undefined symbols when using WebP and force_load flag
68 | void WebPInitPremultiplyNEON(void) {}
69 | void WebPInitUpsamplersNEON(void) {}
70 | void VP8DspInitNEON(void) {}
71 | #endif
72 |
73 | #endif
74 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/UIImageView+HighlightedWebCache.m:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import "UIImageView+HighlightedWebCache.h"
10 | #import "UIView+WebCacheOperation.h"
11 |
12 | #define UIImageViewHighlightedWebCacheOperationKey @"highlightedImage"
13 |
14 | @implementation UIImageView (HighlightedWebCache)
15 |
16 | - (void)sd_setHighlightedImageWithURL:(NSURL *)url {
17 | [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:nil];
18 | }
19 |
20 | - (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options {
21 | [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:nil];
22 | }
23 |
24 | - (void)sd_setHighlightedImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock {
25 | [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:completedBlock];
26 | }
27 |
28 | - (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock {
29 | [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:completedBlock];
30 | }
31 |
32 | - (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock {
33 | [self sd_cancelCurrentHighlightedImageLoad];
34 |
35 | if (url) {
36 | __weak UIImageView *wself = self;
37 | id operation = [SDWebImageManager.sharedManager downloadImageWithURL:url options:options progress:progressBlock completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
38 | if (!wself) return;
39 | dispatch_main_sync_safe (^
40 | {
41 | if (!wself) return;
42 | if (image) {
43 | wself.highlightedImage = image;
44 | [wself setNeedsLayout];
45 | }
46 | if (completedBlock && finished) {
47 | completedBlock(image, error, cacheType, url);
48 | }
49 | });
50 | }];
51 | [self sd_setImageLoadOperation:operation forKey:UIImageViewHighlightedWebCacheOperationKey];
52 | } else {
53 | dispatch_main_async_safe(^{
54 | NSError *error = [NSError errorWithDomain:@"SDWebImageErrorDomain" code:-1 userInfo:@{NSLocalizedDescriptionKey : @"Trying to load a nil url"}];
55 | if (completedBlock) {
56 | completedBlock(nil, error, SDImageCacheTypeNone, url);
57 | }
58 | });
59 | }
60 | }
61 |
62 | - (void)sd_cancelCurrentHighlightedImageLoad {
63 | [self sd_cancelImageLoadOperationWithKey:UIImageViewHighlightedWebCacheOperationKey];
64 | }
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/UIView+WebCacheOperation.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import
10 | #import "SDWebImageManager.h"
11 |
12 | @interface UIView (WebCacheOperation)
13 |
14 | /**
15 | * Set the image load operation (storage in a UIView based dictionary)
16 | *
17 | * @param operation the operation
18 | * @param key key for storing the operation
19 | */
20 | - (void)sd_setImageLoadOperation:(id)operation forKey:(NSString *)key;
21 |
22 | /**
23 | * Cancel all operations for the current UIView and key
24 | *
25 | * @param key key for identifying the operations
26 | */
27 | - (void)sd_cancelImageLoadOperationWithKey:(NSString *)key;
28 |
29 | /**
30 | * Just remove the operations corresponding to the current UIView and key without cancelling them
31 | *
32 | * @param key key for identifying the operations
33 | */
34 | - (void)sd_removeImageLoadOperationWithKey:(NSString *)key;
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/Lib/SDWebImage/UIView+WebCacheOperation.m:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import "UIView+WebCacheOperation.h"
10 | #import "objc/runtime.h"
11 |
12 | static char loadOperationKey;
13 |
14 | @implementation UIView (WebCacheOperation)
15 |
16 | - (NSMutableDictionary *)operationDictionary {
17 | NSMutableDictionary *operations = objc_getAssociatedObject(self, &loadOperationKey);
18 | if (operations) {
19 | return operations;
20 | }
21 | operations = [NSMutableDictionary dictionary];
22 | objc_setAssociatedObject(self, &loadOperationKey, operations, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
23 | return operations;
24 | }
25 |
26 | - (void)sd_setImageLoadOperation:(id)operation forKey:(NSString *)key {
27 | [self sd_cancelImageLoadOperationWithKey:key];
28 | NSMutableDictionary *operationDictionary = [self operationDictionary];
29 | [operationDictionary setObject:operation forKey:key];
30 | }
31 |
32 | - (void)sd_cancelImageLoadOperationWithKey:(NSString *)key {
33 | // Cancel in progress downloader from queue
34 | NSMutableDictionary *operationDictionary = [self operationDictionary];
35 | id operations = [operationDictionary objectForKey:key];
36 | if (operations) {
37 | if ([operations isKindOfClass:[NSArray class]]) {
38 | for (id operation in operations) {
39 | if (operation) {
40 | [operation cancel];
41 | }
42 | }
43 | } else if ([operations conformsToProtocol:@protocol(SDWebImageOperation)]){
44 | [(id) operations cancel];
45 | }
46 | [operationDictionary removeObjectForKey:key];
47 | }
48 | }
49 |
50 | - (void)sd_removeImageLoadOperationWithKey:(NSString *)key {
51 | NSMutableDictionary *operationDictionary = [self operationDictionary];
52 | [operationDictionary removeObjectForKey:key];
53 | }
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/gategory/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Classes/Other(其它)/gategory/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/gategory/UIBarButtonItem+CH.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIBarButtonItem+CH.h
3 | // 新闻
4 | //
5 | // Created by Think_lion on 15/5/4.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIBarButtonItem (CH)
12 | +(UIBarButtonItem*)itemWithIcon:(NSString *)icon highIcon:(NSString*)highIcon target:(id)target action:(SEL)action;
13 | @end
14 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/gategory/UIBarButtonItem+CH.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIBarButtonItem+CH.m
3 | // 新闻
4 | //
5 | // Created by Think_lion on 15/5/4.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "UIBarButtonItem+CH.h"
10 |
11 | @implementation UIBarButtonItem (CH)
12 | +(UIBarButtonItem *)itemWithIcon:(NSString *)icon highIcon:(NSString *)highIcon target:(id)target action:(SEL)action
13 | {
14 | UIButton *btn=[[UIButton alloc]init];
15 | // 这里需要注意:由于是想让图片右移,所以left需要设置为正,right需要设置为负。正在是相反的。
16 | // 让按钮图片左移15
17 | //[btn setImageEdgeInsets:UIEdgeInsetsMake(0, 10, 0, -10)];
18 | [btn setImage:[UIImage resizedImage:icon] forState:UIControlStateNormal];
19 | [btn setImage:[UIImage resizedImage:highIcon] forState:UIControlStateHighlighted];
20 | btn.frame=CGRectMake(0, 20, btn.currentImage.size.width, btn.currentImage.size.height);
21 | [btn addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
22 | return [[UIBarButtonItem alloc]initWithCustomView:btn];
23 | }
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/gategory/UIImage+CH.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+CH.h
3 | // 新闻
4 | //
5 | // Created by Think_lion on 15/5/4.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 | #define ImageScale 0.2
11 | #define LogoImageMargin 5
12 |
13 | @interface UIImage (CH)
14 | +(UIImage *)resizedImage:(NSString *)name;
15 | +(UIImage *)resizedImage:(NSString *)name left:(CGFloat)left top:(CGFloat)top;
16 |
17 |
18 | //截屏方法
19 | +(instancetype)renderView:(UIView *)renderView;
20 | //图片家水印
21 | +(instancetype)waterWithBgName:(NSString *)bg waterLogo:(NSString *)water;
22 | //裁剪图片为园
23 | +(instancetype)clipWithImageName:(NSString*)name bordersW:(CGFloat)bordersW borderColor:(UIColor *)borderColor;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/gategory/UIImage+CH.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+CH.m
3 | // 新闻
4 | //
5 | // Created by Think_lion on 15/5/4.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "UIImage+CH.h"
10 |
11 | @implementation UIImage (CH)
12 |
13 |
14 | + (UIImage *)resizedImage:(NSString *)name
15 | {
16 | UIImage *image = [UIImage imageNamed:name];
17 | return [image stretchableImageWithLeftCapWidth:image.size.width * 0.5 topCapHeight:image.size.height * 0.5];
18 | }
19 |
20 | +(UIImage *)resizedImage:(NSString *)name left:(CGFloat)left top:(CGFloat)top
21 | {
22 | UIImage *image=[UIImage imageNamed:name];
23 | image=[image stretchableImageWithLeftCapWidth:image.size.width*left topCapHeight:image.size.height*top];
24 | return image;
25 | }
26 |
27 | #pragma mark 截屏
28 | +(instancetype)renderView:(UIView *)renderView
29 | {
30 | //应该给一个延迟的效果
31 | //获得图片上下文
32 | UIGraphicsBeginImageContextWithOptions(renderView.frame.size, NO, 0.0);
33 | //将控制器的view的layer渲染到图层
34 | [renderView.layer renderInContext:UIGraphicsGetCurrentContext()];
35 | //去除图片
36 | UIImage *newImage=UIGraphicsGetImageFromCurrentImageContext();
37 | ///Users/think_lion/Desktop
38 | //将新图片压缩成二进制文件
39 | return newImage;
40 |
41 | }
42 |
43 | #pragma mark 裁剪图拍你的芳芳
44 | +(instancetype)clipWithImageName:(NSString *)name bordersW:(CGFloat)bordersW borderColor:(UIColor *)borderColor
45 | {
46 | UIImage *oldImage=[UIImage imageNamed:name];
47 | CGFloat borberW=bordersW;
48 | CGFloat imageW=oldImage.size.width+borberW*2;
49 | CGFloat imageH=oldImage.size.height+borberW*2;
50 | CGSize imageSize=CGSizeMake(imageW, imageH);
51 | UIGraphicsBeginImageContextWithOptions(imageSize, NO, 0.0);
52 |
53 | CGContextRef ref=UIGraphicsGetCurrentContext();
54 | //画一个大圆
55 | [borderColor set];
56 | CGFloat bigRadius=imageW*0.5;
57 | CGFloat bigX=imageW*0.5;
58 | CGFloat bigY=imageH*0.5;
59 | CGContextAddArc(ref, bigX, bigY, bigRadius, 0, M_PI*2, 0);
60 | //渲染到图层
61 | CGContextFillPath(ref);
62 |
63 | //画一个小圆
64 | CGFloat smallRadius=bigRadius-borberW;
65 | CGContextAddArc(ref, bigX, bigY, smallRadius, 0, M_PI*2, 0);
66 | //裁剪
67 | CGContextClip(ref);
68 | //画图
69 | [oldImage drawInRect:CGRectMake(borberW, borberW, oldImage.size.width, oldImage.size.height)];
70 | //去除图片
71 | UIImage *newImage=UIGraphicsGetImageFromCurrentImageContext();
72 | return newImage;
73 | }
74 | #pragma mark 图片加水印的方法
75 | +(instancetype)waterWithBgName:(NSString *)bg waterLogo:(NSString *)water
76 | {
77 | // 获得一张图片
78 | UIImage *bgName=[UIImage imageNamed:bg];
79 | //基于上下文 位图(bitmap) 将所有的东西绘制到一张新的图片上面去
80 | //1.创建一个基于位图的上下文
81 | //size 新图片的尺寸
82 | //opaque YES 表示不透明 NO表示透明
83 | //运行这行代码后 旧相当于创建了一个新的bitmap 相当于创建了UIImage对象
84 | UIGraphicsBeginImageContextWithOptions(bgName.size, YES, 0.0);
85 | //2.话背景
86 | [bgName drawInRect:CGRectMake(0, 0, bgName.size.width, bgName.size.height)];
87 | //添加水印logo
88 | UIImage *logo=[UIImage imageNamed:water];
89 | CGFloat scale=ImageScale;
90 | CGFloat margin=LogoImageMargin;
91 | CGFloat logoW=logo.size.width*scale;;
92 | CGFloat logoH=logo.size.height*scale;
93 | CGFloat logoX=bgName.size.width-logoW-margin;
94 | CGFloat logoY=bgName.size.height-logoH-margin;
95 |
96 | [logo drawInRect:CGRectMake(logoX, logoY, logoW, logoH)];
97 | //4.从上下文去除获得的新图片对象
98 | UIImage *newImage=UIGraphicsGetImageFromCurrentImageContext();
99 | //5.结束上下次文
100 | UIGraphicsEndImageContext();
101 | //返回新创建的图片对象
102 | return newImage;
103 | }
104 |
105 |
106 |
107 | @end
108 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/gategory/UIView+MJ.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MJ.h
3 | // QQZoneDemo
4 | //
5 | // Created by MJ Lee on 14-5-26.
6 | // Copyright (c) 2014年 itcast. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (MJ)
12 | @property (assign, nonatomic) CGFloat x;
13 | @property (assign, nonatomic) CGFloat y;
14 | @property (assign,nonatomic) CGFloat centerX;
15 | @property (assign,nonatomic) CGFloat centerY;
16 | @property (assign, nonatomic) CGFloat width;
17 | @property (assign, nonatomic) CGFloat height;
18 | @property (assign, nonatomic) CGSize size;
19 | @property (assign, nonatomic) CGPoint origin;
20 | @end
21 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Classes/Other(其它)/gategory/UIView+MJ.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MJ.m
3 | // QQZoneDemo
4 | //
5 | // Created by MJ Lee on 14-5-26.
6 | // Copyright (c) 2014年 itcast. All rights reserved.
7 | //
8 |
9 | #import "UIView+MJ.h"
10 |
11 | @implementation UIView (MJ)
12 | - (void)setX:(CGFloat)x
13 | {
14 | CGRect frame = self.frame;
15 | frame.origin.x = x;
16 | self.frame = frame;
17 | }
18 |
19 | - (CGFloat)x
20 | {
21 | return self.frame.origin.x;
22 | }
23 |
24 | - (void)setY:(CGFloat)y
25 | {
26 | CGRect frame = self.frame;
27 | frame.origin.y = y;
28 | self.frame = frame;
29 | }
30 |
31 | - (CGFloat)y
32 | {
33 | return self.frame.origin.y;
34 | }
35 |
36 | - (void)setWidth:(CGFloat)width
37 | {
38 | CGRect frame = self.frame;
39 | frame.size.width = width;
40 | self.frame = frame;
41 | }
42 |
43 | - (CGFloat)width
44 | {
45 | return self.frame.size.width;
46 | }
47 |
48 | - (void)setHeight:(CGFloat)height
49 | {
50 | CGRect frame = self.frame;
51 | frame.size.height = height;
52 | self.frame = frame;
53 | }
54 |
55 | - (CGFloat)height
56 | {
57 | return self.frame.size.height;
58 | }
59 |
60 | - (void)setSize:(CGSize)size
61 | {
62 | CGRect frame = self.frame;
63 | frame.size = size;
64 | self.frame = frame;
65 | }
66 |
67 | - (CGSize)size
68 | {
69 | return self.frame.size;
70 | }
71 |
72 | - (void)setOrigin:(CGPoint)origin
73 | {
74 | CGRect frame = self.frame;
75 | frame.origin = origin;
76 | self.frame = frame;
77 | }
78 |
79 | - (CGPoint)origin
80 | {
81 | return self.frame.origin;
82 | }
83 |
84 | - (void)setCenterX:(CGFloat)centerX
85 | {
86 | CGPoint center = self.center;
87 | center.x = centerX;
88 | self.center = center;
89 | }
90 |
91 | - (CGFloat)centerX
92 | {
93 | return self.center.x;
94 | }
95 |
96 | - (void)setCenterY:(CGFloat)centerY
97 | {
98 | CGPoint center = self.center;
99 | center.y = centerY;
100 | self.center = center;
101 | }
102 |
103 | - (CGFloat)centerY
104 | {
105 | return self.center.y;
106 | }
107 |
108 |
109 | @end
110 |
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/AppIcon.appiconset/AppIcon_Lehe29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/AppIcon.appiconset/AppIcon_Lehe29x29@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/AppIcon.appiconset/AppIcon_Lehe29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/AppIcon.appiconset/AppIcon_Lehe29x29@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/AppIcon.appiconset/AppIcon_Lehe40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/AppIcon.appiconset/AppIcon_Lehe40x40@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/AppIcon.appiconset/AppIcon_Lehe40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/AppIcon.appiconset/AppIcon_Lehe40x40@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/AppIcon.appiconset/AppIcon_Lehe60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/AppIcon.appiconset/AppIcon_Lehe60x60@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/AppIcon.appiconset/AppIcon_Lehe60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/AppIcon.appiconset/AppIcon_Lehe60x60@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "29x29",
5 | "idiom" : "iphone",
6 | "filename" : "AppIcon_Lehe29x29@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "29x29",
11 | "idiom" : "iphone",
12 | "filename" : "AppIcon_Lehe29x29@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "40x40",
17 | "idiom" : "iphone",
18 | "filename" : "AppIcon_Lehe40x40@2x.png",
19 | "scale" : "2x"
20 | },
21 | {
22 | "size" : "40x40",
23 | "idiom" : "iphone",
24 | "filename" : "AppIcon_Lehe40x40@3x.png",
25 | "scale" : "3x"
26 | },
27 | {
28 | "size" : "60x60",
29 | "idiom" : "iphone",
30 | "filename" : "AppIcon_Lehe60x60@2x.png",
31 | "scale" : "2x"
32 | },
33 | {
34 | "size" : "60x60",
35 | "idiom" : "iphone",
36 | "filename" : "AppIcon_Lehe60x60@3x.png",
37 | "scale" : "3x"
38 | }
39 | ],
40 | "info" : {
41 | "version" : 1,
42 | "author" : "xcode"
43 | }
44 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/LaunchImage.launchimage/4S_001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/LaunchImage.launchimage/4S_001.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/LaunchImage.launchimage/5S_001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/LaunchImage.launchimage/5S_001.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/LaunchImage.launchimage/6P_001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/LaunchImage.launchimage/6P_001.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/LaunchImage.launchimage/6_001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/LaunchImage.launchimage/6_001.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "extent" : "full-screen",
5 | "idiom" : "iphone",
6 | "subtype" : "736h",
7 | "filename" : "6P_001.png",
8 | "minimum-system-version" : "8.0",
9 | "orientation" : "portrait",
10 | "scale" : "3x"
11 | },
12 | {
13 | "extent" : "full-screen",
14 | "idiom" : "iphone",
15 | "subtype" : "667h",
16 | "filename" : "6_001.png",
17 | "minimum-system-version" : "8.0",
18 | "orientation" : "portrait",
19 | "scale" : "2x"
20 | },
21 | {
22 | "orientation" : "portrait",
23 | "idiom" : "iphone",
24 | "extent" : "full-screen",
25 | "minimum-system-version" : "7.0",
26 | "filename" : "4S_001.png",
27 | "scale" : "2x"
28 | },
29 | {
30 | "extent" : "full-screen",
31 | "idiom" : "iphone",
32 | "subtype" : "retina4",
33 | "filename" : "5S_001.png",
34 | "minimum-system-version" : "7.0",
35 | "orientation" : "portrait",
36 | "scale" : "2x"
37 | }
38 | ],
39 | "info" : {
40 | "version" : 1,
41 | "author" : "xcode"
42 | }
43 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/Message.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "Message@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "Message@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/Message.imageset/Message@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/Message.imageset/Message@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/Message.imageset/Message@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/Message.imageset/Message@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/MessageH.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "MessageH@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "MessageH@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/MessageH.imageset/MessageH@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/MessageH.imageset/MessageH@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/MessageH.imageset/MessageH@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/MessageH.imageset/MessageH@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/cart.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "cart@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "cart@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/cart.imageset/cart@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/cart.imageset/cart@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/cart.imageset/cart@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/cart.imageset/cart@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/cartH.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "cartH@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "cartH@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/cartH.imageset/cartH@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/cartH.imageset/cartH@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/cartH.imageset/cartH@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/cartH.imageset/cartH@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/earth.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "earth@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "earth@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/earth.imageset/earth@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/earth.imageset/earth@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/earth.imageset/earth@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/earth.imageset/earth@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/earthH.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "earthH@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "earthH@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/earthH.imageset/earthH@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/earthH.imageset/earthH@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/earthH.imageset/earthH@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/earthH.imageset/earthH@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "heart@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "heart@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart.imageset/heart@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heart.imageset/heart@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart.imageset/heart@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heart.imageset/heart@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heartH.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "heartH@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "heartH@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heartH.imageset/heartH@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heartH.imageset/heartH@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heartH.imageset/heartH@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heartH.imageset/heartH@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart_R.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "heart_R@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "heart_R@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart_R.imageset/heart_R@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heart_R.imageset/heart_R@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart_R.imageset/heart_R@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heart_R.imageset/heart_R@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart_n_red.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "heart_n_red@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "heart_n_red@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart_n_red.imageset/heart_n_red@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heart_n_red.imageset/heart_n_red@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart_n_red.imageset/heart_n_red@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heart_n_red.imageset/heart_n_red@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart_s.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "heart_s@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "heart_s@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart_s.imageset/heart_s@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heart_s.imageset/heart_s@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart_s.imageset/heart_s@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heart_s.imageset/heart_s@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart_sH.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "heart_sH@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "heart_sH@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart_sH.imageset/heart_sH@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heart_sH.imageset/heart_sH@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart_sH.imageset/heart_sH@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heart_sH.imageset/heart_sH@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart_w.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "heart_w@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "heart_w@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart_w.imageset/heart_w@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heart_w.imageset/heart_w@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heart_w.imageset/heart_w@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heart_w.imageset/heart_w@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heartss.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "heartss@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "heartss@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heartss.imageset/heartss@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heartss.imageset/heartss@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heartss.imageset/heartss@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heartss.imageset/heartss@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heartssH.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "heartssH@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "heartssH@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heartssH.imageset/heartssH@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heartssH.imageset/heartssH@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heartssH.imageset/heartssH@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heartssH.imageset/heartssH@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heartw.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "heartw@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "heartw@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heartw.imageset/heartw@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heartw.imageset/heartw@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/heartw.imageset/heartw@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/heartw.imageset/heartw@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/home.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "home@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "home@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/home.imageset/home@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/home.imageset/home@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/home.imageset/home@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/home.imageset/home@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/homeH.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "homeH@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "homeH@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/homeH.imageset/homeH@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/homeH.imageset/homeH@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/homeH.imageset/homeH@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/homeH.imageset/homeH@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/imagepicker_cancel_btn_40_40.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "imagepicker_cancel_btn_40_40.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/imagepicker_cancel_btn_40_40.imageset/imagepicker_cancel_btn_40_40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/imagepicker_cancel_btn_40_40.imageset/imagepicker_cancel_btn_40_40.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/loading.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "loading.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/loading.imageset/loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/loading.imageset/loading.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/search02.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "search02@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "search02@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/search02.imageset/search02@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/search02.imageset/search02@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/search02.imageset/search02@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/search02.imageset/search02@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/user.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "user@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "user@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/user.imageset/user@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/user.imageset/user@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/user.imageset/user@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/user.imageset/user@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/userH.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "userH@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "userH@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/userH.imageset/userH@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/userH.imageset/userH@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/userH.imageset/userH@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/userH.imageset/userH@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/userL.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "scale" : "3x",
14 | "filename" : "userL@3x.png"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/images2/userL.imageset/userL@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/images2/userL.imageset/userL@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/localG.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "localG@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "localG@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/localG.imageset/localG@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/test/localG.imageset/localG@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/localG.imageset/localG@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/test/localG.imageset/localG@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/localline_gray.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "localline_gray@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "localline_gray@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/localline_gray.imageset/localline_gray@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/test/localline_gray.imageset/localline_gray@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/localline_gray.imageset/localline_gray@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/test/localline_gray.imageset/localline_gray@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/localline_red.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "localline_red@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "localline_red@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/localline_red.imageset/localline_red@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/test/localline_red.imageset/localline_red@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/localline_red.imageset/localline_red@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/test/localline_red.imageset/localline_red@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/localss.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "localss@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "localss@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/localss.imageset/localss@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/test/localss.imageset/localss@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/localss.imageset/localss@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/test/localss.imageset/localss@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/one.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "one.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/one.imageset/one.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/test/one.imageset/one.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/three.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "three.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/three.imageset/three.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/test/three.imageset/three.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/two.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "two.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/HiGo/HiGo/Images.xcassets/test/two.imageset/two.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/Images.xcassets/test/two.imageset/two.png
--------------------------------------------------------------------------------
/HiGo/HiGo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | Think-lion.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UIRequiredDeviceCapabilities
26 |
27 | armv7
28 |
29 | UIStatusBarHidden
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/HiGo/HiGo/PrefixHeader.pch:
--------------------------------------------------------------------------------
1 |
2 | //
3 | // PrefixHeader.pch
4 | // HiGo
5 | //
6 | // Created by Think_lion on 15/7/25.
7 | // Copyright (c) 2015年 Think_lion. All rights reserved.
8 | //
9 |
10 | #ifndef HiGo_PrefixHeader_pch
11 | #define HiGo_PrefixHeader_pch
12 |
13 |
14 | #define ScreenWidth [UIScreen mainScreen].bounds.size.width
15 |
16 | #import "UIView+MJ.h"
17 | #import "UIImage+CH.h"
18 | #import "UIBarButtonItem+CH.h"
19 | #import "HGBaseMethod.h"
20 | #import "HGFmTool.h"
21 | #import "UIImageView+WebCache.h"
22 | #import "MJExtension.h"
23 | #import "HGGoodsInfoModel.h"
24 | #import "MJRefresh.h"
25 |
26 |
27 | #define HGURL @"http://v.higo.meilishuo.com/goods/goods_discover"
28 | #define HGfont(s) [UIFont systemFontOfSize:(s)]
29 | #define HGColor(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
30 | #define HGolorAlpha(r,g,b,alp) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(alp)]
31 |
32 | #define HGShowTypeOne @"a"
33 | #define HGShowTypeMore @"b"
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/HiGo/HiGo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/HiGo/HiGo/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/HiGo/HiGo/image/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/.DS_Store
--------------------------------------------------------------------------------
/HiGo/HiGo/image/4S_001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/4S_001.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/4S_002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/4S_002.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/4S_003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/4S_003.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/5S_001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/5S_001.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/5S_002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/5S_002.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/5S_003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/5S_003.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/6P_001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/6P_001.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/6P_002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/6P_002.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/6P_003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/6P_003.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/6_001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/6_001.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/6_002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/6_002.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/6_003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/6_003.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe29x29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe29x29.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe29x29@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe29x29@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe29x29@2x~ipad.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe29x29@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe29x29~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe29x29~ipad.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe40x40@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe40x40@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe40x40@2x~ipad.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe40x40@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe40x40~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe40x40~ipad.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe50x50@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe50x50@2x~ipad.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe50x50~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe50x50~ipad.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe57x57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe57x57.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe57x57@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe57x57@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe60x60@2x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe60x60@3x.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe72x72@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe72x72@2x~ipad.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe72x72~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe72x72~ipad.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe76x76@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe76x76@2x~ipad.png
--------------------------------------------------------------------------------
/HiGo/HiGo/image/AppIcon_Lehe76x76~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thinkliona/mycode/d4c6bbc46a3d564fdb35e7583468b34fd5687510/HiGo/HiGo/image/AppIcon_Lehe76x76~ipad.png
--------------------------------------------------------------------------------
/HiGo/HiGo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // HiGo
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. 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 |
--------------------------------------------------------------------------------
/HiGo/HiGo/newses.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | icon
7 | http://d21.higo.res.meilishuo.net/higo/orig/2015-07-23/f5d483ebe83be1d33a2cff6bca4e8bf4.jpg
8 | title
9 | HIGO7.20周年庆惊喜盘点
10 |
11 |
12 | icon
13 | http://d21.higo.res.meilishuo.net/higo/orig/2015-06-05/a08d78e4c12f31481c2643f71d9237a3.jpg
14 | title
15 | HIGO新人首单福利
16 |
17 |
18 | icon
19 | http://d21.higo.res.meilishuo.net/higo/orig/2015-07-25/f15400fa35ad17c1096a77a0acef0fd5.jpg
20 | title
21 | 剩得漫不经心,却又可歌可泣
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/HiGo/HiGo/test.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | icon
7 | one.png
8 | title
9 | HIGO7.20周年庆惊喜盘点
10 |
11 |
12 | icon
13 | two.png
14 | title
15 | HIGO新人首单福利
16 |
17 |
18 | icon
19 | three.png
20 | title
21 | 剩得漫不经心,却又可歌可泣
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/HiGo/HiGoTests/HiGoTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // HiGoTests.m
3 | // HiGoTests
4 | //
5 | // Created by Think_lion on 15/7/25.
6 | // Copyright (c) 2015年 Think_lion. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface HiGoTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation HiGoTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | // [self measureBlock:^{
36 | // // Put the code you want to measure the time of here.
37 | // }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/HiGo/HiGoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | Think-lion.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # mycode
2 | Higo电商App首页面,完美实现无限滚动,瀑布流。
3 |
--------------------------------------------------------------------------------