forked from ibireme/YYModel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
168 changed files
with
20,700 additions
and
1 deletion.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
Benchmark/ModelBenchmark.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// AppDelegate.h | ||
// ModelBenchmark | ||
// | ||
// Created by ibireme on 15/9/18. | ||
// Copyright (c) 2015 ibireme. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface AppDelegate : UIResponder <UIApplicationDelegate> | ||
|
||
@property (strong, nonatomic) UIWindow *window; | ||
|
||
|
||
@end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// AppDelegate.m | ||
// ModelBenchmark | ||
// | ||
// Created by ibireme on 15/9/18. | ||
// Copyright (c) 2015 ibireme. All rights reserved. | ||
// | ||
|
||
#import "AppDelegate.h" | ||
|
||
@interface AppDelegate () | ||
@end | ||
|
||
@implementation AppDelegate | ||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | ||
return YES; | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES"> | ||
<dependencies> | ||
<deployment identifier="iOS"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/> | ||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/> | ||
</dependencies> | ||
<objects> | ||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | ||
<view contentMode="scaleToFill" id="iN0-l3-epB"> | ||
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<subviews> | ||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 ibireme. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye" userLabel="Copyright (c) 2015 ibireme. All rights reserved."> | ||
<rect key="frame" x="20" y="439" width="441" height="21"/> | ||
<animations/> | ||
<fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> | ||
<nil key="highlightedColor"/> | ||
</label> | ||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ModelBenchmark" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX"> | ||
<rect key="frame" x="20" y="140" width="441" height="43"/> | ||
<animations/> | ||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/> | ||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> | ||
<nil key="highlightedColor"/> | ||
</label> | ||
</subviews> | ||
<animations/> | ||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> | ||
<constraints> | ||
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/> | ||
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/> | ||
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/> | ||
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/> | ||
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/> | ||
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/> | ||
</constraints> | ||
<nil key="simulatedStatusBarMetrics"/> | ||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> | ||
<point key="canvasLocation" x="548" y="455"/> | ||
</view> | ||
</objects> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc"> | ||
<dependencies> | ||
<deployment identifier="iOS"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/> | ||
</dependencies> | ||
<scenes> | ||
<!--View Controller--> | ||
<scene sceneID="ufC-wZ-h7g"> | ||
<objects> | ||
<viewController id="vXZ-lx-hvc" customClass="ViewController" sceneMemberID="viewController"> | ||
<layoutGuides> | ||
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/> | ||
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/> | ||
</layoutGuides> | ||
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS"> | ||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
<subviews> | ||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="See logs in Xcode" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="j5c-ge-kV1"> | ||
<rect key="frame" x="232" y="290" width="137" height="21"/> | ||
<fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> | ||
<nil key="highlightedColor"/> | ||
</label> | ||
</subviews> | ||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> | ||
<constraints> | ||
<constraint firstAttribute="centerY" secondItem="j5c-ge-kV1" secondAttribute="centerY" id="aDc-DL-Lbw"/> | ||
<constraint firstAttribute="centerX" secondItem="j5c-ge-kV1" secondAttribute="centerX" id="nbQ-nb-cHc"/> | ||
</constraints> | ||
</view> | ||
</viewController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="409" y="299"/> | ||
</scene> | ||
</scenes> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
github "Hearst-DD/ObjectMapper" | ||
|
||
github "thoughtbot/Argo" | ||
github "thoughtbot/Curry" | ||
|
||
github "isair/JSONHelper" | ||
github "ovenbits/ModelRocket" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// DateFormatter.h | ||
// ModelBenchmark | ||
// | ||
// Created by ibireme on 15/9/18. | ||
// Copyright (c) 2015 ibireme. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface DateFormatter : NSObject | ||
+ (NSDateFormatter *)githubDataFormatter; | ||
+ (NSDateFormatter *)weiboDataFormatter; | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// DateFormatter.m | ||
// ModelBenchmark | ||
// | ||
// Created by ibireme on 15/9/18. | ||
// Copyright (c) 2015 ibireme. All rights reserved. | ||
// | ||
|
||
#import "DateFormatter.h" | ||
#import "JSONModel.h" | ||
|
||
@implementation DateFormatter | ||
+ (NSDateFormatter *)githubDataFormatter { | ||
static NSDateFormatter *formatter; | ||
static dispatch_once_t onceToken; | ||
dispatch_once(&onceToken, ^{ | ||
formatter = [[NSDateFormatter alloc] init]; | ||
formatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; | ||
formatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ssZ"; | ||
}); | ||
return formatter; | ||
} | ||
+ (NSDateFormatter *)weiboDataFormatter { | ||
static NSDateFormatter *formatter; | ||
static dispatch_once_t onceToken; | ||
dispatch_once(&onceToken, ^{ | ||
formatter = [[NSDateFormatter alloc] init]; | ||
formatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; | ||
formatter.dateFormat = @"EEE MMM dd HH:mm:ss Z yyyy"; | ||
}); | ||
return formatter; | ||
} | ||
@end | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
// | ||
// FEWeiboModel.h | ||
// ModelBenchmark | ||
// | ||
// Created by ibireme on 15/9/18. | ||
// Copyright (c) 2015 ibireme. All rights reserved. | ||
// | ||
|
||
#import "FEMMapping.h" | ||
|
||
|
||
@interface FEWeiboPictureMetadata : NSObject | ||
@property (nonatomic, strong) NSString *url; | ||
@property (nonatomic, assign) int width; | ||
@property (nonatomic, assign) int height; | ||
@property (nonatomic, strong) NSString *type; | ||
@property (nonatomic, assign) int cutType; | ||
+ (FEMMapping *)defaultMapping; | ||
@end | ||
|
||
@interface FEWeiboPicture : NSObject | ||
@property (nonatomic, strong) NSString *picID; | ||
@property (nonatomic, strong) NSString *objectID; | ||
@property (nonatomic, assign) int photoTag; | ||
@property (nonatomic, assign) BOOL keepSize; | ||
@property (nonatomic, strong) FEWeiboPictureMetadata *thumbnail; | ||
@property (nonatomic, strong) FEWeiboPictureMetadata *bmiddle; | ||
@property (nonatomic, strong) FEWeiboPictureMetadata *middlePlus; | ||
@property (nonatomic, strong) FEWeiboPictureMetadata *large; | ||
@property (nonatomic, strong) FEWeiboPictureMetadata *largest; | ||
@property (nonatomic, strong) FEWeiboPictureMetadata *original; | ||
+ (FEMMapping *)defaultMapping; | ||
@end | ||
|
||
@interface FEWeiboURL : NSObject | ||
@property (nonatomic, assign) BOOL result; | ||
@property (nonatomic, strong) NSString *shortURL; | ||
@property (nonatomic, strong) NSString *oriURL; | ||
@property (nonatomic, strong) NSString *urlTitle; | ||
@property (nonatomic, strong) NSString *urlTypePic; | ||
@property (nonatomic, assign) int32_t urlType; | ||
@property (nonatomic, strong) NSString *log; | ||
@property (nonatomic, strong) NSDictionary *actionLog; | ||
@property (nonatomic, strong) NSString *pageID; | ||
@property (nonatomic, strong) NSString *storageType; | ||
+ (FEMMapping *)defaultMapping; | ||
@end | ||
|
||
@interface FEWeiboUser : NSObject | ||
@property (nonatomic, assign) uint64_t userID; | ||
@property (nonatomic, strong) NSString *idString; | ||
@property (nonatomic, strong) NSString *genderString; | ||
@property (nonatomic, strong) NSString *desc; | ||
@property (nonatomic, strong) NSString *domain; | ||
@property (nonatomic, strong) NSString *name; | ||
@property (nonatomic, strong) NSString *screenName; | ||
@property (nonatomic, strong) NSString *remark; | ||
@property (nonatomic, assign) int32_t followersCount; | ||
@property (nonatomic, assign) int32_t friendsCount; | ||
@property (nonatomic, assign) int32_t biFollowersCount; | ||
@property (nonatomic, assign) int32_t favouritesCount; | ||
@property (nonatomic, assign) int32_t statusesCount; | ||
@property (nonatomic, assign) int32_t pagefriendsCount; | ||
@property (nonatomic, assign) BOOL followMe; | ||
@property (nonatomic, assign) BOOL following; | ||
@property (nonatomic, strong) NSString *province; | ||
@property (nonatomic, strong) NSString *city; | ||
@property (nonatomic, strong) NSString *url; | ||
@property (nonatomic, strong) NSString *profileImageURL; | ||
@property (nonatomic, strong) NSString *avatarLarge; | ||
@property (nonatomic, strong) NSString *avatarHD; | ||
@property (nonatomic, strong) NSString *coverImage; | ||
@property (nonatomic, strong) NSString *coverImagePhone; | ||
@property (nonatomic, strong) NSString *profileURL; | ||
@property (nonatomic, assign) int32_t type; | ||
@property (nonatomic, assign) int32_t ptype; | ||
@property (nonatomic, assign) int32_t mbtype; | ||
@property (nonatomic, assign) int32_t urank; | ||
@property (nonatomic, assign) int32_t uclass; | ||
@property (nonatomic, assign) int32_t ulevel; | ||
@property (nonatomic, assign) int32_t mbrank; | ||
@property (nonatomic, assign) int32_t star; | ||
@property (nonatomic, assign) int32_t level; | ||
@property (nonatomic, strong) NSDate *createdAt; | ||
@property (nonatomic, assign) BOOL allowAllActMsg; | ||
@property (nonatomic, assign) BOOL allowAllComment; | ||
@property (nonatomic, assign) BOOL geoEnabled; | ||
@property (nonatomic, assign) int32_t onlineStatus; | ||
@property (nonatomic, strong) NSString *location; | ||
@property (nonatomic, strong) NSArray *icons; | ||
@property (nonatomic, strong) NSString *weihao; | ||
@property (nonatomic, strong) NSString *badgeTop; | ||
@property (nonatomic, assign) int32_t blockWord; | ||
@property (nonatomic, assign) int32_t blockApp; | ||
@property (nonatomic, assign) int32_t hasAbilityTag; | ||
@property (nonatomic, assign) int32_t creditScore; | ||
@property (nonatomic, strong) NSDictionary *badge; | ||
@property (nonatomic, strong) NSString *lang; | ||
@property (nonatomic, assign) int32_t userAbility; | ||
@property (nonatomic, strong) NSDictionary *extend; | ||
@property (nonatomic, assign) BOOL verified; | ||
@property (nonatomic, assign) int32_t verifiedType; | ||
@property (nonatomic, assign) int32_t verifiedLevel; | ||
@property (nonatomic, assign) int32_t verifiedState; | ||
@property (nonatomic, strong) NSString *verifiedContactEmail; | ||
@property (nonatomic, strong) NSString *verifiedContactMobile; | ||
@property (nonatomic, strong) NSString *verifiedTrade; | ||
@property (nonatomic, strong) NSString *verifiedContactName; | ||
@property (nonatomic, strong) NSString *verifiedSource; | ||
@property (nonatomic, strong) NSString *verifiedSourceURL; | ||
@property (nonatomic, strong) NSString *verifiedReason; | ||
@property (nonatomic, strong) NSString *verifiedReasonURL; | ||
@property (nonatomic, strong) NSString *verifiedReasonModified; | ||
+ (FEMMapping *)defaultMapping; | ||
@end | ||
|
||
@interface FEWeiboStatus : NSObject | ||
@property (nonatomic, assign) uint64_t statusID; | ||
@property (nonatomic, strong) NSString *idstr; | ||
@property (nonatomic, strong) NSString *mid; | ||
@property (nonatomic, strong) NSString *rid; | ||
@property (nonatomic, strong) NSDate *createdAt; | ||
@property (nonatomic, strong) FEWeiboUser *user; | ||
@property (nonatomic, assign) int32_t userType; | ||
@property (nonatomic, strong) NSString *text; | ||
@property (nonatomic, strong) NSArray *picIds; /// Array<NSString> | ||
@property (nonatomic, strong) NSDictionary *picInfos; /// Dic<NSString, FEWeiboPicture> | ||
@property (nonatomic, strong) NSArray *urlStruct; ///< Array<FEWeiboURL> | ||
@property (nonatomic, assign) BOOL favorited; | ||
@property (nonatomic, assign) BOOL truncated; | ||
@property (nonatomic, assign) int32_t repostsCount; | ||
@property (nonatomic, assign) int32_t commentsCount; | ||
@property (nonatomic, assign) int32_t attitudesCount; | ||
@property (nonatomic, assign) int32_t attitudesStatus; | ||
@property (nonatomic, assign) int32_t recomState; | ||
@property (nonatomic, strong) NSString *inReplyToScreenName; | ||
@property (nonatomic, strong) NSString *inReplyToStatusId; | ||
@property (nonatomic, strong) NSString *inReplyToUserId; | ||
@property (nonatomic, strong) NSString *source; | ||
@property (nonatomic, assign) int32_t sourceType; | ||
@property (nonatomic, assign) int32_t sourceAllowClick; | ||
@property (nonatomic, strong) NSString *geo; | ||
@property (nonatomic, strong) NSArray *annotations; | ||
@property (nonatomic, assign) int32_t bizFeature; | ||
@property (nonatomic, assign) int32_t mlevel; | ||
@property (nonatomic, strong) NSString *mblogid; | ||
@property (nonatomic, strong) NSString *mblogTypeName; | ||
@property (nonatomic, assign) int32_t mblogType; | ||
@property (nonatomic, strong) NSString *scheme; | ||
@property (nonatomic, strong) NSDictionary *visible; | ||
@property (nonatomic, strong) NSArray *darwinTags; | ||
+ (FEMMapping *)defaultMapping; | ||
@end |
Oops, something went wrong.