├── yoyo
├── Assets.xcassets
│ ├── Contents.json
│ ├── bg3.imageset
│ │ ├── bg3.png
│ │ └── Contents.json
│ ├── charm.imageset
│ │ ├── charm@3x.png
│ │ └── Contents.json
│ ├── sousuokuang.imageset
│ │ ├── sousuokuang@2x.png
│ │ ├── sousuokuang@3x.png
│ │ └── Contents.json
│ ├── test_quxiao.imageset
│ │ ├── test_quxiao@2x.png
│ │ ├── test_quxiao@3x.png
│ │ └── Contents.json
│ ├── test_sousuo.imageset
│ │ ├── test_sousuo@2x.png
│ │ ├── test_sousuo@3x.png
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── ViewController.h
├── CheckViewController.h
├── CircleViewController.h
├── TextUpViewController.h
├── MultiselectViewController.h
├── MyAnimalViewController.h
├── CityChooseViewController.h
├── MyCurveAnimalViewController.h
├── CellHeightTableViewController.h
├── ProvinceChooseTableViewController.h
├── CellHeightCell.h
├── AppDelegate.h
├── AreaTableViewController.h
├── CircleView.h
├── main.m
├── PieItem.m
├── PieItem.h
├── CellHeightCell.m
├── PieStroke.m
├── PieStroke.h
├── Info.plist
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── CircleViewController.m
├── AppDelegate.m
├── MyAnimalViewController.m
├── MyCurveAnimalViewController.m
├── CellHeightCell.xib
├── AreaTableViewController.m
├── ProvinceChooseTableViewController.m
├── ViewController.m
├── CheckViewController.m
├── CircleView.m
├── MultiselectViewController.m
├── CellHeightTableViewController.m
├── CityChooseViewController.m
├── TextUpViewController.m
└── city.plist
├── yoyo.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
├── xcuserdata
│ └── zx.xcuserdatad
│ │ ├── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── yoyo.xcscheme
│ │ └── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
└── project.pbxproj
├── yoyoTests
├── Info.plist
└── yoyoTests.m
├── yoyoUITests
├── Info.plist
└── yoyoUITests.m
└── 文件本地缓存操作
├── FileHandle.h
└── FileHandle.m
/yoyo/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/yoyo/Assets.xcassets/bg3.imageset/bg3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yybchl/yoyo/HEAD/yoyo/Assets.xcassets/bg3.imageset/bg3.png
--------------------------------------------------------------------------------
/yoyo/Assets.xcassets/charm.imageset/charm@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yybchl/yoyo/HEAD/yoyo/Assets.xcassets/charm.imageset/charm@3x.png
--------------------------------------------------------------------------------
/yoyo/Assets.xcassets/sousuokuang.imageset/sousuokuang@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yybchl/yoyo/HEAD/yoyo/Assets.xcassets/sousuokuang.imageset/sousuokuang@2x.png
--------------------------------------------------------------------------------
/yoyo/Assets.xcassets/sousuokuang.imageset/sousuokuang@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yybchl/yoyo/HEAD/yoyo/Assets.xcassets/sousuokuang.imageset/sousuokuang@3x.png
--------------------------------------------------------------------------------
/yoyo/Assets.xcassets/test_quxiao.imageset/test_quxiao@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yybchl/yoyo/HEAD/yoyo/Assets.xcassets/test_quxiao.imageset/test_quxiao@2x.png
--------------------------------------------------------------------------------
/yoyo/Assets.xcassets/test_quxiao.imageset/test_quxiao@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yybchl/yoyo/HEAD/yoyo/Assets.xcassets/test_quxiao.imageset/test_quxiao@3x.png
--------------------------------------------------------------------------------
/yoyo/Assets.xcassets/test_sousuo.imageset/test_sousuo@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yybchl/yoyo/HEAD/yoyo/Assets.xcassets/test_sousuo.imageset/test_sousuo@2x.png
--------------------------------------------------------------------------------
/yoyo/Assets.xcassets/test_sousuo.imageset/test_sousuo@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yybchl/yoyo/HEAD/yoyo/Assets.xcassets/test_sousuo.imageset/test_sousuo@3x.png
--------------------------------------------------------------------------------
/yoyo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/yoyo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // yoyo
4 | //
5 | // Created by zx on 16/5/5.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/yoyo/CheckViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ChecksViewController.h
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/11.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CheckViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/yoyo/CircleViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // CircleViewController.h
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/25.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CircleViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/yoyo/TextUpViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // TextUpViewController.h
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/12.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TextUpViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/yoyo/MultiselectViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // TestViewController.h
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/6.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MultiselectViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/yoyo/MyAnimalViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // MyAnimalViewController.h
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/23.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MyAnimalViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/yoyo/CityChooseViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // CityChooseViewController.h
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/12.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CityChooseViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/yoyo/MyCurveAnimalViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // MyCurveAnimalViewController.h
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/23.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MyCurveAnimalViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/yoyo/CellHeightTableViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // CellHeightTableViewController.h
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/20.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CellHeightTableViewController : UITableViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/yoyo/ProvinceChooseTableViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ProvinceChooseTableViewController.h
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/11.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ProvinceChooseTableViewController : UITableViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/yoyo/CellHeightCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // CellHeightCell.h
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/20.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CellHeightCell : UITableViewCell
12 |
13 | @property (strong, nonatomic) IBOutlet UILabel *tLabel;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/yoyo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // yoyo
4 | //
5 | // Created by zx on 16/5/5.
6 | // Copyright © 2016年 cn.yoyoy.mw. 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 |
--------------------------------------------------------------------------------
/yoyo/AreaTableViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // AreaTableViewController.h
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/11.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AreaTableViewController : UITableViewController
12 |
13 | @property (strong, nonatomic) NSArray *areaList; //城市地区列表
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/yoyo/CircleView.h:
--------------------------------------------------------------------------------
1 | //
2 | // CircleView.h
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/25.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CircleView : UIView
12 |
13 | -(instancetype)initWithFrame:(CGRect)frame Items:(NSArray *)items; //初始化
14 |
15 | #pragma mark 开始画图
16 | -(void) startPieStroke;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/yoyo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // yoyo
4 | //
5 | // Created by zx on 16/5/5.
6 | // Copyright © 2016年 cn.yoyoy.mw. 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 |
--------------------------------------------------------------------------------
/yoyo/Assets.xcassets/bg3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "bg3.png",
6 | "scale" : "1x"
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 | }
--------------------------------------------------------------------------------
/yoyo/Assets.xcassets/charm.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 | "filename" : "charm@3x.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/yoyo/PieItem.m:
--------------------------------------------------------------------------------
1 | //
2 | // PieItem.m
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/25.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import "PieItem.h"
10 |
11 | @implementation PieItem
12 |
13 | + (instancetype)pieItemWith:(UIColor *)pieColor ratio:(CGFloat)ratio {
14 | PieItem *item = [PieItem new];
15 | item.pieColor = pieColor;
16 | item.ratio = ratio;
17 | return item;
18 | }
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/yoyo/PieItem.h:
--------------------------------------------------------------------------------
1 | //
2 | // PieItem.h
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/25.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface PieItem : NSObject
13 |
14 | @property (strong, nonatomic) UIColor *pieColor;//扇形的颜色
15 | @property (assign, nonatomic) CGFloat ratio;//比例
16 |
17 | + (instancetype)pieItemWith:(UIColor *)pieColor ratio:(CGFloat)ratio;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/yoyo/Assets.xcassets/sousuokuang.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "sousuokuang@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "sousuokuang@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/yoyo/Assets.xcassets/test_quxiao.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "test_quxiao@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "test_quxiao@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/yoyo/Assets.xcassets/test_sousuo.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "test_sousuo@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "test_sousuo@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/yoyo/CellHeightCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // CellHeightCell.m
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/20.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import "CellHeightCell.h"
10 |
11 | @implementation CellHeightCell
12 |
13 | - (void)awakeFromNib {
14 | [super awakeFromNib];
15 | // Initialization code
16 | }
17 |
18 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
19 | [super setSelected:selected animated:animated];
20 |
21 | // Configure the view for the selected state
22 | }
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/yoyo/PieStroke.m:
--------------------------------------------------------------------------------
1 | //
2 | // PieStroke.m
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/27.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import "PieStroke.h"
10 |
11 | @implementation PieStroke
12 | //初始化方法
13 | + (instancetype)pieStrokeWithCenter:(CGPoint)pieCenter ratio:(CGFloat)pieRadius circlePath:(UIBezierPath *)circlePath spLayer:(CAShapeLayer *)spLayer{
14 | PieStroke *pieStroke = [PieStroke new];
15 | pieStroke.pieCenter = pieCenter;
16 | pieStroke.pieRadius = pieRadius;
17 | pieStroke.circlePath = circlePath;
18 | pieStroke.spLayer = spLayer;
19 | return pieStroke;
20 | }
21 | @end
22 |
--------------------------------------------------------------------------------
/yoyo/PieStroke.h:
--------------------------------------------------------------------------------
1 | //
2 | // PieStroke.h
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/27.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface PieStroke : NSObject
13 |
14 | @property (assign, nonatomic) CGPoint pieCenter;//中心点
15 | @property (assign, nonatomic) CGFloat pieRadius;//半径
16 | @property (strong, nonatomic) UIBezierPath *circlePath;//贝塞尔路径
17 | @property (strong, nonatomic) CAShapeLayer *spLayer;//形状渲染图层
18 | //初始化方法
19 | + (instancetype)pieStrokeWithCenter:(CGPoint)pieCenter ratio:(CGFloat)pieRadius circlePath:(UIBezierPath *)circlePath spLayer:(CAShapeLayer *)spLayer;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/yoyo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/yoyoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/yoyoUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/yoyo.xcodeproj/xcuserdata/zx.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | yoyo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | FB7186DE1CDAFBC500509E75
16 |
17 | primary
18 |
19 |
20 | FB7186F71CDAFBC500509E75
21 |
22 | primary
23 |
24 |
25 | FB7187021CDAFBC500509E75
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/yoyoTests/yoyoTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // yoyoTests.m
3 | // yoyoTests
4 | //
5 | // Created by zx on 16/5/5.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface yoyoTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation yoyoTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/文件本地缓存操作/FileHandle.h:
--------------------------------------------------------------------------------
1 | //
2 | // FileHandle.h
3 | // JinCaiShen
4 | //
5 | // Created by 陈惠玲 on 16/4/24.
6 | // Copyright © 2016年 JinCaiShen. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FileHandle : NSObject
12 |
13 | /**
14 | *保存数组数据到沙盒中
15 | *@arrayName文件名
16 | */
17 | +(void)SaveArray:(NSArray *)array andFileName:(NSString *)arrayName;
18 |
19 | /**
20 | *从沙盒中获取数组
21 | *@arrayName文件名
22 | */
23 | +(NSArray *)getArrayWithFileName:(NSString *)arrayName;
24 |
25 | /**
26 | *保存字典数据到沙盒中
27 | *@arrayName
28 | */
29 | +(void)SaveDictionary:(NSDictionary *)dict andFileName:(NSString *)dictionaryName;
30 |
31 | /**
32 | *从沙盒中获取字典
33 | *@arrayName
34 | */
35 | +(NSDictionary *)getDictionaryWithFileName:(NSString *)dictionaryName;
36 |
37 | /**
38 | *保存对象数据到沙盒中
39 | *@modelName文件名
40 | */
41 | +(void)SaveModel:(id)model andFileName:(NSString *)modelName;
42 |
43 | /**
44 | *从沙盒中获取对象
45 | *@modelName文件名
46 | */
47 | +(id)getModelWithFileName:(NSString *)modelName;
48 |
49 | /**
50 | *清空缓存文件夹
51 | */
52 | +(void)cleanCache;
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/yoyo.xcodeproj/xcuserdata/zx.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
14 |
15 |
16 |
18 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/yoyoUITests/yoyoUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // yoyoUITests.m
3 | // yoyoUITests
4 | //
5 | // Created by zx on 16/5/5.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface yoyoUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation yoyoUITests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 |
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 |
22 | // In UI tests it is usually best to stop immediately when a failure occurs.
23 | self.continueAfterFailure = NO;
24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
25 | [[[XCUIApplication alloc] init] launch];
26 |
27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
28 | }
29 |
30 | - (void)tearDown {
31 | // Put teardown code here. This method is called after the invocation of each test method in the class.
32 | [super tearDown];
33 | }
34 |
35 | - (void)testExample {
36 | // Use recording to get started writing UI tests.
37 | // Use XCTAssert and related functions to verify your tests produce the correct results.
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/yoyo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/yoyo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/yoyo/CircleViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // CircleViewController.m
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/25.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import "CircleViewController.h"
10 | #import "CircleView.h"
11 | #import "PieItem.h"
12 |
13 | @interface CircleViewController ()
14 |
15 | @property (strong, nonatomic) CircleView *circleView;
16 |
17 | @end
18 |
19 | @implementation CircleViewController
20 |
21 | - (void)viewDidLoad {
22 | [super viewDidLoad];
23 | self.view.backgroundColor = [UIColor whiteColor];
24 | NSArray *items = @[[PieItem pieItemWith:[UIColor redColor] ratio:0.45], [PieItem pieItemWith:[UIColor blueColor] ratio:0.25], [PieItem pieItemWith:[UIColor greenColor] ratio:0.15], [PieItem pieItemWith:[UIColor purpleColor] ratio:0.15]];
25 | _circleView = [[CircleView alloc] initWithFrame:CGRectMake(0, 100, [UIScreen mainScreen].bounds.size.width, 300) Items:items];
26 | [self.view addSubview:_circleView];
27 | //添加促发按钮
28 | UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(0, 64, 50, 35)];
29 | btn.backgroundColor = [UIColor purpleColor];
30 | [btn setTitle:@"绘画" forState:UIControlStateNormal];
31 | [btn addTarget:self action:@selector(startStroke) forControlEvents:UIControlEventTouchUpInside];
32 | [self.view addSubview:btn];
33 | }
34 | -(void)startStroke {
35 | [_circleView startPieStroke];
36 | }
37 |
38 | - (void)didReceiveMemoryWarning {
39 | [super didReceiveMemoryWarning];
40 | // Dispose of any resources that can be recreated.
41 | }
42 |
43 | /*
44 | #pragma mark - Navigation
45 |
46 | // In a storyboard-based application, you will often want to do a little preparation before navigation
47 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
48 | // Get the new view controller using [segue destinationViewController].
49 | // Pass the selected object to the new view controller.
50 | }
51 | */
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/yoyo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // yoyo
4 | //
5 | // Created by zx on 16/5/5.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // 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.
25 | // 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.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // 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.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // 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.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // 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.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/yoyo/MyAnimalViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // MyAnimalViewController.m
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/23.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import "MyAnimalViewController.h"
10 |
11 | @interface MyAnimalViewController (){
12 | CALayer *_layer;
13 | }
14 |
15 | @end
16 |
17 | @implementation MyAnimalViewController
18 |
19 | - (void)viewDidLoad {
20 | [super viewDidLoad];
21 | //设置背景(注意这个图片其实在根图层)
22 | UIImage *backgroundImage=[UIImage imageNamed:@"bg3"];
23 | self.view.backgroundColor=[UIColor colorWithPatternImage:backgroundImage];
24 |
25 | //自定义一个图层
26 | _layer=[[CALayer alloc]init];
27 | _layer.bounds=CGRectMake(0, 0, 10, 20);
28 | _layer.position=CGPointMake(50, 150);
29 | _layer.contents=(id)[UIImage imageNamed:@"charm"].CGImage;
30 | [self.view.layer addSublayer:_layer];
31 |
32 | //创建动画
33 | [self translationAnimation];
34 | }
35 | #pragma mark 关键帧动画
36 | -(void)translationAnimation{
37 | //1.创建关键帧动画并设置动画属性
38 | CAKeyframeAnimation *keyframeAnimation=[CAKeyframeAnimation animationWithKeyPath:@"position"];
39 |
40 | //2.设置关键帧,这里有四个关键帧
41 | NSValue *key1=[NSValue valueWithCGPoint:_layer.position];//对于关键帧动画初始值不能省略
42 | NSValue *key2=[NSValue valueWithCGPoint:CGPointMake(80, 220)];
43 | NSValue *key3=[NSValue valueWithCGPoint:CGPointMake(45, 300)];
44 | NSValue *key4=[NSValue valueWithCGPoint:CGPointMake(55, 400)];
45 | NSArray *values=@[key1,key2,key3,key4];
46 | keyframeAnimation.values=values;
47 | //设置其他属性
48 | keyframeAnimation.duration=8.0;
49 | keyframeAnimation.beginTime=CACurrentMediaTime()+2;//设置延迟2秒执行
50 |
51 | //3.添加动画到图层,添加动画后就会执行动画
52 | [_layer addAnimation:keyframeAnimation forKey:@"KCKeyframeAnimation_Position"];
53 | }
54 |
55 | - (void)didReceiveMemoryWarning {
56 | [super didReceiveMemoryWarning];
57 | // Dispose of any resources that can be recreated.
58 | }
59 |
60 | /*
61 | #pragma mark - Navigation
62 |
63 | // In a storyboard-based application, you will often want to do a little preparation before navigation
64 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
65 | // Get the new view controller using [segue destinationViewController].
66 | // Pass the selected object to the new view controller.
67 | }
68 | */
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/yoyo/MyCurveAnimalViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // MyCurveAnimalViewController.m
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/23.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import "MyCurveAnimalViewController.h"
10 |
11 | @interface MyCurveAnimalViewController (){
12 | CALayer *_layer;
13 | }
14 |
15 | @end
16 |
17 | @implementation MyCurveAnimalViewController
18 |
19 | - (void)viewDidLoad {
20 | [super viewDidLoad];
21 | //设置背景(注意这个图片其实在根图层)
22 | UIImage *backgroundImage=[UIImage imageNamed:@"bg3"];
23 | self.view.backgroundColor=[UIColor colorWithPatternImage:backgroundImage];
24 |
25 | //自定义一个图层
26 | _layer=[[CALayer alloc]init];
27 | _layer.bounds=CGRectMake(0, 0, 10, 20);
28 | _layer.position=CGPointMake(50, 150);
29 | _layer.contents=(id)[UIImage imageNamed:@"charm"].CGImage;
30 | [self.view.layer addSublayer:_layer];
31 |
32 | //创建动画
33 | [self translationAnimation];
34 | }
35 | #pragma mark 关键帧动画
36 | -(void)translationAnimation{
37 | //1.创建关键帧动画并设置动画属性
38 | CAKeyframeAnimation *keyframeAnimation=[CAKeyframeAnimation animationWithKeyPath:@"position"];
39 |
40 | //2.设置路径
41 | //绘制贝塞尔曲线
42 | CGPathRef path=CGPathCreateMutable();
43 | CGPathMoveToPoint((CGMutablePathRef)path, NULL, _layer.position.x, _layer.position.y);//移动到起始点
44 | CGPathAddCurveToPoint((CGMutablePathRef)path, NULL, 160, 280, -30, 300, 55, 400);//绘制二次贝塞尔曲线
45 |
46 | keyframeAnimation.path=path;//设置path属性
47 | CGPathRelease(path);//释放路径对象
48 | //设置其他属性
49 | keyframeAnimation.duration=8.0;
50 | keyframeAnimation.beginTime=CACurrentMediaTime()+2;//设置延迟2秒执行
51 |
52 |
53 | //3.添加动画到图层,添加动画后就会执行动画
54 | [_layer addAnimation:keyframeAnimation forKey:@"KCKeyframeAnimation_Position"];
55 | }
56 |
57 |
58 | - (void)didReceiveMemoryWarning {
59 | [super didReceiveMemoryWarning];
60 | // Dispose of any resources that can be recreated.
61 | }
62 |
63 | /*
64 | #pragma mark - Navigation
65 |
66 | // In a storyboard-based application, you will often want to do a little preparation before navigation
67 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
68 | // Get the new view controller using [segue destinationViewController].
69 | // Pass the selected object to the new view controller.
70 | }
71 | */
72 |
73 | @end
74 |
--------------------------------------------------------------------------------
/yoyo/CellHeightCell.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/yoyo/AreaTableViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // AreaTableViewController.m
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/11.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import "AreaTableViewController.h"
10 |
11 | @interface AreaTableViewController ()
12 |
13 | @property (assign, nonatomic) NSIndexPath *selIndex;//单选,当前选中的行
14 |
15 | @end
16 |
17 | @implementation AreaTableViewController
18 |
19 | - (void)viewDidLoad {
20 | [super viewDidLoad];
21 | }
22 |
23 | - (void)didReceiveMemoryWarning {
24 | [super didReceiveMemoryWarning];
25 | // Dispose of any resources that can be recreated.
26 | }
27 |
28 | #pragma mark - Table view data source
29 |
30 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
31 | return 1;
32 | }
33 |
34 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
35 | return _areaList.count;
36 | }
37 |
38 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
39 | static NSString *cellid = @"areaCellId";
40 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellid];
41 | if (cell == nil) {
42 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellid];
43 |
44 | }
45 | cell.textLabel.text = _areaList[indexPath.row];
46 | if (_selIndex == indexPath) {
47 | cell.accessoryType = UITableViewCellAccessoryCheckmark;
48 | }else {
49 | cell.accessoryType = UITableViewCellAccessoryNone;
50 | }
51 | return cell;
52 | }
53 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
54 | //之前选中的
55 | UITableViewCell *celled = [tableView cellForRowAtIndexPath:_selIndex];
56 | celled.accessoryType = UITableViewCellAccessoryNone;
57 | //现在选中的
58 | _selIndex = indexPath;
59 | UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
60 | cell.accessoryType = UITableViewCellAccessoryCheckmark;
61 | }
62 | /*
63 | // Override to support conditional editing of the table view.
64 | - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
65 | // Return NO if you do not want the specified item to be editable.
66 | return YES;
67 | }
68 | */
69 |
70 | /*
71 | // Override to support editing the table view.
72 | - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
73 | if (editingStyle == UITableViewCellEditingStyleDelete) {
74 | // Delete the row from the data source
75 | [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
76 | } else if (editingStyle == UITableViewCellEditingStyleInsert) {
77 | // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
78 | }
79 | }
80 | */
81 |
82 | /*
83 | // Override to support rearranging the table view.
84 | - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
85 | }
86 | */
87 |
88 | /*
89 | // Override to support conditional rearranging of the table view.
90 | - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
91 | // Return NO if you do not want the item to be re-orderable.
92 | return YES;
93 | }
94 | */
95 |
96 | /*
97 | #pragma mark - Navigation
98 |
99 | // In a storyboard-based application, you will often want to do a little preparation before navigation
100 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
101 | // Get the new view controller using [segue destinationViewController].
102 | // Pass the selected object to the new view controller.
103 | }
104 | */
105 |
106 | @end
107 |
--------------------------------------------------------------------------------
/yoyo/ProvinceChooseTableViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ProvinceChooseTableViewController.m
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/11.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import "ProvinceChooseTableViewController.h"
10 | #import "AreaTableViewController.h"
11 |
12 | @interface ProvinceChooseTableViewController ()
13 |
14 | @property (strong, nonatomic) NSArray *cityList; //城市列表
15 |
16 | @end
17 |
18 | @implementation ProvinceChooseTableViewController
19 |
20 | - (void)viewDidLoad {
21 | [super viewDidLoad];
22 | self.title = @"省份";
23 | //获取目录下的city.plist文件
24 | NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"city" ofType:@"plist"];
25 | _cityList = [NSArray arrayWithContentsOfFile:plistPath];
26 | }
27 |
28 | - (void)didReceiveMemoryWarning {
29 | [super didReceiveMemoryWarning];
30 | // Dispose of any resources that can be recreated.
31 | }
32 |
33 | #pragma mark - Table view data source
34 |
35 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
36 | return 1;
37 | }
38 |
39 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
40 | return _cityList.count;
41 | }
42 |
43 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
44 | static NSString *cellid = @"cityCellId";
45 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellid];
46 | if (cell == nil) {
47 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellid];
48 | cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
49 | }
50 | cell.textLabel.text = _cityList[indexPath.row][@"state"];
51 | return cell;
52 | }
53 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
54 | AreaTableViewController *vc = [AreaTableViewController new];
55 | vc.areaList = _cityList[indexPath.row][@"cities"];
56 | vc.title = _cityList[indexPath.row][@"state"];
57 | [self.navigationController pushViewController:vc animated:YES];
58 | }
59 | /*
60 | // Override to support conditional editing of the table view.
61 | - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
62 | // Return NO if you do not want the specified item to be editable.
63 | return YES;
64 | }
65 | */
66 |
67 | /*
68 | // Override to support editing the table view.
69 | - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
70 | if (editingStyle == UITableViewCellEditingStyleDelete) {
71 | // Delete the row from the data source
72 | [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
73 | } else if (editingStyle == UITableViewCellEditingStyleInsert) {
74 | // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
75 | }
76 | }
77 | */
78 |
79 | /*
80 | // Override to support rearranging the table view.
81 | - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
82 | }
83 | */
84 |
85 | /*
86 | // Override to support conditional rearranging of the table view.
87 | - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
88 | // Return NO if you do not want the item to be re-orderable.
89 | return YES;
90 | }
91 | */
92 |
93 | /*
94 | #pragma mark - Navigation
95 |
96 | // In a storyboard-based application, you will often want to do a little preparation before navigation
97 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
98 | // Get the new view controller using [segue destinationViewController].
99 | // Pass the selected object to the new view controller.
100 | }
101 | */
102 |
103 | @end
104 |
--------------------------------------------------------------------------------
/yoyo/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // yoyo
4 | //
5 | // Created by zx on 16/5/5.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "MultiselectViewController.h"
11 | #import "CityChooseViewController.h"
12 | #import "TextUpViewController.h"
13 | #import "CellHeightTableViewController.h"
14 | #import "MyAnimalViewController.h"
15 | #import "MyCurveAnimalViewController.h"
16 | #import "CircleViewController.h"
17 | #import "FileHandle.h"
18 |
19 | @interface ViewController ()
20 |
21 | @end
22 |
23 | @implementation ViewController
24 |
25 | - (void)viewDidLoad {
26 | [super viewDidLoad];
27 | UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 260, self.view.frame.size.width - 16, 35)];
28 | searchBar.searchBarStyle = UISearchBarStyleMinimal;
29 | searchBar.placeholder = @"请输入关键字";
30 | [searchBar setImage:[UIImage imageNamed:@"test_sousuo"] forSearchBarIcon:UISearchBarIconSearch state:UIControlStateNormal]; //替换收缩放大镜
31 | [searchBar setImage:[UIImage imageNamed:@"test_quxiao"] forSearchBarIcon:UISearchBarIconClear state:UIControlStateNormal]; //输入的时候,右侧的清除按钮
32 | [searchBar setSearchFieldBackgroundImage:[UIImage imageNamed:@"sousuokuang"] forState:UIControlStateNormal]; //输入背景框
33 | //改变提示文字颜色
34 | UITextField *sbTextField = [searchBar valueForKey:@"searchField"]; //首先取出textfield
35 | sbTextField.textColor = [UIColor blueColor]; //输入的颜色
36 | UILabel *sbPlaceholderLabel = [sbTextField valueForKey:@"placeholderLabel"]; //然后取出textField的placeHolder
37 | sbPlaceholderLabel.textColor = [UIColor redColor]; //改变颜色
38 | searchBar.delegate = self;
39 | //取消按钮有显示的时候
40 | searchBar.showsCancelButton = YES;
41 | UIButton *cancelBtn = [searchBar valueForKey:@"cancelButton"]; //首先取出cancelBtn
42 | cancelBtn.enabled = YES;
43 | //这样就可以随便设置这个按钮了
44 | [cancelBtn setTitle:@"搜索" forState:UIControlStateNormal];
45 | [self.view addSubview:searchBar];
46 | NSArray *arr = @[@"hhhh",@"jjj"];
47 | [FileHandle SaveArray:arr andFileName:@"testttttyoyo"];
48 | }
49 | -(void)searchBarTextDidEndEditing:(UISearchBar *)searchBar {
50 |
51 | }
52 | -(void)searchBarCancelButtonClicked:(UISearchBar *)searchBar {
53 | [searchBar resignFirstResponder];
54 | }
55 | -(void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {
56 | [searchBar resignFirstResponder]; //searchBar失去焦点
57 | UIButton *cancelBtn = [searchBar valueForKey:@"cancelButton"]; //首先取出cancelBtn
58 | cancelBtn.enabled = YES; //把enabled设置为yes
59 | }
60 | - (IBAction)nextAction:(id)sender {
61 | MultiselectViewController *vc = [MultiselectViewController new];
62 | [self.navigationController pushViewController:vc animated:YES];
63 | }
64 | - (IBAction)selectCity:(id)sender {
65 | CityChooseViewController *vc = [CityChooseViewController new];
66 | [self.navigationController pushViewController:vc animated:YES];
67 | }
68 | - (IBAction)textFieldUp:(id)sender {
69 | TextUpViewController *vc = [TextUpViewController new];
70 | [self.navigationController pushViewController:vc animated:YES];
71 | }
72 | - (IBAction)cellHeightAction:(id)sender {
73 | [FileHandle cleanCache];
74 | CellHeightTableViewController *vc = [CellHeightTableViewController new];
75 | [self.navigationController pushViewController:vc animated:YES];
76 | }
77 | - (IBAction)animalAction:(id)sender {
78 | MyAnimalViewController *vc = [MyAnimalViewController new];
79 | [self.navigationController pushViewController:vc animated:YES];
80 | }
81 | - (IBAction)curveAnimalAction:(id)sender {
82 | MyCurveAnimalViewController *vc = [MyCurveAnimalViewController new];
83 | [self.navigationController pushViewController:vc animated:YES];
84 | }
85 | - (IBAction)circleAction:(id)sender {
86 | CircleViewController *vc = [CircleViewController new];
87 | [self.navigationController pushViewController:vc animated:YES];
88 | }
89 |
90 | - (void)didReceiveMemoryWarning {
91 | [super didReceiveMemoryWarning];
92 | // Dispose of any resources that can be recreated.
93 | }
94 |
95 | @end
96 |
--------------------------------------------------------------------------------
/yoyo.xcodeproj/xcuserdata/zx.xcuserdatad/xcschemes/yoyo.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
43 |
49 |
50 |
51 |
52 |
53 |
59 |
60 |
61 |
62 |
63 |
64 |
74 |
76 |
82 |
83 |
84 |
85 |
86 |
87 |
93 |
95 |
101 |
102 |
103 |
104 |
106 |
107 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/yoyo/CheckViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ChecksViewController.m
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/11.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import "CheckViewController.h"
10 | #import "ProvinceChooseTableViewController.h"
11 |
12 | @interface CheckViewController ()
13 |
14 | @property (strong, nonatomic) UITableView *tableView;
15 |
16 | @property (assign, nonatomic) NSIndexPath *selIndex;//单选,当前选中的行
17 |
18 | @end
19 |
20 | @implementation CheckViewController
21 |
22 | - (void)viewDidLoad {
23 | [super viewDidLoad];
24 | self.title = @"单选";
25 | _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height) style:UITableViewStyleGrouped]; //Grouped类型的,section头部就不会一直停留在最上面
26 | _tableView.delegate = self;
27 | _tableView.dataSource = self;
28 | _tableView.backgroundColor = [UIColor groupTableViewBackgroundColor];
29 | [self.view addSubview:_tableView];
30 | //多选
31 | UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeSystem];
32 | rightBtn.frame = CGRectMake(0, 0, 44, 44);
33 | [rightBtn setTitle:@"城市" forState:UIControlStateNormal];
34 | [rightBtn addTarget:self action:@selector(cityView) forControlEvents:UIControlEventTouchUpInside];
35 | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];
36 | }
37 | //跳到多选页面
38 | - (void) cityView {
39 | ProvinceChooseTableViewController *vc = [ProvinceChooseTableViewController new];
40 | [self.navigationController pushViewController:vc animated:YES];
41 | }
42 | #pragma mark 列数
43 | -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
44 | return 3;
45 | }
46 | #pragma mark 行数
47 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
48 | if (section == 0) {
49 | return 5;
50 | }else if (section == 1) {
51 | return 14;
52 | }else {
53 | return 1;
54 | }
55 | }
56 | #pragma mark 行高
57 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
58 | return 45;
59 | }
60 | #pragma mark 列表头高
61 | -(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
62 | return 25;
63 | }
64 | #pragma mark 列表尾高
65 | -(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
66 | return 0.00001;
67 | }
68 | #pragma mark 列表头设置成自定义视图
69 | -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
70 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 25)];
71 | view.backgroundColor = [UIColor groupTableViewBackgroundColor];
72 | return view;
73 | }
74 |
75 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
76 | static NSString *cellId = @"cellid";
77 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
78 | if (cell == nil) {
79 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId];
80 | }
81 | cell.textLabel.text = [NSString stringWithFormat:@"第%zi列,第%zi行",indexPath.section, indexPath.row];
82 |
83 | //当上下拉动的时候,因为cell的复用性,我们需要重新判断一下哪一行是打勾的
84 | if (_selIndex == indexPath) {
85 | cell.accessoryType = UITableViewCellAccessoryCheckmark;
86 | }else {
87 | cell.accessoryType = UITableViewCellAccessoryNone;
88 | }
89 |
90 | return cell;
91 | }
92 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
93 | //之前选中的,取消选择
94 | UITableViewCell *celled = [tableView cellForRowAtIndexPath:_selIndex];
95 | celled.accessoryType = UITableViewCellAccessoryNone;
96 | //记录当前选中的位置索引
97 | _selIndex = indexPath;
98 | //当前选择的打勾
99 | UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
100 | cell.accessoryType = UITableViewCellAccessoryCheckmark;
101 | }
102 | - (void)didReceiveMemoryWarning {
103 | [super didReceiveMemoryWarning];
104 | // Dispose of any resources that can be recreated.
105 | }
106 |
107 |
108 | /*
109 | #pragma mark - Navigation
110 |
111 | // In a storyboard-based application, you will often want to do a little preparation before navigation
112 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
113 | // Get the new view controller using [segue destinationViewController].
114 | // Pass the selected object to the new view controller.
115 | }
116 | */
117 |
118 | @end
119 |
--------------------------------------------------------------------------------
/yoyo/CircleView.m:
--------------------------------------------------------------------------------
1 | //
2 | // CircleView.m
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/25.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import "CircleView.h"
10 | #import "PieItem.h"
11 | #import "PieStroke.h"
12 |
13 | @implementation CircleView {
14 | CGPoint _pieCenter;//中心点
15 | CGFloat _pieRadius;//半径
16 | NSMutableArray *_pathArray;//路径数组
17 | }
18 |
19 | // Only override drawRect: if you perform custom drawing.
20 | // An empty implementation adversely affects performance during animation.
21 | - (void)drawRect:(CGRect)rect {
22 | // //创建path
23 | // UIBezierPath *circlePath = [UIBezierPath bezierPath];
24 | // // 添加圆到path
25 | // [circlePath addArcWithCenter:CGPointMake(self.frame.size.width/2, self.frame.size.height/2) radius:100.0 startAngle:0.0 endAngle:M_PI*2 clockwise:YES];
26 | // // 设置描边宽度(为了让描边看上去更清楚)
27 | // [circlePath setLineWidth:5.0];
28 | // //设置颜色(颜色设置也可以放在最上面,只要在绘制前都可以)
29 | // [[UIColor blueColor] setStroke];
30 | // [[UIColor redColor] setFill];
31 | // // 描边和填充
32 | // [circlePath stroke];
33 | // [circlePath fill];
34 | }
35 | -(instancetype)initWithFrame:(CGRect)frame Items:(NSArray *)items{
36 | self = [super initWithFrame:frame];
37 | if (self) {
38 | self.backgroundColor = [UIColor groupTableViewBackgroundColor];
39 | //画底图
40 | [self drawBasePie:frame];
41 | CGFloat startAngle = M_PI * 0.25; //开始的角度
42 | CGFloat endAngle = 0;//结束的位置
43 | _pathArray = [NSMutableArray new];
44 | for (int i = 0; i < items.count; i++) {
45 | PieItem *item = items[i];
46 | CAShapeLayer *_spLayer = [CAShapeLayer layer];
47 | _spLayer.lineCap = kCALineCapButt;//设置线条起点和终点的样式
48 | _spLayer.lineJoin = kCALineJoinBevel;//设置线条的转角的样式
49 | _spLayer.fillColor = [[UIColor clearColor] CGColor];
50 | _spLayer.strokeColor = [item.pieColor CGColor];
51 | _spLayer.lineWidth = 60.0;
52 | [self.layer addSublayer:_spLayer];
53 | endAngle = startAngle + M_PI * 2.0 * item.ratio;
54 | _pieCenter = CGPointMake(frame.size.width/2, frame.size.height/2);
55 | _pieRadius = frame.size.height / 2 - 50;
56 | //创建path
57 | UIBezierPath *circlePath = [UIBezierPath bezierPath];
58 | // 添加圆到path
59 | [circlePath addArcWithCenter:_pieCenter radius:_pieRadius startAngle:startAngle endAngle:endAngle clockwise:YES];
60 | //添加到数组
61 | PieStroke *pieStroke = [PieStroke pieStrokeWithCenter:_pieCenter ratio:_pieRadius circlePath:circlePath spLayer:_spLayer];
62 | [_pathArray addObject:pieStroke];
63 |
64 | //获取每一截环的开始点
65 | [self calcCircleCoordinateWithCenter:_pieCenter andWithAngle:startAngle andWithRadius:_pieRadius];
66 |
67 | startAngle = startAngle + M_PI * 2.0 * item.ratio;
68 | }
69 | }
70 | return self;
71 | }
72 | #pragma mark 顺时针计算圆圈上点在IOS系统中的坐标,传入弧度
73 | -(CGPoint) calcCircleCoordinateWithCenter:(CGPoint)center andWithAngle:(CGFloat)angle andWithRadius:(CGFloat)radius {
74 | CGFloat x2 = radius*cosf(angle);
75 | CGFloat y2 = radius*sinf(angle);
76 | return CGPointMake(center.x+x2, center.y+y2);
77 | }
78 | #pragma mark 画底图
79 | -(void) drawBasePie:(CGRect)frame {
80 | CAShapeLayer *_spLayer = [CAShapeLayer layer];
81 | _spLayer.lineCap = kCALineCapButt;//设置线条起点和终点的样式
82 | _spLayer.lineJoin = kCALineJoinBevel;//设置线条的转角的样式
83 | _spLayer.fillColor = [[UIColor clearColor] CGColor];
84 | _spLayer.strokeColor = [[UIColor lightGrayColor] CGColor];
85 | _spLayer.lineWidth = 60.0;
86 | [self.layer addSublayer:_spLayer];
87 | //创建path
88 | UIBezierPath *circlePath = [UIBezierPath bezierPath];
89 | // 添加圆到path
90 | [circlePath addArcWithCenter:CGPointMake(frame.size.width/2, frame.size.height/2) radius:frame.size.height / 2 - 50 startAngle:0 endAngle:M_PI * 2 clockwise:YES];
91 | _spLayer.path = circlePath.CGPath;
92 |
93 | }
94 | #pragma mark 开始画图
95 | -(void) startPieStroke {
96 | for (PieStroke *item in _pathArray) {
97 | item.spLayer.path = item.circlePath.CGPath;
98 | CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
99 | animation.fromValue = @(0.0);
100 | animation.toValue = @(1.0);
101 | animation.duration = 1.0;
102 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
103 | animation.autoreverses = NO;
104 | [item.spLayer addAnimation:animation forKey:@"strokeEnd"];
105 | }
106 | }
107 |
108 | @end
109 |
--------------------------------------------------------------------------------
/yoyo/MultiselectViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // TestViewController.m
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/6.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import "MultiselectViewController.h"
10 | #import "CheckViewController.h"
11 |
12 | @interface MultiselectViewController ()
13 |
14 | @property (strong, nonatomic) UITableView *tableView;
15 |
16 | @property (strong, nonatomic) NSMutableArray *selectIndexs;//多选选中的行
17 |
18 | @end
19 |
20 | @implementation MultiselectViewController
21 |
22 | - (void)viewDidLoad {
23 | [super viewDidLoad];
24 | _selectIndexs = [NSMutableArray new];
25 | self.title = @"多选";
26 | _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height) style:UITableViewStyleGrouped]; //Grouped类型的,section头部就不会一直停留在最上面
27 | _tableView.delegate = self;
28 | _tableView.dataSource = self;
29 | _tableView.backgroundColor = [UIColor groupTableViewBackgroundColor];
30 | [self.view addSubview:_tableView];
31 | //多选
32 | UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeSystem];
33 | rightBtn.frame = CGRectMake(0, 0, 44, 44);
34 | [rightBtn setTitle:@"单选" forState:UIControlStateNormal];
35 | [rightBtn addTarget:self action:@selector(checksView) forControlEvents:UIControlEventTouchUpInside];
36 | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];
37 | }
38 | //跳到多选页面
39 | - (void) checksView {
40 | CheckViewController *checkVC = [CheckViewController new];
41 | [self.navigationController pushViewController:checkVC animated:YES];
42 | }
43 | #pragma mark 列数
44 | -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
45 | return 3;
46 | }
47 | #pragma mark 行数
48 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
49 | if (section == 0) {
50 | return 5;
51 | }else if (section == 1) {
52 | return 14;
53 | }else {
54 | return 1;
55 | }
56 | }
57 | #pragma mark 行高
58 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
59 | return 45;
60 | }
61 | #pragma mark 列表头高
62 | -(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
63 | return 25;
64 | }
65 | #pragma mark 列表尾高
66 | -(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
67 | return 0.00001;
68 | }
69 | #pragma mark 列表头设置成自定义视图
70 | -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
71 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 25)];
72 | view.backgroundColor = [UIColor groupTableViewBackgroundColor];
73 | return view;
74 | }
75 |
76 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
77 | static NSString *cellId = @"cellid";
78 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
79 | if (cell == nil) {
80 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId];
81 | }
82 | cell.textLabel.text = [NSString stringWithFormat:@"第%zi列,第%zi行",indexPath.section, indexPath.row];
83 |
84 | //设置勾
85 | cell.accessoryType = UITableViewCellAccessoryNone;
86 | for (NSIndexPath *index in _selectIndexs) {
87 | if (index == indexPath) { //改行在选择的数组里面有记录
88 | cell.accessoryType = UITableViewCellAccessoryCheckmark; //打勾
89 | break;
90 | }
91 | }
92 |
93 | return cell;
94 | }
95 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
96 | //获取到点击的cell
97 | UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
98 | if (cell.accessoryType == UITableViewCellAccessoryCheckmark) { //如果为选中状态
99 | cell.accessoryType = UITableViewCellAccessoryNone; //切换为未选中
100 | [_selectIndexs removeObject:indexPath]; //数据移除
101 | }else { //未选中
102 | cell.accessoryType = UITableViewCellAccessoryCheckmark; //切换为选中
103 | [_selectIndexs addObject:indexPath]; //添加索引数据到数组
104 | }
105 | }
106 | - (void)didReceiveMemoryWarning {
107 | [super didReceiveMemoryWarning];
108 | // Dispose of any resources that can be recreated.
109 | }
110 |
111 | /*
112 | #pragma mark - Navigation
113 |
114 | // In a storyboard-based application, you will often want to do a little preparation before navigation
115 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
116 | // Get the new view controller using [segue destinationViewController].
117 | // Pass the selected object to the new view controller.
118 | }
119 | */
120 |
121 | @end
122 |
--------------------------------------------------------------------------------
/yoyo/CellHeightTableViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // CellHeightTableViewController.m
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/20.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import "CellHeightTableViewController.h"
10 | #import "CellHeightCell.h"
11 |
12 | @interface CellHeightTableViewController ()
13 |
14 | @property (strong, nonatomic) NSArray *list;
15 |
16 | @end
17 |
18 | @implementation CellHeightTableViewController
19 |
20 | - (void)viewDidLoad {
21 | [super viewDidLoad];
22 | _list = @[@"回家开很快就很快", @"换个时间的感觉很国家宏观环境国家和国家和国家和国家和国家和国家宏观环境国家宏观环境国家和国家和国家和国家和国家和国家宏观就好就回家开很快就很快就很快就好看见好看好看", @"太让人特意人尔特突然", @"空间互动分开就回家客户均可好你不你那边吗讨厌图样图沿", @"空间互动分开就回家客户均可好你不你那边吗讨厌图样图沿途愚人太让人特意人尔特突然"];
23 | // Uncomment the following line to preserve selection between presentations.
24 | // self.clearsSelectionOnViewWillAppear = NO;
25 |
26 | // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
27 | // self.navigationItem.rightBarButtonItem = self.editButtonItem;
28 | }
29 |
30 | - (void)didReceiveMemoryWarning {
31 | [super didReceiveMemoryWarning];
32 | // Dispose of any resources that can be recreated.
33 | }
34 |
35 | #pragma mark - Table view data source
36 |
37 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
38 | #warning Incomplete implementation, return the number of sections
39 | return 1;
40 | }
41 |
42 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
43 | #warning Incomplete implementation, return the number of rows
44 | return _list.count;
45 | }
46 |
47 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
48 | NSString *content = _list[indexPath.row];
49 | return 39 + [self getLabelHeightWithString:content andWidth:[UIScreen mainScreen].bounds.size.width - 16 andFont:[UIFont systemFontOfSize:17.0]];
50 | }
51 | //获取高度,传入文本框的宽度和字号以及内容
52 | -(CGFloat)getLabelHeightWithString:(NSString *)text andWidth:(CGFloat)width andFont:(UIFont *)font{
53 | CGSize textSize = [text boundingRectWithSize:CGSizeMake(width, MAXFLOAT) // 用于计算文本绘制时占据的矩形块
54 | options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading // 文本绘制时的附加选项
55 | attributes:[NSDictionary dictionaryWithObjectsAndKeys:font,NSFontAttributeName, nil] // 文字的属性
56 | context:nil].size;
57 | return textSize.height;
58 | }
59 |
60 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
61 | static NSString *cellId = @"cellid";
62 | UINib *nib = [UINib nibWithNibName:@"CellHeightCell" bundle:[NSBundle mainBundle]];
63 | [tableView registerNib:nib forCellReuseIdentifier:cellId];
64 | CellHeightCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId forIndexPath:indexPath];
65 |
66 | cell.tLabel.text = _list[indexPath.row];
67 |
68 | return cell;
69 | }
70 |
71 | /*
72 | // Override to support conditional editing of the table view.
73 | - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
74 | // Return NO if you do not want the specified item to be editable.
75 | return YES;
76 | }
77 | */
78 |
79 | /*
80 | // Override to support editing the table view.
81 | - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
82 | if (editingStyle == UITableViewCellEditingStyleDelete) {
83 | // Delete the row from the data source
84 | [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
85 | } else if (editingStyle == UITableViewCellEditingStyleInsert) {
86 | // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
87 | }
88 | }
89 | */
90 |
91 | /*
92 | // Override to support rearranging the table view.
93 | - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
94 | }
95 | */
96 |
97 | /*
98 | // Override to support conditional rearranging of the table view.
99 | - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
100 | // Return NO if you do not want the item to be re-orderable.
101 | return YES;
102 | }
103 | */
104 |
105 | /*
106 | #pragma mark - Navigation
107 |
108 | // In a storyboard-based application, you will often want to do a little preparation before navigation
109 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
110 | // Get the new view controller using [segue destinationViewController].
111 | // Pass the selected object to the new view controller.
112 | }
113 | */
114 |
115 | @end
116 |
--------------------------------------------------------------------------------
/yoyo/CityChooseViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // CityChooseViewController.m
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/12.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 |
9 | #import "CityChooseViewController.h"
10 |
11 | #define screen_width [UIScreen mainScreen].bounds.size.width
12 | #define screen_height [UIScreen mainScreen].bounds.size.height
13 |
14 | @interface CityChooseViewController ()
15 |
16 | @property (strong, nonatomic) UITableView *mainTableView; //主
17 | @property (strong, nonatomic) UITableView *subTableView; //次
18 | @property (strong, nonatomic) NSArray *cityList; //城市列表
19 | @property (assign, nonatomic) NSInteger selIndex;//主列表当前选中的行
20 | @property (assign, nonatomic) NSIndexPath *subSelIndex;//子列表当前选中的行
21 | @property (assign, nonatomic) BOOL clickRefresh;//是否是点击主列表刷新子列表,系统刚开始默认为NO
22 |
23 | @end
24 |
25 | @implementation CityChooseViewController
26 |
27 | - (void)viewDidLoad {
28 | [super viewDidLoad];
29 | [self addTableView];
30 | }
31 |
32 | #pragma mark 创建两个tableView
33 | - (void)addTableView {
34 | self.title = @"城市";
35 | self.view.backgroundColor = [UIColor whiteColor];
36 | //获取目录下的city.plist文件
37 | NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"city" ofType:@"plist"];
38 | _cityList = [NSArray arrayWithContentsOfFile:plistPath];
39 | //刚开始,默认选中第一行
40 | _selIndex = 0;
41 | //tableView
42 | _mainTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, screen_width / 4 + 1, screen_height) style:UITableViewStylePlain];
43 | _mainTableView.dataSource = self;
44 | _mainTableView.delegate = self;
45 | [self.view addSubview:_mainTableView];
46 | _subTableView = [[UITableView alloc] initWithFrame:CGRectMake(screen_width / 4, 64, screen_width * 3 / 4, screen_height - 64) style:UITableViewStylePlain];
47 | _subTableView.dataSource = self;
48 | _subTableView.delegate = self;
49 | [self.view addSubview:_subTableView];
50 | }
51 | -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
52 | return 1;
53 | }
54 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
55 | if ([tableView isEqual:_mainTableView]) {
56 | return _cityList.count;
57 | }else {
58 | NSArray *areaList = _cityList[_selIndex][@"cities"];
59 | return areaList.count;
60 | }
61 | }
62 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
63 | if ([tableView isEqual:_mainTableView]) {
64 | static NSString *mainCellId = @"mainCellId";
65 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:mainCellId];
66 | if (cell == nil) {
67 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:mainCellId];
68 | }
69 | cell.textLabel.text = _cityList[indexPath.row][@"state"];
70 | return cell;
71 | }else {
72 | static NSString *subCellId = @"subCellId";
73 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:subCellId];
74 | if (cell == nil) {
75 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:subCellId];
76 | }
77 | NSArray *areaList = _cityList[_selIndex][@"cities"];
78 | cell.textLabel.text = areaList[indexPath.row];
79 | //当上下拉动的时候,因为cell的复用性,我们需要重新判断一下哪一行是打勾的
80 | if (_subSelIndex == indexPath && _clickRefresh == NO) {
81 | cell.accessoryType = UITableViewCellAccessoryCheckmark;
82 | }else {
83 | cell.accessoryType = UITableViewCellAccessoryNone;
84 | }
85 | return cell;
86 | }
87 | }
88 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
89 | if ([tableView isEqual:_mainTableView]) {
90 | _selIndex = indexPath.row;
91 | _clickRefresh = YES;
92 | [_subTableView reloadData];
93 | }else {
94 | _clickRefresh = NO;
95 | //之前选中的,取消选择
96 | UITableViewCell *celled = [tableView cellForRowAtIndexPath:_subSelIndex];
97 | celled.accessoryType = UITableViewCellAccessoryNone;
98 | //记录当前选中的位置索引
99 | _subSelIndex = indexPath;
100 | //当前选择的打勾
101 | UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
102 | cell.accessoryType = UITableViewCellAccessoryCheckmark;
103 | }
104 | }
105 |
106 | - (void)didReceiveMemoryWarning {
107 | [super didReceiveMemoryWarning];
108 | // Dispose of any resources that can be recreated.
109 | }
110 |
111 | /*
112 | #pragma mark - Navigation
113 |
114 | // In a storyboard-based application, you will often want to do a little preparation before navigation
115 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
116 | // Get the new view controller using [segue destinationViewController].
117 | // Pass the selected object to the new view controller.
118 | }
119 | */
120 |
121 | @end
122 |
--------------------------------------------------------------------------------
/yoyo/TextUpViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // TextUpViewController.m
3 | // yoyo
4 | //
5 | // Created by YoYo on 16/5/12.
6 | // Copyright © 2016年 cn.yoyoy.mw. All rights reserved.
7 | //
8 | #import "TextUpViewController.h"
9 |
10 | @interface TextFieldCell : UITableViewCell
11 |
12 | @property (strong, nonatomic) UITextField *textField;
13 |
14 | @end
15 | @implementation TextFieldCell
16 |
17 | -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
18 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
19 | if (self) {
20 | _textField = [[UITextField alloc] initWithFrame:CGRectOffset(self.contentView.frame, 20, 0)];
21 | _textField.placeholder = @"输入文字";
22 | [self.contentView addSubview:_textField];
23 | }
24 | return self;
25 | }
26 | @end
27 |
28 | @interface TextUpViewController ()
29 |
30 | @property (strong, nonatomic) UITableView *tableView;
31 | @property (strong, nonatomic) NSMutableArray *array;
32 |
33 | @end
34 |
35 | @implementation TextUpViewController
36 |
37 | - (void)viewDidLoad {
38 | [super viewDidLoad];
39 | _array = [NSMutableArray arrayWithObjects:@"1", @"2", nil];
40 | self.title = @"输入框上移";
41 | self.view.backgroundColor = [UIColor whiteColor];
42 | self.automaticallyAdjustsScrollViewInsets = false;
43 | _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 64, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height - 64) style:UITableViewStyleGrouped]; //Grouped类型的,section头部就不会一直停留在最上面
44 | _tableView.delegate = self;
45 | _tableView.dataSource = self;
46 | _tableView.backgroundColor = [UIColor groupTableViewBackgroundColor];
47 | // [_tableView setEditing:YES animated:YES];//列表是否可以编辑
48 | [self.view addSubview:_tableView];
49 | //添加回收键盘手势
50 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismiss:)];
51 | tap.cancelsTouchesInView = false;
52 | [self.view addGestureRecognizer:tap];
53 | //监听键盘出现和消失
54 | [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
55 | [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
56 | }
57 | #pragma mark 回收键盘
58 | -(void)dismiss:(UIGestureRecognizer *)sender {
59 | [self.view endEditing:YES]; //页面停止编辑
60 | }
61 | #pragma mark 键盘出现
62 | -(void)keyboardWillShow:(NSNotification *)note
63 | {
64 | CGRect keyBoardRect=[note.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
65 | // self.tableView.frame = CGRectMake(0, 64, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height - 64 - keyBoardRect.size.height);
66 | self.tableView.contentInset = UIEdgeInsetsMake(0, 0, keyBoardRect.size.height, 0);
67 | }
68 | #pragma mark 键盘消失
69 | -(void)keyboardWillHide:(NSNotification *)note
70 | {
71 | // self.tableView.frame = CGRectMake(0, 64, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height - 64);
72 | self.tableView.contentInset = UIEdgeInsetsZero;
73 | }
74 | #pragma mark 列数
75 | -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
76 | return 3;
77 | }
78 | #pragma mark 行数
79 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
80 | if (section == 0) {
81 | return 5;
82 | }else if (section == 1) {
83 | return 14;
84 | }else {
85 | return _array.count;
86 | }
87 | }
88 | #pragma mark 行高
89 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
90 | return 45;
91 | }
92 | #pragma mark 列表头高
93 | -(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
94 | return 25;
95 | }
96 | #pragma mark 列表尾高
97 | -(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
98 | return 0.00001;
99 | }
100 | #pragma mark 列表头设置成自定义视图
101 | -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
102 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 25)];
103 | view.backgroundColor = [UIColor groupTableViewBackgroundColor];
104 | return view;
105 | }
106 |
107 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
108 | static NSString *cellId = @"cellid";
109 | TextFieldCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
110 | if (cell == nil) {
111 | cell = [[TextFieldCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId];
112 | cell.textField.delegate = self;
113 | }
114 | if (indexPath.section == 2) {
115 | cell.textLabel.text = _array[indexPath.row];
116 | }
117 | return cell;
118 | }
119 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
120 | [tableView moveRowAtIndexPath:indexPath toIndexPath:[NSIndexPath indexPathForRow:0 inSection:indexPath.section]];
121 | if (indexPath.section == 2) {
122 | // 取出要拖动的模型数据
123 | NSDictionary *dict = _array[indexPath.row];
124 | //删除之前行的数据
125 | [_array removeObject:dict];
126 | // 插入数据到新的位置
127 | [_array insertObject:dict atIndex:0];
128 | }
129 | }
130 | #pragma mark 选择编辑模式,添加模式很少用,默认是删除
131 | //-(UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
132 | //{
133 | // return UITableViewCellEditingStyleNone;
134 | //}
135 | #pragma mark 排序 当移动了某一行时候会调用
136 | //编辑状态下,只要实现这个方法,就能实现拖动排序
137 | //-(void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath
138 | //{
139 | // // 取出要拖动的模型数据
140 | // Goods *goods = _goodsAry[sourceIndexPath.row];
141 | // //删除之前行的数据
142 | // [_goodsAry removeObject:goods];
143 | // // 插入数据到新的位置
144 | // [_goodsAry insertObject:goods atIndex:destinationIndexPath.row];
145 | //}
146 |
147 | -(void)textFieldDidEndEditing:(UITextField *)textField {
148 | textField.text = [self countNumAndChangeformat:textField.text];
149 | }
150 | - (NSString *)countNumAndChangeformat:(NSString *)num
151 | {
152 | int count = 0;
153 | long long int a = num.longLongValue;
154 | while (a != 0)
155 | {
156 | count++;
157 | a /= 10;
158 | }
159 | NSMutableString *string = [NSMutableString stringWithString:num];
160 | NSMutableString *newstring = [NSMutableString string];
161 | while (count > 3) {
162 | count -= 3;
163 | NSRange rang = NSMakeRange(string.length - 3, 3);
164 | NSString *str = [string substringWithRange:rang];
165 | [newstring insertString:str atIndex:0];
166 | [newstring insertString:@"," atIndex:0];
167 | [string deleteCharactersInRange:rang];
168 | }
169 | [newstring insertString:string atIndex:0];
170 | return newstring;
171 | }
172 |
173 | -(BOOL)textFieldShouldReturn:(UITextField *)textField {
174 | [textField resignFirstResponder];
175 | return YES;
176 | }
177 |
178 | - (void)didReceiveMemoryWarning {
179 | [super didReceiveMemoryWarning];
180 | // Dispose of any resources that can be recreated.
181 | }
182 |
183 | /*
184 | #pragma mark - Navigation
185 |
186 | // In a storyboard-based application, you will often want to do a little preparation before navigation
187 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
188 | // Get the new view controller using [segue destinationViewController].
189 | // Pass the selected object to the new view controller.
190 | }
191 | */
192 |
193 | @end
194 |
195 |
--------------------------------------------------------------------------------
/yoyo/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
43 |
50 |
57 |
64 |
71 |
78 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/文件本地缓存操作/FileHandle.m:
--------------------------------------------------------------------------------
1 | //
2 | // FileHandle.m
3 | // JinCaiShen
4 | //
5 | // Created by 陈惠玲 on 16/4/24.
6 | // Copyright © 2016年 JinCaiShen. All rights reserved.
7 | //
8 |
9 | #import "FileHandle.h"
10 |
11 | @implementation FileHandle
12 |
13 | /**
14 | *保存数组数据到沙河中
15 | *@arrayName
16 | */
17 | +(void)SaveArray:(NSArray *)array andFileName:(NSString *)arrayName{
18 | /**
19 | 沙盒文件
20 |
21 | 每个ios应用都有自己的应用沙盒,应用沙盒就是文件系统目录,与其他应用的文件系统隔离,ios系统不允许访问其他应用的应用沙盒。在ios8中已经开放访问。
22 |
23 | 应用沙盒一般包括以下几个文件目录:应用程序包、Documents、Libaray(下面有Caches和Preferences目录)、tmp。
24 |
25 | 应用程序包:包含所有的资源文件和可执行文件。
26 |
27 | Documents:保存应用运行时生成的需要持久化的数据,iTunes会自动备份该目录。苹果建议将程序中建立的或在程序中浏览到的文件数据保存在该目录下,iTunes备份和恢复的时候会包括此目录
28 |
29 | tmp:保存应用运行时所需的临时数据,使用完毕后再将相应的文件从该目录删除。应用没有运行时,系统也有可能会清除该目录下的文件,iTunes不会同步该目录。iphone重启时,该目录下的文件会丢失。
30 |
31 | Library:存储程序的默认设置和其他状态信息,iTunes会自动备份该目录。
32 |
33 | Libaray/Caches: 存放缓存文件,iTunes不会备份此目录,此目录下文件不会在应用退出删除。一般存放体积比较大,不是特别重要的资源。
34 |
35 | Libaray/Preferences: 保存应用的所有偏好设置,ios的Settings(设置)应用会在该目录中查找应用的设置信息,iTunes会自动备份该目录。
36 |
37 | 沙盒文件目录获取代码:
38 |
39 | //Home目录
40 | NSString *homeDirectory = NSHomeDirectory();
41 |
42 | //Document目录
43 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
44 | NSString *path = [paths objectAtIndex:0];
45 |
46 | //Cache目录
47 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
48 | NSString *path = [paths objectAtIndex:0];
49 |
50 | //Libaray目录
51 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
52 | NSString *path = [paths objectAtIndex:0];
53 |
54 | //tmp目录
55 | NSString *tmpDir = NSTemporaryDirectory();
56 | */
57 |
58 | //Cache目录
59 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
60 | NSString *path = [paths objectAtIndex:0];
61 | //拼接文件名
62 | path = [path stringByAppendingPathComponent:arrayName];
63 |
64 | NSMutableArray *marray = [NSMutableArray new];
65 |
66 | for (id dict in array) {
67 | if ([dict isKindOfClass:[NSDictionary class]] || [dict isKindOfClass:[NSMutableDictionary class]]) {
68 | NSMutableDictionary *mDict = [NSMutableDictionary dictionaryWithDictionary:dict];
69 | //排除nsnull
70 | for (NSString *key in [mDict allKeys]) {
71 | if (mDict[key] == [NSNull null]) {
72 | [mDict setValue:@"" forKey:key];
73 | }
74 | }
75 | [marray addObject:mDict];
76 | }
77 | }
78 |
79 | //保存数组元素到本地文件,以xml格式序列化存储
80 | [marray writeToFile:path atomically:YES];
81 |
82 | }
83 | /**
84 | *从沙河中获取数组
85 | *@arrayName
86 | */
87 | +(NSArray *)getArrayWithFileName:(NSString *)arrayName{
88 | //Cache目录
89 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
90 | NSString *path = [paths objectAtIndex:0];
91 | //拼接文件名
92 | path = [path stringByAppendingPathComponent:arrayName];
93 | //读取本地文件,反序列化为数组
94 | NSArray *array = [[NSArray alloc]initWithContentsOfFile:path];
95 | return array;
96 | }
97 |
98 | /**
99 | *保存字典数据到沙盒中
100 | *@arrayName
101 | */
102 | +(void)SaveDictionary:(NSDictionary *)dict andFileName:(NSString *)dictionaryName{
103 | /**
104 | 沙盒文件
105 |
106 | 每个ios应用都有自己的应用沙盒,应用沙盒就是文件系统目录,与其他应用的文件系统隔离,ios系统不允许访问其他应用的应用沙盒。在ios8中已经开放访问。
107 |
108 | 应用沙盒一般包括以下几个文件目录:应用程序包、Documents、Libaray(下面有Caches和Preferences目录)、tmp。
109 |
110 | 应用程序包:包含所有的资源文件和可执行文件。
111 |
112 | Documents:保存应用运行时生成的需要持久化的数据,iTunes会自动备份该目录。苹果建议将程序中建立的或在程序中浏览到的文件数据保存在该目录下,iTunes备份和恢复的时候会包括此目录
113 |
114 | tmp:保存应用运行时所需的临时数据,使用完毕后再将相应的文件从该目录删除。应用没有运行时,系统也有可能会清除该目录下的文件,iTunes不会同步该目录。iphone重启时,该目录下的文件会丢失。
115 |
116 | Library:存储程序的默认设置和其他状态信息,iTunes会自动备份该目录。
117 |
118 | Libaray/Caches: 存放缓存文件,iTunes不会备份此目录,此目录下文件不会在应用退出删除。一般存放体积比较大,不是特别重要的资源。
119 |
120 | Libaray/Preferences: 保存应用的所有偏好设置,ios的Settings(设置)应用会在该目录中查找应用的设置信息,iTunes会自动备份该目录。
121 |
122 | 沙盒文件目录获取代码:
123 |
124 | //Home目录
125 | NSString *homeDirectory = NSHomeDirectory();
126 |
127 | //Document目录
128 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
129 | NSString *path = [paths objectAtIndex:0];
130 |
131 | //Cache目录
132 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
133 | NSString *path = [paths objectAtIndex:0];
134 |
135 | //Libaray目录
136 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
137 | NSString *path = [paths objectAtIndex:0];
138 |
139 | //tmp目录
140 | NSString *tmpDir = NSTemporaryDirectory();
141 | */
142 |
143 | //Cache目录
144 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
145 | NSString *path = [paths objectAtIndex:0];
146 | //拼接文件名
147 | path = [path stringByAppendingPathComponent:dictionaryName];
148 |
149 | NSMutableDictionary *mDict = [NSMutableDictionary dictionaryWithDictionary:dict];
150 | //排除nsnull
151 | for (NSString *key in [mDict allKeys]) {
152 | if (mDict[key] == [NSNull null]) {
153 | [mDict setValue:@"" forKey:key];
154 | }
155 | }
156 | //保存字典元素到本地文件,以xml格式序列化存储
157 | [mDict writeToFile:path atomically:YES];
158 | }
159 | /**
160 | *从沙河中获取字典
161 | *@arrayName
162 | */
163 | +(NSDictionary *)getDictionaryWithFileName:(NSString *)dictionaryName{
164 | //Cache目录
165 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
166 | NSString *path = [paths objectAtIndex:0];
167 | //拼接文件名
168 | path = [path stringByAppendingPathComponent:dictionaryName];
169 | //读取本地文件,反序列化为数组
170 | NSDictionary *dict = [[NSDictionary alloc]initWithContentsOfFile:path];
171 | return dict;
172 | }
173 |
174 | /**
175 | *保存对象数据到沙盒中
176 | *@modelName
177 | */
178 | +(void)SaveModel:(id)model andFileName:(NSString *)modelName{
179 |
180 | //Cache目录
181 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
182 | NSString *path = [paths objectAtIndex:0];
183 | //拼接文件名
184 | path = [path stringByAppendingPathComponent:modelName];
185 |
186 | //将自定义的对象保存到文件中
187 | [NSKeyedArchiver archiveRootObject:model toFile:path];
188 |
189 | }
190 |
191 | /**
192 | *从沙盒中获取对象
193 | *@modelName
194 | */
195 | +(id)getModelWithFileName:(NSString *)modelName{
196 |
197 | //Cache目录
198 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
199 | NSString *path = [paths objectAtIndex:0];
200 | //拼接文件名
201 | path = [path stringByAppendingPathComponent:modelName];
202 |
203 | //获取对象
204 | id model = [NSKeyedUnarchiver unarchiveObjectWithFile:path];
205 |
206 | return model;
207 | }
208 |
209 | /**
210 | *清空缓存文件夹
211 | */
212 | +(void)cleanCache{
213 | //GCD异步操作
214 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
215 | //Cache目录
216 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
217 | NSString *path = [paths objectAtIndex:0];
218 | //获取到缓存目录的文件
219 | NSArray *files = [[NSFileManager defaultManager] subpathsAtPath:path];
220 | //一共几个文件
221 | NSLog(@"files :%ld",[files count]);
222 | //遍历删除各个文件
223 | for ( NSString *subPath in files) {
224 | NSError *error;
225 | //拼接路径
226 | NSString *fullPath = [path stringByAppendingPathComponent:subPath];
227 | //如果存在临时文件
228 | if([[NSFileManager defaultManager] fileExistsAtPath:fullPath]) {
229 | //删除文件
230 | [[NSFileManager defaultManager] removeItemAtPath:fullPath error:&error];
231 | }
232 | }
233 | });
234 | }
235 |
236 | @end
237 |
--------------------------------------------------------------------------------
/yoyo/city.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | cities
7 |
8 | 通州
9 | 房山
10 | 昌平
11 | 顺义
12 | 怀柔
13 | 大兴
14 | 密云
15 | 平谷
16 | 延庆
17 | 东城
18 | 崇文
19 | 西城
20 | 朝阳
21 | 宣武
22 | 石景山
23 | 丰台
24 | 门头沟
25 | 海淀
26 |
27 | state
28 | 北京
29 |
30 |
31 | cities
32 |
33 | 普陀
34 | 闸北
35 | 虹口
36 | 杨浦
37 | 卢湾
38 | 徐汇
39 | 长宁
40 | 静安
41 | 黄浦
42 | 金山
43 | 浦东新
44 | 嘉定
45 | 闵行
46 | 宝山
47 | 南汇
48 | 青浦
49 | 松江
50 | 奉贤
51 | 崇明
52 |
53 | state
54 | 上海
55 |
56 |
57 | cities
58 |
59 | 武清
60 | 河东
61 | 和平
62 | 西青
63 | 津南
64 | 大港
65 | 东丽
66 | 塘沽
67 | 汉沽
68 | 河北
69 | 红桥
70 | 河西
71 | 南开
72 | 蓟县
73 | 宁河
74 | 静海
75 | 宝坻
76 | 北辰
77 |
78 | state
79 | 天津
80 |
81 |
82 | cities
83 |
84 | 开县
85 | 江北
86 | 沙坪坝
87 | 九龙坡
88 | 南岸
89 | 北碚
90 | 万盛
91 | 双桥
92 | 渝北
93 | 巴南
94 | 黔江
95 | 垫江
96 | 武隆
97 | 巫山
98 | 巫溪
99 | 云阳
100 | 奉节
101 | 忠县
102 | 梁平
103 | 璧山
104 | 荣昌
105 | 大足
106 | 铜梁
107 | 潼南
108 | 綦江
109 | 长寿
110 | 彭水
111 | 酉阳
112 | 合川
113 | 江津
114 | 南川
115 | 永川
116 | 丰都
117 | 城口
118 | 大渡口
119 | 渝中
120 | 涪陵
121 | 万州
122 | 石柱
123 | 秀山
124 |
125 | state
126 | 重庆
127 |
128 |
129 | cities
130 |
131 | 丽水
132 | 舟山
133 | 宁波
134 | 衢州
135 | 温州
136 | 杭州
137 | 台州
138 | 嘉兴
139 | 绍兴
140 | 金华
141 | 湖州
142 |
143 | state
144 | 浙江
145 |
146 |
147 | cities
148 |
149 | 珠海
150 | 惠州
151 | 清远
152 | 韶关
153 | 江门
154 | 揭阳
155 | 云浮
156 | 佛山
157 | 广州
158 | 深圳
159 | 河源
160 | 汕头
161 | 汕尾
162 | 茂名
163 | 肇庆
164 | 东莞
165 | 湛江
166 | 潮州
167 | 阳江
168 | 中山
169 | 梅州
170 |
171 | state
172 | 广东
173 |
174 |
175 | cities
176 |
177 | 连云港
178 | 盐城
179 | 无锡
180 | 宿迁
181 | 扬州
182 | 镇江
183 | 南京
184 | 徐州
185 | 泰州
186 | 南通
187 | 常州
188 | 淮安
189 | 苏州
190 |
191 | state
192 | 江苏
193 |
194 |
195 | cities
196 |
197 | 淄博
198 | 烟台
199 | 日照
200 | 荷泽
201 | 潍坊
202 | 济南
203 | 济宁
204 | 青岛
205 | 临沂
206 | 威海
207 | 莱芜
208 | 泰安
209 | 东营
210 | 聊城
211 | 枣庄
212 | 滨州
213 | 德州
214 |
215 | state
216 | 山东
217 |
218 |
219 | cities
220 |
221 | 南平
222 | 厦门
223 | 福州
224 | 宁德
225 | 龙岩
226 | 莆田
227 | 漳州
228 | 泉州
229 | 三明
230 |
231 | state
232 | 福建
233 |
234 |
235 | cities
236 |
237 | 淮南
238 | 黄山
239 | 蚌埠
240 | 合肥
241 | 宿州
242 | 六安
243 | 池州
244 | 芜湖
245 | 宣城
246 | 巢湖
247 | 亳州
248 | 阜阳
249 | 铜陵
250 | 淮北
251 | 滁州
252 | 马鞍山
253 | 安庆
254 |
255 | state
256 | 安徽
257 |
258 |
259 | cities
260 |
261 | 宜宾
262 | 巴中
263 | 南充
264 | 成都
265 | 凉山彝族
266 | 眉山
267 | 阿坝
268 | 乐山
269 | 绵阳
270 | 广安
271 | 广元
272 | 德阳
273 | 资阳
274 | 达州
275 | 泸州
276 | 自贡
277 | 遂宁
278 | 甘孜藏族
279 | 雅安
280 | 内江
281 | 攀枝花
282 |
283 | state
284 | 四川
285 |
286 |
287 | cities
288 |
289 | 咸宁
290 | 宜昌
291 | 黄冈
292 | 荆州
293 | 孝感
294 | 荆门
295 | 十堰
296 | 鄂州
297 | 天门
298 | 潜江
299 | 恩施
300 | 武汉
301 | 仙桃
302 | 神农架林
303 | 随州
304 | 黄石
305 | 襄樊
306 |
307 | state
308 | 湖北
309 |
310 |
311 | cities
312 |
313 | 张家口
314 | 邯郸
315 | 邢台
316 | 衡水
317 | 秦皇岛
318 | 廊坊
319 | 保定
320 | 承德
321 | 唐山
322 | 沧州
323 | 石家庄
324 |
325 | state
326 | 河北
327 |
328 |
329 | cities
330 |
331 | 德宏
332 | 玉溪
333 | 曲靖
334 | 保山
335 | 怒江
336 | 迪庆
337 | 昭通
338 | 昆明
339 | 楚雄
340 | 文山
341 | 西双版纳
342 | 丽江
343 | 红河
344 | 大理
345 | 临沧
346 | 思茅
347 |
348 | state
349 | 云南
350 |
351 |
352 | cities
353 |
354 | 鹤岗
355 | 大兴安岭地
356 | 大庆
357 | 七台河
358 | 齐齐哈尔
359 | 牡丹江
360 | 黑河
361 | 双鸭山
362 | 绥化
363 | 伊春
364 | 佳木斯
365 | 哈尔滨
366 | 鸡西
367 |
368 | state
369 | 黑龙江
370 |
371 |
372 | cities
373 |
374 | 松原
375 | 四平
376 | 白城
377 | 白山
378 | 吉林
379 | 通化
380 | 长春
381 | 延边朝鲜族
382 | 辽源
383 |
384 | state
385 | 吉林
386 |
387 |
388 | cities
389 |
390 | 铁岭
391 | 葫芦岛
392 | 营口
393 | 本溪
394 | 辽阳
395 | 盘锦
396 | 阜新
397 | 朝阳
398 | 锦州
399 | 抚顺
400 | 丹东
401 | 沈阳
402 | 鞍山
403 | 大连
404 |
405 | state
406 | 辽宁
407 |
408 |
409 | cities
410 |
411 | 保亭
412 | 澄迈
413 | 南沙群岛
414 | 陵水黎族
415 | 中沙群岛
416 | 屯昌
417 | 昌江黎族
418 | 乐东黎族
419 | 琼海
420 | 儋州
421 | 文昌
422 | 万宁
423 | 白沙黎族
424 | 海口
425 | 三亚
426 | 五指山
427 | 琼中
428 | 东方
429 | 定安
430 | 西沙群岛
431 | 临高
432 |
433 | state
434 | 海南
435 |
436 |
437 | cities
438 |
439 | 郴州
440 | 岳阳
441 | 怀化
442 | 娄底
443 | 张家界
444 | 益阳
445 | 湘西土家族苗族
446 | 常德
447 | 湘潭
448 | 永州
449 | 衡阳
450 | 株洲
451 | 长沙
452 | 邵阳
453 |
454 | state
455 | 湖南
456 |
457 |
458 | cities
459 |
460 | 南阳
461 | 洛阳
462 | 三门峡
463 | 商丘
464 | 焦作
465 | 开封
466 | 驻马店
467 | 濮阳
468 | 许昌
469 | 安阳
470 | 信阳
471 | 漯河
472 | 平顶山
473 | 郑州
474 | 新乡
475 | 鹤壁
476 | 周口
477 |
478 | state
479 | 河南
480 |
481 |
482 | cities
483 |
484 | 毕节地
485 | 黔南
486 | 六盘水
487 | 黔东南
488 | 贵阳
489 | 遵义
490 | 铜仁地
491 | 黔西南
492 | 安顺
493 |
494 | state
495 | 贵州
496 |
497 |
498 | cities
499 |
500 | 南昌
501 | 萍乡
502 | 景德镇
503 | 吉安
504 | 九江
505 | 新余
506 | 鹰潭
507 | 抚州
508 | 赣州
509 | 上饶
510 | 宜春
511 |
512 | state
513 | 江西
514 |
515 |
516 | cities
517 |
518 | 贺州
519 | 梧州
520 | 河池
521 | 百色
522 | 来宾
523 | 贵港
524 | 玉林
525 | 钦州
526 | 北海
527 | 柳州
528 | 桂林
529 | 南宁
530 | 防城港
531 | 崇左
532 |
533 | state
534 | 广西
535 |
536 |
537 | cities
538 |
539 | 咸阳
540 | 铜川
541 | 商洛
542 | 榆林
543 | 渭南
544 | 汉中
545 | 安康
546 | 延安
547 | 宝鸡
548 | 西安
549 |
550 | state
551 | 陕西
552 |
553 |
554 | cities
555 |
556 | 临汾
557 | 晋中
558 | 朔州
559 | 运城
560 | 晋城
561 | 阳泉
562 | 忻州
563 | 大同
564 | 长治
565 | 太原
566 | 吕梁
567 |
568 | state
569 | 山西
570 |
571 |
572 | cities
573 |
574 | 黄南
575 | 海东地
576 | 果洛
577 | 西宁
578 | 海北
579 | 玉树
580 | 海南
581 | 海西
582 |
583 | state
584 | 青海
585 |
586 |
587 | cities
588 |
589 | 石嘴山
590 | 固原
591 | 中卫
592 | 银川
593 | 吴忠
594 |
595 | state
596 | 宁夏
597 |
598 |
599 | cities
600 |
601 | 兰州
602 | 金昌
603 | 甘南藏族
604 | 平凉
605 | 嘉峪关
606 | 天水
607 | 白银
608 | 武威
609 | 张掖
610 | 庆阳
611 | 定西
612 | 临夏回族
613 | 酒泉
614 | 陇南
615 |
616 | state
617 | 甘肃
618 |
619 |
620 | cities
621 |
622 | 阿里地
623 | 拉萨
624 | 山南地
625 | 日喀则地
626 | 那曲地
627 | 昌都地
628 | 林芝地
629 |
630 | state
631 | 西藏
632 |
633 |
634 | cities
635 |
636 | 巴彦淖尔
637 | 锡林郭勒盟
638 | 兴安盟
639 | 乌兰察布
640 | 鄂尔多斯
641 | 乌海
642 | 包头
643 | 呼和浩特
644 | 呼伦贝尔
645 | 通辽
646 | 阿拉善盟
647 | 赤峰
648 |
649 | state
650 | 内蒙古
651 |
652 |
653 | cities
654 |
655 | 伊犁
656 | 克拉玛依
657 | 哈密地
658 | 石河子
659 | 吐鲁番地
660 | 阿拉尔
661 | 阿勒泰地
662 | 乌鲁木齐
663 | 塔城地
664 | 昌吉
665 | 克孜勒
666 | 图木舒克
667 | 阿克苏地
668 | 五家渠
669 | 巴音郭楞
670 | 和田地
671 | 博尔塔拉
672 | 喀什地
673 |
674 | state
675 | 新疆
676 |
677 |
678 | cities
679 |
680 | 新竹
681 | 基隆
682 | 高雄
683 | 台北
684 | 台南
685 | 嘉义
686 | 台中
687 | 宜兰
688 | 屏东
689 | 桃园
690 | 台东
691 | 苗栗
692 | 金门
693 | 花莲
694 | 云林
695 | 连江
696 | 澎湖
697 | 南投
698 | 彰化
699 |
700 | state
701 | 台湾
702 |
703 |
704 | cities
705 |
706 | 油尖旺
707 | 黄大仙
708 | 深水埗
709 | 观塘
710 | 九龙城
711 | 湾仔
712 | 葵青
713 | 离岛
714 | 中西
715 | 南
716 | 东
717 | 荃湾
718 | 元朗
719 | 沙田
720 | 西贡
721 | 屯门
722 | 大埔
723 | 北
724 |
725 | state
726 | 香港
727 |
728 |
729 | cities
730 |
731 | 花地玛堂
732 | 圣安多尼堂
733 | 大堂
734 | 望德堂
735 | 风顺堂
736 | 嘉模堂
737 | 圣方济各堂
738 |
739 | state
740 | 澳门
741 |
742 |
743 | cities
744 |
745 | 德国
746 | 新加坡
747 | 美国
748 | 加拿大
749 | 澳大利亚
750 | 日本
751 | 英国
752 | 巴西
753 | 俄罗斯
754 | 尼日利亚
755 | 马来西亚
756 | 爱尔兰
757 | 奥地利
758 | 挪威
759 | 意大利
760 | 西班牙
761 | 泰国
762 | 芬兰
763 | 丹麦
764 | 荷兰
765 | 阿联酋
766 | 瑞典
767 | 瑞士
768 | 比利时
769 | 新西兰
770 | 法国
771 | 韩国
772 | 匈牙利
773 | 其他
774 | 越南
775 | 以色列
776 | 科威特
777 | 希腊
778 | 南非
779 | 葡萄牙
780 | 墨西哥
781 | 印尼
782 |
783 | state
784 | 国外
785 |
786 |
787 |
788 |
--------------------------------------------------------------------------------
/yoyo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | FB7186E41CDAFBC500509E75 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = FB7186E31CDAFBC500509E75 /* main.m */; };
11 | FB7186E71CDAFBC500509E75 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = FB7186E61CDAFBC500509E75 /* AppDelegate.m */; };
12 | FB7186EA1CDAFBC500509E75 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FB7186E91CDAFBC500509E75 /* ViewController.m */; };
13 | FB7186ED1CDAFBC500509E75 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FB7186EB1CDAFBC500509E75 /* Main.storyboard */; };
14 | FB7186EF1CDAFBC500509E75 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FB7186EE1CDAFBC500509E75 /* Assets.xcassets */; };
15 | FB7186F21CDAFBC500509E75 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FB7186F01CDAFBC500509E75 /* LaunchScreen.storyboard */; };
16 | FB7186FD1CDAFBC500509E75 /* yoyoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = FB7186FC1CDAFBC500509E75 /* yoyoTests.m */; };
17 | FB7187081CDAFBC500509E75 /* yoyoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = FB7187071CDAFBC500509E75 /* yoyoUITests.m */; };
18 | FB751ABD1CDC7CD500E8651D /* MultiselectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FB751ABC1CDC7CD500E8651D /* MultiselectViewController.m */; };
19 | FB751AC31CE2E00B00E8651D /* CheckViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FB751AC21CE2E00B00E8651D /* CheckViewController.m */; };
20 | FB751AC61CE310B900E8651D /* ProvinceChooseTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FB751AC51CE310B900E8651D /* ProvinceChooseTableViewController.m */; };
21 | FB751AC81CE3110000E8651D /* city.plist in Resources */ = {isa = PBXBuildFile; fileRef = FB751AC71CE3110000E8651D /* city.plist */; };
22 | FB751ACB1CE3134400E8651D /* AreaTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FB751ACA1CE3134400E8651D /* AreaTableViewController.m */; };
23 | FBCE6B5D1CE4151C00FA5006 /* CityChooseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FBCE6B5C1CE4151C00FA5006 /* CityChooseViewController.m */; };
24 | FBCE6B601CE4216600FA5006 /* TextUpViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FBCE6B5F1CE4216600FA5006 /* TextUpViewController.m */; };
25 | FBF616641CEEEA6F00279BDE /* CellHeightTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FBF616631CEEEA6F00279BDE /* CellHeightTableViewController.m */; };
26 | FBF616681CEEEAC400279BDE /* CellHeightCell.m in Sources */ = {isa = PBXBuildFile; fileRef = FBF616661CEEEAC400279BDE /* CellHeightCell.m */; };
27 | FBF616691CEEEAC400279BDE /* CellHeightCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = FBF616671CEEEAC400279BDE /* CellHeightCell.xib */; };
28 | FBF6166C1CF2A59100279BDE /* MyAnimalViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FBF6166B1CF2A59100279BDE /* MyAnimalViewController.m */; };
29 | FBF6166F1CF2A99E00279BDE /* MyCurveAnimalViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FBF6166E1CF2A99E00279BDE /* MyCurveAnimalViewController.m */; };
30 | FBF616721CF54BE500279BDE /* CircleView.m in Sources */ = {isa = PBXBuildFile; fileRef = FBF616711CF54BE500279BDE /* CircleView.m */; };
31 | FBF616751CF54CB100279BDE /* CircleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FBF616741CF54CB100279BDE /* CircleViewController.m */; };
32 | FBF616781CF5A77E00279BDE /* PieItem.m in Sources */ = {isa = PBXBuildFile; fileRef = FBF616771CF5A77E00279BDE /* PieItem.m */; };
33 | FBF6167D1CF7EDC200279BDE /* PieStroke.m in Sources */ = {isa = PBXBuildFile; fileRef = FBF6167C1CF7EDC200279BDE /* PieStroke.m */; };
34 | FBF616811CFBD46E00279BDE /* FileHandle.m in Sources */ = {isa = PBXBuildFile; fileRef = FBF616801CFBD46E00279BDE /* FileHandle.m */; };
35 | /* End PBXBuildFile section */
36 |
37 | /* Begin PBXContainerItemProxy section */
38 | FB7186F91CDAFBC500509E75 /* PBXContainerItemProxy */ = {
39 | isa = PBXContainerItemProxy;
40 | containerPortal = FB7186D71CDAFBC500509E75 /* Project object */;
41 | proxyType = 1;
42 | remoteGlobalIDString = FB7186DE1CDAFBC500509E75;
43 | remoteInfo = yoyo;
44 | };
45 | FB7187041CDAFBC500509E75 /* PBXContainerItemProxy */ = {
46 | isa = PBXContainerItemProxy;
47 | containerPortal = FB7186D71CDAFBC500509E75 /* Project object */;
48 | proxyType = 1;
49 | remoteGlobalIDString = FB7186DE1CDAFBC500509E75;
50 | remoteInfo = yoyo;
51 | };
52 | /* End PBXContainerItemProxy section */
53 |
54 | /* Begin PBXFileReference section */
55 | FB7186DF1CDAFBC500509E75 /* yoyo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = yoyo.app; sourceTree = BUILT_PRODUCTS_DIR; };
56 | FB7186E31CDAFBC500509E75 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
57 | FB7186E51CDAFBC500509E75 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
58 | FB7186E61CDAFBC500509E75 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
59 | FB7186E81CDAFBC500509E75 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
60 | FB7186E91CDAFBC500509E75 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
61 | FB7186EC1CDAFBC500509E75 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
62 | FB7186EE1CDAFBC500509E75 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
63 | FB7186F11CDAFBC500509E75 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
64 | FB7186F31CDAFBC500509E75 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
65 | FB7186F81CDAFBC500509E75 /* yoyoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = yoyoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
66 | FB7186FC1CDAFBC500509E75 /* yoyoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = yoyoTests.m; sourceTree = ""; };
67 | FB7186FE1CDAFBC500509E75 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
68 | FB7187031CDAFBC500509E75 /* yoyoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = yoyoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
69 | FB7187071CDAFBC500509E75 /* yoyoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = yoyoUITests.m; sourceTree = ""; };
70 | FB7187091CDAFBC500509E75 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
71 | FB751ABB1CDC7CD500E8651D /* MultiselectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MultiselectViewController.h; sourceTree = ""; };
72 | FB751ABC1CDC7CD500E8651D /* MultiselectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MultiselectViewController.m; sourceTree = ""; };
73 | FB751AC11CE2E00B00E8651D /* CheckViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CheckViewController.h; sourceTree = ""; };
74 | FB751AC21CE2E00B00E8651D /* CheckViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CheckViewController.m; sourceTree = ""; };
75 | FB751AC41CE310B900E8651D /* ProvinceChooseTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProvinceChooseTableViewController.h; sourceTree = ""; };
76 | FB751AC51CE310B900E8651D /* ProvinceChooseTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProvinceChooseTableViewController.m; sourceTree = ""; };
77 | FB751AC71CE3110000E8651D /* city.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = city.plist; sourceTree = ""; };
78 | FB751AC91CE3134400E8651D /* AreaTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AreaTableViewController.h; sourceTree = ""; };
79 | FB751ACA1CE3134400E8651D /* AreaTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AreaTableViewController.m; sourceTree = ""; };
80 | FBCE6B5B1CE4151C00FA5006 /* CityChooseViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CityChooseViewController.h; sourceTree = ""; };
81 | FBCE6B5C1CE4151C00FA5006 /* CityChooseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CityChooseViewController.m; sourceTree = ""; };
82 | FBCE6B5E1CE4216600FA5006 /* TextUpViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextUpViewController.h; sourceTree = ""; };
83 | FBCE6B5F1CE4216600FA5006 /* TextUpViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TextUpViewController.m; sourceTree = ""; };
84 | FBF616621CEEEA6F00279BDE /* CellHeightTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CellHeightTableViewController.h; sourceTree = ""; };
85 | FBF616631CEEEA6F00279BDE /* CellHeightTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CellHeightTableViewController.m; sourceTree = ""; };
86 | FBF616651CEEEAC400279BDE /* CellHeightCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CellHeightCell.h; sourceTree = ""; };
87 | FBF616661CEEEAC400279BDE /* CellHeightCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CellHeightCell.m; sourceTree = ""; };
88 | FBF616671CEEEAC400279BDE /* CellHeightCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CellHeightCell.xib; sourceTree = ""; };
89 | FBF6166A1CF2A59100279BDE /* MyAnimalViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyAnimalViewController.h; sourceTree = ""; };
90 | FBF6166B1CF2A59100279BDE /* MyAnimalViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyAnimalViewController.m; sourceTree = ""; };
91 | FBF6166D1CF2A99E00279BDE /* MyCurveAnimalViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyCurveAnimalViewController.h; sourceTree = ""; };
92 | FBF6166E1CF2A99E00279BDE /* MyCurveAnimalViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyCurveAnimalViewController.m; sourceTree = ""; };
93 | FBF616701CF54BE500279BDE /* CircleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CircleView.h; sourceTree = ""; };
94 | FBF616711CF54BE500279BDE /* CircleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CircleView.m; sourceTree = ""; };
95 | FBF616731CF54CB100279BDE /* CircleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CircleViewController.h; sourceTree = ""; };
96 | FBF616741CF54CB100279BDE /* CircleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CircleViewController.m; sourceTree = ""; };
97 | FBF616761CF5A77E00279BDE /* PieItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PieItem.h; sourceTree = ""; };
98 | FBF616771CF5A77E00279BDE /* PieItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PieItem.m; sourceTree = ""; };
99 | FBF6167B1CF7EDC200279BDE /* PieStroke.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PieStroke.h; sourceTree = ""; };
100 | FBF6167C1CF7EDC200279BDE /* PieStroke.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PieStroke.m; sourceTree = ""; };
101 | FBF6167F1CFBD46E00279BDE /* FileHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileHandle.h; sourceTree = ""; };
102 | FBF616801CFBD46E00279BDE /* FileHandle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FileHandle.m; sourceTree = ""; };
103 | /* End PBXFileReference section */
104 |
105 | /* Begin PBXFrameworksBuildPhase section */
106 | FB7186DC1CDAFBC500509E75 /* Frameworks */ = {
107 | isa = PBXFrameworksBuildPhase;
108 | buildActionMask = 2147483647;
109 | files = (
110 | );
111 | runOnlyForDeploymentPostprocessing = 0;
112 | };
113 | FB7186F51CDAFBC500509E75 /* Frameworks */ = {
114 | isa = PBXFrameworksBuildPhase;
115 | buildActionMask = 2147483647;
116 | files = (
117 | );
118 | runOnlyForDeploymentPostprocessing = 0;
119 | };
120 | FB7187001CDAFBC500509E75 /* Frameworks */ = {
121 | isa = PBXFrameworksBuildPhase;
122 | buildActionMask = 2147483647;
123 | files = (
124 | );
125 | runOnlyForDeploymentPostprocessing = 0;
126 | };
127 | /* End PBXFrameworksBuildPhase section */
128 |
129 | /* Begin PBXGroup section */
130 | FB7186D61CDAFBC500509E75 = {
131 | isa = PBXGroup;
132 | children = (
133 | FBF6167E1CFBD46E00279BDE /* 文件本地缓存操作 */,
134 | FB7186E11CDAFBC500509E75 /* yoyo */,
135 | FB7186FB1CDAFBC500509E75 /* yoyoTests */,
136 | FB7187061CDAFBC500509E75 /* yoyoUITests */,
137 | FB7186E01CDAFBC500509E75 /* Products */,
138 | );
139 | sourceTree = "";
140 | };
141 | FB7186E01CDAFBC500509E75 /* Products */ = {
142 | isa = PBXGroup;
143 | children = (
144 | FB7186DF1CDAFBC500509E75 /* yoyo.app */,
145 | FB7186F81CDAFBC500509E75 /* yoyoTests.xctest */,
146 | FB7187031CDAFBC500509E75 /* yoyoUITests.xctest */,
147 | );
148 | name = Products;
149 | sourceTree = "";
150 | };
151 | FB7186E11CDAFBC500509E75 /* yoyo */ = {
152 | isa = PBXGroup;
153 | children = (
154 | FB7186E51CDAFBC500509E75 /* AppDelegate.h */,
155 | FB7186E61CDAFBC500509E75 /* AppDelegate.m */,
156 | FB7186E81CDAFBC500509E75 /* ViewController.h */,
157 | FB7186E91CDAFBC500509E75 /* ViewController.m */,
158 | FB751ABB1CDC7CD500E8651D /* MultiselectViewController.h */,
159 | FB751ABC1CDC7CD500E8651D /* MultiselectViewController.m */,
160 | FB751AC11CE2E00B00E8651D /* CheckViewController.h */,
161 | FB751AC21CE2E00B00E8651D /* CheckViewController.m */,
162 | FB751AC41CE310B900E8651D /* ProvinceChooseTableViewController.h */,
163 | FB751AC51CE310B900E8651D /* ProvinceChooseTableViewController.m */,
164 | FB751AC91CE3134400E8651D /* AreaTableViewController.h */,
165 | FB751ACA1CE3134400E8651D /* AreaTableViewController.m */,
166 | FBCE6B5B1CE4151C00FA5006 /* CityChooseViewController.h */,
167 | FBCE6B5C1CE4151C00FA5006 /* CityChooseViewController.m */,
168 | FBCE6B5E1CE4216600FA5006 /* TextUpViewController.h */,
169 | FBCE6B5F1CE4216600FA5006 /* TextUpViewController.m */,
170 | FBF616621CEEEA6F00279BDE /* CellHeightTableViewController.h */,
171 | FBF616631CEEEA6F00279BDE /* CellHeightTableViewController.m */,
172 | FBF616651CEEEAC400279BDE /* CellHeightCell.h */,
173 | FBF616661CEEEAC400279BDE /* CellHeightCell.m */,
174 | FBF616671CEEEAC400279BDE /* CellHeightCell.xib */,
175 | FBF6166A1CF2A59100279BDE /* MyAnimalViewController.h */,
176 | FBF6166B1CF2A59100279BDE /* MyAnimalViewController.m */,
177 | FBF6166D1CF2A99E00279BDE /* MyCurveAnimalViewController.h */,
178 | FBF6166E1CF2A99E00279BDE /* MyCurveAnimalViewController.m */,
179 | FBF616731CF54CB100279BDE /* CircleViewController.h */,
180 | FBF616741CF54CB100279BDE /* CircleViewController.m */,
181 | FBF616701CF54BE500279BDE /* CircleView.h */,
182 | FBF616711CF54BE500279BDE /* CircleView.m */,
183 | FBF616761CF5A77E00279BDE /* PieItem.h */,
184 | FBF616771CF5A77E00279BDE /* PieItem.m */,
185 | FBF6167B1CF7EDC200279BDE /* PieStroke.h */,
186 | FBF6167C1CF7EDC200279BDE /* PieStroke.m */,
187 | FB7186EB1CDAFBC500509E75 /* Main.storyboard */,
188 | FB7186EE1CDAFBC500509E75 /* Assets.xcassets */,
189 | FB7186F01CDAFBC500509E75 /* LaunchScreen.storyboard */,
190 | FB7186F31CDAFBC500509E75 /* Info.plist */,
191 | FB751AC71CE3110000E8651D /* city.plist */,
192 | FB7186E21CDAFBC500509E75 /* Supporting Files */,
193 | );
194 | path = yoyo;
195 | sourceTree = "";
196 | };
197 | FB7186E21CDAFBC500509E75 /* Supporting Files */ = {
198 | isa = PBXGroup;
199 | children = (
200 | FB7186E31CDAFBC500509E75 /* main.m */,
201 | );
202 | name = "Supporting Files";
203 | sourceTree = "";
204 | };
205 | FB7186FB1CDAFBC500509E75 /* yoyoTests */ = {
206 | isa = PBXGroup;
207 | children = (
208 | FB7186FC1CDAFBC500509E75 /* yoyoTests.m */,
209 | FB7186FE1CDAFBC500509E75 /* Info.plist */,
210 | );
211 | path = yoyoTests;
212 | sourceTree = "";
213 | };
214 | FB7187061CDAFBC500509E75 /* yoyoUITests */ = {
215 | isa = PBXGroup;
216 | children = (
217 | FB7187071CDAFBC500509E75 /* yoyoUITests.m */,
218 | FB7187091CDAFBC500509E75 /* Info.plist */,
219 | );
220 | path = yoyoUITests;
221 | sourceTree = "";
222 | };
223 | FBF6167E1CFBD46E00279BDE /* 文件本地缓存操作 */ = {
224 | isa = PBXGroup;
225 | children = (
226 | FBF6167F1CFBD46E00279BDE /* FileHandle.h */,
227 | FBF616801CFBD46E00279BDE /* FileHandle.m */,
228 | );
229 | path = "文件本地缓存操作";
230 | sourceTree = "";
231 | };
232 | /* End PBXGroup section */
233 |
234 | /* Begin PBXNativeTarget section */
235 | FB7186DE1CDAFBC500509E75 /* yoyo */ = {
236 | isa = PBXNativeTarget;
237 | buildConfigurationList = FB71870C1CDAFBC500509E75 /* Build configuration list for PBXNativeTarget "yoyo" */;
238 | buildPhases = (
239 | FB7186DB1CDAFBC500509E75 /* Sources */,
240 | FB7186DC1CDAFBC500509E75 /* Frameworks */,
241 | FB7186DD1CDAFBC500509E75 /* Resources */,
242 | );
243 | buildRules = (
244 | );
245 | dependencies = (
246 | );
247 | name = yoyo;
248 | productName = yoyo;
249 | productReference = FB7186DF1CDAFBC500509E75 /* yoyo.app */;
250 | productType = "com.apple.product-type.application";
251 | };
252 | FB7186F71CDAFBC500509E75 /* yoyoTests */ = {
253 | isa = PBXNativeTarget;
254 | buildConfigurationList = FB71870F1CDAFBC500509E75 /* Build configuration list for PBXNativeTarget "yoyoTests" */;
255 | buildPhases = (
256 | FB7186F41CDAFBC500509E75 /* Sources */,
257 | FB7186F51CDAFBC500509E75 /* Frameworks */,
258 | FB7186F61CDAFBC500509E75 /* Resources */,
259 | );
260 | buildRules = (
261 | );
262 | dependencies = (
263 | FB7186FA1CDAFBC500509E75 /* PBXTargetDependency */,
264 | );
265 | name = yoyoTests;
266 | productName = yoyoTests;
267 | productReference = FB7186F81CDAFBC500509E75 /* yoyoTests.xctest */;
268 | productType = "com.apple.product-type.bundle.unit-test";
269 | };
270 | FB7187021CDAFBC500509E75 /* yoyoUITests */ = {
271 | isa = PBXNativeTarget;
272 | buildConfigurationList = FB7187121CDAFBC500509E75 /* Build configuration list for PBXNativeTarget "yoyoUITests" */;
273 | buildPhases = (
274 | FB7186FF1CDAFBC500509E75 /* Sources */,
275 | FB7187001CDAFBC500509E75 /* Frameworks */,
276 | FB7187011CDAFBC500509E75 /* Resources */,
277 | );
278 | buildRules = (
279 | );
280 | dependencies = (
281 | FB7187051CDAFBC500509E75 /* PBXTargetDependency */,
282 | );
283 | name = yoyoUITests;
284 | productName = yoyoUITests;
285 | productReference = FB7187031CDAFBC500509E75 /* yoyoUITests.xctest */;
286 | productType = "com.apple.product-type.bundle.ui-testing";
287 | };
288 | /* End PBXNativeTarget section */
289 |
290 | /* Begin PBXProject section */
291 | FB7186D71CDAFBC500509E75 /* Project object */ = {
292 | isa = PBXProject;
293 | attributes = {
294 | LastUpgradeCheck = 0730;
295 | ORGANIZATIONNAME = cn.yoyoy.mw;
296 | TargetAttributes = {
297 | FB7186DE1CDAFBC500509E75 = {
298 | CreatedOnToolsVersion = 7.3;
299 | };
300 | FB7186F71CDAFBC500509E75 = {
301 | CreatedOnToolsVersion = 7.3;
302 | TestTargetID = FB7186DE1CDAFBC500509E75;
303 | };
304 | FB7187021CDAFBC500509E75 = {
305 | CreatedOnToolsVersion = 7.3;
306 | TestTargetID = FB7186DE1CDAFBC500509E75;
307 | };
308 | };
309 | };
310 | buildConfigurationList = FB7186DA1CDAFBC500509E75 /* Build configuration list for PBXProject "yoyo" */;
311 | compatibilityVersion = "Xcode 3.2";
312 | developmentRegion = English;
313 | hasScannedForEncodings = 0;
314 | knownRegions = (
315 | en,
316 | Base,
317 | );
318 | mainGroup = FB7186D61CDAFBC500509E75;
319 | productRefGroup = FB7186E01CDAFBC500509E75 /* Products */;
320 | projectDirPath = "";
321 | projectRoot = "";
322 | targets = (
323 | FB7186DE1CDAFBC500509E75 /* yoyo */,
324 | FB7186F71CDAFBC500509E75 /* yoyoTests */,
325 | FB7187021CDAFBC500509E75 /* yoyoUITests */,
326 | );
327 | };
328 | /* End PBXProject section */
329 |
330 | /* Begin PBXResourcesBuildPhase section */
331 | FB7186DD1CDAFBC500509E75 /* Resources */ = {
332 | isa = PBXResourcesBuildPhase;
333 | buildActionMask = 2147483647;
334 | files = (
335 | FB7186F21CDAFBC500509E75 /* LaunchScreen.storyboard in Resources */,
336 | FB751AC81CE3110000E8651D /* city.plist in Resources */,
337 | FB7186EF1CDAFBC500509E75 /* Assets.xcassets in Resources */,
338 | FBF616691CEEEAC400279BDE /* CellHeightCell.xib in Resources */,
339 | FB7186ED1CDAFBC500509E75 /* Main.storyboard in Resources */,
340 | );
341 | runOnlyForDeploymentPostprocessing = 0;
342 | };
343 | FB7186F61CDAFBC500509E75 /* Resources */ = {
344 | isa = PBXResourcesBuildPhase;
345 | buildActionMask = 2147483647;
346 | files = (
347 | );
348 | runOnlyForDeploymentPostprocessing = 0;
349 | };
350 | FB7187011CDAFBC500509E75 /* Resources */ = {
351 | isa = PBXResourcesBuildPhase;
352 | buildActionMask = 2147483647;
353 | files = (
354 | );
355 | runOnlyForDeploymentPostprocessing = 0;
356 | };
357 | /* End PBXResourcesBuildPhase section */
358 |
359 | /* Begin PBXSourcesBuildPhase section */
360 | FB7186DB1CDAFBC500509E75 /* Sources */ = {
361 | isa = PBXSourcesBuildPhase;
362 | buildActionMask = 2147483647;
363 | files = (
364 | FB7186EA1CDAFBC500509E75 /* ViewController.m in Sources */,
365 | FBF616811CFBD46E00279BDE /* FileHandle.m in Sources */,
366 | FBF616781CF5A77E00279BDE /* PieItem.m in Sources */,
367 | FBCE6B601CE4216600FA5006 /* TextUpViewController.m in Sources */,
368 | FBF6166C1CF2A59100279BDE /* MyAnimalViewController.m in Sources */,
369 | FB7186E71CDAFBC500509E75 /* AppDelegate.m in Sources */,
370 | FBF616751CF54CB100279BDE /* CircleViewController.m in Sources */,
371 | FBF616721CF54BE500279BDE /* CircleView.m in Sources */,
372 | FB751AC61CE310B900E8651D /* ProvinceChooseTableViewController.m in Sources */,
373 | FBF6166F1CF2A99E00279BDE /* MyCurveAnimalViewController.m in Sources */,
374 | FBF616641CEEEA6F00279BDE /* CellHeightTableViewController.m in Sources */,
375 | FB751AC31CE2E00B00E8651D /* CheckViewController.m in Sources */,
376 | FB751ABD1CDC7CD500E8651D /* MultiselectViewController.m in Sources */,
377 | FB751ACB1CE3134400E8651D /* AreaTableViewController.m in Sources */,
378 | FBCE6B5D1CE4151C00FA5006 /* CityChooseViewController.m in Sources */,
379 | FB7186E41CDAFBC500509E75 /* main.m in Sources */,
380 | FBF6167D1CF7EDC200279BDE /* PieStroke.m in Sources */,
381 | FBF616681CEEEAC400279BDE /* CellHeightCell.m in Sources */,
382 | );
383 | runOnlyForDeploymentPostprocessing = 0;
384 | };
385 | FB7186F41CDAFBC500509E75 /* Sources */ = {
386 | isa = PBXSourcesBuildPhase;
387 | buildActionMask = 2147483647;
388 | files = (
389 | FB7186FD1CDAFBC500509E75 /* yoyoTests.m in Sources */,
390 | );
391 | runOnlyForDeploymentPostprocessing = 0;
392 | };
393 | FB7186FF1CDAFBC500509E75 /* Sources */ = {
394 | isa = PBXSourcesBuildPhase;
395 | buildActionMask = 2147483647;
396 | files = (
397 | FB7187081CDAFBC500509E75 /* yoyoUITests.m in Sources */,
398 | );
399 | runOnlyForDeploymentPostprocessing = 0;
400 | };
401 | /* End PBXSourcesBuildPhase section */
402 |
403 | /* Begin PBXTargetDependency section */
404 | FB7186FA1CDAFBC500509E75 /* PBXTargetDependency */ = {
405 | isa = PBXTargetDependency;
406 | target = FB7186DE1CDAFBC500509E75 /* yoyo */;
407 | targetProxy = FB7186F91CDAFBC500509E75 /* PBXContainerItemProxy */;
408 | };
409 | FB7187051CDAFBC500509E75 /* PBXTargetDependency */ = {
410 | isa = PBXTargetDependency;
411 | target = FB7186DE1CDAFBC500509E75 /* yoyo */;
412 | targetProxy = FB7187041CDAFBC500509E75 /* PBXContainerItemProxy */;
413 | };
414 | /* End PBXTargetDependency section */
415 |
416 | /* Begin PBXVariantGroup section */
417 | FB7186EB1CDAFBC500509E75 /* Main.storyboard */ = {
418 | isa = PBXVariantGroup;
419 | children = (
420 | FB7186EC1CDAFBC500509E75 /* Base */,
421 | );
422 | name = Main.storyboard;
423 | sourceTree = "";
424 | };
425 | FB7186F01CDAFBC500509E75 /* LaunchScreen.storyboard */ = {
426 | isa = PBXVariantGroup;
427 | children = (
428 | FB7186F11CDAFBC500509E75 /* Base */,
429 | );
430 | name = LaunchScreen.storyboard;
431 | sourceTree = "";
432 | };
433 | /* End PBXVariantGroup section */
434 |
435 | /* Begin XCBuildConfiguration section */
436 | FB71870A1CDAFBC500509E75 /* Debug */ = {
437 | isa = XCBuildConfiguration;
438 | buildSettings = {
439 | ALWAYS_SEARCH_USER_PATHS = NO;
440 | CLANG_ANALYZER_NONNULL = YES;
441 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
442 | CLANG_CXX_LIBRARY = "libc++";
443 | CLANG_ENABLE_MODULES = YES;
444 | CLANG_ENABLE_OBJC_ARC = YES;
445 | CLANG_WARN_BOOL_CONVERSION = YES;
446 | CLANG_WARN_CONSTANT_CONVERSION = YES;
447 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
448 | CLANG_WARN_EMPTY_BODY = YES;
449 | CLANG_WARN_ENUM_CONVERSION = YES;
450 | CLANG_WARN_INT_CONVERSION = YES;
451 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
452 | CLANG_WARN_UNREACHABLE_CODE = YES;
453 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
454 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
455 | COPY_PHASE_STRIP = NO;
456 | DEBUG_INFORMATION_FORMAT = dwarf;
457 | ENABLE_STRICT_OBJC_MSGSEND = YES;
458 | ENABLE_TESTABILITY = YES;
459 | GCC_C_LANGUAGE_STANDARD = gnu99;
460 | GCC_DYNAMIC_NO_PIC = NO;
461 | GCC_NO_COMMON_BLOCKS = YES;
462 | GCC_OPTIMIZATION_LEVEL = 0;
463 | GCC_PREPROCESSOR_DEFINITIONS = (
464 | "DEBUG=1",
465 | "$(inherited)",
466 | );
467 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
468 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
469 | GCC_WARN_UNDECLARED_SELECTOR = YES;
470 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
471 | GCC_WARN_UNUSED_FUNCTION = YES;
472 | GCC_WARN_UNUSED_VARIABLE = YES;
473 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
474 | MTL_ENABLE_DEBUG_INFO = YES;
475 | ONLY_ACTIVE_ARCH = YES;
476 | SDKROOT = iphoneos;
477 | };
478 | name = Debug;
479 | };
480 | FB71870B1CDAFBC500509E75 /* Release */ = {
481 | isa = XCBuildConfiguration;
482 | buildSettings = {
483 | ALWAYS_SEARCH_USER_PATHS = NO;
484 | CLANG_ANALYZER_NONNULL = YES;
485 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
486 | CLANG_CXX_LIBRARY = "libc++";
487 | CLANG_ENABLE_MODULES = YES;
488 | CLANG_ENABLE_OBJC_ARC = YES;
489 | CLANG_WARN_BOOL_CONVERSION = YES;
490 | CLANG_WARN_CONSTANT_CONVERSION = YES;
491 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
492 | CLANG_WARN_EMPTY_BODY = YES;
493 | CLANG_WARN_ENUM_CONVERSION = YES;
494 | CLANG_WARN_INT_CONVERSION = YES;
495 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
496 | CLANG_WARN_UNREACHABLE_CODE = YES;
497 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
498 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
499 | COPY_PHASE_STRIP = NO;
500 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
501 | ENABLE_NS_ASSERTIONS = NO;
502 | ENABLE_STRICT_OBJC_MSGSEND = YES;
503 | GCC_C_LANGUAGE_STANDARD = gnu99;
504 | GCC_NO_COMMON_BLOCKS = YES;
505 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
506 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
507 | GCC_WARN_UNDECLARED_SELECTOR = YES;
508 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
509 | GCC_WARN_UNUSED_FUNCTION = YES;
510 | GCC_WARN_UNUSED_VARIABLE = YES;
511 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
512 | MTL_ENABLE_DEBUG_INFO = NO;
513 | SDKROOT = iphoneos;
514 | VALIDATE_PRODUCT = YES;
515 | };
516 | name = Release;
517 | };
518 | FB71870D1CDAFBC500509E75 /* Debug */ = {
519 | isa = XCBuildConfiguration;
520 | buildSettings = {
521 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
522 | INFOPLIST_FILE = yoyo/Info.plist;
523 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
524 | PRODUCT_BUNDLE_IDENTIFIER = cn.yoyoy.mw.yoyo;
525 | PRODUCT_NAME = "$(TARGET_NAME)";
526 | };
527 | name = Debug;
528 | };
529 | FB71870E1CDAFBC500509E75 /* Release */ = {
530 | isa = XCBuildConfiguration;
531 | buildSettings = {
532 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
533 | INFOPLIST_FILE = yoyo/Info.plist;
534 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
535 | PRODUCT_BUNDLE_IDENTIFIER = cn.yoyoy.mw.yoyo;
536 | PRODUCT_NAME = "$(TARGET_NAME)";
537 | };
538 | name = Release;
539 | };
540 | FB7187101CDAFBC500509E75 /* Debug */ = {
541 | isa = XCBuildConfiguration;
542 | buildSettings = {
543 | BUNDLE_LOADER = "$(TEST_HOST)";
544 | INFOPLIST_FILE = yoyoTests/Info.plist;
545 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
546 | PRODUCT_BUNDLE_IDENTIFIER = cn.yoyoy.mw.yoyoTests;
547 | PRODUCT_NAME = "$(TARGET_NAME)";
548 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/yoyo.app/yoyo";
549 | };
550 | name = Debug;
551 | };
552 | FB7187111CDAFBC500509E75 /* Release */ = {
553 | isa = XCBuildConfiguration;
554 | buildSettings = {
555 | BUNDLE_LOADER = "$(TEST_HOST)";
556 | INFOPLIST_FILE = yoyoTests/Info.plist;
557 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
558 | PRODUCT_BUNDLE_IDENTIFIER = cn.yoyoy.mw.yoyoTests;
559 | PRODUCT_NAME = "$(TARGET_NAME)";
560 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/yoyo.app/yoyo";
561 | };
562 | name = Release;
563 | };
564 | FB7187131CDAFBC500509E75 /* Debug */ = {
565 | isa = XCBuildConfiguration;
566 | buildSettings = {
567 | INFOPLIST_FILE = yoyoUITests/Info.plist;
568 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
569 | PRODUCT_BUNDLE_IDENTIFIER = cn.yoyoy.mw.yoyoUITests;
570 | PRODUCT_NAME = "$(TARGET_NAME)";
571 | TEST_TARGET_NAME = yoyo;
572 | };
573 | name = Debug;
574 | };
575 | FB7187141CDAFBC500509E75 /* Release */ = {
576 | isa = XCBuildConfiguration;
577 | buildSettings = {
578 | INFOPLIST_FILE = yoyoUITests/Info.plist;
579 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
580 | PRODUCT_BUNDLE_IDENTIFIER = cn.yoyoy.mw.yoyoUITests;
581 | PRODUCT_NAME = "$(TARGET_NAME)";
582 | TEST_TARGET_NAME = yoyo;
583 | };
584 | name = Release;
585 | };
586 | /* End XCBuildConfiguration section */
587 |
588 | /* Begin XCConfigurationList section */
589 | FB7186DA1CDAFBC500509E75 /* Build configuration list for PBXProject "yoyo" */ = {
590 | isa = XCConfigurationList;
591 | buildConfigurations = (
592 | FB71870A1CDAFBC500509E75 /* Debug */,
593 | FB71870B1CDAFBC500509E75 /* Release */,
594 | );
595 | defaultConfigurationIsVisible = 0;
596 | defaultConfigurationName = Release;
597 | };
598 | FB71870C1CDAFBC500509E75 /* Build configuration list for PBXNativeTarget "yoyo" */ = {
599 | isa = XCConfigurationList;
600 | buildConfigurations = (
601 | FB71870D1CDAFBC500509E75 /* Debug */,
602 | FB71870E1CDAFBC500509E75 /* Release */,
603 | );
604 | defaultConfigurationIsVisible = 0;
605 | defaultConfigurationName = Release;
606 | };
607 | FB71870F1CDAFBC500509E75 /* Build configuration list for PBXNativeTarget "yoyoTests" */ = {
608 | isa = XCConfigurationList;
609 | buildConfigurations = (
610 | FB7187101CDAFBC500509E75 /* Debug */,
611 | FB7187111CDAFBC500509E75 /* Release */,
612 | );
613 | defaultConfigurationIsVisible = 0;
614 | defaultConfigurationName = Release;
615 | };
616 | FB7187121CDAFBC500509E75 /* Build configuration list for PBXNativeTarget "yoyoUITests" */ = {
617 | isa = XCConfigurationList;
618 | buildConfigurations = (
619 | FB7187131CDAFBC500509E75 /* Debug */,
620 | FB7187141CDAFBC500509E75 /* Release */,
621 | );
622 | defaultConfigurationIsVisible = 0;
623 | defaultConfigurationName = Release;
624 | };
625 | /* End XCConfigurationList section */
626 | };
627 | rootObject = FB7186D71CDAFBC500509E75 /* Project object */;
628 | }
629 |
--------------------------------------------------------------------------------