├── KVO演示.xcodeproj ├── xcuserdata │ ├── _sheng.xcuserdatad │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ └── KVO演示.xcscheme │ ├── sheng.xcuserdatad │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ └── cws.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist ├── project.xcworkspace │ ├── xcuserdata │ │ ├── cws.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ │ ├── sheng.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ │ └── _sheng.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── project.pbxproj ├── KVO演示 ├── MyKVOModel.m ├── AppDelegate.h ├── MyKVOModel.h ├── ViewController.h ├── main.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── AppDelegate.m └── ViewController.m └── README.md /KVO演示.xcodeproj/xcuserdata/_sheng.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /KVO演示.xcodeproj/project.xcworkspace/xcuserdata/cws.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azuo520/KVO-Demo/HEAD/KVO演示.xcodeproj/project.xcworkspace/xcuserdata/cws.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /KVO演示.xcodeproj/project.xcworkspace/xcuserdata/sheng.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azuo520/KVO-Demo/HEAD/KVO演示.xcodeproj/project.xcworkspace/xcuserdata/sheng.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /KVO演示.xcodeproj/project.xcworkspace/xcuserdata/_sheng.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azuo520/KVO-Demo/HEAD/KVO演示.xcodeproj/project.xcworkspace/xcuserdata/_sheng.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /KVO演示.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /KVO演示/MyKVOModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyKVOModel.m 3 | // KVO演示 4 | // 5 | // Created by cws on 2020/4/13. 6 | // Copyright © 2020 Azuo. All rights reserved. 7 | // 8 | 9 | #import "MyKVOModel.h" 10 | 11 | @implementation MyKVOModel 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /KVO演示.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 前言 2 | KVO演示-Demo。 3 | ###本次开发环境 4 | Xcode: 7.2 5 | iOS Simulator: iphone6 6 | ### 内容 7 | 8 | iOS--KVO的实现原理与具体应用_Demo: 9 | 2个类之间的通信。 10 | 11 | ### 啊左的博客 12 | 13 | 博客园:http://www.cnblogs.com/azuo/ 14 | ## 15 | 简书:http://www.jianshu.com/users/a46bde0697f4/latest_articles 16 | ## 17 | 啊左,稀罕iOS开发,也稀罕摄影。欢迎访问、欢迎交流~ 18 | -------------------------------------------------------------------------------- /KVO演示/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // KVO演示 4 | // 5 | // Created by zuoA on 16/4/27. 6 | // Copyright © 2016年 Azuo. 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 | -------------------------------------------------------------------------------- /KVO演示/MyKVOModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyKVOModel.h 3 | // KVO演示 4 | // 5 | // Created by cws on 2020/4/13. 6 | // Copyright © 2020 Azuo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface MyKVOModel : NSObject 14 | 15 | @property (nonatomic, assign) int num; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /KVO演示/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // KVO演示 4 | // 5 | // Created by zuoA on 16/4/27. 6 | // Copyright © 2016年 Azuo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @property (weak, nonatomic) IBOutlet UILabel *label; 14 | 15 | - (IBAction)changeNum:(UIButton *)sender; 16 | 17 | @end 18 | 19 | -------------------------------------------------------------------------------- /KVO演示/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // KVO演示 4 | // 5 | // Created by zuoA on 16/4/27. 6 | // Copyright © 2016年 Azuo. 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 | -------------------------------------------------------------------------------- /KVO演示.xcodeproj/xcuserdata/sheng.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | KVO演示.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /KVO演示.xcodeproj/xcuserdata/cws.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | KVO演示.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /KVO演示.xcodeproj/xcuserdata/_sheng.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | KVO演示.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 9F4359AD1CD0B8C1002B116F 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /KVO演示/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 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /KVO演示/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 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /KVO演示/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 | -------------------------------------------------------------------------------- /KVO演示/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // KVO演示 4 | // 5 | // Created by zuoA on 16/4/27. 6 | // Copyright © 2016年 Azuo. 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 | -------------------------------------------------------------------------------- /KVO演示/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // KVO演示 4 | // 5 | // Created by zuoA on 16/4/27. 6 | // Copyright © 2016年 Azuo. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "MyKVOModel.h" 11 | 12 | @interface ViewController () 13 | 14 | @property (nonatomic, strong) MyKVOModel *myObject; 15 | 16 | @end 17 | 18 | @implementation ViewController 19 | 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | 24 | // 初始化待观察类对象 25 | self.myObject = [[MyKVOModel alloc]init]; 26 | 27 | // 1.注册对象myKVO为被观察者。 28 | // option中: 29 | // NSKeyValueObservingOptionOld 以字典的形式提供 “初始对象数据”; 30 | // NSKeyValueObservingOptionNew 以字典的形式提供 “更新后新的数据”; 31 | [self.myObject addObserver:self 32 | forKeyPath:@"num" 33 | options:NSKeyValueObservingOptionOld|NSKeyValueObservingOptionNew 34 | context:nil]; 35 | 36 | } 37 | 38 | #pragma mark - KVO 39 | /** 40 | 2.只要object的keyPath属性发生变化,就会调用此回调方法,进行相应的处理:UI更 41 | 42 | @param keyPath 属性名称 43 | @param object 被观察的对象 44 | @param change 变化前后的值都存储在 change 字典中 45 | @param context 注册观察者时,context 传过来的值 46 | */ 47 | -(void)observeValueForKeyPath:(NSString *)keyPath 48 | ofObject:(id)object 49 | change:(NSDictionary *)change 50 | context:(void *)context { 51 | if([keyPath isEqualToString:@"num"] && object == self.myObject) { 52 | // 响应变化处理:UI更新(label文本改变) 53 | self.label.text = [NSString stringWithFormat:@"当前的num值为:%@", 54 | [change valueForKey:@"new"]]; 55 | 56 | //上文注册时,枚举为2个,因此可以提取change字典中的新、旧值的这两个方法 57 | NSLog(@"\noldnum:%@ newnum:%@", 58 | [change valueForKey:@"old"], 59 | [change valueForKey:@"new"]); 60 | } 61 | } 62 | 63 | #pragma mark - Event Click 64 | 65 | /** 66 | 按钮事件 67 | 68 | @param sender button 69 | */ 70 | - (IBAction)changeNum:(UIButton *)sender { 71 | //按一次,使num的值+1 72 | self.myObject.num = self.myObject.num + 1; 73 | } 74 | 75 | /** 76 | 3.移除KVO 77 | */ 78 | - (void)dealloc { 79 | [self removeObserver:self 80 | forKeyPath:@"num" 81 | context:nil]; 82 | } 83 | 84 | @end 85 | 86 | -------------------------------------------------------------------------------- /KVO演示.xcodeproj/xcuserdata/_sheng.xcuserdatad/xcschemes/KVO演示.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /KVO演示/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 29 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /KVO演示.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 88C078052444540B00372D8B /* MyKVOModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 88C078042444540B00372D8B /* MyKVOModel.m */; }; 11 | 9F4359B31CD0B8C1002B116F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F4359B21CD0B8C1002B116F /* main.m */; }; 12 | 9F4359B61CD0B8C1002B116F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F4359B51CD0B8C1002B116F /* AppDelegate.m */; }; 13 | 9F4359B91CD0B8C1002B116F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F4359B81CD0B8C1002B116F /* ViewController.m */; }; 14 | 9F4359BC1CD0B8C1002B116F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9F4359BA1CD0B8C1002B116F /* Main.storyboard */; }; 15 | 9F4359BE1CD0B8C1002B116F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9F4359BD1CD0B8C1002B116F /* Assets.xcassets */; }; 16 | 9F4359C11CD0B8C1002B116F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9F4359BF1CD0B8C1002B116F /* LaunchScreen.storyboard */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | 88C078032444540B00372D8B /* MyKVOModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyKVOModel.h; sourceTree = ""; }; 21 | 88C078042444540B00372D8B /* MyKVOModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyKVOModel.m; sourceTree = ""; }; 22 | 9F4359AE1CD0B8C1002B116F /* KVO演示.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "KVO演示.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | 9F4359B21CD0B8C1002B116F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 24 | 9F4359B41CD0B8C1002B116F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 25 | 9F4359B51CD0B8C1002B116F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 26 | 9F4359B71CD0B8C1002B116F /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 27 | 9F4359B81CD0B8C1002B116F /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 28 | 9F4359BB1CD0B8C1002B116F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 29 | 9F4359BD1CD0B8C1002B116F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 30 | 9F4359C01CD0B8C1002B116F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 31 | 9F4359C21CD0B8C1002B116F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | /* End PBXFileReference section */ 33 | 34 | /* Begin PBXFrameworksBuildPhase section */ 35 | 9F4359AB1CD0B8C1002B116F /* Frameworks */ = { 36 | isa = PBXFrameworksBuildPhase; 37 | buildActionMask = 2147483647; 38 | files = ( 39 | ); 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXFrameworksBuildPhase section */ 43 | 44 | /* Begin PBXGroup section */ 45 | 9F4359A51CD0B8C1002B116F = { 46 | isa = PBXGroup; 47 | children = ( 48 | 9F4359B01CD0B8C1002B116F /* KVO演示 */, 49 | 9F4359AF1CD0B8C1002B116F /* Products */, 50 | ); 51 | sourceTree = ""; 52 | }; 53 | 9F4359AF1CD0B8C1002B116F /* Products */ = { 54 | isa = PBXGroup; 55 | children = ( 56 | 9F4359AE1CD0B8C1002B116F /* KVO演示.app */, 57 | ); 58 | name = Products; 59 | sourceTree = ""; 60 | }; 61 | 9F4359B01CD0B8C1002B116F /* KVO演示 */ = { 62 | isa = PBXGroup; 63 | children = ( 64 | 9F4359B41CD0B8C1002B116F /* AppDelegate.h */, 65 | 9F4359B51CD0B8C1002B116F /* AppDelegate.m */, 66 | 9F4359B71CD0B8C1002B116F /* ViewController.h */, 67 | 9F4359B81CD0B8C1002B116F /* ViewController.m */, 68 | 88C078032444540B00372D8B /* MyKVOModel.h */, 69 | 88C078042444540B00372D8B /* MyKVOModel.m */, 70 | 9F4359BA1CD0B8C1002B116F /* Main.storyboard */, 71 | 9F4359B11CD0B8C1002B116F /* Supporting Files */, 72 | ); 73 | path = "KVO演示"; 74 | sourceTree = ""; 75 | }; 76 | 9F4359B11CD0B8C1002B116F /* Supporting Files */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | 9F4359BD1CD0B8C1002B116F /* Assets.xcassets */, 80 | 9F4359BF1CD0B8C1002B116F /* LaunchScreen.storyboard */, 81 | 9F4359C21CD0B8C1002B116F /* Info.plist */, 82 | 9F4359B21CD0B8C1002B116F /* main.m */, 83 | ); 84 | name = "Supporting Files"; 85 | sourceTree = ""; 86 | }; 87 | /* End PBXGroup section */ 88 | 89 | /* Begin PBXNativeTarget section */ 90 | 9F4359AD1CD0B8C1002B116F /* KVO演示 */ = { 91 | isa = PBXNativeTarget; 92 | buildConfigurationList = 9F4359C51CD0B8C1002B116F /* Build configuration list for PBXNativeTarget "KVO演示" */; 93 | buildPhases = ( 94 | 9F4359AA1CD0B8C1002B116F /* Sources */, 95 | 9F4359AB1CD0B8C1002B116F /* Frameworks */, 96 | 9F4359AC1CD0B8C1002B116F /* Resources */, 97 | ); 98 | buildRules = ( 99 | ); 100 | dependencies = ( 101 | ); 102 | name = "KVO演示"; 103 | productName = "KVO演示"; 104 | productReference = 9F4359AE1CD0B8C1002B116F /* KVO演示.app */; 105 | productType = "com.apple.product-type.application"; 106 | }; 107 | /* End PBXNativeTarget section */ 108 | 109 | /* Begin PBXProject section */ 110 | 9F4359A61CD0B8C1002B116F /* Project object */ = { 111 | isa = PBXProject; 112 | attributes = { 113 | LastUpgradeCheck = 0720; 114 | ORGANIZATIONNAME = Azuo; 115 | TargetAttributes = { 116 | 9F4359AD1CD0B8C1002B116F = { 117 | CreatedOnToolsVersion = 7.2; 118 | }; 119 | }; 120 | }; 121 | buildConfigurationList = 9F4359A91CD0B8C1002B116F /* Build configuration list for PBXProject "KVO演示" */; 122 | compatibilityVersion = "Xcode 3.2"; 123 | developmentRegion = English; 124 | hasScannedForEncodings = 0; 125 | knownRegions = ( 126 | English, 127 | en, 128 | Base, 129 | ); 130 | mainGroup = 9F4359A51CD0B8C1002B116F; 131 | productRefGroup = 9F4359AF1CD0B8C1002B116F /* Products */; 132 | projectDirPath = ""; 133 | projectRoot = ""; 134 | targets = ( 135 | 9F4359AD1CD0B8C1002B116F /* KVO演示 */, 136 | ); 137 | }; 138 | /* End PBXProject section */ 139 | 140 | /* Begin PBXResourcesBuildPhase section */ 141 | 9F4359AC1CD0B8C1002B116F /* Resources */ = { 142 | isa = PBXResourcesBuildPhase; 143 | buildActionMask = 2147483647; 144 | files = ( 145 | 9F4359C11CD0B8C1002B116F /* LaunchScreen.storyboard in Resources */, 146 | 9F4359BE1CD0B8C1002B116F /* Assets.xcassets in Resources */, 147 | 9F4359BC1CD0B8C1002B116F /* Main.storyboard in Resources */, 148 | ); 149 | runOnlyForDeploymentPostprocessing = 0; 150 | }; 151 | /* End PBXResourcesBuildPhase section */ 152 | 153 | /* Begin PBXSourcesBuildPhase section */ 154 | 9F4359AA1CD0B8C1002B116F /* Sources */ = { 155 | isa = PBXSourcesBuildPhase; 156 | buildActionMask = 2147483647; 157 | files = ( 158 | 88C078052444540B00372D8B /* MyKVOModel.m in Sources */, 159 | 9F4359B91CD0B8C1002B116F /* ViewController.m in Sources */, 160 | 9F4359B61CD0B8C1002B116F /* AppDelegate.m in Sources */, 161 | 9F4359B31CD0B8C1002B116F /* main.m in Sources */, 162 | ); 163 | runOnlyForDeploymentPostprocessing = 0; 164 | }; 165 | /* End PBXSourcesBuildPhase section */ 166 | 167 | /* Begin PBXVariantGroup section */ 168 | 9F4359BA1CD0B8C1002B116F /* Main.storyboard */ = { 169 | isa = PBXVariantGroup; 170 | children = ( 171 | 9F4359BB1CD0B8C1002B116F /* Base */, 172 | ); 173 | name = Main.storyboard; 174 | sourceTree = ""; 175 | }; 176 | 9F4359BF1CD0B8C1002B116F /* LaunchScreen.storyboard */ = { 177 | isa = PBXVariantGroup; 178 | children = ( 179 | 9F4359C01CD0B8C1002B116F /* Base */, 180 | ); 181 | name = LaunchScreen.storyboard; 182 | sourceTree = ""; 183 | }; 184 | /* End PBXVariantGroup section */ 185 | 186 | /* Begin XCBuildConfiguration section */ 187 | 9F4359C31CD0B8C1002B116F /* Debug */ = { 188 | isa = XCBuildConfiguration; 189 | buildSettings = { 190 | ALWAYS_SEARCH_USER_PATHS = NO; 191 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 192 | CLANG_CXX_LIBRARY = "libc++"; 193 | CLANG_ENABLE_MODULES = YES; 194 | CLANG_ENABLE_OBJC_ARC = YES; 195 | CLANG_WARN_BOOL_CONVERSION = YES; 196 | CLANG_WARN_CONSTANT_CONVERSION = YES; 197 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 198 | CLANG_WARN_EMPTY_BODY = YES; 199 | CLANG_WARN_ENUM_CONVERSION = YES; 200 | CLANG_WARN_INT_CONVERSION = YES; 201 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 202 | CLANG_WARN_UNREACHABLE_CODE = YES; 203 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 204 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 205 | COPY_PHASE_STRIP = NO; 206 | DEBUG_INFORMATION_FORMAT = dwarf; 207 | ENABLE_STRICT_OBJC_MSGSEND = YES; 208 | ENABLE_TESTABILITY = YES; 209 | GCC_C_LANGUAGE_STANDARD = gnu99; 210 | GCC_DYNAMIC_NO_PIC = NO; 211 | GCC_NO_COMMON_BLOCKS = YES; 212 | GCC_OPTIMIZATION_LEVEL = 0; 213 | GCC_PREPROCESSOR_DEFINITIONS = ( 214 | "DEBUG=1", 215 | "$(inherited)", 216 | ); 217 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 218 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 219 | GCC_WARN_UNDECLARED_SELECTOR = YES; 220 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 221 | GCC_WARN_UNUSED_FUNCTION = YES; 222 | GCC_WARN_UNUSED_VARIABLE = YES; 223 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 224 | MTL_ENABLE_DEBUG_INFO = YES; 225 | ONLY_ACTIVE_ARCH = YES; 226 | SDKROOT = iphoneos; 227 | TARGETED_DEVICE_FAMILY = "1,2"; 228 | }; 229 | name = Debug; 230 | }; 231 | 9F4359C41CD0B8C1002B116F /* Release */ = { 232 | isa = XCBuildConfiguration; 233 | buildSettings = { 234 | ALWAYS_SEARCH_USER_PATHS = NO; 235 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 236 | CLANG_CXX_LIBRARY = "libc++"; 237 | CLANG_ENABLE_MODULES = YES; 238 | CLANG_ENABLE_OBJC_ARC = YES; 239 | CLANG_WARN_BOOL_CONVERSION = YES; 240 | CLANG_WARN_CONSTANT_CONVERSION = YES; 241 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 242 | CLANG_WARN_EMPTY_BODY = YES; 243 | CLANG_WARN_ENUM_CONVERSION = YES; 244 | CLANG_WARN_INT_CONVERSION = YES; 245 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 246 | CLANG_WARN_UNREACHABLE_CODE = YES; 247 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 248 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 249 | COPY_PHASE_STRIP = NO; 250 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 251 | ENABLE_NS_ASSERTIONS = NO; 252 | ENABLE_STRICT_OBJC_MSGSEND = YES; 253 | GCC_C_LANGUAGE_STANDARD = gnu99; 254 | GCC_NO_COMMON_BLOCKS = YES; 255 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 256 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 257 | GCC_WARN_UNDECLARED_SELECTOR = YES; 258 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 259 | GCC_WARN_UNUSED_FUNCTION = YES; 260 | GCC_WARN_UNUSED_VARIABLE = YES; 261 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 262 | MTL_ENABLE_DEBUG_INFO = NO; 263 | SDKROOT = iphoneos; 264 | TARGETED_DEVICE_FAMILY = "1,2"; 265 | VALIDATE_PRODUCT = YES; 266 | }; 267 | name = Release; 268 | }; 269 | 9F4359C61CD0B8C1002B116F /* Debug */ = { 270 | isa = XCBuildConfiguration; 271 | buildSettings = { 272 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 273 | INFOPLIST_FILE = "KVO演示/Info.plist"; 274 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 275 | PRODUCT_BUNDLE_IDENTIFIER = "Azuo.KVO--"; 276 | PRODUCT_NAME = "$(TARGET_NAME)"; 277 | }; 278 | name = Debug; 279 | }; 280 | 9F4359C71CD0B8C1002B116F /* Release */ = { 281 | isa = XCBuildConfiguration; 282 | buildSettings = { 283 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 284 | INFOPLIST_FILE = "KVO演示/Info.plist"; 285 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 286 | PRODUCT_BUNDLE_IDENTIFIER = "Azuo.KVO--"; 287 | PRODUCT_NAME = "$(TARGET_NAME)"; 288 | }; 289 | name = Release; 290 | }; 291 | /* End XCBuildConfiguration section */ 292 | 293 | /* Begin XCConfigurationList section */ 294 | 9F4359A91CD0B8C1002B116F /* Build configuration list for PBXProject "KVO演示" */ = { 295 | isa = XCConfigurationList; 296 | buildConfigurations = ( 297 | 9F4359C31CD0B8C1002B116F /* Debug */, 298 | 9F4359C41CD0B8C1002B116F /* Release */, 299 | ); 300 | defaultConfigurationIsVisible = 0; 301 | defaultConfigurationName = Release; 302 | }; 303 | 9F4359C51CD0B8C1002B116F /* Build configuration list for PBXNativeTarget "KVO演示" */ = { 304 | isa = XCConfigurationList; 305 | buildConfigurations = ( 306 | 9F4359C61CD0B8C1002B116F /* Debug */, 307 | 9F4359C71CD0B8C1002B116F /* Release */, 308 | ); 309 | defaultConfigurationIsVisible = 0; 310 | defaultConfigurationName = Release; 311 | }; 312 | /* End XCConfigurationList section */ 313 | }; 314 | rootObject = 9F4359A61CD0B8C1002B116F /* Project object */; 315 | } 316 | --------------------------------------------------------------------------------