├── Address ├── 2.gif ├── ViewController.h ├── AddressModel.m ├── AppDelegate.h ├── AddressAreaModel.m ├── main.m ├── AddressAreaModel.h ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── AddressModel.h ├── AreaView.h ├── 2.plist ├── Info.plist ├── Base.lproj │ ├── Main.storyboard │ └── LaunchScreen.storyboard ├── AppDelegate.m ├── 3.plist ├── 1.plist ├── ViewController.m └── AreaView.m ├── Address.xcodeproj ├── xcuserdata │ └── Codeliu.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── Address.xcscheme ├── project.xcworkspace │ └── contents.xcworkspacedata └── project.pbxproj ├── AddressTests ├── Info.plist └── AddressTests.m └── AddressUITests ├── Info.plist └── AddressUITests.m /Address/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeliu6572/AddAddress/HEAD/Address/2.gif -------------------------------------------------------------------------------- /Address.xcodeproj/xcuserdata/Codeliu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /Address.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Address/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // Address 4 | // 5 | // Created by 刘浩浩 on 2017/7/29. 6 | // Copyright © 2017年 CodingFire. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AreaView.h" 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Address/AddressModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // AdressModel.m 3 | // Shihanbainian 4 | // 5 | // Created by apple on 2017/7/10. 6 | // Copyright © 2017年 Codeliu. All rights reserved. 7 | // 8 | 9 | #import "AddressModel.h" 10 | 11 | @implementation AddressModel 12 | - (void)setValue:(id)value forUndefinedKey:(NSString *)key 13 | { 14 | 15 | } 16 | @end 17 | -------------------------------------------------------------------------------- /Address/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Address 4 | // 5 | // Created by 刘浩浩 on 2017/7/29. 6 | // Copyright © 2017年 CodingFire. 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 | -------------------------------------------------------------------------------- /Address/AddressAreaModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // AddressAreaModel.m 3 | // Shihanbainian 4 | // 5 | // Created by apple on 2017/7/13. 6 | // Copyright © 2017年 Codeliu. All rights reserved. 7 | // 8 | 9 | #import "AddressAreaModel.h" 10 | 11 | @implementation AddressAreaModel 12 | - (void)setValue:(id)value forUndefinedKey:(NSString *)key 13 | { 14 | 15 | } 16 | @end 17 | -------------------------------------------------------------------------------- /Address/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Address 4 | // 5 | // Created by 刘浩浩 on 2017/7/29. 6 | // Copyright © 2017年 CodingFire. 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 | -------------------------------------------------------------------------------- /Address/AddressAreaModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // AddressAreaModel.h 3 | // Shihanbainian 4 | // 5 | // Created by apple on 2017/7/13. 6 | // Copyright © 2017年 Codeliu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AddressAreaModel : NSObject 12 | @property(nonatomic,strong)NSString *sh_id; 13 | @property(nonatomic,strong)NSString *sh_name; 14 | @property(nonatomic,strong)NSString *sh_parentid; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /AddressTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /AddressUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Address/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 | } -------------------------------------------------------------------------------- /Address/AddressModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // AdressModel.h 3 | // Shihanbainian 4 | // 5 | // Created by apple on 2017/7/10. 6 | // Copyright © 2017年 Codeliu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AddressModel : NSObject 12 | @property(nonatomic,strong)NSString *sh_address; 13 | @property(nonatomic,strong)NSString *sh_full_name; 14 | @property(nonatomic,strong)NSString *sh_area; 15 | @property(nonatomic,strong)NSString *sh_area_id; 16 | @property(nonatomic,strong)NSString *sh_city; 17 | @property(nonatomic,strong)NSString *sh_city_id; 18 | @property(nonatomic,strong)NSString *sh_id; 19 | @property(nonatomic,strong)NSString *sh_is_default; 20 | @property(nonatomic,strong)NSString *sh_mobile; 21 | @property(nonatomic,strong)NSString *sh_province; 22 | @property(nonatomic,strong)NSString *sh_province_id; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Address.xcodeproj/xcuserdata/Codeliu.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Address.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 68EF2D7D1F2C6BB70020F87F 16 | 17 | primary 18 | 19 | 20 | 68EF2D961F2C6BB70020F87F 21 | 22 | primary 23 | 24 | 25 | 68EF2DA11F2C6BB70020F87F 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Address/AreaView.h: -------------------------------------------------------------------------------- 1 | // 2 | // AreaView.h 3 | // Shihanbainian 4 | // 5 | // Created by apple on 2017/7/13. 6 | // Copyright © 2017年 Codeliu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol AreaSelectDelegate 12 | 13 | - (void)selectIndex:(NSInteger)index selectID:(NSString *)areaID; 14 | 15 | - (void)getSelectAddressInfor:(NSString *)addressInfor; 16 | @end 17 | @interface AreaView : UIView 18 | @property(nonatomic,strong)UIScrollView *areaScrollView; 19 | @property(nonatomic,strong)UIView *areaWhiteBaseView; 20 | @property(nonatomic,strong)NSMutableArray *provinceArray; 21 | @property(nonatomic,strong)NSMutableArray *cityArray; 22 | @property(nonatomic,strong)NSMutableArray *regionsArray; 23 | @property(nonatomic,strong)id address_delegate; 24 | 25 | - (void)showAreaView; 26 | - (void)hidenAreaView; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /AddressTests/AddressTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // AddressTests.m 3 | // AddressTests 4 | // 5 | // Created by 刘浩浩 on 2017/7/29. 6 | // Copyright © 2017年 CodingFire. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AddressTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation AddressTests 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 | -------------------------------------------------------------------------------- /Address/2.plist: -------------------------------------------------------------------------------- 1 | { 2 | data = { 3 | "sh_items" = ( 4 | { 5 | "sh_id" = 73; 6 | "sh_name" = "\U77f3\U5bb6\U5e84\U5e02"; 7 | "sh_parentid" = 3; 8 | }, 9 | { 10 | "sh_id" = 74; 11 | "sh_name" = "\U5510\U5c71\U5e02"; 12 | "sh_parentid" = 3; 13 | }, 14 | { 15 | "sh_id" = 75; 16 | "sh_name" = "\U79e6\U7687\U5c9b\U5e02"; 17 | "sh_parentid" = 3; 18 | }, 19 | { 20 | "sh_id" = 76; 21 | "sh_name" = "\U90af\U90f8\U5e02"; 22 | "sh_parentid" = 3; 23 | }, 24 | { 25 | "sh_id" = 77; 26 | "sh_name" = "\U90a2\U53f0\U5e02"; 27 | "sh_parentid" = 3; 28 | }, 29 | { 30 | "sh_id" = 78; 31 | "sh_name" = "\U4fdd\U5b9a\U5e02"; 32 | "sh_parentid" = 3; 33 | }, 34 | { 35 | "sh_id" = 79; 36 | "sh_name" = "\U5f20\U5bb6\U53e3\U5e02"; 37 | "sh_parentid" = 3; 38 | }, 39 | { 40 | "sh_id" = 80; 41 | "sh_name" = "\U627f\U5fb7\U5e02"; 42 | "sh_parentid" = 3; 43 | }, 44 | { 45 | "sh_id" = 81; 46 | "sh_name" = "\U8861\U6c34\U5e02"; 47 | "sh_parentid" = 3; 48 | }, 49 | { 50 | "sh_id" = 82; 51 | "sh_name" = "\U5eca\U574a\U5e02"; 52 | "sh_parentid" = 3; 53 | }, 54 | { 55 | "sh_id" = 83; 56 | "sh_name" = "\U6ca7\U5dde\U5e02"; 57 | "sh_parentid" = 3; 58 | }, 59 | ); 60 | }; 61 | } -------------------------------------------------------------------------------- /Address/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /AddressUITests/AddressUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // AddressUITests.m 3 | // AddressUITests 4 | // 5 | // Created by 刘浩浩 on 2017/7/29. 6 | // Copyright © 2017年 CodingFire. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AddressUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation AddressUITests 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 | -------------------------------------------------------------------------------- /Address/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 | -------------------------------------------------------------------------------- /Address/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 | -------------------------------------------------------------------------------- /Address/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // Address 4 | // 5 | // Created by 刘浩浩 on 2017/7/29. 6 | // Copyright © 2017年 CodingFire. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Address/3.plist: -------------------------------------------------------------------------------- 1 | { 2 | data = { 3 | "sh_items" = ( 4 | { 5 | "sh_id" = 1126; 6 | "sh_name" = "\U4e95\U9649\U53bf"; 7 | "sh_parentid" = 73; 8 | }, 9 | { 10 | "sh_id" = 1127; 11 | "sh_name" = "\U4e95\U9649\U77ff\U533a"; 12 | "sh_parentid" = 73; 13 | }, 14 | { 15 | "sh_id" = 1128; 16 | "sh_name" = "\U5143\U6c0f\U53bf"; 17 | "sh_parentid" = 73; 18 | }, 19 | { 20 | "sh_id" = 1129; 21 | "sh_name" = "\U5e73\U5c71\U53bf"; 22 | "sh_parentid" = 73; 23 | }, 24 | { 25 | "sh_id" = 1130; 26 | "sh_name" = "\U65b0\U4e50\U5e02"; 27 | "sh_parentid" = 73; 28 | }, 29 | { 30 | "sh_id" = 1131; 31 | "sh_name" = "\U65b0\U534e\U533a"; 32 | "sh_parentid" = 73; 33 | }, 34 | { 35 | "sh_id" = 1132; 36 | "sh_name" = "\U65e0\U6781\U53bf"; 37 | "sh_parentid" = 73; 38 | }, 39 | { 40 | "sh_id" = 1133; 41 | "sh_name" = "\U664b\U5dde\U5e02"; 42 | "sh_parentid" = 73; 43 | }, 44 | { 45 | "sh_id" = 1134; 46 | "sh_name" = "\U683e\U57ce\U53bf"; 47 | "sh_parentid" = 73; 48 | }, 49 | { 50 | "sh_id" = 1135; 51 | "sh_name" = "\U6865\U4e1c\U533a"; 52 | "sh_parentid" = 73; 53 | }, 54 | { 55 | "sh_id" = 1136; 56 | "sh_name" = "\U6865\U897f\U533a"; 57 | "sh_parentid" = 73; 58 | }, 59 | { 60 | "sh_id" = 1137; 61 | "sh_name" = "\U6b63\U5b9a\U53bf"; 62 | "sh_parentid" = 73; 63 | }, 64 | { 65 | "sh_id" = 1138; 66 | "sh_name" = "\U6df1\U6cfd\U53bf"; 67 | "sh_parentid" = 73; 68 | }, 69 | { 70 | "sh_id" = 1139; 71 | "sh_name" = "\U7075\U5bff\U53bf"; 72 | "sh_parentid" = 73; 73 | }, 74 | { 75 | "sh_id" = 1140; 76 | "sh_name" = "\U85c1\U57ce\U5e02"; 77 | "sh_parentid" = 73; 78 | }, 79 | { 80 | "sh_id" = 1141; 81 | "sh_name" = "\U884c\U5510\U53bf"; 82 | "sh_parentid" = 73; 83 | }, 84 | { 85 | "sh_id" = 1142; 86 | "sh_name" = "\U88d5\U534e\U533a"; 87 | "sh_parentid" = 73; 88 | }, 89 | { 90 | "sh_id" = 1143; 91 | "sh_name" = "\U8d5e\U7687\U53bf"; 92 | "sh_parentid" = 73; 93 | }, 94 | { 95 | "sh_id" = 1144; 96 | "sh_name" = "\U8d75\U53bf"; 97 | "sh_parentid" = 73; 98 | }, 99 | { 100 | "sh_id" = 1145; 101 | "sh_name" = "\U8f9b\U96c6\U5e02"; 102 | "sh_parentid" = 73; 103 | }, 104 | { 105 | "sh_id" = 1146; 106 | "sh_name" = "\U957f\U5b89\U533a"; 107 | "sh_parentid" = 73; 108 | }, 109 | { 110 | "sh_id" = 1147; 111 | "sh_name" = "\U9ad8\U9091\U53bf"; 112 | "sh_parentid" = 73; 113 | }, 114 | { 115 | "sh_id" = 1148; 116 | "sh_name" = "\U9e7f\U6cc9\U5e02"; 117 | "sh_parentid" = 73; 118 | }, 119 | ); 120 | }; 121 | } -------------------------------------------------------------------------------- /Address/1.plist: -------------------------------------------------------------------------------- 1 | { 2 | data = { 3 | "sh_items" = ( 4 | { 5 | "sh_id" = 1; 6 | "sh_name" = "\U5317\U4eac"; 7 | "sh_parentid" = 0; 8 | }, 9 | { 10 | "sh_id" = 2; 11 | "sh_name" = "\U5929\U6d25"; 12 | "sh_parentid" = 0; 13 | }, 14 | { 15 | "sh_id" = 3; 16 | "sh_name" = "\U6cb3\U5317\U7701"; 17 | "sh_parentid" = 0; 18 | }, 19 | { 20 | "sh_id" = 4; 21 | "sh_name" = "\U5c71\U897f\U7701"; 22 | "sh_parentid" = 0; 23 | }, 24 | { 25 | "sh_id" = 5; 26 | "sh_name" = "\U5185\U8499\U53e4\U81ea\U6cbb\U533a"; 27 | "sh_parentid" = 0; 28 | }, 29 | { 30 | "sh_id" = 6; 31 | "sh_name" = "\U8fbd\U5b81\U7701"; 32 | "sh_parentid" = 0; 33 | }, 34 | { 35 | "sh_id" = 7; 36 | "sh_name" = "\U5409\U6797\U7701"; 37 | "sh_parentid" = 0; 38 | }, 39 | { 40 | "sh_id" = 8; 41 | "sh_name" = "\U9ed1\U9f99\U6c5f\U7701"; 42 | "sh_parentid" = 0; 43 | }, 44 | { 45 | "sh_id" = 9; 46 | "sh_name" = "\U4e0a\U6d77"; 47 | "sh_parentid" = 0; 48 | }, 49 | { 50 | "sh_id" = 10; 51 | "sh_name" = "\U6c5f\U82cf\U7701"; 52 | "sh_parentid" = 0; 53 | }, 54 | { 55 | "sh_id" = 11; 56 | "sh_name" = "\U6d59\U6c5f\U7701"; 57 | "sh_parentid" = 0; 58 | }, 59 | { 60 | "sh_id" = 12; 61 | "sh_name" = "\U5b89\U5fbd\U7701"; 62 | "sh_parentid" = 0; 63 | }, 64 | { 65 | "sh_id" = 13; 66 | "sh_name" = "\U798f\U5efa\U7701"; 67 | "sh_parentid" = 0; 68 | }, 69 | { 70 | "sh_id" = 14; 71 | "sh_name" = "\U6c5f\U897f\U7701"; 72 | "sh_parentid" = 0; 73 | }, 74 | { 75 | "sh_id" = 15; 76 | "sh_name" = "\U5c71\U4e1c\U7701"; 77 | "sh_parentid" = 0; 78 | }, 79 | { 80 | "sh_id" = 16; 81 | "sh_name" = "\U6cb3\U5357\U7701"; 82 | "sh_parentid" = 0; 83 | }, 84 | { 85 | "sh_id" = 17; 86 | "sh_name" = "\U6e56\U5317\U7701"; 87 | "sh_parentid" = 0; 88 | }, 89 | { 90 | "sh_id" = 18; 91 | "sh_name" = "\U6e56\U5357\U7701"; 92 | "sh_parentid" = 0; 93 | }, 94 | { 95 | "sh_id" = 19; 96 | "sh_name" = "\U5e7f\U4e1c\U7701"; 97 | "sh_parentid" = 0; 98 | }, 99 | { 100 | "sh_id" = 20; 101 | "sh_name" = "\U5e7f\U897f\U58ee\U65cf\U81ea\U6cbb\U533a"; 102 | "sh_parentid" = 0; 103 | }, 104 | { 105 | "sh_id" = 21; 106 | "sh_name" = "\U6d77\U5357\U7701"; 107 | "sh_parentid" = 0; 108 | }, 109 | { 110 | "sh_id" = 22; 111 | "sh_name" = "\U91cd\U5e86"; 112 | "sh_parentid" = 0; 113 | }, 114 | { 115 | "sh_id" = 23; 116 | "sh_name" = "\U56db\U5ddd\U7701"; 117 | "sh_parentid" = 0; 118 | }, 119 | { 120 | "sh_id" = 24; 121 | "sh_name" = "\U8d35\U5dde\U7701"; 122 | "sh_parentid" = 0; 123 | }, 124 | { 125 | "sh_id" = 25; 126 | "sh_name" = "\U4e91\U5357\U7701"; 127 | "sh_parentid" = 0; 128 | }, 129 | { 130 | "sh_id" = 26; 131 | "sh_name" = "\U897f\U85cf\U81ea\U6cbb\U533a"; 132 | "sh_parentid" = 0; 133 | }, 134 | { 135 | "sh_id" = 27; 136 | "sh_name" = "\U9655\U897f\U7701"; 137 | "sh_parentid" = 0; 138 | }, 139 | { 140 | "sh_id" = 28; 141 | "sh_name" = "\U7518\U8083\U7701"; 142 | "sh_parentid" = 0; 143 | }, 144 | { 145 | "sh_id" = 29; 146 | "sh_name" = "\U9752\U6d77\U7701"; 147 | "sh_parentid" = 0; 148 | }, 149 | { 150 | "sh_id" = 30; 151 | "sh_name" = "\U5b81\U590f\U56de\U65cf\U81ea\U6cbb\U533a"; 152 | "sh_parentid" = 0; 153 | }, 154 | { 155 | "sh_id" = 31; 156 | "sh_name" = "\U65b0\U7586\U7ef4\U543e\U5c14\U81ea\U6cbb\U533a"; 157 | "sh_parentid" = 0; 158 | }, 159 | { 160 | "sh_id" = 32; 161 | "sh_name" = "\U53f0\U6e7e\U7701"; 162 | "sh_parentid" = 0; 163 | }, 164 | { 165 | "sh_id" = 33; 166 | "sh_name" = "\U9999\U6e2f\U7279\U522b\U884c\U653f\U533a"; 167 | "sh_parentid" = 0; 168 | }, 169 | { 170 | "sh_id" = 34; 171 | "sh_name" = "\U6fb3\U95e8\U7279\U522b\U884c\U653f\U533a"; 172 | "sh_parentid" = 0; 173 | }, 174 | { 175 | "sh_id" = 35; 176 | "sh_name" = "\U6d77\U5916"; 177 | "sh_parentid" = 0; 178 | }, 179 | ); 180 | }; 181 | } -------------------------------------------------------------------------------- /Address/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // Address 4 | // 5 | // Created by 刘浩浩 on 2017/7/29. 6 | // Copyright © 2017年 CodingFire. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "AddressModel.h" 11 | #import "AddressAreaModel.h" 12 | 13 | @interface ViewController () 14 | { 15 | AreaView *areaView; 16 | NSInteger areaIndex; 17 | NSMutableArray *area_dataArray1; 18 | NSMutableArray *area_dataArray2; 19 | NSMutableArray *area_dataArray3; 20 | UILabel *areaLabel; 21 | } 22 | @end 23 | CG_INLINE CGRect CGRectMakes(CGFloat x, CGFloat y, CGFloat width, CGFloat height) 24 | { 25 | CGRect rect; 26 | float secretNum = [[UIScreen mainScreen] bounds].size.width / 375; 27 | rect.origin.x = x*secretNum; rect.origin.y = y*secretNum; 28 | rect.size.width = width*secretNum; rect.size.height = height*secretNum; 29 | 30 | return rect; 31 | } 32 | @implementation ViewController 33 | 34 | - (void)viewDidLoad { 35 | [super viewDidLoad]; 36 | // Do any additional setup after loading the view, typically from a nib. 37 | areaIndex = 0; 38 | area_dataArray1 = [[NSMutableArray alloc]init]; 39 | area_dataArray2 = [[NSMutableArray alloc]init]; 40 | area_dataArray3 = [[NSMutableArray alloc]init]; 41 | 42 | areaLabel = [[UILabel alloc]initWithFrame:self.view.bounds]; 43 | areaLabel.numberOfLines = 0; 44 | areaLabel.textAlignment = NSTextAlignmentCenter; 45 | [self.view addSubview:areaLabel]; 46 | 47 | } 48 | #pragma mark - AreaSelectDelegate 49 | - (void)selectIndex:(NSInteger)index selectID:(NSString *)areaID 50 | { 51 | areaIndex = index; 52 | switch (areaIndex) { 53 | case 1: 54 | [area_dataArray2 removeAllObjects]; 55 | break; 56 | case 2: 57 | [area_dataArray3 removeAllObjects]; 58 | break; 59 | default: 60 | break; 61 | } 62 | [self requestAllAreaName]; 63 | } 64 | - (void)getSelectAddressInfor:(NSString *)addressInfor 65 | { 66 | areaLabel.text = addressInfor; 67 | } 68 | 69 | 70 | 71 | #pragma mark - requestAllAreaName 72 | - (void)requestAllAreaName 73 | { 74 | if (!areaView) { 75 | areaView = [[AreaView alloc]initWithFrame:CGRectMakes(0, 0, 375, 667)]; 76 | areaView.hidden = YES; 77 | areaView.address_delegate = self; 78 | [[UIApplication sharedApplication].keyWindow addSubview:areaView]; 79 | } 80 | NSString *path = [[NSBundle mainBundle]pathForResource:[NSString stringWithFormat:@"%ld",areaIndex + 1] ofType:@"plist"]; 81 | NSMutableDictionary *plistDic=[NSMutableDictionary dictionaryWithContentsOfFile:path]; 82 | 83 | for (NSDictionary *sh_dic in plistDic[@"data"][@"sh_items"]) { 84 | AddressAreaModel *addressAreaModel = [[AddressAreaModel alloc]init]; 85 | [addressAreaModel setValuesForKeysWithDictionary:sh_dic]; 86 | switch (areaIndex) { 87 | case 0: 88 | [area_dataArray1 addObject:addressAreaModel]; 89 | break; 90 | case 1: 91 | [area_dataArray2 addObject:addressAreaModel]; 92 | break; 93 | case 2: 94 | [area_dataArray3 addObject:addressAreaModel]; 95 | break; 96 | default: 97 | break; 98 | } 99 | } 100 | switch (areaIndex) { 101 | case 0: 102 | { 103 | [areaView showAreaView]; 104 | [areaView setProvinceArray:area_dataArray1]; 105 | } 106 | break; 107 | case 1: 108 | [areaView setCityArray:area_dataArray2]; 109 | break; 110 | case 2: 111 | [areaView setRegionsArray:area_dataArray3]; 112 | break; 113 | default: 114 | break; 115 | } 116 | 117 | } 118 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 119 | { 120 | if (!areaView) { 121 | [self requestAllAreaName]; 122 | } 123 | else 124 | [areaView showAreaView]; 125 | 126 | 127 | } 128 | 129 | - (void)didReceiveMemoryWarning { 130 | [super didReceiveMemoryWarning]; 131 | // Dispose of any resources that can be recreated. 132 | } 133 | 134 | 135 | @end 136 | -------------------------------------------------------------------------------- /Address.xcodeproj/xcuserdata/Codeliu.xcuserdatad/xcschemes/Address.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 | -------------------------------------------------------------------------------- /Address/AreaView.m: -------------------------------------------------------------------------------- 1 | // 2 | // AreaView.m 3 | // Shihanbainian 4 | // 5 | // Created by apple on 2017/7/13. 6 | // Copyright © 2017年 Codeliu. All rights reserved. 7 | // 8 | 9 | #import "AreaView.h" 10 | #import "AddressAreaModel.h" 11 | @implementation AreaView 12 | { 13 | UIView *blackBaseView; 14 | CGFloat btn1Height; 15 | CGFloat btn2Height; 16 | CGFloat btn3Height; 17 | } 18 | CG_INLINE CGRect CGRectMakes(CGFloat x, CGFloat y, CGFloat width, CGFloat height) 19 | { 20 | CGRect rect; 21 | float secretNum = [[UIScreen mainScreen] bounds].size.width / 375; 22 | rect.origin.x = x*secretNum; rect.origin.y = y*secretNum; 23 | rect.size.width = width*secretNum; rect.size.height = height*secretNum; 24 | 25 | return rect; 26 | } 27 | 28 | #define RGBCOLOR(r,g,b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1] 29 | #define HTFont(s) [UIFont fontWithName:@"Helvetica-Light" size:s / 2 * MULPITLE] 30 | #define MULPITLE [[UIScreen mainScreen] bounds].size.width / 375 31 | 32 | - (instancetype)initWithFrame:(CGRect)frame 33 | { 34 | self = [super initWithFrame:frame]; 35 | if (self) { 36 | self.autoresizesSubviews = NO; 37 | _provinceArray = [[NSMutableArray alloc]init]; 38 | _cityArray = [[NSMutableArray alloc]init]; 39 | _regionsArray = [[NSMutableArray alloc]init]; 40 | 41 | [self creatBaseUI]; 42 | } 43 | return self; 44 | } 45 | 46 | 47 | - (void)creatBaseUI 48 | { 49 | blackBaseView = [[UIView alloc]initWithFrame:self.bounds]; 50 | blackBaseView.backgroundColor = [UIColor blackColor]; 51 | blackBaseView.alpha = 0; 52 | [self addSubview:blackBaseView]; 53 | 54 | _areaWhiteBaseView = [[UIView alloc]initWithFrame:CGRectMakes(0, 667, 375, 380)]; 55 | _areaWhiteBaseView.backgroundColor = [UIColor whiteColor]; 56 | 57 | [self addSubview:_areaWhiteBaseView]; 58 | 59 | UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMakes(0, 0, 375, 50)]; 60 | titleLabel.text = @"所在地"; 61 | titleLabel.textColor = RGBCOLOR(0, 0, 34); 62 | titleLabel.font = HTFont(34); 63 | titleLabel.textAlignment = NSTextAlignmentCenter; 64 | [_areaWhiteBaseView addSubview:titleLabel]; 65 | 66 | for (int i = 0; i < 3; i++) { 67 | UIButton *areaBtn = [UIButton buttonWithType:UIButtonTypeSystem]; 68 | areaBtn.frame = CGRectMakes(80 * i, 50, 80, 30); 69 | [areaBtn setTitleColor:RGBCOLOR(34, 34, 34) forState:UIControlStateNormal]; 70 | areaBtn.tag = 100 + i; 71 | [areaBtn setTitle:@"" forState:UIControlStateNormal]; 72 | [areaBtn addTarget:self action:@selector(areaBtnAction:) forControlEvents:UIControlEventTouchUpInside]; 73 | areaBtn.userInteractionEnabled = NO; 74 | [_areaWhiteBaseView addSubview:areaBtn]; 75 | 76 | UIView *lineView = [[UIView alloc]initWithFrame:CGRectMakes(80 * i + 10, 78, 60, 2)]; 77 | lineView.backgroundColor = RGBCOLOR(204, 54, 60); 78 | [_areaWhiteBaseView addSubview:lineView]; 79 | lineView.tag = 300 + i; 80 | lineView.hidden = YES; 81 | if (i == 0) { 82 | areaBtn.userInteractionEnabled = YES; 83 | [areaBtn setTitle:@"请选择" forState:UIControlStateNormal]; 84 | [areaBtn setTitleColor:RGBCOLOR(204, 54, 60) forState:UIControlStateNormal]; 85 | lineView.hidden = NO; 86 | } 87 | } 88 | 89 | _areaScrollView = [[UIScrollView alloc]initWithFrame:CGRectMakes(0, 80, 375, 300)]; 90 | _areaScrollView.delegate = self; 91 | _areaScrollView.contentSize = CGSizeMake(375 * MULPITLE * 1, 300 * MULPITLE); 92 | _areaScrollView.pagingEnabled = YES; 93 | _areaScrollView.showsVerticalScrollIndicator = NO; 94 | _areaScrollView.showsHorizontalScrollIndicator = NO; 95 | [_areaWhiteBaseView addSubview:_areaScrollView]; 96 | 97 | for (int i = 0; i < 3; i++) { 98 | UITableView *area_tableView = [[UITableView alloc]initWithFrame:CGRectMakes(375 * i, 0, 375, 300) style:UITableViewStylePlain]; 99 | area_tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 100 | area_tableView.delegate = self; 101 | area_tableView.dataSource = self; 102 | area_tableView.tag = 200 + i; 103 | [_areaScrollView addSubview:area_tableView]; 104 | } 105 | 106 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapHidenGes)]; 107 | [blackBaseView addGestureRecognizer:tap]; 108 | } 109 | #pragma mark - tapHidenGes 110 | - (void)tapHidenGes 111 | { 112 | [self hidenAreaView]; 113 | } 114 | #pragma mark - areaBtnAction 115 | - (void)areaBtnAction:(UIButton *)btn 116 | { 117 | for (UIView *view in _areaWhiteBaseView.subviews) { 118 | if (view.tag >= 300) { 119 | view.hidden = YES; 120 | } 121 | } 122 | UIView *lineView = [_areaWhiteBaseView viewWithTag:300 + btn.tag - 100]; 123 | lineView.hidden = NO; 124 | [UIView animateWithDuration:0.5 animations:^{ 125 | _areaScrollView.contentOffset = CGPointMake(375 * MULPITLE * (btn.tag - 100), 0); 126 | }]; 127 | } 128 | - (void)setProvinceArray:(NSMutableArray *)provinceArray 129 | { 130 | _provinceArray = provinceArray; 131 | UITableView *tableView = [_areaScrollView viewWithTag:200]; 132 | [tableView reloadData]; 133 | } 134 | - (void)setCityArray:(NSMutableArray *)cityArray 135 | { 136 | _cityArray = cityArray; 137 | UITableView *tableView = [_areaScrollView viewWithTag:201]; 138 | [tableView reloadData]; 139 | _areaScrollView.contentSize = CGSizeMake(375 * MULPITLE * 2, 300 * MULPITLE); 140 | [UIView animateWithDuration:0.5 animations:^{ 141 | _areaScrollView.contentOffset = CGPointMake(375 * MULPITLE, 0); 142 | }]; 143 | } 144 | - (void)setRegionsArray:(NSMutableArray *)regionsArray 145 | { 146 | _regionsArray = regionsArray; 147 | UITableView *tableView = [_areaScrollView viewWithTag:202]; 148 | [tableView reloadData]; 149 | _areaScrollView.contentSize = CGSizeMake(375 * MULPITLE * 3, 300 * MULPITLE); 150 | [UIView animateWithDuration:0.5 animations:^{ 151 | _areaScrollView.contentOffset = CGPointMake(375 * 2 * MULPITLE, 0); 152 | }]; 153 | } 154 | 155 | #pragma mark - UITableViewDelegate 156 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 157 | { 158 | switch (tableView.tag - 200) { 159 | case 0: 160 | { 161 | return _provinceArray.count; 162 | } 163 | break; 164 | case 1: 165 | { 166 | return _cityArray.count; 167 | } 168 | break; 169 | case 2: 170 | { 171 | return _regionsArray.count; 172 | } 173 | break; 174 | default: 175 | break; 176 | } 177 | return 0; 178 | } 179 | 180 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 181 | { 182 | return 44 * MULPITLE; 183 | } 184 | 185 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 186 | { 187 | UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"area_cell"]; 188 | if (!cell) { 189 | cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"area_cell"]; 190 | } 191 | cell.selectedBackgroundView = [[UIView alloc] initWithFrame:cell.frame]; 192 | cell.selectedBackgroundView.backgroundColor = RGBCOLOR(255,238,238); 193 | cell.textLabel.highlightedTextColor = RGBCOLOR(204, 54, 60); 194 | switch (tableView.tag - 200) { 195 | case 0: 196 | { 197 | AddressAreaModel *addressAreaModel = _provinceArray[indexPath.row]; 198 | cell.textLabel.text = addressAreaModel.sh_name; 199 | cell.textLabel.font = HTFont(28); 200 | cell.textLabel.textColor = RGBCOLOR(102, 102, 102); 201 | } 202 | break; 203 | case 1: 204 | { 205 | AddressAreaModel *addressAreaModel = _cityArray[indexPath.row]; 206 | cell.textLabel.text = addressAreaModel.sh_name; 207 | cell.textLabel.font = HTFont(28); 208 | cell.textLabel.textColor = RGBCOLOR(102, 102, 102); 209 | } 210 | break; 211 | case 2: 212 | { 213 | AddressAreaModel *addressAreaModel = _regionsArray[indexPath.row]; 214 | cell.textLabel.text = addressAreaModel.sh_name; 215 | cell.textLabel.font = HTFont(28); 216 | cell.textLabel.textColor = RGBCOLOR(102, 102, 102); 217 | } 218 | break; 219 | default: 220 | break; 221 | } 222 | 223 | 224 | 225 | return cell; 226 | } 227 | 228 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 229 | { 230 | UIButton *btn1 = [_areaWhiteBaseView viewWithTag:100]; 231 | UIButton *btn2 = [_areaWhiteBaseView viewWithTag:101]; 232 | UIButton *btn3 = [_areaWhiteBaseView viewWithTag:102]; 233 | 234 | for (UIView *view in _areaWhiteBaseView.subviews) { 235 | if (view.tag >= 300) { 236 | view.hidden = YES; 237 | } 238 | } 239 | 240 | UIView *lineView1 = [_areaWhiteBaseView viewWithTag:300]; 241 | UIView *lineView2 = [_areaWhiteBaseView viewWithTag:301]; 242 | UIView *lineView3 = [_areaWhiteBaseView viewWithTag:302]; 243 | switch (tableView.tag - 200) { 244 | case 0: 245 | { 246 | AddressAreaModel *addressAreaModel = _provinceArray[indexPath.row]; 247 | btn1Height = [AreaView getLabelWidth:addressAreaModel.sh_name font:30 height:30] + 20; 248 | [btn1 setTitle:addressAreaModel.sh_name forState:UIControlStateNormal]; 249 | [btn1 setTitleColor:RGBCOLOR(34, 34, 34) forState:UIControlStateNormal]; 250 | btn1.frame = CGRectMakes(0, 50, btn1Height, 30); 251 | btn2.frame = CGRectMakes(btn1Height, 50, 80, 30); 252 | btn1.userInteractionEnabled = YES; 253 | btn2.userInteractionEnabled = YES; 254 | btn3.userInteractionEnabled = NO; 255 | [btn2 setTitle:@"请选择" forState:UIControlStateNormal]; 256 | [btn2 setTitleColor:RGBCOLOR(204, 54, 60) forState:UIControlStateNormal]; 257 | [btn3 setTitle:@"" forState:UIControlStateNormal]; 258 | 259 | lineView2.hidden = NO; 260 | lineView1.frame = CGRectMakes(10, 78, btn1Height - 20, 2); 261 | lineView2.frame = CGRectMakes(btn1Height + 10, 78, 80 - 20, 2); 262 | if ([self.address_delegate respondsToSelector:@selector(selectIndex:selectID:)]) { 263 | [self.address_delegate selectIndex:1 selectID:addressAreaModel.sh_id]; 264 | } 265 | } 266 | break; 267 | case 1: 268 | { 269 | AddressAreaModel *addressAreaModel = _cityArray[indexPath.row]; 270 | btn2Height = [AreaView getLabelWidth:addressAreaModel.sh_name font:30 height:30] + 20; 271 | [btn2 setTitle:addressAreaModel.sh_name forState:UIControlStateNormal]; 272 | [btn2 setTitleColor:RGBCOLOR(34, 34, 34) forState:UIControlStateNormal]; 273 | [btn3 setTitle:@"请选择" forState:UIControlStateNormal]; 274 | [btn3 setTitleColor:RGBCOLOR(204, 54, 60) forState:UIControlStateNormal]; 275 | lineView3.hidden = NO; 276 | lineView2.frame = CGRectMakes(btn1Height + 10, 78, btn2Height - 20, 2); 277 | lineView3.frame = CGRectMakes(btn1Height + btn2Height + 10, 78, 80 - 20, 2); 278 | btn3.userInteractionEnabled = YES; 279 | btn2.frame = CGRectMakes(btn1Height, 50, btn2Height, 30); 280 | btn3.frame = CGRectMakes(btn1Height + btn2Height, 50, 80, 30); 281 | 282 | 283 | if ([self.address_delegate respondsToSelector:@selector(selectIndex:selectID:)]) { 284 | [self.address_delegate selectIndex:2 selectID:addressAreaModel.sh_id]; 285 | } 286 | } 287 | break; 288 | case 2: 289 | { 290 | AddressAreaModel *addressAreaModel = _regionsArray[indexPath.row]; 291 | btn3Height = [AreaView getLabelWidth:addressAreaModel.sh_name font:30 height:30] + 20; 292 | [btn3 setTitle:addressAreaModel.sh_name forState:UIControlStateNormal]; 293 | [btn3 setTitleColor:RGBCOLOR(34, 34, 34) forState:UIControlStateNormal]; 294 | lineView3.hidden = NO; 295 | if (btn1Height + btn2Height + btn3Height > 375) { 296 | btn3Height = 375 - (btn1Height + btn2Height); 297 | } 298 | lineView3.frame = CGRectMakes(btn1Height + btn2Height + 10, 78, btn3Height - 20, 2); 299 | btn3.frame = CGRectMakes(btn1Height + btn2Height, 50, btn3Height, 30); 300 | [self hidenAreaView]; 301 | } 302 | break; 303 | default: 304 | break; 305 | } 306 | 307 | } 308 | 309 | #pragma mark - UIScrollViewDelegate 310 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView 311 | { 312 | for (UIView *view in _areaWhiteBaseView.subviews) { 313 | if (view.tag >= 300) { 314 | view.hidden = YES; 315 | } 316 | } 317 | if (scrollView == _areaScrollView) { 318 | UIView *lineView = [_areaWhiteBaseView viewWithTag:300 + scrollView.contentOffset.x / (375 * MULPITLE)]; 319 | lineView.hidden = NO; 320 | } 321 | 322 | 323 | } 324 | #pragma mark - showAreaView 325 | - (void)showAreaView 326 | { 327 | self.hidden = NO; 328 | [UIView animateWithDuration:0.25 animations:^{ 329 | blackBaseView.alpha = 0.6; 330 | _areaWhiteBaseView.frame = CGRectMakes(0, 667 - 380, 375, 380); 331 | }]; 332 | } 333 | 334 | #pragma mark - hidenAreaView 335 | - (void)hidenAreaView 336 | { 337 | UIButton *btn1 = [_areaWhiteBaseView viewWithTag:100]; 338 | UIButton *btn2 = [_areaWhiteBaseView viewWithTag:101]; 339 | UIButton *btn3 = [_areaWhiteBaseView viewWithTag:102]; 340 | 341 | [UIView animateWithDuration:0.25 animations:^{ 342 | blackBaseView.alpha = 0; 343 | _areaWhiteBaseView.frame = CGRectMakes(0, 667, 375, 380); 344 | }completion:^(BOOL finished) { 345 | self.hidden = YES; 346 | if ([self.address_delegate respondsToSelector:@selector(getSelectAddressInfor:)]) { 347 | [self.address_delegate getSelectAddressInfor:[NSString stringWithFormat:@"%@%@%@",btn1.titleLabel.text,btn2.titleLabel.text,btn3.titleLabel.text]]; 348 | } 349 | }]; 350 | } 351 | + (CGFloat)getLabelWidth:(NSString *)textStr font:(CGFloat)fontSize height:(CGFloat)labelHeight 352 | { 353 | NSMutableParagraphStyle *paraStyle = [[NSMutableParagraphStyle alloc] init]; 354 | paraStyle.alignment = NSTextAlignmentLeft; 355 | paraStyle.lineSpacing = 5 * MULPITLE; //设置行间距 356 | paraStyle.hyphenationFactor = 1.0; 357 | paraStyle.firstLineHeadIndent = 0.0; 358 | paraStyle.paragraphSpacingBefore = 0.0; 359 | paraStyle.headIndent = 0; 360 | paraStyle.tailIndent = 0; 361 | paraStyle.lineBreakMode = NSLineBreakByCharWrapping; 362 | NSDictionary *attribute = @{NSFontAttributeName: HTFont(fontSize),NSParagraphStyleAttributeName:paraStyle}; 363 | CGSize size = [textStr boundingRectWithSize:CGSizeMake(1000, labelHeight) options:NSStringDrawingUsesLineFragmentOrigin attributes:attribute context:nil].size; 364 | return size.width; 365 | } 366 | 367 | 368 | @end 369 | -------------------------------------------------------------------------------- /Address.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 68EF2D831F2C6BB70020F87F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 68EF2D821F2C6BB70020F87F /* main.m */; }; 11 | 68EF2D861F2C6BB70020F87F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 68EF2D851F2C6BB70020F87F /* AppDelegate.m */; }; 12 | 68EF2D891F2C6BB70020F87F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 68EF2D881F2C6BB70020F87F /* ViewController.m */; }; 13 | 68EF2D8C1F2C6BB70020F87F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 68EF2D8A1F2C6BB70020F87F /* Main.storyboard */; }; 14 | 68EF2D8E1F2C6BB70020F87F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 68EF2D8D1F2C6BB70020F87F /* Assets.xcassets */; }; 15 | 68EF2D911F2C6BB70020F87F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 68EF2D8F1F2C6BB70020F87F /* LaunchScreen.storyboard */; }; 16 | 68EF2D9C1F2C6BB70020F87F /* AddressTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 68EF2D9B1F2C6BB70020F87F /* AddressTests.m */; }; 17 | 68EF2DA71F2C6BB70020F87F /* AddressUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 68EF2DA61F2C6BB70020F87F /* AddressUITests.m */; }; 18 | 68EF2DBE1F2C6BD40020F87F /* 1.plist in Resources */ = {isa = PBXBuildFile; fileRef = 68EF2DB41F2C6BD40020F87F /* 1.plist */; }; 19 | 68EF2DBF1F2C6BD40020F87F /* 2.gif in Resources */ = {isa = PBXBuildFile; fileRef = 68EF2DB51F2C6BD40020F87F /* 2.gif */; }; 20 | 68EF2DC01F2C6BD40020F87F /* 2.plist in Resources */ = {isa = PBXBuildFile; fileRef = 68EF2DB61F2C6BD40020F87F /* 2.plist */; }; 21 | 68EF2DC11F2C6BD40020F87F /* 3.plist in Resources */ = {isa = PBXBuildFile; fileRef = 68EF2DB71F2C6BD40020F87F /* 3.plist */; }; 22 | 68EF2DC21F2C6BD40020F87F /* AddressAreaModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 68EF2DB91F2C6BD40020F87F /* AddressAreaModel.m */; }; 23 | 68EF2DC31F2C6BD40020F87F /* AddressModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 68EF2DBB1F2C6BD40020F87F /* AddressModel.m */; }; 24 | 68EF2DC41F2C6BD40020F87F /* AreaView.m in Sources */ = {isa = PBXBuildFile; fileRef = 68EF2DBD1F2C6BD40020F87F /* AreaView.m */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | 68EF2D981F2C6BB70020F87F /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = 68EF2D761F2C6BB70020F87F /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 68EF2D7D1F2C6BB70020F87F; 33 | remoteInfo = Address; 34 | }; 35 | 68EF2DA31F2C6BB70020F87F /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = 68EF2D761F2C6BB70020F87F /* Project object */; 38 | proxyType = 1; 39 | remoteGlobalIDString = 68EF2D7D1F2C6BB70020F87F; 40 | remoteInfo = Address; 41 | }; 42 | /* End PBXContainerItemProxy section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | 68EF2D7E1F2C6BB70020F87F /* Address.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Address.app; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 68EF2D821F2C6BB70020F87F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 47 | 68EF2D841F2C6BB70020F87F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 48 | 68EF2D851F2C6BB70020F87F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 49 | 68EF2D871F2C6BB70020F87F /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 50 | 68EF2D881F2C6BB70020F87F /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 51 | 68EF2D8B1F2C6BB70020F87F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 52 | 68EF2D8D1F2C6BB70020F87F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 53 | 68EF2D901F2C6BB70020F87F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 54 | 68EF2D921F2C6BB70020F87F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | 68EF2D971F2C6BB70020F87F /* AddressTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AddressTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | 68EF2D9B1F2C6BB70020F87F /* AddressTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AddressTests.m; sourceTree = ""; }; 57 | 68EF2D9D1F2C6BB70020F87F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 68EF2DA21F2C6BB70020F87F /* AddressUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AddressUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | 68EF2DA61F2C6BB70020F87F /* AddressUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AddressUITests.m; sourceTree = ""; }; 60 | 68EF2DA81F2C6BB70020F87F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 61 | 68EF2DB41F2C6BD40020F87F /* 1.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = 1.plist; sourceTree = ""; }; 62 | 68EF2DB51F2C6BD40020F87F /* 2.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = 2.gif; sourceTree = ""; }; 63 | 68EF2DB61F2C6BD40020F87F /* 2.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = 2.plist; sourceTree = ""; }; 64 | 68EF2DB71F2C6BD40020F87F /* 3.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = 3.plist; sourceTree = ""; }; 65 | 68EF2DB81F2C6BD40020F87F /* AddressAreaModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddressAreaModel.h; sourceTree = ""; }; 66 | 68EF2DB91F2C6BD40020F87F /* AddressAreaModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AddressAreaModel.m; sourceTree = ""; }; 67 | 68EF2DBA1F2C6BD40020F87F /* AddressModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddressModel.h; sourceTree = ""; }; 68 | 68EF2DBB1F2C6BD40020F87F /* AddressModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AddressModel.m; sourceTree = ""; }; 69 | 68EF2DBC1F2C6BD40020F87F /* AreaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AreaView.h; sourceTree = ""; }; 70 | 68EF2DBD1F2C6BD40020F87F /* AreaView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AreaView.m; sourceTree = ""; }; 71 | /* End PBXFileReference section */ 72 | 73 | /* Begin PBXFrameworksBuildPhase section */ 74 | 68EF2D7B1F2C6BB70020F87F /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | 68EF2D941F2C6BB70020F87F /* Frameworks */ = { 82 | isa = PBXFrameworksBuildPhase; 83 | buildActionMask = 2147483647; 84 | files = ( 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | 68EF2D9F1F2C6BB70020F87F /* Frameworks */ = { 89 | isa = PBXFrameworksBuildPhase; 90 | buildActionMask = 2147483647; 91 | files = ( 92 | ); 93 | runOnlyForDeploymentPostprocessing = 0; 94 | }; 95 | /* End PBXFrameworksBuildPhase section */ 96 | 97 | /* Begin PBXGroup section */ 98 | 68EF2D751F2C6BB70020F87F = { 99 | isa = PBXGroup; 100 | children = ( 101 | 68EF2D801F2C6BB70020F87F /* Address */, 102 | 68EF2D9A1F2C6BB70020F87F /* AddressTests */, 103 | 68EF2DA51F2C6BB70020F87F /* AddressUITests */, 104 | 68EF2D7F1F2C6BB70020F87F /* Products */, 105 | ); 106 | sourceTree = ""; 107 | }; 108 | 68EF2D7F1F2C6BB70020F87F /* Products */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | 68EF2D7E1F2C6BB70020F87F /* Address.app */, 112 | 68EF2D971F2C6BB70020F87F /* AddressTests.xctest */, 113 | 68EF2DA21F2C6BB70020F87F /* AddressUITests.xctest */, 114 | ); 115 | name = Products; 116 | sourceTree = ""; 117 | }; 118 | 68EF2D801F2C6BB70020F87F /* Address */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 68EF2D841F2C6BB70020F87F /* AppDelegate.h */, 122 | 68EF2D851F2C6BB70020F87F /* AppDelegate.m */, 123 | 68EF2D871F2C6BB70020F87F /* ViewController.h */, 124 | 68EF2D881F2C6BB70020F87F /* ViewController.m */, 125 | 68EF2DB51F2C6BD40020F87F /* 2.gif */, 126 | 68EF2DB41F2C6BD40020F87F /* 1.plist */, 127 | 68EF2DB61F2C6BD40020F87F /* 2.plist */, 128 | 68EF2DB71F2C6BD40020F87F /* 3.plist */, 129 | 68EF2DB81F2C6BD40020F87F /* AddressAreaModel.h */, 130 | 68EF2DB91F2C6BD40020F87F /* AddressAreaModel.m */, 131 | 68EF2DBA1F2C6BD40020F87F /* AddressModel.h */, 132 | 68EF2DBB1F2C6BD40020F87F /* AddressModel.m */, 133 | 68EF2DBC1F2C6BD40020F87F /* AreaView.h */, 134 | 68EF2DBD1F2C6BD40020F87F /* AreaView.m */, 135 | 68EF2D8A1F2C6BB70020F87F /* Main.storyboard */, 136 | 68EF2D8D1F2C6BB70020F87F /* Assets.xcassets */, 137 | 68EF2D8F1F2C6BB70020F87F /* LaunchScreen.storyboard */, 138 | 68EF2D921F2C6BB70020F87F /* Info.plist */, 139 | 68EF2D811F2C6BB70020F87F /* Supporting Files */, 140 | ); 141 | path = Address; 142 | sourceTree = ""; 143 | }; 144 | 68EF2D811F2C6BB70020F87F /* Supporting Files */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 68EF2D821F2C6BB70020F87F /* main.m */, 148 | ); 149 | name = "Supporting Files"; 150 | sourceTree = ""; 151 | }; 152 | 68EF2D9A1F2C6BB70020F87F /* AddressTests */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 68EF2D9B1F2C6BB70020F87F /* AddressTests.m */, 156 | 68EF2D9D1F2C6BB70020F87F /* Info.plist */, 157 | ); 158 | path = AddressTests; 159 | sourceTree = ""; 160 | }; 161 | 68EF2DA51F2C6BB70020F87F /* AddressUITests */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | 68EF2DA61F2C6BB70020F87F /* AddressUITests.m */, 165 | 68EF2DA81F2C6BB70020F87F /* Info.plist */, 166 | ); 167 | path = AddressUITests; 168 | sourceTree = ""; 169 | }; 170 | /* End PBXGroup section */ 171 | 172 | /* Begin PBXNativeTarget section */ 173 | 68EF2D7D1F2C6BB70020F87F /* Address */ = { 174 | isa = PBXNativeTarget; 175 | buildConfigurationList = 68EF2DAB1F2C6BB70020F87F /* Build configuration list for PBXNativeTarget "Address" */; 176 | buildPhases = ( 177 | 68EF2D7A1F2C6BB70020F87F /* Sources */, 178 | 68EF2D7B1F2C6BB70020F87F /* Frameworks */, 179 | 68EF2D7C1F2C6BB70020F87F /* Resources */, 180 | ); 181 | buildRules = ( 182 | ); 183 | dependencies = ( 184 | ); 185 | name = Address; 186 | productName = Address; 187 | productReference = 68EF2D7E1F2C6BB70020F87F /* Address.app */; 188 | productType = "com.apple.product-type.application"; 189 | }; 190 | 68EF2D961F2C6BB70020F87F /* AddressTests */ = { 191 | isa = PBXNativeTarget; 192 | buildConfigurationList = 68EF2DAE1F2C6BB70020F87F /* Build configuration list for PBXNativeTarget "AddressTests" */; 193 | buildPhases = ( 194 | 68EF2D931F2C6BB70020F87F /* Sources */, 195 | 68EF2D941F2C6BB70020F87F /* Frameworks */, 196 | 68EF2D951F2C6BB70020F87F /* Resources */, 197 | ); 198 | buildRules = ( 199 | ); 200 | dependencies = ( 201 | 68EF2D991F2C6BB70020F87F /* PBXTargetDependency */, 202 | ); 203 | name = AddressTests; 204 | productName = AddressTests; 205 | productReference = 68EF2D971F2C6BB70020F87F /* AddressTests.xctest */; 206 | productType = "com.apple.product-type.bundle.unit-test"; 207 | }; 208 | 68EF2DA11F2C6BB70020F87F /* AddressUITests */ = { 209 | isa = PBXNativeTarget; 210 | buildConfigurationList = 68EF2DB11F2C6BB70020F87F /* Build configuration list for PBXNativeTarget "AddressUITests" */; 211 | buildPhases = ( 212 | 68EF2D9E1F2C6BB70020F87F /* Sources */, 213 | 68EF2D9F1F2C6BB70020F87F /* Frameworks */, 214 | 68EF2DA01F2C6BB70020F87F /* Resources */, 215 | ); 216 | buildRules = ( 217 | ); 218 | dependencies = ( 219 | 68EF2DA41F2C6BB70020F87F /* PBXTargetDependency */, 220 | ); 221 | name = AddressUITests; 222 | productName = AddressUITests; 223 | productReference = 68EF2DA21F2C6BB70020F87F /* AddressUITests.xctest */; 224 | productType = "com.apple.product-type.bundle.ui-testing"; 225 | }; 226 | /* End PBXNativeTarget section */ 227 | 228 | /* Begin PBXProject section */ 229 | 68EF2D761F2C6BB70020F87F /* Project object */ = { 230 | isa = PBXProject; 231 | attributes = { 232 | LastUpgradeCheck = 0830; 233 | ORGANIZATIONNAME = CodingFire; 234 | TargetAttributes = { 235 | 68EF2D7D1F2C6BB70020F87F = { 236 | CreatedOnToolsVersion = 8.3.3; 237 | DevelopmentTeam = B2P95ADDC5; 238 | ProvisioningStyle = Automatic; 239 | }; 240 | 68EF2D961F2C6BB70020F87F = { 241 | CreatedOnToolsVersion = 8.3.3; 242 | DevelopmentTeam = B2P95ADDC5; 243 | ProvisioningStyle = Automatic; 244 | TestTargetID = 68EF2D7D1F2C6BB70020F87F; 245 | }; 246 | 68EF2DA11F2C6BB70020F87F = { 247 | CreatedOnToolsVersion = 8.3.3; 248 | DevelopmentTeam = B2P95ADDC5; 249 | ProvisioningStyle = Automatic; 250 | TestTargetID = 68EF2D7D1F2C6BB70020F87F; 251 | }; 252 | }; 253 | }; 254 | buildConfigurationList = 68EF2D791F2C6BB70020F87F /* Build configuration list for PBXProject "Address" */; 255 | compatibilityVersion = "Xcode 3.2"; 256 | developmentRegion = English; 257 | hasScannedForEncodings = 0; 258 | knownRegions = ( 259 | en, 260 | Base, 261 | ); 262 | mainGroup = 68EF2D751F2C6BB70020F87F; 263 | productRefGroup = 68EF2D7F1F2C6BB70020F87F /* Products */; 264 | projectDirPath = ""; 265 | projectRoot = ""; 266 | targets = ( 267 | 68EF2D7D1F2C6BB70020F87F /* Address */, 268 | 68EF2D961F2C6BB70020F87F /* AddressTests */, 269 | 68EF2DA11F2C6BB70020F87F /* AddressUITests */, 270 | ); 271 | }; 272 | /* End PBXProject section */ 273 | 274 | /* Begin PBXResourcesBuildPhase section */ 275 | 68EF2D7C1F2C6BB70020F87F /* Resources */ = { 276 | isa = PBXResourcesBuildPhase; 277 | buildActionMask = 2147483647; 278 | files = ( 279 | 68EF2D911F2C6BB70020F87F /* LaunchScreen.storyboard in Resources */, 280 | 68EF2DBF1F2C6BD40020F87F /* 2.gif in Resources */, 281 | 68EF2D8E1F2C6BB70020F87F /* Assets.xcassets in Resources */, 282 | 68EF2DC01F2C6BD40020F87F /* 2.plist in Resources */, 283 | 68EF2DBE1F2C6BD40020F87F /* 1.plist in Resources */, 284 | 68EF2D8C1F2C6BB70020F87F /* Main.storyboard in Resources */, 285 | 68EF2DC11F2C6BD40020F87F /* 3.plist in Resources */, 286 | ); 287 | runOnlyForDeploymentPostprocessing = 0; 288 | }; 289 | 68EF2D951F2C6BB70020F87F /* Resources */ = { 290 | isa = PBXResourcesBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | ); 294 | runOnlyForDeploymentPostprocessing = 0; 295 | }; 296 | 68EF2DA01F2C6BB70020F87F /* Resources */ = { 297 | isa = PBXResourcesBuildPhase; 298 | buildActionMask = 2147483647; 299 | files = ( 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | /* End PBXResourcesBuildPhase section */ 304 | 305 | /* Begin PBXSourcesBuildPhase section */ 306 | 68EF2D7A1F2C6BB70020F87F /* Sources */ = { 307 | isa = PBXSourcesBuildPhase; 308 | buildActionMask = 2147483647; 309 | files = ( 310 | 68EF2DC31F2C6BD40020F87F /* AddressModel.m in Sources */, 311 | 68EF2D891F2C6BB70020F87F /* ViewController.m in Sources */, 312 | 68EF2DC21F2C6BD40020F87F /* AddressAreaModel.m in Sources */, 313 | 68EF2DC41F2C6BD40020F87F /* AreaView.m in Sources */, 314 | 68EF2D861F2C6BB70020F87F /* AppDelegate.m in Sources */, 315 | 68EF2D831F2C6BB70020F87F /* main.m in Sources */, 316 | ); 317 | runOnlyForDeploymentPostprocessing = 0; 318 | }; 319 | 68EF2D931F2C6BB70020F87F /* Sources */ = { 320 | isa = PBXSourcesBuildPhase; 321 | buildActionMask = 2147483647; 322 | files = ( 323 | 68EF2D9C1F2C6BB70020F87F /* AddressTests.m in Sources */, 324 | ); 325 | runOnlyForDeploymentPostprocessing = 0; 326 | }; 327 | 68EF2D9E1F2C6BB70020F87F /* Sources */ = { 328 | isa = PBXSourcesBuildPhase; 329 | buildActionMask = 2147483647; 330 | files = ( 331 | 68EF2DA71F2C6BB70020F87F /* AddressUITests.m in Sources */, 332 | ); 333 | runOnlyForDeploymentPostprocessing = 0; 334 | }; 335 | /* End PBXSourcesBuildPhase section */ 336 | 337 | /* Begin PBXTargetDependency section */ 338 | 68EF2D991F2C6BB70020F87F /* PBXTargetDependency */ = { 339 | isa = PBXTargetDependency; 340 | target = 68EF2D7D1F2C6BB70020F87F /* Address */; 341 | targetProxy = 68EF2D981F2C6BB70020F87F /* PBXContainerItemProxy */; 342 | }; 343 | 68EF2DA41F2C6BB70020F87F /* PBXTargetDependency */ = { 344 | isa = PBXTargetDependency; 345 | target = 68EF2D7D1F2C6BB70020F87F /* Address */; 346 | targetProxy = 68EF2DA31F2C6BB70020F87F /* PBXContainerItemProxy */; 347 | }; 348 | /* End PBXTargetDependency section */ 349 | 350 | /* Begin PBXVariantGroup section */ 351 | 68EF2D8A1F2C6BB70020F87F /* Main.storyboard */ = { 352 | isa = PBXVariantGroup; 353 | children = ( 354 | 68EF2D8B1F2C6BB70020F87F /* Base */, 355 | ); 356 | name = Main.storyboard; 357 | sourceTree = ""; 358 | }; 359 | 68EF2D8F1F2C6BB70020F87F /* LaunchScreen.storyboard */ = { 360 | isa = PBXVariantGroup; 361 | children = ( 362 | 68EF2D901F2C6BB70020F87F /* Base */, 363 | ); 364 | name = LaunchScreen.storyboard; 365 | sourceTree = ""; 366 | }; 367 | /* End PBXVariantGroup section */ 368 | 369 | /* Begin XCBuildConfiguration section */ 370 | 68EF2DA91F2C6BB70020F87F /* Debug */ = { 371 | isa = XCBuildConfiguration; 372 | buildSettings = { 373 | ALWAYS_SEARCH_USER_PATHS = NO; 374 | CLANG_ANALYZER_NONNULL = YES; 375 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 376 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 377 | CLANG_CXX_LIBRARY = "libc++"; 378 | CLANG_ENABLE_MODULES = YES; 379 | CLANG_ENABLE_OBJC_ARC = YES; 380 | CLANG_WARN_BOOL_CONVERSION = YES; 381 | CLANG_WARN_CONSTANT_CONVERSION = YES; 382 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 383 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 384 | CLANG_WARN_EMPTY_BODY = YES; 385 | CLANG_WARN_ENUM_CONVERSION = YES; 386 | CLANG_WARN_INFINITE_RECURSION = YES; 387 | CLANG_WARN_INT_CONVERSION = YES; 388 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 389 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 390 | CLANG_WARN_UNREACHABLE_CODE = YES; 391 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 392 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 393 | COPY_PHASE_STRIP = NO; 394 | DEBUG_INFORMATION_FORMAT = dwarf; 395 | ENABLE_STRICT_OBJC_MSGSEND = YES; 396 | ENABLE_TESTABILITY = YES; 397 | GCC_C_LANGUAGE_STANDARD = gnu99; 398 | GCC_DYNAMIC_NO_PIC = NO; 399 | GCC_NO_COMMON_BLOCKS = YES; 400 | GCC_OPTIMIZATION_LEVEL = 0; 401 | GCC_PREPROCESSOR_DEFINITIONS = ( 402 | "DEBUG=1", 403 | "$(inherited)", 404 | ); 405 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 406 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 407 | GCC_WARN_UNDECLARED_SELECTOR = YES; 408 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 409 | GCC_WARN_UNUSED_FUNCTION = YES; 410 | GCC_WARN_UNUSED_VARIABLE = YES; 411 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 412 | MTL_ENABLE_DEBUG_INFO = YES; 413 | ONLY_ACTIVE_ARCH = YES; 414 | SDKROOT = iphoneos; 415 | }; 416 | name = Debug; 417 | }; 418 | 68EF2DAA1F2C6BB70020F87F /* Release */ = { 419 | isa = XCBuildConfiguration; 420 | buildSettings = { 421 | ALWAYS_SEARCH_USER_PATHS = NO; 422 | CLANG_ANALYZER_NONNULL = YES; 423 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 424 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 425 | CLANG_CXX_LIBRARY = "libc++"; 426 | CLANG_ENABLE_MODULES = YES; 427 | CLANG_ENABLE_OBJC_ARC = YES; 428 | CLANG_WARN_BOOL_CONVERSION = YES; 429 | CLANG_WARN_CONSTANT_CONVERSION = YES; 430 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 431 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 432 | CLANG_WARN_EMPTY_BODY = YES; 433 | CLANG_WARN_ENUM_CONVERSION = YES; 434 | CLANG_WARN_INFINITE_RECURSION = YES; 435 | CLANG_WARN_INT_CONVERSION = YES; 436 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 437 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 438 | CLANG_WARN_UNREACHABLE_CODE = YES; 439 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 440 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 441 | COPY_PHASE_STRIP = NO; 442 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 443 | ENABLE_NS_ASSERTIONS = NO; 444 | ENABLE_STRICT_OBJC_MSGSEND = YES; 445 | GCC_C_LANGUAGE_STANDARD = gnu99; 446 | GCC_NO_COMMON_BLOCKS = YES; 447 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 448 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 449 | GCC_WARN_UNDECLARED_SELECTOR = YES; 450 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 451 | GCC_WARN_UNUSED_FUNCTION = YES; 452 | GCC_WARN_UNUSED_VARIABLE = YES; 453 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 454 | MTL_ENABLE_DEBUG_INFO = NO; 455 | SDKROOT = iphoneos; 456 | VALIDATE_PRODUCT = YES; 457 | }; 458 | name = Release; 459 | }; 460 | 68EF2DAC1F2C6BB70020F87F /* Debug */ = { 461 | isa = XCBuildConfiguration; 462 | buildSettings = { 463 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 464 | DEVELOPMENT_TEAM = B2P95ADDC5; 465 | INFOPLIST_FILE = Address/Info.plist; 466 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 467 | PRODUCT_BUNDLE_IDENTIFIER = Codeliu.Fire.Address; 468 | PRODUCT_NAME = "$(TARGET_NAME)"; 469 | }; 470 | name = Debug; 471 | }; 472 | 68EF2DAD1F2C6BB70020F87F /* Release */ = { 473 | isa = XCBuildConfiguration; 474 | buildSettings = { 475 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 476 | DEVELOPMENT_TEAM = B2P95ADDC5; 477 | INFOPLIST_FILE = Address/Info.plist; 478 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 479 | PRODUCT_BUNDLE_IDENTIFIER = Codeliu.Fire.Address; 480 | PRODUCT_NAME = "$(TARGET_NAME)"; 481 | }; 482 | name = Release; 483 | }; 484 | 68EF2DAF1F2C6BB70020F87F /* Debug */ = { 485 | isa = XCBuildConfiguration; 486 | buildSettings = { 487 | BUNDLE_LOADER = "$(TEST_HOST)"; 488 | DEVELOPMENT_TEAM = B2P95ADDC5; 489 | INFOPLIST_FILE = AddressTests/Info.plist; 490 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 491 | PRODUCT_BUNDLE_IDENTIFIER = Codeliu.Fire.AddressTests; 492 | PRODUCT_NAME = "$(TARGET_NAME)"; 493 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Address.app/Address"; 494 | }; 495 | name = Debug; 496 | }; 497 | 68EF2DB01F2C6BB70020F87F /* Release */ = { 498 | isa = XCBuildConfiguration; 499 | buildSettings = { 500 | BUNDLE_LOADER = "$(TEST_HOST)"; 501 | DEVELOPMENT_TEAM = B2P95ADDC5; 502 | INFOPLIST_FILE = AddressTests/Info.plist; 503 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 504 | PRODUCT_BUNDLE_IDENTIFIER = Codeliu.Fire.AddressTests; 505 | PRODUCT_NAME = "$(TARGET_NAME)"; 506 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Address.app/Address"; 507 | }; 508 | name = Release; 509 | }; 510 | 68EF2DB21F2C6BB70020F87F /* Debug */ = { 511 | isa = XCBuildConfiguration; 512 | buildSettings = { 513 | DEVELOPMENT_TEAM = B2P95ADDC5; 514 | INFOPLIST_FILE = AddressUITests/Info.plist; 515 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 516 | PRODUCT_BUNDLE_IDENTIFIER = Codeliu.Fire.AddressUITests; 517 | PRODUCT_NAME = "$(TARGET_NAME)"; 518 | TEST_TARGET_NAME = Address; 519 | }; 520 | name = Debug; 521 | }; 522 | 68EF2DB31F2C6BB70020F87F /* Release */ = { 523 | isa = XCBuildConfiguration; 524 | buildSettings = { 525 | DEVELOPMENT_TEAM = B2P95ADDC5; 526 | INFOPLIST_FILE = AddressUITests/Info.plist; 527 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 528 | PRODUCT_BUNDLE_IDENTIFIER = Codeliu.Fire.AddressUITests; 529 | PRODUCT_NAME = "$(TARGET_NAME)"; 530 | TEST_TARGET_NAME = Address; 531 | }; 532 | name = Release; 533 | }; 534 | /* End XCBuildConfiguration section */ 535 | 536 | /* Begin XCConfigurationList section */ 537 | 68EF2D791F2C6BB70020F87F /* Build configuration list for PBXProject "Address" */ = { 538 | isa = XCConfigurationList; 539 | buildConfigurations = ( 540 | 68EF2DA91F2C6BB70020F87F /* Debug */, 541 | 68EF2DAA1F2C6BB70020F87F /* Release */, 542 | ); 543 | defaultConfigurationIsVisible = 0; 544 | defaultConfigurationName = Release; 545 | }; 546 | 68EF2DAB1F2C6BB70020F87F /* Build configuration list for PBXNativeTarget "Address" */ = { 547 | isa = XCConfigurationList; 548 | buildConfigurations = ( 549 | 68EF2DAC1F2C6BB70020F87F /* Debug */, 550 | 68EF2DAD1F2C6BB70020F87F /* Release */, 551 | ); 552 | defaultConfigurationIsVisible = 0; 553 | }; 554 | 68EF2DAE1F2C6BB70020F87F /* Build configuration list for PBXNativeTarget "AddressTests" */ = { 555 | isa = XCConfigurationList; 556 | buildConfigurations = ( 557 | 68EF2DAF1F2C6BB70020F87F /* Debug */, 558 | 68EF2DB01F2C6BB70020F87F /* Release */, 559 | ); 560 | defaultConfigurationIsVisible = 0; 561 | }; 562 | 68EF2DB11F2C6BB70020F87F /* Build configuration list for PBXNativeTarget "AddressUITests" */ = { 563 | isa = XCConfigurationList; 564 | buildConfigurations = ( 565 | 68EF2DB21F2C6BB70020F87F /* Debug */, 566 | 68EF2DB31F2C6BB70020F87F /* Release */, 567 | ); 568 | defaultConfigurationIsVisible = 0; 569 | }; 570 | /* End XCConfigurationList section */ 571 | }; 572 | rootObject = 68EF2D761F2C6BB70020F87F /* Project object */; 573 | } 574 | --------------------------------------------------------------------------------