├── LICENSE ├── Podfile ├── Podfile.lock ├── Pods ├── HYBUnicodeReadable │ ├── HYBUnicodeReadable │ │ ├── NSArray+HYBUnicodeReadable.h │ │ ├── NSArray+HYBUnicodeReadable.m │ │ ├── NSDictionary+HYBUnicodeReadable.h │ │ ├── NSDictionary+HYBUnicodeReadable.m │ │ ├── NSSet+HYBUnicodeReadable.h │ │ └── NSSet+HYBUnicodeReadable.m │ ├── LICENSE │ └── README.md ├── Headers │ ├── Private │ │ └── HYBUnicodeReadable │ │ │ ├── NSArray+HYBUnicodeReadable.h │ │ │ ├── NSDictionary+HYBUnicodeReadable.h │ │ │ └── NSSet+HYBUnicodeReadable.h │ └── Public │ │ └── HYBUnicodeReadable │ │ ├── NSArray+HYBUnicodeReadable.h │ │ ├── NSDictionary+HYBUnicodeReadable.h │ │ └── NSSet+HYBUnicodeReadable.h ├── Manifest.lock ├── Pods.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ │ └── huangyibiao.xcuserdatad │ │ └── xcschemes │ │ ├── HYBUnicodeReadable.xcscheme │ │ ├── Pods.xcscheme │ │ └── xcschememanagement.plist └── Target Support Files │ ├── HYBUnicodeReadable │ ├── HYBUnicodeReadable-dummy.m │ ├── HYBUnicodeReadable-prefix.pch │ └── HYBUnicodeReadable.xcconfig │ └── Pods │ ├── Pods-acknowledgements.markdown │ ├── Pods-acknowledgements.plist │ ├── Pods-dummy.m │ ├── Pods-frameworks.sh │ ├── Pods-resources.sh │ ├── Pods.debug.xcconfig │ └── Pods.release.xcconfig ├── README.md ├── RuntimeDemo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── huangyibiao.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── huangyibiao.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── RuntimeDemo.xcscheme │ └── xcschememanagement.plist ├── RuntimeDemo.xcworkspace ├── contents.xcworkspacedata └── xcuserdata │ └── huangyibiao.xcuserdatad │ ├── UserInterfaceState.xcuserstate │ └── xcdebugger │ └── Breakpoints_v2.xcbkptlist ├── RuntimeDemo ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── HDFArchiveModel.h ├── HDFArchiveModel.m ├── HYBCat.h ├── HYBCat.m ├── HYBDog.h ├── HYBDog.m ├── HYBMethodExchange.h ├── HYBMethodExchange.m ├── HYBMethodLearn.h ├── HYBMethodLearn.m ├── HYBMsgSend.h ├── HYBMsgSend.m ├── HYBPig.h ├── HYBPig.m ├── HYBPropertyLearn.h ├── HYBPropertyLearn.m ├── HYBTestEntry.h ├── HYBTestEntry.m ├── HYBTestModel.h ├── HYBTestModel.m ├── Info.plist ├── NSArray+Swizzling.h ├── NSArray+Swizzling.m ├── NSMutableArray+Swizzling.h ├── NSMutableArray+Swizzling.m ├── NSObject+Swizzling.h ├── NSObject+Swizzling.m ├── UIControl+HYBBlock.h ├── UIControl+HYBBlock.m ├── UIViewController+Swizzling.h ├── UIViewController+Swizzling.m ├── ViewController.h ├── ViewController.m └── main.m ├── RuntimeDemoTests ├── Info.plist └── RuntimeDemoTests.m └── RuntimeDemoUITests ├── Info.plist └── RuntimeDemoUITests.m /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 JackyHuang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | 2 | pod 'HYBUnicodeReadable', '~> 0.0.1' 3 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - HYBUnicodeReadable (0.0.1) 3 | 4 | DEPENDENCIES: 5 | - HYBUnicodeReadable (~> 0.0.1) 6 | 7 | SPEC CHECKSUMS: 8 | HYBUnicodeReadable: 3ba06a721d27f08b9aaee9ae89173ef5d092b9d6 9 | 10 | COCOAPODS: 0.39.0 11 | -------------------------------------------------------------------------------- /Pods/HYBUnicodeReadable/HYBUnicodeReadable/NSArray+HYBUnicodeReadable.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+HYBUnicodeReadable.h 3 | // demo 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /*! 12 | * @author 黄仪标, 16-12-29 10:12:52 13 | * 14 | * 请不要删除作者信息 15 | * 16 | * @blog article http://www.henishuo.com/ios-unicode-readable/ 17 | * @github https://github.com/CoderJackyHuang/HYBUnicodeReadable 18 | * @email huangyibiao520@163.com 19 | * @sinaweibo 标哥Jacky 20 | */ 21 | @interface NSArray (HYBUnicodeReadable) 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Pods/HYBUnicodeReadable/HYBUnicodeReadable/NSArray+HYBUnicodeReadable.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+HYBUnicodeReadable.m 3 | // demo 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "NSArray+HYBUnicodeReadable.h" 10 | 11 | @implementation NSArray (HYBUnicodeReadable) 12 | 13 | - (NSString *)descriptionWithLocale:(id)locale indent:(NSUInteger)level { 14 | NSMutableString *desc = [NSMutableString string]; 15 | 16 | NSMutableString *tabString = [[NSMutableString alloc] initWithCapacity:level]; 17 | for (NSUInteger i = 0; i < level; ++i) { 18 | [tabString appendString:@"\t"]; 19 | } 20 | 21 | NSString *tab = @""; 22 | if (level > 0) { 23 | tab = tabString; 24 | } 25 | [desc appendString:@"\t(\n"]; 26 | 27 | for (id obj in self) { 28 | if ([obj isKindOfClass:[NSDictionary class]] 29 | || [obj isKindOfClass:[NSArray class]] 30 | || [obj isKindOfClass:[NSSet class]]) { 31 | NSString *str = [((NSDictionary *)obj) descriptionWithLocale:locale indent:level + 1]; 32 | [desc appendFormat:@"%@\t%@,\n", tab, str]; 33 | } else if ([obj isKindOfClass:[NSString class]]) { 34 | [desc appendFormat:@"%@\t\"%@\",\n", tab, obj]; 35 | } else { 36 | [desc appendFormat:@"%@\t%@,\n", tab, obj]; 37 | } 38 | } 39 | 40 | [desc appendFormat:@"%@)", tab]; 41 | 42 | return desc; 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Pods/HYBUnicodeReadable/HYBUnicodeReadable/NSDictionary+HYBUnicodeReadable.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+HYBUnicodeReadable.h 3 | // demo 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /*! 12 | * @author 黄仪标, 16-12-29 10:12:52 13 | * 14 | * 请不要删除作者信息 15 | * 16 | * @blog article http://www.henishuo.com/ios-unicode-readable/ 17 | * @github https://github.com/CoderJackyHuang/HYBUnicodeReadable 18 | * @email huangyibiao520@163.com 19 | * @sinaweibo 标哥Jacky 20 | */ 21 | @interface NSDictionary (HYBUnicodeReadable) 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Pods/HYBUnicodeReadable/HYBUnicodeReadable/NSDictionary+HYBUnicodeReadable.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+HYBUnicodeReadable.m 3 | // demo 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "NSDictionary+HYBUnicodeReadable.h" 10 | 11 | @implementation NSDictionary (HYBUnicodeReadable) 12 | 13 | - (NSString *)descriptionWithLocale:(id)locale indent:(NSUInteger)level { 14 | NSMutableString *desc = [NSMutableString string]; 15 | 16 | NSMutableString *tabString = [[NSMutableString alloc] initWithCapacity:level]; 17 | for (NSUInteger i = 0; i < level; ++i) { 18 | [tabString appendString:@"\t"]; 19 | } 20 | 21 | NSString *tab = @""; 22 | if (level > 0) { 23 | tab = tabString; 24 | } 25 | 26 | [desc appendString:@"\t{\n"]; 27 | 28 | // 遍历数组,self就是当前的数组 29 | for (id key in self.allKeys) { 30 | id obj = [self objectForKey:key]; 31 | 32 | if ([obj isKindOfClass:[NSString class]]) { 33 | [desc appendFormat:@"%@\t%@ = \"%@\",\n", tab, key, obj]; 34 | } else if ([obj isKindOfClass:[NSArray class]] 35 | || [obj isKindOfClass:[NSDictionary class]] 36 | || [obj isKindOfClass:[NSSet class]]) { 37 | [desc appendFormat:@"%@\t%@ = %@,\n", tab, key, [obj descriptionWithLocale:locale indent:level + 1]]; 38 | } else { 39 | [desc appendFormat:@"%@\t%@ = %@,\n", tab, key, obj]; 40 | } 41 | } 42 | 43 | [desc appendFormat:@"%@}", tab]; 44 | 45 | return desc; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Pods/HYBUnicodeReadable/HYBUnicodeReadable/NSSet+HYBUnicodeReadable.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSSet+HYBUnicodeReadable.h 3 | // demo 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /*! 12 | * @author 黄仪标, 16-12-29 10:12:52 13 | * 14 | * 请不要删除作者信息 15 | * 16 | * @blog article http://www.henishuo.com/ios-unicode-readable/ 17 | * @github https://github.com/CoderJackyHuang/HYBUnicodeReadable 18 | * @email huangyibiao520@163.com 19 | * @sinaweibo 标哥Jacky 20 | */ 21 | @interface NSSet (HYBUnicodeReadable) 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Pods/HYBUnicodeReadable/HYBUnicodeReadable/NSSet+HYBUnicodeReadable.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSSet+HYBUnicodeReadable.m 3 | // demo 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "NSSet+HYBUnicodeReadable.h" 10 | 11 | @implementation NSSet (HYBUnicodeReadable) 12 | 13 | - (NSString *)descriptionWithLocale:(id)locale indent:(NSUInteger)level { 14 | NSMutableString *desc = [NSMutableString string]; 15 | 16 | NSMutableString *tabString = [[NSMutableString alloc] initWithCapacity:level]; 17 | for (NSUInteger i = 0; i < level; ++i) { 18 | [tabString appendString:@"\t"]; 19 | } 20 | 21 | NSString *tab = @"\t"; 22 | if (level > 0) { 23 | tab = tabString; 24 | } 25 | [desc appendString:@"\t{(\n"]; 26 | 27 | for (id obj in self) { 28 | if ([obj isKindOfClass:[NSDictionary class]] 29 | || [obj isKindOfClass:[NSArray class]] 30 | || [obj isKindOfClass:[NSSet class]]) { 31 | NSString *str = [((NSDictionary *)obj) descriptionWithLocale:locale indent:level + 1]; 32 | [desc appendFormat:@"%@\t%@,\n", tab, str]; 33 | } else if ([obj isKindOfClass:[NSString class]]) { 34 | [desc appendFormat:@"%@\t\"%@\",\n", tab, obj]; 35 | } else { 36 | [desc appendFormat:@"%@\t%@,\n", tab, obj]; 37 | } 38 | } 39 | 40 | [desc appendFormat:@"%@)}", tab]; 41 | 42 | return desc; 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Pods/HYBUnicodeReadable/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 JackyHuang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Pods/HYBUnicodeReadable/README.md: -------------------------------------------------------------------------------- 1 | # HYBUnicodeReadable 2 | 解决打印日志对于Unicode编码不能正常显示中文的问题,只需要将文件导入工程,不需要引用,就能达到打印日志显示Unicode编码中文数据 3 | 4 | #用途 5 | 6 | 在开发中,通常希望在console中打印出的信息能够显示出Unicode编码对应的中文,由此作者研究了一下如何解决此问题。 7 | 在这里,将此解决方案贡献给大家,如果觉得有用,请给个star! 8 | 9 | #效果图 10 | 11 | ![image](https://github.com/CoderJackyHuang/HYBUnicodeReadable/blob/master/screenshot.gif) 12 | 13 | #讲解 14 | 15 | 为了更详细地说明如何使用,笔者写了一篇博文,大家可以阅读:[http://www.henishuo.com/ios-unicode-readable/](http://www.henishuo.com/ios-unicode-readable/) 16 | 17 | #维护 18 | 19 | 笔者会一直维护,如果使用过程中出现任何bug,请反馈给作者,谢谢您的支持!!! 20 | 21 | #关注我 22 | 23 | 如果在使用过程中遇到问题,或者想要与我交流,可加入有问必答**QQ群:[324400294]()** 24 | 25 | 关注微信公众号:[**iOSDevShares**]() 26 | 27 | 关注新浪微博账号:[标哥Jacky](http://weibo.com/u/5384637337) 28 | 29 | #支持并捐助 30 | 31 | 如果您觉得文章对您很有帮助,希望得到您的支持。您的捐肋将会给予我最大的鼓励,感谢您的支持! 32 | 33 | 支付宝捐助 | 微信捐助 34 | ------------- | ------------- 35 | ![image](http://www.henishuo.com/wp-content/uploads/2015/12/alipay-e1451124478416.jpg) | ![image](http://www.henishuo.com/wp-content/uploads/2015/12/weixin.jpg) 36 | -------------------------------------------------------------------------------- /Pods/Headers/Private/HYBUnicodeReadable/NSArray+HYBUnicodeReadable.h: -------------------------------------------------------------------------------- 1 | ../../../HYBUnicodeReadable/HYBUnicodeReadable/NSArray+HYBUnicodeReadable.h -------------------------------------------------------------------------------- /Pods/Headers/Private/HYBUnicodeReadable/NSDictionary+HYBUnicodeReadable.h: -------------------------------------------------------------------------------- 1 | ../../../HYBUnicodeReadable/HYBUnicodeReadable/NSDictionary+HYBUnicodeReadable.h -------------------------------------------------------------------------------- /Pods/Headers/Private/HYBUnicodeReadable/NSSet+HYBUnicodeReadable.h: -------------------------------------------------------------------------------- 1 | ../../../HYBUnicodeReadable/HYBUnicodeReadable/NSSet+HYBUnicodeReadable.h -------------------------------------------------------------------------------- /Pods/Headers/Public/HYBUnicodeReadable/NSArray+HYBUnicodeReadable.h: -------------------------------------------------------------------------------- 1 | ../../../HYBUnicodeReadable/HYBUnicodeReadable/NSArray+HYBUnicodeReadable.h -------------------------------------------------------------------------------- /Pods/Headers/Public/HYBUnicodeReadable/NSDictionary+HYBUnicodeReadable.h: -------------------------------------------------------------------------------- 1 | ../../../HYBUnicodeReadable/HYBUnicodeReadable/NSDictionary+HYBUnicodeReadable.h -------------------------------------------------------------------------------- /Pods/Headers/Public/HYBUnicodeReadable/NSSet+HYBUnicodeReadable.h: -------------------------------------------------------------------------------- 1 | ../../../HYBUnicodeReadable/HYBUnicodeReadable/NSSet+HYBUnicodeReadable.h -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - HYBUnicodeReadable (0.0.1) 3 | 4 | DEPENDENCIES: 5 | - HYBUnicodeReadable (~> 0.0.1) 6 | 7 | SPEC CHECKSUMS: 8 | HYBUnicodeReadable: 3ba06a721d27f08b9aaee9ae89173ef5d092b9d6 9 | 10 | COCOAPODS: 0.39.0 11 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0836ADB4A8615AA972D4AA8F3FD08D98 /* NSArray+HYBUnicodeReadable.m in Sources */ = {isa = PBXBuildFile; fileRef = 6550073C3546412FB3B89D9A37B63719 /* NSArray+HYBUnicodeReadable.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; 11 | 0FE229B87CA9013F5D29D56342988954 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */; }; 12 | 34E4950A9C7F832530162B3E9BA07B28 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */; }; 13 | 3EFF832C631B219CC3A25B5014B0F7D7 /* NSArray+HYBUnicodeReadable.h in Headers */ = {isa = PBXBuildFile; fileRef = 485FA14CF66122F2E82961B2E7A06012 /* NSArray+HYBUnicodeReadable.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14 | 63BAB1E8B82160C8C263044A368AD178 /* NSSet+HYBUnicodeReadable.h in Headers */ = {isa = PBXBuildFile; fileRef = DE6C78569D6C9FD68B474D58F98A57EA /* NSSet+HYBUnicodeReadable.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15 | 64149ACE6BE6681C7D1CBF075A29072C /* Pods-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 272643F56613CA0D336AE3DBF19DC404 /* Pods-dummy.m */; }; 16 | 8601FF9D67997CFE59537E3267B85983 /* HYBUnicodeReadable-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CE0C1B260C895FD00F97ABCD56A6086 /* HYBUnicodeReadable-dummy.m */; }; 17 | D6CF5F64F26778C15E00AFA7EB04B187 /* NSDictionary+HYBUnicodeReadable.h in Headers */ = {isa = PBXBuildFile; fileRef = 7FF804FBC98DD013A93E36316BA4E7B1 /* NSDictionary+HYBUnicodeReadable.h */; settings = {ATTRIBUTES = (Public, ); }; }; 18 | D85BD2535FB39B1CBCDA28BE90977C8B /* NSSet+HYBUnicodeReadable.m in Sources */ = {isa = PBXBuildFile; fileRef = F22A2DB1CCEB27745D06342D44FD7E6D /* NSSet+HYBUnicodeReadable.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; 19 | E31930CE730FEFA1B38764F329E11EDC /* NSDictionary+HYBUnicodeReadable.m in Sources */ = {isa = PBXBuildFile; fileRef = A1FFBC1E8A32BF1B14995D696E61A62A /* NSDictionary+HYBUnicodeReadable.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | D0075E5FB15D1916010EF23D1ABCF9FC /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = CF4405E19DD99D7A6C6EF5065C000E2F; 28 | remoteInfo = HYBUnicodeReadable; 29 | }; 30 | /* End PBXContainerItemProxy section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 10834806BD7B412BC24F347361FA2C8E /* Pods-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-acknowledgements.plist"; sourceTree = ""; }; 34 | 272643F56613CA0D336AE3DBF19DC404 /* Pods-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-dummy.m"; sourceTree = ""; }; 35 | 2CE0C1B260C895FD00F97ABCD56A6086 /* HYBUnicodeReadable-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "HYBUnicodeReadable-dummy.m"; sourceTree = ""; }; 36 | 37DB56D75062CC75FCB0966E1C6E8A8E /* Pods-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-acknowledgements.markdown"; sourceTree = ""; }; 37 | 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 38 | 472E13C1677239E7B9556F659CCE2B6F /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | 485FA14CF66122F2E82961B2E7A06012 /* NSArray+HYBUnicodeReadable.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+HYBUnicodeReadable.h"; path = "HYBUnicodeReadable/NSArray+HYBUnicodeReadable.h"; sourceTree = ""; }; 40 | 4E762F23EC34ED4A6FF3312D84E33A40 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.debug.xcconfig; sourceTree = ""; }; 41 | 6550073C3546412FB3B89D9A37B63719 /* NSArray+HYBUnicodeReadable.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSArray+HYBUnicodeReadable.m"; path = "HYBUnicodeReadable/NSArray+HYBUnicodeReadable.m"; sourceTree = ""; }; 42 | 6911BECA35E7518D864239B7E898EEF3 /* Pods-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-frameworks.sh"; sourceTree = ""; }; 43 | 7FF804FBC98DD013A93E36316BA4E7B1 /* NSDictionary+HYBUnicodeReadable.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+HYBUnicodeReadable.h"; path = "HYBUnicodeReadable/NSDictionary+HYBUnicodeReadable.h"; sourceTree = ""; }; 44 | 98C98CDFB3F20F2925F6CD1F141BB14F /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.release.xcconfig; sourceTree = ""; }; 45 | A1A36D34413696BE466E2CA0AFF194DA /* Pods-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-resources.sh"; sourceTree = ""; }; 46 | A1FFBC1E8A32BF1B14995D696E61A62A /* NSDictionary+HYBUnicodeReadable.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+HYBUnicodeReadable.m"; path = "HYBUnicodeReadable/NSDictionary+HYBUnicodeReadable.m"; sourceTree = ""; }; 47 | B8726015D23EC062A1D8D1006E66BE79 /* HYBUnicodeReadable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = HYBUnicodeReadable.xcconfig; sourceTree = ""; }; 48 | BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 49 | C3670D79FC08E6E1C580B7F3F84FCCB6 /* HYBUnicodeReadable-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "HYBUnicodeReadable-prefix.pch"; sourceTree = ""; }; 50 | D56E885F96BC54B8BC1FBEB8A6630C00 /* libHYBUnicodeReadable.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libHYBUnicodeReadable.a; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | DE6C78569D6C9FD68B474D58F98A57EA /* NSSet+HYBUnicodeReadable.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSSet+HYBUnicodeReadable.h"; path = "HYBUnicodeReadable/NSSet+HYBUnicodeReadable.h"; sourceTree = ""; }; 52 | F22A2DB1CCEB27745D06342D44FD7E6D /* NSSet+HYBUnicodeReadable.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSSet+HYBUnicodeReadable.m"; path = "HYBUnicodeReadable/NSSet+HYBUnicodeReadable.m"; sourceTree = ""; }; 53 | /* End PBXFileReference section */ 54 | 55 | /* Begin PBXFrameworksBuildPhase section */ 56 | 666C99C66372B7C6C11E7C5FCCEA3835 /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | 34E4950A9C7F832530162B3E9BA07B28 /* Foundation.framework in Frameworks */, 61 | ); 62 | runOnlyForDeploymentPostprocessing = 0; 63 | }; 64 | D7F9FC1C46AA18CA6AB1365F061DFB55 /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | 0FE229B87CA9013F5D29D56342988954 /* Foundation.framework in Frameworks */, 69 | ); 70 | runOnlyForDeploymentPostprocessing = 0; 71 | }; 72 | /* End PBXFrameworksBuildPhase section */ 73 | 74 | /* Begin PBXGroup section */ 75 | 037C0CA694176A3C0915F62C9D20B3E6 /* Targets Support Files */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | B3D1D13E0C6553800746CB8FD61CF946 /* Pods */, 79 | ); 80 | name = "Targets Support Files"; 81 | sourceTree = ""; 82 | }; 83 | 6D501A69D7EB6EF0C0B5A157F85B9B2C /* Pods */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | BDF535FB72CAE3CC9847118992A08AA9 /* HYBUnicodeReadable */, 87 | ); 88 | name = Pods; 89 | sourceTree = ""; 90 | }; 91 | 7DB346D0F39D3F0E887471402A8071AB = { 92 | isa = PBXGroup; 93 | children = ( 94 | BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */, 95 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 96 | 6D501A69D7EB6EF0C0B5A157F85B9B2C /* Pods */, 97 | F48ACADB7A11232E4852810D4D3C9775 /* Products */, 98 | 037C0CA694176A3C0915F62C9D20B3E6 /* Targets Support Files */, 99 | ); 100 | sourceTree = ""; 101 | }; 102 | 9913DCF0DB50FB3AB6480D902FA24F2C /* Support Files */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | B8726015D23EC062A1D8D1006E66BE79 /* HYBUnicodeReadable.xcconfig */, 106 | 2CE0C1B260C895FD00F97ABCD56A6086 /* HYBUnicodeReadable-dummy.m */, 107 | C3670D79FC08E6E1C580B7F3F84FCCB6 /* HYBUnicodeReadable-prefix.pch */, 108 | ); 109 | name = "Support Files"; 110 | path = "../Target Support Files/HYBUnicodeReadable"; 111 | sourceTree = ""; 112 | }; 113 | B3D1D13E0C6553800746CB8FD61CF946 /* Pods */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 37DB56D75062CC75FCB0966E1C6E8A8E /* Pods-acknowledgements.markdown */, 117 | 10834806BD7B412BC24F347361FA2C8E /* Pods-acknowledgements.plist */, 118 | 272643F56613CA0D336AE3DBF19DC404 /* Pods-dummy.m */, 119 | 6911BECA35E7518D864239B7E898EEF3 /* Pods-frameworks.sh */, 120 | A1A36D34413696BE466E2CA0AFF194DA /* Pods-resources.sh */, 121 | 4E762F23EC34ED4A6FF3312D84E33A40 /* Pods.debug.xcconfig */, 122 | 98C98CDFB3F20F2925F6CD1F141BB14F /* Pods.release.xcconfig */, 123 | ); 124 | name = Pods; 125 | path = "Target Support Files/Pods"; 126 | sourceTree = ""; 127 | }; 128 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | BF6342C8B29F4CEEA088EFF7AB4DE362 /* iOS */, 132 | ); 133 | name = Frameworks; 134 | sourceTree = ""; 135 | }; 136 | BDF535FB72CAE3CC9847118992A08AA9 /* HYBUnicodeReadable */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 485FA14CF66122F2E82961B2E7A06012 /* NSArray+HYBUnicodeReadable.h */, 140 | 6550073C3546412FB3B89D9A37B63719 /* NSArray+HYBUnicodeReadable.m */, 141 | 7FF804FBC98DD013A93E36316BA4E7B1 /* NSDictionary+HYBUnicodeReadable.h */, 142 | A1FFBC1E8A32BF1B14995D696E61A62A /* NSDictionary+HYBUnicodeReadable.m */, 143 | DE6C78569D6C9FD68B474D58F98A57EA /* NSSet+HYBUnicodeReadable.h */, 144 | F22A2DB1CCEB27745D06342D44FD7E6D /* NSSet+HYBUnicodeReadable.m */, 145 | 9913DCF0DB50FB3AB6480D902FA24F2C /* Support Files */, 146 | ); 147 | path = HYBUnicodeReadable; 148 | sourceTree = ""; 149 | }; 150 | BF6342C8B29F4CEEA088EFF7AB4DE362 /* iOS */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */, 154 | ); 155 | name = iOS; 156 | sourceTree = ""; 157 | }; 158 | F48ACADB7A11232E4852810D4D3C9775 /* Products */ = { 159 | isa = PBXGroup; 160 | children = ( 161 | D56E885F96BC54B8BC1FBEB8A6630C00 /* libHYBUnicodeReadable.a */, 162 | 472E13C1677239E7B9556F659CCE2B6F /* libPods.a */, 163 | ); 164 | name = Products; 165 | sourceTree = ""; 166 | }; 167 | /* End PBXGroup section */ 168 | 169 | /* Begin PBXHeadersBuildPhase section */ 170 | 46EFF4F3F6B37CC2F406116DEC1DDED8 /* Headers */ = { 171 | isa = PBXHeadersBuildPhase; 172 | buildActionMask = 2147483647; 173 | files = ( 174 | 3EFF832C631B219CC3A25B5014B0F7D7 /* NSArray+HYBUnicodeReadable.h in Headers */, 175 | D6CF5F64F26778C15E00AFA7EB04B187 /* NSDictionary+HYBUnicodeReadable.h in Headers */, 176 | 63BAB1E8B82160C8C263044A368AD178 /* NSSet+HYBUnicodeReadable.h in Headers */, 177 | ); 178 | runOnlyForDeploymentPostprocessing = 0; 179 | }; 180 | /* End PBXHeadersBuildPhase section */ 181 | 182 | /* Begin PBXNativeTarget section */ 183 | CF4405E19DD99D7A6C6EF5065C000E2F /* HYBUnicodeReadable */ = { 184 | isa = PBXNativeTarget; 185 | buildConfigurationList = 9BB837112B60D79DDB79D5B3FFF500EF /* Build configuration list for PBXNativeTarget "HYBUnicodeReadable" */; 186 | buildPhases = ( 187 | A7FEB46B46AE1919A5C998CCCA4EE403 /* Sources */, 188 | 666C99C66372B7C6C11E7C5FCCEA3835 /* Frameworks */, 189 | 46EFF4F3F6B37CC2F406116DEC1DDED8 /* Headers */, 190 | ); 191 | buildRules = ( 192 | ); 193 | dependencies = ( 194 | ); 195 | name = HYBUnicodeReadable; 196 | productName = HYBUnicodeReadable; 197 | productReference = D56E885F96BC54B8BC1FBEB8A6630C00 /* libHYBUnicodeReadable.a */; 198 | productType = "com.apple.product-type.library.static"; 199 | }; 200 | F8CAB9B6D2C4FDA32742464BEB5285A3 /* Pods */ = { 201 | isa = PBXNativeTarget; 202 | buildConfigurationList = 71A242FC789E85E96DE2F75C218F22E8 /* Build configuration list for PBXNativeTarget "Pods" */; 203 | buildPhases = ( 204 | BB3B285DD84F275545480BE93D58318F /* Sources */, 205 | D7F9FC1C46AA18CA6AB1365F061DFB55 /* Frameworks */, 206 | ); 207 | buildRules = ( 208 | ); 209 | dependencies = ( 210 | 559D5354550EDE7E5961D6D7F8F06848 /* PBXTargetDependency */, 211 | ); 212 | name = Pods; 213 | productName = Pods; 214 | productReference = 472E13C1677239E7B9556F659CCE2B6F /* libPods.a */; 215 | productType = "com.apple.product-type.library.static"; 216 | }; 217 | /* End PBXNativeTarget section */ 218 | 219 | /* Begin PBXProject section */ 220 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 221 | isa = PBXProject; 222 | attributes = { 223 | LastSwiftUpdateCheck = 0700; 224 | LastUpgradeCheck = 0700; 225 | }; 226 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 227 | compatibilityVersion = "Xcode 3.2"; 228 | developmentRegion = English; 229 | hasScannedForEncodings = 0; 230 | knownRegions = ( 231 | en, 232 | ); 233 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 234 | productRefGroup = F48ACADB7A11232E4852810D4D3C9775 /* Products */; 235 | projectDirPath = ""; 236 | projectRoot = ""; 237 | targets = ( 238 | CF4405E19DD99D7A6C6EF5065C000E2F /* HYBUnicodeReadable */, 239 | F8CAB9B6D2C4FDA32742464BEB5285A3 /* Pods */, 240 | ); 241 | }; 242 | /* End PBXProject section */ 243 | 244 | /* Begin PBXSourcesBuildPhase section */ 245 | A7FEB46B46AE1919A5C998CCCA4EE403 /* Sources */ = { 246 | isa = PBXSourcesBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | 8601FF9D67997CFE59537E3267B85983 /* HYBUnicodeReadable-dummy.m in Sources */, 250 | 0836ADB4A8615AA972D4AA8F3FD08D98 /* NSArray+HYBUnicodeReadable.m in Sources */, 251 | E31930CE730FEFA1B38764F329E11EDC /* NSDictionary+HYBUnicodeReadable.m in Sources */, 252 | D85BD2535FB39B1CBCDA28BE90977C8B /* NSSet+HYBUnicodeReadable.m in Sources */, 253 | ); 254 | runOnlyForDeploymentPostprocessing = 0; 255 | }; 256 | BB3B285DD84F275545480BE93D58318F /* Sources */ = { 257 | isa = PBXSourcesBuildPhase; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | 64149ACE6BE6681C7D1CBF075A29072C /* Pods-dummy.m in Sources */, 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | /* End PBXSourcesBuildPhase section */ 265 | 266 | /* Begin PBXTargetDependency section */ 267 | 559D5354550EDE7E5961D6D7F8F06848 /* PBXTargetDependency */ = { 268 | isa = PBXTargetDependency; 269 | name = HYBUnicodeReadable; 270 | target = CF4405E19DD99D7A6C6EF5065C000E2F /* HYBUnicodeReadable */; 271 | targetProxy = D0075E5FB15D1916010EF23D1ABCF9FC /* PBXContainerItemProxy */; 272 | }; 273 | /* End PBXTargetDependency section */ 274 | 275 | /* Begin XCBuildConfiguration section */ 276 | 1C0529148E15DCB4C38B599ED3738A85 /* Release */ = { 277 | isa = XCBuildConfiguration; 278 | baseConfigurationReference = 98C98CDFB3F20F2925F6CD1F141BB14F /* Pods.release.xcconfig */; 279 | buildSettings = { 280 | ENABLE_STRICT_OBJC_MSGSEND = YES; 281 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 282 | MACH_O_TYPE = staticlib; 283 | MTL_ENABLE_DEBUG_INFO = NO; 284 | OTHER_LDFLAGS = ""; 285 | OTHER_LIBTOOLFLAGS = ""; 286 | PODS_ROOT = "$(SRCROOT)"; 287 | PRODUCT_NAME = "$(TARGET_NAME)"; 288 | SDKROOT = iphoneos; 289 | SKIP_INSTALL = YES; 290 | }; 291 | name = Release; 292 | }; 293 | 1F2746E94657BC5C602AE4F59E41F20C /* Debug */ = { 294 | isa = XCBuildConfiguration; 295 | baseConfigurationReference = B8726015D23EC062A1D8D1006E66BE79 /* HYBUnicodeReadable.xcconfig */; 296 | buildSettings = { 297 | ENABLE_STRICT_OBJC_MSGSEND = YES; 298 | GCC_PREFIX_HEADER = "Target Support Files/HYBUnicodeReadable/HYBUnicodeReadable-prefix.pch"; 299 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 300 | MTL_ENABLE_DEBUG_INFO = YES; 301 | OTHER_LDFLAGS = ""; 302 | OTHER_LIBTOOLFLAGS = ""; 303 | PRIVATE_HEADERS_FOLDER_PATH = ""; 304 | PRODUCT_NAME = "$(TARGET_NAME)"; 305 | PUBLIC_HEADERS_FOLDER_PATH = ""; 306 | SDKROOT = iphoneos; 307 | SKIP_INSTALL = YES; 308 | }; 309 | name = Debug; 310 | }; 311 | 3EF48C0125CCAEA8850C969B5F44C051 /* Debug */ = { 312 | isa = XCBuildConfiguration; 313 | baseConfigurationReference = 4E762F23EC34ED4A6FF3312D84E33A40 /* Pods.debug.xcconfig */; 314 | buildSettings = { 315 | ENABLE_STRICT_OBJC_MSGSEND = YES; 316 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 317 | MACH_O_TYPE = staticlib; 318 | MTL_ENABLE_DEBUG_INFO = YES; 319 | OTHER_LDFLAGS = ""; 320 | OTHER_LIBTOOLFLAGS = ""; 321 | PODS_ROOT = "$(SRCROOT)"; 322 | PRODUCT_NAME = "$(TARGET_NAME)"; 323 | SDKROOT = iphoneos; 324 | SKIP_INSTALL = YES; 325 | }; 326 | name = Debug; 327 | }; 328 | 8D1534490D941DCA47C62AC4314182AF /* Debug */ = { 329 | isa = XCBuildConfiguration; 330 | buildSettings = { 331 | ALWAYS_SEARCH_USER_PATHS = NO; 332 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 333 | CLANG_CXX_LIBRARY = "libc++"; 334 | CLANG_ENABLE_MODULES = YES; 335 | CLANG_ENABLE_OBJC_ARC = YES; 336 | CLANG_WARN_BOOL_CONVERSION = YES; 337 | CLANG_WARN_CONSTANT_CONVERSION = YES; 338 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 339 | CLANG_WARN_EMPTY_BODY = YES; 340 | CLANG_WARN_ENUM_CONVERSION = YES; 341 | CLANG_WARN_INT_CONVERSION = YES; 342 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 343 | CLANG_WARN_UNREACHABLE_CODE = YES; 344 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 345 | COPY_PHASE_STRIP = NO; 346 | GCC_C_LANGUAGE_STANDARD = gnu99; 347 | GCC_DYNAMIC_NO_PIC = NO; 348 | GCC_OPTIMIZATION_LEVEL = 0; 349 | GCC_PREPROCESSOR_DEFINITIONS = ( 350 | "DEBUG=1", 351 | "$(inherited)", 352 | ); 353 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 354 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 355 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 356 | GCC_WARN_UNDECLARED_SELECTOR = YES; 357 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 358 | GCC_WARN_UNUSED_FUNCTION = YES; 359 | GCC_WARN_UNUSED_VARIABLE = YES; 360 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 361 | ONLY_ACTIVE_ARCH = YES; 362 | STRIP_INSTALLED_PRODUCT = NO; 363 | SYMROOT = "${SRCROOT}/../build"; 364 | }; 365 | name = Debug; 366 | }; 367 | C5A18280E9321A9268D1C80B7DA43967 /* Release */ = { 368 | isa = XCBuildConfiguration; 369 | buildSettings = { 370 | ALWAYS_SEARCH_USER_PATHS = NO; 371 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 372 | CLANG_CXX_LIBRARY = "libc++"; 373 | CLANG_ENABLE_MODULES = YES; 374 | CLANG_ENABLE_OBJC_ARC = YES; 375 | CLANG_WARN_BOOL_CONVERSION = YES; 376 | CLANG_WARN_CONSTANT_CONVERSION = YES; 377 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 378 | CLANG_WARN_EMPTY_BODY = YES; 379 | CLANG_WARN_ENUM_CONVERSION = YES; 380 | CLANG_WARN_INT_CONVERSION = YES; 381 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 382 | CLANG_WARN_UNREACHABLE_CODE = YES; 383 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 384 | COPY_PHASE_STRIP = YES; 385 | ENABLE_NS_ASSERTIONS = NO; 386 | GCC_C_LANGUAGE_STANDARD = gnu99; 387 | GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1"; 388 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 389 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 390 | GCC_WARN_UNDECLARED_SELECTOR = YES; 391 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 392 | GCC_WARN_UNUSED_FUNCTION = YES; 393 | GCC_WARN_UNUSED_VARIABLE = YES; 394 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 395 | STRIP_INSTALLED_PRODUCT = NO; 396 | SYMROOT = "${SRCROOT}/../build"; 397 | VALIDATE_PRODUCT = YES; 398 | }; 399 | name = Release; 400 | }; 401 | C5FB4DE8334E0461EF191F3B84B342C8 /* Release */ = { 402 | isa = XCBuildConfiguration; 403 | baseConfigurationReference = B8726015D23EC062A1D8D1006E66BE79 /* HYBUnicodeReadable.xcconfig */; 404 | buildSettings = { 405 | ENABLE_STRICT_OBJC_MSGSEND = YES; 406 | GCC_PREFIX_HEADER = "Target Support Files/HYBUnicodeReadable/HYBUnicodeReadable-prefix.pch"; 407 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 408 | MTL_ENABLE_DEBUG_INFO = NO; 409 | OTHER_LDFLAGS = ""; 410 | OTHER_LIBTOOLFLAGS = ""; 411 | PRIVATE_HEADERS_FOLDER_PATH = ""; 412 | PRODUCT_NAME = "$(TARGET_NAME)"; 413 | PUBLIC_HEADERS_FOLDER_PATH = ""; 414 | SDKROOT = iphoneos; 415 | SKIP_INSTALL = YES; 416 | }; 417 | name = Release; 418 | }; 419 | /* End XCBuildConfiguration section */ 420 | 421 | /* Begin XCConfigurationList section */ 422 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 423 | isa = XCConfigurationList; 424 | buildConfigurations = ( 425 | 8D1534490D941DCA47C62AC4314182AF /* Debug */, 426 | C5A18280E9321A9268D1C80B7DA43967 /* Release */, 427 | ); 428 | defaultConfigurationIsVisible = 0; 429 | defaultConfigurationName = Release; 430 | }; 431 | 71A242FC789E85E96DE2F75C218F22E8 /* Build configuration list for PBXNativeTarget "Pods" */ = { 432 | isa = XCConfigurationList; 433 | buildConfigurations = ( 434 | 3EF48C0125CCAEA8850C969B5F44C051 /* Debug */, 435 | 1C0529148E15DCB4C38B599ED3738A85 /* Release */, 436 | ); 437 | defaultConfigurationIsVisible = 0; 438 | defaultConfigurationName = Release; 439 | }; 440 | 9BB837112B60D79DDB79D5B3FFF500EF /* Build configuration list for PBXNativeTarget "HYBUnicodeReadable" */ = { 441 | isa = XCConfigurationList; 442 | buildConfigurations = ( 443 | 1F2746E94657BC5C602AE4F59E41F20C /* Debug */, 444 | C5FB4DE8334E0461EF191F3B84B342C8 /* Release */, 445 | ); 446 | defaultConfigurationIsVisible = 0; 447 | defaultConfigurationName = Release; 448 | }; 449 | /* End XCConfigurationList section */ 450 | }; 451 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 452 | } 453 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/huangyibiao.xcuserdatad/xcschemes/HYBUnicodeReadable.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/huangyibiao.xcuserdatad/xcschemes/Pods.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/huangyibiao.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | HYBUnicodeReadable.xcscheme 8 | 9 | isShown 10 | 11 | 12 | Pods.xcscheme 13 | 14 | isShown 15 | 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | CF4405E19DD99D7A6C6EF5065C000E2F 21 | 22 | primary 23 | 24 | 25 | F8CAB9B6D2C4FDA32742464BEB5285A3 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Pods/Target Support Files/HYBUnicodeReadable/HYBUnicodeReadable-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_HYBUnicodeReadable : NSObject 3 | @end 4 | @implementation PodsDummy_HYBUnicodeReadable 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/HYBUnicodeReadable/HYBUnicodeReadable-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Pods/Target Support Files/HYBUnicodeReadable/HYBUnicodeReadable.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/HYBUnicodeReadable" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/HYBUnicodeReadable" 3 | PODS_ROOT = ${SRCROOT} 4 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## HYBUnicodeReadable 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) 2015 JackyHuang 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | 29 | Generated by CocoaPods - http://cocoapods.org 30 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | The MIT License (MIT) 18 | 19 | Copyright (c) 2015 JackyHuang 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | 40 | Title 41 | HYBUnicodeReadable 42 | Type 43 | PSGroupSpecifier 44 | 45 | 46 | FooterText 47 | Generated by CocoaPods - http://cocoapods.org 48 | Title 49 | 50 | Type 51 | PSGroupSpecifier 52 | 53 | 54 | StringsTable 55 | Acknowledgements 56 | Title 57 | Acknowledgements 58 | 59 | 60 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods : NSObject 3 | @end 4 | @implementation PodsDummy_Pods 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | realpath() { 12 | DIRECTORY="$(cd "${1%/*}" && pwd)" 13 | FILENAME="${1##*/}" 14 | echo "$DIRECTORY/$FILENAME" 15 | } 16 | 17 | install_resource() 18 | { 19 | case $1 in 20 | *.storyboard) 21 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 22 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 23 | ;; 24 | *.xib) 25 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 26 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 27 | ;; 28 | *.framework) 29 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 30 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 31 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 32 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 33 | ;; 34 | *.xcdatamodel) 35 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 36 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 37 | ;; 38 | *.xcdatamodeld) 39 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 40 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 41 | ;; 42 | *.xcmappingmodel) 43 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" 44 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" 45 | ;; 46 | *.xcassets) 47 | ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") 48 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 49 | ;; 50 | /*) 51 | echo "$1" 52 | echo "$1" >> "$RESOURCES_TO_COPY" 53 | ;; 54 | *) 55 | echo "${PODS_ROOT}/$1" 56 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 57 | ;; 58 | esac 59 | } 60 | 61 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 62 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 63 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 64 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 65 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 66 | fi 67 | rm -f "$RESOURCES_TO_COPY" 68 | 69 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 70 | then 71 | case "${TARGETED_DEVICE_FAMILY}" in 72 | 1,2) 73 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 74 | ;; 75 | 1) 76 | TARGET_DEVICE_ARGS="--target-device iphone" 77 | ;; 78 | 2) 79 | TARGET_DEVICE_ARGS="--target-device ipad" 80 | ;; 81 | *) 82 | TARGET_DEVICE_ARGS="--target-device mac" 83 | ;; 84 | esac 85 | 86 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 87 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 88 | while read line; do 89 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then 90 | XCASSET_FILES+=("$line") 91 | fi 92 | done <<<"$OTHER_XCASSETS" 93 | 94 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 95 | fi 96 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/HYBUnicodeReadable" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/HYBUnicodeReadable" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"HYBUnicodeReadable" 5 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/HYBUnicodeReadable" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/HYBUnicodeReadable" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"HYBUnicodeReadable" 5 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RuntimeDemo 2 | 学习Runtime 3 | 4 | #文章讲解 5 | 6 | [标哥的技术博客](http://www.henishuo.com/category/runtime/) 7 | 8 | #关注我 9 | 10 | 11 | 如果在使用过程中遇到问题,或者想要与我交流,可加入有问必答**QQ群:[324400294]()** 12 | 13 | 关注微信公众号:[**iOSDevShares**]() 14 | 15 | 关注新浪微博账号:[标哥Jacky](http://weibo.com/u/5384637337) 16 | 17 | #支持并捐助 18 | 19 | 如果您觉得文章对您很有帮助,希望得到您的支持。您的捐肋将会给予我最大的鼓励,感谢您的支持! 20 | 21 | 支付宝捐助 | 微信捐助 22 | ------------- | ------------- 23 | ![image](http://www.henishuo.com/wp-content/uploads/2015/12/alipay-e1451124478416.jpg) | ![image](http://www.henishuo.com/wp-content/uploads/2015/12/weixin.jpg) 24 | 25 | -------------------------------------------------------------------------------- /RuntimeDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 303C7F5F03832071E9D4019A /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 38B8A79A2F4B8D8AA2D898F1 /* libPods.a */; }; 11 | 691D6FC51C421E68003D41FB /* HYBPropertyLearn.m in Sources */ = {isa = PBXBuildFile; fileRef = 691D6FC41C421E68003D41FB /* HYBPropertyLearn.m */; }; 12 | 691D6FC61C421E68003D41FB /* HYBPropertyLearn.m in Sources */ = {isa = PBXBuildFile; fileRef = 691D6FC41C421E68003D41FB /* HYBPropertyLearn.m */; }; 13 | 691D6FC71C421E68003D41FB /* HYBPropertyLearn.m in Sources */ = {isa = PBXBuildFile; fileRef = 691D6FC41C421E68003D41FB /* HYBPropertyLearn.m */; }; 14 | 69384B111C47631700B61526 /* HYBTestEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 69384B101C47631700B61526 /* HYBTestEntry.m */; }; 15 | 69384B121C47631700B61526 /* HYBTestEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 69384B101C47631700B61526 /* HYBTestEntry.m */; }; 16 | 69384B131C47631700B61526 /* HYBTestEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 69384B101C47631700B61526 /* HYBTestEntry.m */; }; 17 | 69654F5B1C2CDE6600FFB5AC /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 69654F5A1C2CDE6600FFB5AC /* main.m */; }; 18 | 69654F5E1C2CDE6600FFB5AC /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 69654F5D1C2CDE6600FFB5AC /* AppDelegate.m */; }; 19 | 69654F611C2CDE6600FFB5AC /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 69654F601C2CDE6600FFB5AC /* ViewController.m */; }; 20 | 69654F641C2CDE6600FFB5AC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 69654F621C2CDE6600FFB5AC /* Main.storyboard */; }; 21 | 69654F661C2CDE6600FFB5AC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 69654F651C2CDE6600FFB5AC /* Assets.xcassets */; }; 22 | 69654F691C2CDE6600FFB5AC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 69654F671C2CDE6600FFB5AC /* LaunchScreen.storyboard */; }; 23 | 69654F741C2CDE6600FFB5AC /* RuntimeDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 69654F731C2CDE6600FFB5AC /* RuntimeDemoTests.m */; }; 24 | 69654F7F1C2CDE6600FFB5AC /* RuntimeDemoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 69654F7E1C2CDE6600FFB5AC /* RuntimeDemoUITests.m */; }; 25 | 69654F931C30214500FFB5AC /* UIControl+HYBBlock.m in Sources */ = {isa = PBXBuildFile; fileRef = 69654F921C30214500FFB5AC /* UIControl+HYBBlock.m */; }; 26 | 69654F941C30214500FFB5AC /* UIControl+HYBBlock.m in Sources */ = {isa = PBXBuildFile; fileRef = 69654F921C30214500FFB5AC /* UIControl+HYBBlock.m */; }; 27 | 69654F951C30214500FFB5AC /* UIControl+HYBBlock.m in Sources */ = {isa = PBXBuildFile; fileRef = 69654F921C30214500FFB5AC /* UIControl+HYBBlock.m */; }; 28 | 69657DD51C44A67F0095C032 /* HYBMethodLearn.m in Sources */ = {isa = PBXBuildFile; fileRef = 69657DD41C44A67F0095C032 /* HYBMethodLearn.m */; }; 29 | 69657DD61C44A67F0095C032 /* HYBMethodLearn.m in Sources */ = {isa = PBXBuildFile; fileRef = 69657DD41C44A67F0095C032 /* HYBMethodLearn.m */; }; 30 | 69657DD71C44A67F0095C032 /* HYBMethodLearn.m in Sources */ = {isa = PBXBuildFile; fileRef = 69657DD41C44A67F0095C032 /* HYBMethodLearn.m */; }; 31 | 69657DDA1C44D1A30095C032 /* NSMutableArray+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 69657DD91C44D1A30095C032 /* NSMutableArray+Swizzling.m */; }; 32 | 69657DDB1C44D1A30095C032 /* NSMutableArray+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 69657DD91C44D1A30095C032 /* NSMutableArray+Swizzling.m */; }; 33 | 69657DDC1C44D1A30095C032 /* NSMutableArray+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 69657DD91C44D1A30095C032 /* NSMutableArray+Swizzling.m */; }; 34 | 69657DDF1C44D8620095C032 /* NSArray+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 69657DDE1C44D8620095C032 /* NSArray+Swizzling.m */; }; 35 | 69657DE01C44D8620095C032 /* NSArray+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 69657DDE1C44D8620095C032 /* NSArray+Swizzling.m */; }; 36 | 69657DE11C44D8620095C032 /* NSArray+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 69657DDE1C44D8620095C032 /* NSArray+Swizzling.m */; }; 37 | 69657DE41C44DB520095C032 /* NSObject+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 69657DE31C44DB520095C032 /* NSObject+Swizzling.m */; }; 38 | 69657DE51C44DB520095C032 /* NSObject+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 69657DE31C44DB520095C032 /* NSObject+Swizzling.m */; }; 39 | 69657DE61C44DB520095C032 /* NSObject+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 69657DE31C44DB520095C032 /* NSObject+Swizzling.m */; }; 40 | 69657E2D1C46402D0095C032 /* UIViewController+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 69657E2C1C46402D0095C032 /* UIViewController+Swizzling.m */; }; 41 | 69657E2E1C46402D0095C032 /* UIViewController+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 69657E2C1C46402D0095C032 /* UIViewController+Swizzling.m */; }; 42 | 69657E2F1C46402D0095C032 /* UIViewController+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 69657E2C1C46402D0095C032 /* UIViewController+Swizzling.m */; }; 43 | 697364B11C3A461F003E1FE9 /* HYBMethodExchange.m in Sources */ = {isa = PBXBuildFile; fileRef = 697364B01C3A461F003E1FE9 /* HYBMethodExchange.m */; }; 44 | 697364B21C3A461F003E1FE9 /* HYBMethodExchange.m in Sources */ = {isa = PBXBuildFile; fileRef = 697364B01C3A461F003E1FE9 /* HYBMethodExchange.m */; }; 45 | 697364B31C3A461F003E1FE9 /* HYBMethodExchange.m in Sources */ = {isa = PBXBuildFile; fileRef = 697364B01C3A461F003E1FE9 /* HYBMethodExchange.m */; }; 46 | 6980598D1C30D6070021085B /* HYBTestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6980598C1C30D6070021085B /* HYBTestModel.m */; }; 47 | 6980598E1C30D6070021085B /* HYBTestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6980598C1C30D6070021085B /* HYBTestModel.m */; }; 48 | 6980598F1C30D6070021085B /* HYBTestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6980598C1C30D6070021085B /* HYBTestModel.m */; }; 49 | 698828201C3383F8002363D5 /* HDFArchiveModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6988281F1C3383F8002363D5 /* HDFArchiveModel.m */; }; 50 | 698828211C3383F8002363D5 /* HDFArchiveModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6988281F1C3383F8002363D5 /* HDFArchiveModel.m */; }; 51 | 698828221C3383F8002363D5 /* HDFArchiveModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6988281F1C3383F8002363D5 /* HDFArchiveModel.m */; }; 52 | 6988282B1C34CB9F002363D5 /* HYBCat.m in Sources */ = {isa = PBXBuildFile; fileRef = 6988282A1C34CB9F002363D5 /* HYBCat.m */; }; 53 | 6988282C1C34CB9F002363D5 /* HYBCat.m in Sources */ = {isa = PBXBuildFile; fileRef = 6988282A1C34CB9F002363D5 /* HYBCat.m */; }; 54 | 6988282D1C34CB9F002363D5 /* HYBCat.m in Sources */ = {isa = PBXBuildFile; fileRef = 6988282A1C34CB9F002363D5 /* HYBCat.m */; }; 55 | 698828301C34CBAB002363D5 /* HYBDog.m in Sources */ = {isa = PBXBuildFile; fileRef = 6988282F1C34CBAB002363D5 /* HYBDog.m */; }; 56 | 698828311C34CBAB002363D5 /* HYBDog.m in Sources */ = {isa = PBXBuildFile; fileRef = 6988282F1C34CBAB002363D5 /* HYBDog.m */; }; 57 | 698828321C34CBAB002363D5 /* HYBDog.m in Sources */ = {isa = PBXBuildFile; fileRef = 6988282F1C34CBAB002363D5 /* HYBDog.m */; }; 58 | 698828351C34D476002363D5 /* HYBPig.m in Sources */ = {isa = PBXBuildFile; fileRef = 698828341C34D476002363D5 /* HYBPig.m */; }; 59 | 698828361C34D476002363D5 /* HYBPig.m in Sources */ = {isa = PBXBuildFile; fileRef = 698828341C34D476002363D5 /* HYBPig.m */; }; 60 | 698828371C34D476002363D5 /* HYBPig.m in Sources */ = {isa = PBXBuildFile; fileRef = 698828341C34D476002363D5 /* HYBPig.m */; }; 61 | 69E0205C1C3771AF0034BF32 /* HYBMsgSend.m in Sources */ = {isa = PBXBuildFile; fileRef = 69E0205B1C3771AF0034BF32 /* HYBMsgSend.m */; }; 62 | 69E0205D1C3771AF0034BF32 /* HYBMsgSend.m in Sources */ = {isa = PBXBuildFile; fileRef = 69E0205B1C3771AF0034BF32 /* HYBMsgSend.m */; }; 63 | 69E0205E1C3771AF0034BF32 /* HYBMsgSend.m in Sources */ = {isa = PBXBuildFile; fileRef = 69E0205B1C3771AF0034BF32 /* HYBMsgSend.m */; }; 64 | /* End PBXBuildFile section */ 65 | 66 | /* Begin PBXContainerItemProxy section */ 67 | 69654F701C2CDE6600FFB5AC /* PBXContainerItemProxy */ = { 68 | isa = PBXContainerItemProxy; 69 | containerPortal = 69654F4E1C2CDE6600FFB5AC /* Project object */; 70 | proxyType = 1; 71 | remoteGlobalIDString = 69654F551C2CDE6600FFB5AC; 72 | remoteInfo = RuntimeDemo; 73 | }; 74 | 69654F7B1C2CDE6600FFB5AC /* PBXContainerItemProxy */ = { 75 | isa = PBXContainerItemProxy; 76 | containerPortal = 69654F4E1C2CDE6600FFB5AC /* Project object */; 77 | proxyType = 1; 78 | remoteGlobalIDString = 69654F551C2CDE6600FFB5AC; 79 | remoteInfo = RuntimeDemo; 80 | }; 81 | /* End PBXContainerItemProxy section */ 82 | 83 | /* Begin PBXFileReference section */ 84 | 2BDAA9539E871117ED795ADE /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; 85 | 38B8A79A2F4B8D8AA2D898F1 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 86 | 54494B247380150E00DCBCF2 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; 87 | 691D6FC31C421E68003D41FB /* HYBPropertyLearn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBPropertyLearn.h; sourceTree = ""; }; 88 | 691D6FC41C421E68003D41FB /* HYBPropertyLearn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBPropertyLearn.m; sourceTree = ""; }; 89 | 69384B0F1C47631700B61526 /* HYBTestEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBTestEntry.h; sourceTree = ""; }; 90 | 69384B101C47631700B61526 /* HYBTestEntry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBTestEntry.m; sourceTree = ""; }; 91 | 69654F561C2CDE6600FFB5AC /* RuntimeDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RuntimeDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 92 | 69654F5A1C2CDE6600FFB5AC /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 93 | 69654F5C1C2CDE6600FFB5AC /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 94 | 69654F5D1C2CDE6600FFB5AC /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 95 | 69654F5F1C2CDE6600FFB5AC /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 96 | 69654F601C2CDE6600FFB5AC /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 97 | 69654F631C2CDE6600FFB5AC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 98 | 69654F651C2CDE6600FFB5AC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 99 | 69654F681C2CDE6600FFB5AC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 100 | 69654F6A1C2CDE6600FFB5AC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 101 | 69654F6F1C2CDE6600FFB5AC /* RuntimeDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RuntimeDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 102 | 69654F731C2CDE6600FFB5AC /* RuntimeDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RuntimeDemoTests.m; sourceTree = ""; }; 103 | 69654F751C2CDE6600FFB5AC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 104 | 69654F7A1C2CDE6600FFB5AC /* RuntimeDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RuntimeDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 105 | 69654F7E1C2CDE6600FFB5AC /* RuntimeDemoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RuntimeDemoUITests.m; sourceTree = ""; }; 106 | 69654F801C2CDE6600FFB5AC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 107 | 69654F911C30214500FFB5AC /* UIControl+HYBBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIControl+HYBBlock.h"; sourceTree = ""; }; 108 | 69654F921C30214500FFB5AC /* UIControl+HYBBlock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIControl+HYBBlock.m"; sourceTree = ""; }; 109 | 69657DD31C44A67F0095C032 /* HYBMethodLearn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBMethodLearn.h; sourceTree = ""; }; 110 | 69657DD41C44A67F0095C032 /* HYBMethodLearn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBMethodLearn.m; sourceTree = ""; }; 111 | 69657DD81C44D1A30095C032 /* NSMutableArray+Swizzling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+Swizzling.h"; sourceTree = ""; }; 112 | 69657DD91C44D1A30095C032 /* NSMutableArray+Swizzling.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableArray+Swizzling.m"; sourceTree = ""; }; 113 | 69657DDD1C44D8620095C032 /* NSArray+Swizzling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+Swizzling.h"; sourceTree = ""; }; 114 | 69657DDE1C44D8620095C032 /* NSArray+Swizzling.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+Swizzling.m"; sourceTree = ""; }; 115 | 69657DE21C44DB520095C032 /* NSObject+Swizzling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+Swizzling.h"; sourceTree = ""; }; 116 | 69657DE31C44DB520095C032 /* NSObject+Swizzling.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+Swizzling.m"; sourceTree = ""; }; 117 | 69657E2B1C46402D0095C032 /* UIViewController+Swizzling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+Swizzling.h"; sourceTree = ""; }; 118 | 69657E2C1C46402D0095C032 /* UIViewController+Swizzling.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+Swizzling.m"; sourceTree = ""; }; 119 | 697364AF1C3A461F003E1FE9 /* HYBMethodExchange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBMethodExchange.h; sourceTree = ""; }; 120 | 697364B01C3A461F003E1FE9 /* HYBMethodExchange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBMethodExchange.m; sourceTree = ""; }; 121 | 6980598B1C30D6070021085B /* HYBTestModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBTestModel.h; sourceTree = ""; }; 122 | 6980598C1C30D6070021085B /* HYBTestModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBTestModel.m; sourceTree = ""; }; 123 | 6988281E1C3383F8002363D5 /* HDFArchiveModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HDFArchiveModel.h; sourceTree = ""; }; 124 | 6988281F1C3383F8002363D5 /* HDFArchiveModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HDFArchiveModel.m; sourceTree = ""; }; 125 | 698828291C34CB9F002363D5 /* HYBCat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBCat.h; sourceTree = ""; }; 126 | 6988282A1C34CB9F002363D5 /* HYBCat.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBCat.m; sourceTree = ""; }; 127 | 6988282E1C34CBAB002363D5 /* HYBDog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBDog.h; sourceTree = ""; }; 128 | 6988282F1C34CBAB002363D5 /* HYBDog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBDog.m; sourceTree = ""; }; 129 | 698828331C34D476002363D5 /* HYBPig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBPig.h; sourceTree = ""; }; 130 | 698828341C34D476002363D5 /* HYBPig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBPig.m; sourceTree = ""; }; 131 | 69E0205A1C3771AF0034BF32 /* HYBMsgSend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBMsgSend.h; sourceTree = ""; }; 132 | 69E0205B1C3771AF0034BF32 /* HYBMsgSend.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBMsgSend.m; sourceTree = ""; }; 133 | /* End PBXFileReference section */ 134 | 135 | /* Begin PBXFrameworksBuildPhase section */ 136 | 69654F531C2CDE6600FFB5AC /* Frameworks */ = { 137 | isa = PBXFrameworksBuildPhase; 138 | buildActionMask = 2147483647; 139 | files = ( 140 | 303C7F5F03832071E9D4019A /* libPods.a in Frameworks */, 141 | ); 142 | runOnlyForDeploymentPostprocessing = 0; 143 | }; 144 | 69654F6C1C2CDE6600FFB5AC /* Frameworks */ = { 145 | isa = PBXFrameworksBuildPhase; 146 | buildActionMask = 2147483647; 147 | files = ( 148 | ); 149 | runOnlyForDeploymentPostprocessing = 0; 150 | }; 151 | 69654F771C2CDE6600FFB5AC /* Frameworks */ = { 152 | isa = PBXFrameworksBuildPhase; 153 | buildActionMask = 2147483647; 154 | files = ( 155 | ); 156 | runOnlyForDeploymentPostprocessing = 0; 157 | }; 158 | /* End PBXFrameworksBuildPhase section */ 159 | 160 | /* Begin PBXGroup section */ 161 | 1574F27037C5422C34CA2FA9 /* Pods */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | 54494B247380150E00DCBCF2 /* Pods.debug.xcconfig */, 165 | 2BDAA9539E871117ED795ADE /* Pods.release.xcconfig */, 166 | ); 167 | name = Pods; 168 | sourceTree = ""; 169 | }; 170 | 691D6FC21C421E3E003D41FB /* Property */ = { 171 | isa = PBXGroup; 172 | children = ( 173 | 691D6FC31C421E68003D41FB /* HYBPropertyLearn.h */, 174 | 691D6FC41C421E68003D41FB /* HYBPropertyLearn.m */, 175 | ); 176 | name = Property; 177 | sourceTree = ""; 178 | }; 179 | 69384B0E1C47630500B61526 /* TestEntry */ = { 180 | isa = PBXGroup; 181 | children = ( 182 | 69384B0F1C47631700B61526 /* HYBTestEntry.h */, 183 | 69384B101C47631700B61526 /* HYBTestEntry.m */, 184 | ); 185 | name = TestEntry; 186 | sourceTree = ""; 187 | }; 188 | 69654F4D1C2CDE6600FFB5AC = { 189 | isa = PBXGroup; 190 | children = ( 191 | 69654F581C2CDE6600FFB5AC /* RuntimeDemo */, 192 | 69654F721C2CDE6600FFB5AC /* RuntimeDemoTests */, 193 | 69654F7D1C2CDE6600FFB5AC /* RuntimeDemoUITests */, 194 | 69654F571C2CDE6600FFB5AC /* Products */, 195 | 1574F27037C5422C34CA2FA9 /* Pods */, 196 | A4EC37D5D490197569607E30 /* Frameworks */, 197 | ); 198 | sourceTree = ""; 199 | }; 200 | 69654F571C2CDE6600FFB5AC /* Products */ = { 201 | isa = PBXGroup; 202 | children = ( 203 | 69654F561C2CDE6600FFB5AC /* RuntimeDemo.app */, 204 | 69654F6F1C2CDE6600FFB5AC /* RuntimeDemoTests.xctest */, 205 | 69654F7A1C2CDE6600FFB5AC /* RuntimeDemoUITests.xctest */, 206 | ); 207 | name = Products; 208 | sourceTree = ""; 209 | }; 210 | 69654F581C2CDE6600FFB5AC /* RuntimeDemo */ = { 211 | isa = PBXGroup; 212 | children = ( 213 | 69384B0E1C47630500B61526 /* TestEntry */, 214 | 69657DD21C44A66E0095C032 /* Method */, 215 | 691D6FC21C421E3E003D41FB /* Property */, 216 | 697364AE1C3A45F9003E1FE9 /* MethodExchange */, 217 | 69E020591C3771860034BF32 /* Message */, 218 | 698828281C34CB6A002363D5 /* ForwardMessage */, 219 | 6988281D1C3383B4002363D5 /* Archive */, 220 | 6980598A1C30D5E90021085B /* Dict-Model */, 221 | 69654F5C1C2CDE6600FFB5AC /* AppDelegate.h */, 222 | 69654F5D1C2CDE6600FFB5AC /* AppDelegate.m */, 223 | 69654F5F1C2CDE6600FFB5AC /* ViewController.h */, 224 | 69654F601C2CDE6600FFB5AC /* ViewController.m */, 225 | 69654F621C2CDE6600FFB5AC /* Main.storyboard */, 226 | 69654F651C2CDE6600FFB5AC /* Assets.xcassets */, 227 | 69654F671C2CDE6600FFB5AC /* LaunchScreen.storyboard */, 228 | 69654F6A1C2CDE6600FFB5AC /* Info.plist */, 229 | 69654F591C2CDE6600FFB5AC /* Supporting Files */, 230 | 69654F911C30214500FFB5AC /* UIControl+HYBBlock.h */, 231 | 69654F921C30214500FFB5AC /* UIControl+HYBBlock.m */, 232 | ); 233 | path = RuntimeDemo; 234 | sourceTree = ""; 235 | }; 236 | 69654F591C2CDE6600FFB5AC /* Supporting Files */ = { 237 | isa = PBXGroup; 238 | children = ( 239 | 69654F5A1C2CDE6600FFB5AC /* main.m */, 240 | ); 241 | name = "Supporting Files"; 242 | sourceTree = ""; 243 | }; 244 | 69654F721C2CDE6600FFB5AC /* RuntimeDemoTests */ = { 245 | isa = PBXGroup; 246 | children = ( 247 | 69654F731C2CDE6600FFB5AC /* RuntimeDemoTests.m */, 248 | 69654F751C2CDE6600FFB5AC /* Info.plist */, 249 | ); 250 | path = RuntimeDemoTests; 251 | sourceTree = ""; 252 | }; 253 | 69654F7D1C2CDE6600FFB5AC /* RuntimeDemoUITests */ = { 254 | isa = PBXGroup; 255 | children = ( 256 | 69654F7E1C2CDE6600FFB5AC /* RuntimeDemoUITests.m */, 257 | 69654F801C2CDE6600FFB5AC /* Info.plist */, 258 | ); 259 | path = RuntimeDemoUITests; 260 | sourceTree = ""; 261 | }; 262 | 69657DD21C44A66E0095C032 /* Method */ = { 263 | isa = PBXGroup; 264 | children = ( 265 | 69657DD31C44A67F0095C032 /* HYBMethodLearn.h */, 266 | 69657DD41C44A67F0095C032 /* HYBMethodLearn.m */, 267 | ); 268 | name = Method; 269 | sourceTree = ""; 270 | }; 271 | 697364AE1C3A45F9003E1FE9 /* MethodExchange */ = { 272 | isa = PBXGroup; 273 | children = ( 274 | 697364AF1C3A461F003E1FE9 /* HYBMethodExchange.h */, 275 | 697364B01C3A461F003E1FE9 /* HYBMethodExchange.m */, 276 | 69657DD81C44D1A30095C032 /* NSMutableArray+Swizzling.h */, 277 | 69657DD91C44D1A30095C032 /* NSMutableArray+Swizzling.m */, 278 | 69657DDD1C44D8620095C032 /* NSArray+Swizzling.h */, 279 | 69657DDE1C44D8620095C032 /* NSArray+Swizzling.m */, 280 | 69657DE21C44DB520095C032 /* NSObject+Swizzling.h */, 281 | 69657DE31C44DB520095C032 /* NSObject+Swizzling.m */, 282 | 69657E2B1C46402D0095C032 /* UIViewController+Swizzling.h */, 283 | 69657E2C1C46402D0095C032 /* UIViewController+Swizzling.m */, 284 | ); 285 | name = MethodExchange; 286 | sourceTree = ""; 287 | }; 288 | 6980598A1C30D5E90021085B /* Dict-Model */ = { 289 | isa = PBXGroup; 290 | children = ( 291 | 6980598B1C30D6070021085B /* HYBTestModel.h */, 292 | 6980598C1C30D6070021085B /* HYBTestModel.m */, 293 | ); 294 | name = "Dict-Model"; 295 | sourceTree = ""; 296 | }; 297 | 6988281D1C3383B4002363D5 /* Archive */ = { 298 | isa = PBXGroup; 299 | children = ( 300 | 6988281E1C3383F8002363D5 /* HDFArchiveModel.h */, 301 | 6988281F1C3383F8002363D5 /* HDFArchiveModel.m */, 302 | ); 303 | name = Archive; 304 | sourceTree = ""; 305 | }; 306 | 698828281C34CB6A002363D5 /* ForwardMessage */ = { 307 | isa = PBXGroup; 308 | children = ( 309 | 698828291C34CB9F002363D5 /* HYBCat.h */, 310 | 6988282A1C34CB9F002363D5 /* HYBCat.m */, 311 | 6988282E1C34CBAB002363D5 /* HYBDog.h */, 312 | 6988282F1C34CBAB002363D5 /* HYBDog.m */, 313 | 698828331C34D476002363D5 /* HYBPig.h */, 314 | 698828341C34D476002363D5 /* HYBPig.m */, 315 | ); 316 | name = ForwardMessage; 317 | sourceTree = ""; 318 | }; 319 | 69E020591C3771860034BF32 /* Message */ = { 320 | isa = PBXGroup; 321 | children = ( 322 | 69E0205A1C3771AF0034BF32 /* HYBMsgSend.h */, 323 | 69E0205B1C3771AF0034BF32 /* HYBMsgSend.m */, 324 | ); 325 | name = Message; 326 | sourceTree = ""; 327 | }; 328 | A4EC37D5D490197569607E30 /* Frameworks */ = { 329 | isa = PBXGroup; 330 | children = ( 331 | 38B8A79A2F4B8D8AA2D898F1 /* libPods.a */, 332 | ); 333 | name = Frameworks; 334 | sourceTree = ""; 335 | }; 336 | /* End PBXGroup section */ 337 | 338 | /* Begin PBXNativeTarget section */ 339 | 69654F551C2CDE6600FFB5AC /* RuntimeDemo */ = { 340 | isa = PBXNativeTarget; 341 | buildConfigurationList = 69654F831C2CDE6600FFB5AC /* Build configuration list for PBXNativeTarget "RuntimeDemo" */; 342 | buildPhases = ( 343 | E8F35A7A0E95DED9B0C66F9F /* Check Pods Manifest.lock */, 344 | 69654F521C2CDE6600FFB5AC /* Sources */, 345 | 69654F531C2CDE6600FFB5AC /* Frameworks */, 346 | 69654F541C2CDE6600FFB5AC /* Resources */, 347 | 89BB4FA307D36FC42F0BE172 /* Embed Pods Frameworks */, 348 | 64E012AA1CA97E018A940BB2 /* Copy Pods Resources */, 349 | ); 350 | buildRules = ( 351 | ); 352 | dependencies = ( 353 | ); 354 | name = RuntimeDemo; 355 | productName = RuntimeDemo; 356 | productReference = 69654F561C2CDE6600FFB5AC /* RuntimeDemo.app */; 357 | productType = "com.apple.product-type.application"; 358 | }; 359 | 69654F6E1C2CDE6600FFB5AC /* RuntimeDemoTests */ = { 360 | isa = PBXNativeTarget; 361 | buildConfigurationList = 69654F861C2CDE6600FFB5AC /* Build configuration list for PBXNativeTarget "RuntimeDemoTests" */; 362 | buildPhases = ( 363 | 69654F6B1C2CDE6600FFB5AC /* Sources */, 364 | 69654F6C1C2CDE6600FFB5AC /* Frameworks */, 365 | 69654F6D1C2CDE6600FFB5AC /* Resources */, 366 | ); 367 | buildRules = ( 368 | ); 369 | dependencies = ( 370 | 69654F711C2CDE6600FFB5AC /* PBXTargetDependency */, 371 | ); 372 | name = RuntimeDemoTests; 373 | productName = RuntimeDemoTests; 374 | productReference = 69654F6F1C2CDE6600FFB5AC /* RuntimeDemoTests.xctest */; 375 | productType = "com.apple.product-type.bundle.unit-test"; 376 | }; 377 | 69654F791C2CDE6600FFB5AC /* RuntimeDemoUITests */ = { 378 | isa = PBXNativeTarget; 379 | buildConfigurationList = 69654F891C2CDE6600FFB5AC /* Build configuration list for PBXNativeTarget "RuntimeDemoUITests" */; 380 | buildPhases = ( 381 | 69654F761C2CDE6600FFB5AC /* Sources */, 382 | 69654F771C2CDE6600FFB5AC /* Frameworks */, 383 | 69654F781C2CDE6600FFB5AC /* Resources */, 384 | ); 385 | buildRules = ( 386 | ); 387 | dependencies = ( 388 | 69654F7C1C2CDE6600FFB5AC /* PBXTargetDependency */, 389 | ); 390 | name = RuntimeDemoUITests; 391 | productName = RuntimeDemoUITests; 392 | productReference = 69654F7A1C2CDE6600FFB5AC /* RuntimeDemoUITests.xctest */; 393 | productType = "com.apple.product-type.bundle.ui-testing"; 394 | }; 395 | /* End PBXNativeTarget section */ 396 | 397 | /* Begin PBXProject section */ 398 | 69654F4E1C2CDE6600FFB5AC /* Project object */ = { 399 | isa = PBXProject; 400 | attributes = { 401 | LastUpgradeCheck = 0720; 402 | ORGANIZATIONNAME = huangyibiao; 403 | TargetAttributes = { 404 | 69654F551C2CDE6600FFB5AC = { 405 | CreatedOnToolsVersion = 7.2; 406 | }; 407 | 69654F6E1C2CDE6600FFB5AC = { 408 | CreatedOnToolsVersion = 7.2; 409 | TestTargetID = 69654F551C2CDE6600FFB5AC; 410 | }; 411 | 69654F791C2CDE6600FFB5AC = { 412 | CreatedOnToolsVersion = 7.2; 413 | TestTargetID = 69654F551C2CDE6600FFB5AC; 414 | }; 415 | }; 416 | }; 417 | buildConfigurationList = 69654F511C2CDE6600FFB5AC /* Build configuration list for PBXProject "RuntimeDemo" */; 418 | compatibilityVersion = "Xcode 3.2"; 419 | developmentRegion = English; 420 | hasScannedForEncodings = 0; 421 | knownRegions = ( 422 | en, 423 | Base, 424 | ); 425 | mainGroup = 69654F4D1C2CDE6600FFB5AC; 426 | productRefGroup = 69654F571C2CDE6600FFB5AC /* Products */; 427 | projectDirPath = ""; 428 | projectRoot = ""; 429 | targets = ( 430 | 69654F551C2CDE6600FFB5AC /* RuntimeDemo */, 431 | 69654F6E1C2CDE6600FFB5AC /* RuntimeDemoTests */, 432 | 69654F791C2CDE6600FFB5AC /* RuntimeDemoUITests */, 433 | ); 434 | }; 435 | /* End PBXProject section */ 436 | 437 | /* Begin PBXResourcesBuildPhase section */ 438 | 69654F541C2CDE6600FFB5AC /* Resources */ = { 439 | isa = PBXResourcesBuildPhase; 440 | buildActionMask = 2147483647; 441 | files = ( 442 | 69654F691C2CDE6600FFB5AC /* LaunchScreen.storyboard in Resources */, 443 | 69654F661C2CDE6600FFB5AC /* Assets.xcassets in Resources */, 444 | 69654F641C2CDE6600FFB5AC /* Main.storyboard in Resources */, 445 | ); 446 | runOnlyForDeploymentPostprocessing = 0; 447 | }; 448 | 69654F6D1C2CDE6600FFB5AC /* Resources */ = { 449 | isa = PBXResourcesBuildPhase; 450 | buildActionMask = 2147483647; 451 | files = ( 452 | ); 453 | runOnlyForDeploymentPostprocessing = 0; 454 | }; 455 | 69654F781C2CDE6600FFB5AC /* Resources */ = { 456 | isa = PBXResourcesBuildPhase; 457 | buildActionMask = 2147483647; 458 | files = ( 459 | ); 460 | runOnlyForDeploymentPostprocessing = 0; 461 | }; 462 | /* End PBXResourcesBuildPhase section */ 463 | 464 | /* Begin PBXShellScriptBuildPhase section */ 465 | 64E012AA1CA97E018A940BB2 /* Copy Pods Resources */ = { 466 | isa = PBXShellScriptBuildPhase; 467 | buildActionMask = 2147483647; 468 | files = ( 469 | ); 470 | inputPaths = ( 471 | ); 472 | name = "Copy Pods Resources"; 473 | outputPaths = ( 474 | ); 475 | runOnlyForDeploymentPostprocessing = 0; 476 | shellPath = /bin/sh; 477 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; 478 | showEnvVarsInLog = 0; 479 | }; 480 | 89BB4FA307D36FC42F0BE172 /* Embed Pods Frameworks */ = { 481 | isa = PBXShellScriptBuildPhase; 482 | buildActionMask = 2147483647; 483 | files = ( 484 | ); 485 | inputPaths = ( 486 | ); 487 | name = "Embed Pods Frameworks"; 488 | outputPaths = ( 489 | ); 490 | runOnlyForDeploymentPostprocessing = 0; 491 | shellPath = /bin/sh; 492 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n"; 493 | showEnvVarsInLog = 0; 494 | }; 495 | E8F35A7A0E95DED9B0C66F9F /* Check Pods Manifest.lock */ = { 496 | isa = PBXShellScriptBuildPhase; 497 | buildActionMask = 2147483647; 498 | files = ( 499 | ); 500 | inputPaths = ( 501 | ); 502 | name = "Check Pods Manifest.lock"; 503 | outputPaths = ( 504 | ); 505 | runOnlyForDeploymentPostprocessing = 0; 506 | shellPath = /bin/sh; 507 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 508 | showEnvVarsInLog = 0; 509 | }; 510 | /* End PBXShellScriptBuildPhase section */ 511 | 512 | /* Begin PBXSourcesBuildPhase section */ 513 | 69654F521C2CDE6600FFB5AC /* Sources */ = { 514 | isa = PBXSourcesBuildPhase; 515 | buildActionMask = 2147483647; 516 | files = ( 517 | 69657DDF1C44D8620095C032 /* NSArray+Swizzling.m in Sources */, 518 | 697364B11C3A461F003E1FE9 /* HYBMethodExchange.m in Sources */, 519 | 698828301C34CBAB002363D5 /* HYBDog.m in Sources */, 520 | 69657DE41C44DB520095C032 /* NSObject+Swizzling.m in Sources */, 521 | 6988282B1C34CB9F002363D5 /* HYBCat.m in Sources */, 522 | 69654F611C2CDE6600FFB5AC /* ViewController.m in Sources */, 523 | 69654F5E1C2CDE6600FFB5AC /* AppDelegate.m in Sources */, 524 | 69657DD51C44A67F0095C032 /* HYBMethodLearn.m in Sources */, 525 | 69654F5B1C2CDE6600FFB5AC /* main.m in Sources */, 526 | 69657DDA1C44D1A30095C032 /* NSMutableArray+Swizzling.m in Sources */, 527 | 698828201C3383F8002363D5 /* HDFArchiveModel.m in Sources */, 528 | 6980598D1C30D6070021085B /* HYBTestModel.m in Sources */, 529 | 69384B111C47631700B61526 /* HYBTestEntry.m in Sources */, 530 | 698828351C34D476002363D5 /* HYBPig.m in Sources */, 531 | 69654F931C30214500FFB5AC /* UIControl+HYBBlock.m in Sources */, 532 | 69E0205C1C3771AF0034BF32 /* HYBMsgSend.m in Sources */, 533 | 691D6FC51C421E68003D41FB /* HYBPropertyLearn.m in Sources */, 534 | 69657E2D1C46402D0095C032 /* UIViewController+Swizzling.m in Sources */, 535 | ); 536 | runOnlyForDeploymentPostprocessing = 0; 537 | }; 538 | 69654F6B1C2CDE6600FFB5AC /* Sources */ = { 539 | isa = PBXSourcesBuildPhase; 540 | buildActionMask = 2147483647; 541 | files = ( 542 | 69654F741C2CDE6600FFB5AC /* RuntimeDemoTests.m in Sources */, 543 | 6988282C1C34CB9F002363D5 /* HYBCat.m in Sources */, 544 | 698828211C3383F8002363D5 /* HDFArchiveModel.m in Sources */, 545 | 69657DE51C44DB520095C032 /* NSObject+Swizzling.m in Sources */, 546 | 69657DD61C44A67F0095C032 /* HYBMethodLearn.m in Sources */, 547 | 69E0205D1C3771AF0034BF32 /* HYBMsgSend.m in Sources */, 548 | 69654F941C30214500FFB5AC /* UIControl+HYBBlock.m in Sources */, 549 | 691D6FC61C421E68003D41FB /* HYBPropertyLearn.m in Sources */, 550 | 698828361C34D476002363D5 /* HYBPig.m in Sources */, 551 | 697364B21C3A461F003E1FE9 /* HYBMethodExchange.m in Sources */, 552 | 69657E2E1C46402D0095C032 /* UIViewController+Swizzling.m in Sources */, 553 | 698828311C34CBAB002363D5 /* HYBDog.m in Sources */, 554 | 6980598E1C30D6070021085B /* HYBTestModel.m in Sources */, 555 | 69657DE01C44D8620095C032 /* NSArray+Swizzling.m in Sources */, 556 | 69384B121C47631700B61526 /* HYBTestEntry.m in Sources */, 557 | 69657DDB1C44D1A30095C032 /* NSMutableArray+Swizzling.m in Sources */, 558 | ); 559 | runOnlyForDeploymentPostprocessing = 0; 560 | }; 561 | 69654F761C2CDE6600FFB5AC /* Sources */ = { 562 | isa = PBXSourcesBuildPhase; 563 | buildActionMask = 2147483647; 564 | files = ( 565 | 69654F7F1C2CDE6600FFB5AC /* RuntimeDemoUITests.m in Sources */, 566 | 6988282D1C34CB9F002363D5 /* HYBCat.m in Sources */, 567 | 698828221C3383F8002363D5 /* HDFArchiveModel.m in Sources */, 568 | 69657DE61C44DB520095C032 /* NSObject+Swizzling.m in Sources */, 569 | 69657DD71C44A67F0095C032 /* HYBMethodLearn.m in Sources */, 570 | 69E0205E1C3771AF0034BF32 /* HYBMsgSend.m in Sources */, 571 | 69654F951C30214500FFB5AC /* UIControl+HYBBlock.m in Sources */, 572 | 691D6FC71C421E68003D41FB /* HYBPropertyLearn.m in Sources */, 573 | 698828371C34D476002363D5 /* HYBPig.m in Sources */, 574 | 697364B31C3A461F003E1FE9 /* HYBMethodExchange.m in Sources */, 575 | 69657E2F1C46402D0095C032 /* UIViewController+Swizzling.m in Sources */, 576 | 698828321C34CBAB002363D5 /* HYBDog.m in Sources */, 577 | 6980598F1C30D6070021085B /* HYBTestModel.m in Sources */, 578 | 69657DE11C44D8620095C032 /* NSArray+Swizzling.m in Sources */, 579 | 69384B131C47631700B61526 /* HYBTestEntry.m in Sources */, 580 | 69657DDC1C44D1A30095C032 /* NSMutableArray+Swizzling.m in Sources */, 581 | ); 582 | runOnlyForDeploymentPostprocessing = 0; 583 | }; 584 | /* End PBXSourcesBuildPhase section */ 585 | 586 | /* Begin PBXTargetDependency section */ 587 | 69654F711C2CDE6600FFB5AC /* PBXTargetDependency */ = { 588 | isa = PBXTargetDependency; 589 | target = 69654F551C2CDE6600FFB5AC /* RuntimeDemo */; 590 | targetProxy = 69654F701C2CDE6600FFB5AC /* PBXContainerItemProxy */; 591 | }; 592 | 69654F7C1C2CDE6600FFB5AC /* PBXTargetDependency */ = { 593 | isa = PBXTargetDependency; 594 | target = 69654F551C2CDE6600FFB5AC /* RuntimeDemo */; 595 | targetProxy = 69654F7B1C2CDE6600FFB5AC /* PBXContainerItemProxy */; 596 | }; 597 | /* End PBXTargetDependency section */ 598 | 599 | /* Begin PBXVariantGroup section */ 600 | 69654F621C2CDE6600FFB5AC /* Main.storyboard */ = { 601 | isa = PBXVariantGroup; 602 | children = ( 603 | 69654F631C2CDE6600FFB5AC /* Base */, 604 | ); 605 | name = Main.storyboard; 606 | sourceTree = ""; 607 | }; 608 | 69654F671C2CDE6600FFB5AC /* LaunchScreen.storyboard */ = { 609 | isa = PBXVariantGroup; 610 | children = ( 611 | 69654F681C2CDE6600FFB5AC /* Base */, 612 | ); 613 | name = LaunchScreen.storyboard; 614 | sourceTree = ""; 615 | }; 616 | /* End PBXVariantGroup section */ 617 | 618 | /* Begin XCBuildConfiguration section */ 619 | 69654F811C2CDE6600FFB5AC /* Debug */ = { 620 | isa = XCBuildConfiguration; 621 | buildSettings = { 622 | ALWAYS_SEARCH_USER_PATHS = NO; 623 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 624 | CLANG_CXX_LIBRARY = "libc++"; 625 | CLANG_ENABLE_MODULES = YES; 626 | CLANG_ENABLE_OBJC_ARC = YES; 627 | CLANG_WARN_BOOL_CONVERSION = YES; 628 | CLANG_WARN_CONSTANT_CONVERSION = YES; 629 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 630 | CLANG_WARN_EMPTY_BODY = YES; 631 | CLANG_WARN_ENUM_CONVERSION = YES; 632 | CLANG_WARN_INT_CONVERSION = YES; 633 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 634 | CLANG_WARN_UNREACHABLE_CODE = YES; 635 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 636 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 637 | COPY_PHASE_STRIP = NO; 638 | DEBUG_INFORMATION_FORMAT = dwarf; 639 | ENABLE_STRICT_OBJC_MSGSEND = YES; 640 | ENABLE_TESTABILITY = YES; 641 | GCC_C_LANGUAGE_STANDARD = gnu99; 642 | GCC_DYNAMIC_NO_PIC = NO; 643 | GCC_NO_COMMON_BLOCKS = YES; 644 | GCC_OPTIMIZATION_LEVEL = 0; 645 | GCC_PREPROCESSOR_DEFINITIONS = ( 646 | "DEBUG=1", 647 | "$(inherited)", 648 | ); 649 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 650 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 651 | GCC_WARN_UNDECLARED_SELECTOR = YES; 652 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 653 | GCC_WARN_UNUSED_FUNCTION = YES; 654 | GCC_WARN_UNUSED_VARIABLE = YES; 655 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 656 | MTL_ENABLE_DEBUG_INFO = YES; 657 | ONLY_ACTIVE_ARCH = YES; 658 | SDKROOT = iphoneos; 659 | }; 660 | name = Debug; 661 | }; 662 | 69654F821C2CDE6600FFB5AC /* Release */ = { 663 | isa = XCBuildConfiguration; 664 | buildSettings = { 665 | ALWAYS_SEARCH_USER_PATHS = NO; 666 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 667 | CLANG_CXX_LIBRARY = "libc++"; 668 | CLANG_ENABLE_MODULES = YES; 669 | CLANG_ENABLE_OBJC_ARC = YES; 670 | CLANG_WARN_BOOL_CONVERSION = YES; 671 | CLANG_WARN_CONSTANT_CONVERSION = YES; 672 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 673 | CLANG_WARN_EMPTY_BODY = YES; 674 | CLANG_WARN_ENUM_CONVERSION = YES; 675 | CLANG_WARN_INT_CONVERSION = YES; 676 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 677 | CLANG_WARN_UNREACHABLE_CODE = YES; 678 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 679 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 680 | COPY_PHASE_STRIP = NO; 681 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 682 | ENABLE_NS_ASSERTIONS = NO; 683 | ENABLE_STRICT_OBJC_MSGSEND = YES; 684 | GCC_C_LANGUAGE_STANDARD = gnu99; 685 | GCC_NO_COMMON_BLOCKS = YES; 686 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 687 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 688 | GCC_WARN_UNDECLARED_SELECTOR = YES; 689 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 690 | GCC_WARN_UNUSED_FUNCTION = YES; 691 | GCC_WARN_UNUSED_VARIABLE = YES; 692 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 693 | MTL_ENABLE_DEBUG_INFO = NO; 694 | SDKROOT = iphoneos; 695 | VALIDATE_PRODUCT = YES; 696 | }; 697 | name = Release; 698 | }; 699 | 69654F841C2CDE6600FFB5AC /* Debug */ = { 700 | isa = XCBuildConfiguration; 701 | baseConfigurationReference = 54494B247380150E00DCBCF2 /* Pods.debug.xcconfig */; 702 | buildSettings = { 703 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 704 | INFOPLIST_FILE = RuntimeDemo/Info.plist; 705 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 706 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 707 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.RuntimeDemo; 708 | PRODUCT_NAME = "$(TARGET_NAME)"; 709 | }; 710 | name = Debug; 711 | }; 712 | 69654F851C2CDE6600FFB5AC /* Release */ = { 713 | isa = XCBuildConfiguration; 714 | baseConfigurationReference = 2BDAA9539E871117ED795ADE /* Pods.release.xcconfig */; 715 | buildSettings = { 716 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 717 | INFOPLIST_FILE = RuntimeDemo/Info.plist; 718 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 719 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 720 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.RuntimeDemo; 721 | PRODUCT_NAME = "$(TARGET_NAME)"; 722 | }; 723 | name = Release; 724 | }; 725 | 69654F871C2CDE6600FFB5AC /* Debug */ = { 726 | isa = XCBuildConfiguration; 727 | buildSettings = { 728 | BUNDLE_LOADER = "$(TEST_HOST)"; 729 | INFOPLIST_FILE = RuntimeDemoTests/Info.plist; 730 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 731 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.RuntimeDemoTests; 732 | PRODUCT_NAME = "$(TARGET_NAME)"; 733 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RuntimeDemo.app/RuntimeDemo"; 734 | }; 735 | name = Debug; 736 | }; 737 | 69654F881C2CDE6600FFB5AC /* Release */ = { 738 | isa = XCBuildConfiguration; 739 | buildSettings = { 740 | BUNDLE_LOADER = "$(TEST_HOST)"; 741 | INFOPLIST_FILE = RuntimeDemoTests/Info.plist; 742 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 743 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.RuntimeDemoTests; 744 | PRODUCT_NAME = "$(TARGET_NAME)"; 745 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RuntimeDemo.app/RuntimeDemo"; 746 | }; 747 | name = Release; 748 | }; 749 | 69654F8A1C2CDE6600FFB5AC /* Debug */ = { 750 | isa = XCBuildConfiguration; 751 | buildSettings = { 752 | INFOPLIST_FILE = RuntimeDemoUITests/Info.plist; 753 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 754 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.RuntimeDemoUITests; 755 | PRODUCT_NAME = "$(TARGET_NAME)"; 756 | TEST_TARGET_NAME = RuntimeDemo; 757 | USES_XCTRUNNER = YES; 758 | }; 759 | name = Debug; 760 | }; 761 | 69654F8B1C2CDE6600FFB5AC /* Release */ = { 762 | isa = XCBuildConfiguration; 763 | buildSettings = { 764 | INFOPLIST_FILE = RuntimeDemoUITests/Info.plist; 765 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 766 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.RuntimeDemoUITests; 767 | PRODUCT_NAME = "$(TARGET_NAME)"; 768 | TEST_TARGET_NAME = RuntimeDemo; 769 | USES_XCTRUNNER = YES; 770 | }; 771 | name = Release; 772 | }; 773 | /* End XCBuildConfiguration section */ 774 | 775 | /* Begin XCConfigurationList section */ 776 | 69654F511C2CDE6600FFB5AC /* Build configuration list for PBXProject "RuntimeDemo" */ = { 777 | isa = XCConfigurationList; 778 | buildConfigurations = ( 779 | 69654F811C2CDE6600FFB5AC /* Debug */, 780 | 69654F821C2CDE6600FFB5AC /* Release */, 781 | ); 782 | defaultConfigurationIsVisible = 0; 783 | defaultConfigurationName = Release; 784 | }; 785 | 69654F831C2CDE6600FFB5AC /* Build configuration list for PBXNativeTarget "RuntimeDemo" */ = { 786 | isa = XCConfigurationList; 787 | buildConfigurations = ( 788 | 69654F841C2CDE6600FFB5AC /* Debug */, 789 | 69654F851C2CDE6600FFB5AC /* Release */, 790 | ); 791 | defaultConfigurationIsVisible = 0; 792 | defaultConfigurationName = Release; 793 | }; 794 | 69654F861C2CDE6600FFB5AC /* Build configuration list for PBXNativeTarget "RuntimeDemoTests" */ = { 795 | isa = XCConfigurationList; 796 | buildConfigurations = ( 797 | 69654F871C2CDE6600FFB5AC /* Debug */, 798 | 69654F881C2CDE6600FFB5AC /* Release */, 799 | ); 800 | defaultConfigurationIsVisible = 0; 801 | defaultConfigurationName = Release; 802 | }; 803 | 69654F891C2CDE6600FFB5AC /* Build configuration list for PBXNativeTarget "RuntimeDemoUITests" */ = { 804 | isa = XCConfigurationList; 805 | buildConfigurations = ( 806 | 69654F8A1C2CDE6600FFB5AC /* Debug */, 807 | 69654F8B1C2CDE6600FFB5AC /* Release */, 808 | ); 809 | defaultConfigurationIsVisible = 0; 810 | defaultConfigurationName = Release; 811 | }; 812 | /* End XCConfigurationList section */ 813 | }; 814 | rootObject = 69654F4E1C2CDE6600FFB5AC /* Project object */; 815 | } 816 | -------------------------------------------------------------------------------- /RuntimeDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RuntimeDemo.xcodeproj/project.xcworkspace/xcuserdata/huangyibiao.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/RuntimeDemo/8704275ea9c9bb5fee0e613d4f340374c81647de/RuntimeDemo.xcodeproj/project.xcworkspace/xcuserdata/huangyibiao.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /RuntimeDemo.xcodeproj/xcuserdata/huangyibiao.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /RuntimeDemo.xcodeproj/xcuserdata/huangyibiao.xcuserdatad/xcschemes/RuntimeDemo.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 | 89 | 90 | 91 | 92 | 98 | 100 | 106 | 107 | 108 | 109 | 111 | 112 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /RuntimeDemo.xcodeproj/xcuserdata/huangyibiao.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | RuntimeDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 69654F551C2CDE6600FFB5AC 16 | 17 | primary 18 | 19 | 20 | 69654F6E1C2CDE6600FFB5AC 21 | 22 | primary 23 | 24 | 25 | 69654F791C2CDE6600FFB5AC 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /RuntimeDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /RuntimeDemo.xcworkspace/xcuserdata/huangyibiao.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/RuntimeDemo/8704275ea9c9bb5fee0e613d4f340374c81647de/RuntimeDemo.xcworkspace/xcuserdata/huangyibiao.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /RuntimeDemo.xcworkspace/xcuserdata/huangyibiao.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /RuntimeDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 15/12/25. 6 | // Copyright © 2015年 huangyibiao. 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 | -------------------------------------------------------------------------------- /RuntimeDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 15/12/25. 6 | // Copyright © 2015年 huangyibiao. 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 | -------------------------------------------------------------------------------- /RuntimeDemo/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 | } -------------------------------------------------------------------------------- /RuntimeDemo/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 | -------------------------------------------------------------------------------- /RuntimeDemo/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 | -------------------------------------------------------------------------------- /RuntimeDemo/HDFArchiveModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // HDFArchiveModel.h 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 15/12/30. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "HYBTestModel.h" 11 | 12 | @interface HDFArchiveModel : NSObject 13 | 14 | @property (nonatomic, assign) int referenceCount; 15 | //@property (nonatomic, strong) HYBTestModel *testModel; 16 | @property (nonatomic, copy) NSString *archive; 17 | @property (nonatomic, assign) const void *session; 18 | @property (nonatomic, strong) NSNumber *totalCount; 19 | @property (nonatomic, assign) float _floatValue; 20 | 21 | + (void)test; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /RuntimeDemo/HDFArchiveModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // HDFArchiveModel.m 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 15/12/30. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HDFArchiveModel.h" 10 | #import 11 | #import 12 | 13 | @implementation HDFArchiveModel 14 | 15 | - (void)encodeWithCoder:(NSCoder *)aCoder { 16 | unsigned int outCount = 0; 17 | Ivar *ivars = class_copyIvarList([self class], &outCount); 18 | 19 | for (unsigned int i = 0; i < outCount; ++i) { 20 | Ivar ivar = ivars[i]; 21 | 22 | // 获取成员变量名 23 | const void *name = ivar_getName(ivar); 24 | NSString *ivarName = [NSString stringWithUTF8String:name]; 25 | // 去掉成员变量的下划线 26 | ivarName = [ivarName substringFromIndex:1]; 27 | 28 | // 获取getter方法 29 | SEL getter = NSSelectorFromString(ivarName); 30 | if ([self respondsToSelector:getter]) { 31 | const void *typeEncoding = ivar_getTypeEncoding(ivar); 32 | NSString *type = [NSString stringWithUTF8String:typeEncoding]; 33 | 34 | // const void * 35 | if ([type isEqualToString:@"r^v"]) { 36 | const char *value = ((const void *(*)(id, SEL))(void *)objc_msgSend)((id)self, getter); 37 | NSString *utf8Value = [NSString stringWithUTF8String:value]; 38 | [aCoder encodeObject:utf8Value forKey:ivarName]; 39 | continue; 40 | } 41 | // int 42 | else if ([type isEqualToString:@"i"]) { 43 | int value = ((int (*)(id, SEL))(void *)objc_msgSend)((id)self, getter); 44 | [aCoder encodeObject:@(value) forKey:ivarName]; 45 | continue; 46 | } 47 | // float 48 | else if ([type isEqualToString:@"f"]) { 49 | float value = ((float (*)(id, SEL))(void *)objc_msgSend)((id)self, getter); 50 | [aCoder encodeObject:@(value) forKey:ivarName]; 51 | continue; 52 | } 53 | 54 | id value = ((id (*)(id, SEL))(void *)objc_msgSend)((id)self, getter); 55 | if (value != nil && [value respondsToSelector:@selector(encodeWithCoder:)]) { 56 | [aCoder encodeObject:value forKey:ivarName]; 57 | } 58 | } 59 | } 60 | 61 | free(ivars); 62 | } 63 | 64 | - (instancetype)initWithCoder:(NSCoder *)aDecoder { 65 | if (self = [super init]) { 66 | unsigned int outCount = 0; 67 | Ivar *ivars = class_copyIvarList([self class], &outCount); 68 | 69 | for (unsigned int i = 0; i < outCount; ++i) { 70 | Ivar ivar = ivars[i]; 71 | 72 | // 获取成员变量名 73 | const void *name = ivar_getName(ivar); 74 | NSString *ivarName = [NSString stringWithUTF8String:name]; 75 | // 去掉成员变量的下划线 76 | ivarName = [ivarName substringFromIndex:1]; 77 | // 生成setter格式 78 | NSString *setterName = ivarName; 79 | // 那么一定是字母开头 80 | if (![setterName hasPrefix:@"_"]) { 81 | NSString *firstLetter = [NSString stringWithFormat:@"%c", [setterName characterAtIndex:0]]; 82 | setterName = [setterName substringFromIndex:1]; 83 | setterName = [NSString stringWithFormat:@"%@%@", firstLetter.uppercaseString, setterName]; 84 | 85 | // [setterName stringByReplacingCharactersInRange:NSMakeRange(0, 0) withString:firstLetter.uppercaseString]; 86 | 87 | } 88 | setterName = [NSString stringWithFormat:@"set%@:", setterName]; 89 | // 获取getter方法 90 | SEL setter = NSSelectorFromString(setterName); 91 | if ([self respondsToSelector:setter]) { 92 | const void *typeEncoding = ivar_getTypeEncoding(ivar); 93 | NSString *type = [NSString stringWithUTF8String:typeEncoding]; 94 | NSLog(@"%@", type); 95 | 96 | // const void * 97 | if ([type isEqualToString:@"r^v"]) { 98 | NSString *value = [aDecoder decodeObjectForKey:ivarName]; 99 | if (value) { 100 | ((void (*)(id, SEL, const void *))objc_msgSend)(self, setter, value.UTF8String); 101 | } 102 | 103 | continue; 104 | } 105 | // int 106 | else if ([type isEqualToString:@"i"]) { 107 | NSNumber *value = [aDecoder decodeObjectForKey:ivarName]; 108 | if (value != nil) { 109 | ((void (*)(id, SEL, int))objc_msgSend)(self, setter, [value intValue]); 110 | } 111 | continue; 112 | } else if ([type isEqualToString:@"f"]) { 113 | NSNumber *value = [aDecoder decodeObjectForKey:ivarName]; 114 | if (value != nil) { 115 | ((void (*)(id, SEL, float))objc_msgSend)(self, setter, [value floatValue]); 116 | } 117 | continue; 118 | } 119 | 120 | // object 121 | id value = [aDecoder decodeObjectForKey:ivarName]; 122 | if (value != nil) { 123 | ((void (*)(id, SEL, id))objc_msgSend)(self, setter, value); 124 | } 125 | } 126 | } 127 | 128 | free(ivars); 129 | } 130 | 131 | return self; 132 | } 133 | 134 | + (void)test { 135 | HDFArchiveModel *archiveModel = [[HDFArchiveModel alloc] init]; 136 | archiveModel.archive = @"标哥学习自动归档"; 137 | archiveModel.session = "http://www.henishuo.com"; 138 | archiveModel.totalCount = @(123); 139 | archiveModel.referenceCount = 10; 140 | archiveModel._floatValue = 10.0; 141 | 142 | NSString *path = NSHomeDirectory(); 143 | path = [NSString stringWithFormat:@"%@/archive", path]; 144 | [NSKeyedArchiver archiveRootObject:archiveModel 145 | toFile:path]; 146 | 147 | HDFArchiveModel *unarchiveModel = [NSKeyedUnarchiver unarchiveObjectWithFile:path]; 148 | 149 | } 150 | 151 | @end 152 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBCat.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBCat.h 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 15/12/31. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HYBCat : NSObject 12 | 13 | 14 | + (void)test; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBCat.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBCat.m 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 15/12/31. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBCat.h" 10 | #import "HYBDog.h" 11 | #import "HYBPig.h" 12 | #import 13 | 14 | @implementation HYBCat 15 | 16 | // 第一步:在没有找到方法时,会先调用此方法,可用于动态添加方法 17 | // 我们不动态添加 18 | + (BOOL)resolveInstanceMethod:(SEL)sel { 19 | return NO; 20 | } 21 | 22 | // 第二步:上一步返回NO,就会进入这一步,用于指定备选响应此SEL的对象 23 | // 千万不能返回self,否则就会死循环 24 | // 自己没有实现这个方法才会进入这一流程,因此成为死循环 25 | - (id)forwardingTargetForSelector:(SEL)aSelector { 26 | return nil; 27 | } 28 | 29 | // 第三步:指定方法签名,若返回nil,则不会进入下一步,而是无法处理消息 30 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector { 31 | if ([NSStringFromSelector(aSelector) isEqualToString:@"eat"]) { 32 | return [NSMethodSignature signatureWithObjCTypes:"v@:"]; 33 | } 34 | 35 | return [super methodSignatureForSelector:aSelector]; 36 | } 37 | 38 | // 当我们实现了此方法后,-doesNotRecognizeSelector:不会再被调用 39 | // 如果要测试找不到方法,可以注释掉这一个方法 40 | - (void)forwardInvocation:(NSInvocation *)anInvocation { 41 | 42 | // 我们还可以改变方法选择器 43 | [anInvocation setSelector:@selector(jump)]; 44 | // 改变方法选择器后,还需要指定是哪个对象的方法 45 | [anInvocation invokeWithTarget:self]; 46 | } 47 | 48 | - (void)doesNotRecognizeSelector:(SEL)aSelector { 49 | NSLog(@"无法处理消息:%@", NSStringFromSelector(aSelector)); 50 | } 51 | 52 | - (void)jump { 53 | NSLog(@"由eat方法改成jump方法"); 54 | } 55 | 56 | + (void)test { 57 | HYBDog *dog = [[HYBDog alloc] init]; 58 | [dog eat]; 59 | 60 | HYBPig *pig = [[HYBPig alloc] init]; 61 | // [pig performSelector:@selector(eat) withObject:nil afterDelay:0]; 62 | ((void (*)(id, SEL))objc_msgSend)((id)pig, @selector(eat)); 63 | 64 | HYBCat *cat = [[HYBCat alloc] init]; 65 | [cat performSelector:@selector(eat) withObject:nil afterDelay:0]; 66 | } 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBDog.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBDog.h 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 15/12/31. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HYBDog : NSObject 12 | 13 | // 我们只声明,而不实现 14 | - (void)eat; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBDog.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBDog.m 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 15/12/31. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBDog.h" 10 | #import 11 | 12 | 13 | @implementation HYBDog 14 | 15 | // 第一步:实现此方法,在调用对象的某方法找不到时,会先调用此方法,允许 16 | // 我们动态添加方法实现 17 | + (BOOL)resolveInstanceMethod:(SEL)sel { 18 | // 我们这里没有给dog声明有eat方法,因此,我们可以动态添加eat方法 19 | if ([NSStringFromSelector(sel) isEqualToString:@"eat"]) { 20 | class_addMethod(self, sel, (IMP)eat, "v@:"); 21 | return YES; 22 | } 23 | 24 | return [super resolveInstanceMethod:sel]; 25 | } 26 | 27 | // 这个方法是我们动态添加的哦 28 | // 29 | void eat(id self, SEL cmd) { 30 | NSLog(@"%@ is eating", self); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBMethodExchange.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBMethodExchange.h 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 16/1/4. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HYBMethodExchange : NSObject 12 | 13 | + (void)test; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBMethodExchange.m: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // HYBMethodExchange.m 4 | // RuntimeDemo 5 | // 6 | // Created by huangyibiao on 16/1/4. 7 | // Copyright © 2016年 huangyibiao. All rights reserved. 8 | // 9 | 10 | #import "HYBMethodExchange.h" 11 | #import 12 | #import "NSMutableArray+Swizzling.h" 13 | #import "NSArray+Swizzling.h" 14 | 15 | @implementation HYBMethodExchange 16 | 17 | 18 | + (void)test { 19 | 20 | // Method originalMethod = class_getInstanceMethod([NSArray class], @selector(lastObject)); 21 | // Method newMedthod = class_getInstanceMethod([NSArray class], NSSelectorFromString(@"hdf_lastObject")); 22 | // method_exchangeImplementations(originalMethod, newMedthod); 23 | 24 | NSMutableArray *array = [@[@"value", @"value1"] mutableCopy]; 25 | [array lastObject]; 26 | 27 | [array removeObject:@"value"]; 28 | [array removeObject:nil]; 29 | [array addObject:@"12"]; 30 | [array addObject:nil]; 31 | [array insertObject:nil atIndex:0]; 32 | [array insertObject:@"sdf" atIndex:10]; 33 | [array objectAtIndex:100]; 34 | [array removeObjectAtIndex:10]; 35 | 36 | NSMutableArray *anotherArray = [[NSMutableArray alloc] init]; 37 | [anotherArray objectAtIndex:0]; 38 | 39 | NSString *nilStr = nil; 40 | NSArray *array1 = @[@"ara", @"sdf", @"dsfdsf", nilStr]; 41 | NSLog(@"array1.count = %lu", array1.count); 42 | 43 | // 测试数组中有数组 44 | NSArray *array2 = @[@[@"12323", @"nsdf", nilStr], @[@"sdf", @"nilsdf", nilStr, @"sdhfodf"]]; 45 | } 46 | 47 | // C语言版 48 | void swizzleSelector(Class class, SEL originalSelector, SEL swizzledSelector) { 49 | Method originalMethod = class_getInstanceMethod(class, originalSelector); 50 | Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector); 51 | 52 | // 若已经存在,则添加会失败 53 | BOOL didAddMethod = class_addMethod(class, 54 | originalSelector, 55 | method_getImplementation(swizzledMethod), 56 | method_getTypeEncoding(swizzledMethod)); 57 | 58 | // 若原来的方法并不存在,则添加即可 59 | if (didAddMethod) { 60 | class_replaceMethod(class, 61 | swizzledSelector, 62 | method_getImplementation(originalMethod), 63 | method_getTypeEncoding(originalMethod)); 64 | } else { 65 | method_exchangeImplementations(originalMethod, swizzledMethod); 66 | } 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBMethodLearn.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBMethodLearn.h 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 16/1/12. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HYBMethodLearn : NSObject 12 | 13 | + (void)test; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBMethodLearn.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBMethodLearn.m 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 16/1/12. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBMethodLearn.h" 10 | #import 11 | #import 12 | 13 | @implementation HYBMethodLearn 14 | 15 | - (int)testInstanceMethod:(NSString *)name andValue:(NSNumber *)value { 16 | NSLog(@"%@", name); 17 | 18 | 19 | return value.intValue; 20 | } 21 | 22 | - (NSArray *)arrayWithNames:(NSArray *)names { 23 | NSLog(@"%@", names); 24 | return names; 25 | } 26 | 27 | - (void)getMethods { 28 | unsigned int outCount = 0; 29 | Method *methodList = class_copyMethodList(self.class, &outCount); 30 | 31 | for (unsigned int i = 0; i < outCount; ++i) { 32 | Method method = methodList[i]; 33 | 34 | SEL methodName = method_getName(method); 35 | NSLog(@"方法名:%@", NSStringFromSelector(methodName)); 36 | 37 | // 获取方法的参数类型 38 | unsigned int argumentsCount = method_getNumberOfArguments(method); 39 | char argName[512] = {}; 40 | for (unsigned int j = 0; j < argumentsCount; ++j) { 41 | method_getArgumentType(method, j, argName, 512); 42 | 43 | NSLog(@"第%u个参数类型为:%s", j, argName); 44 | memset(argName, '\0', strlen(argName)); 45 | } 46 | 47 | char returnType[512] = {}; 48 | method_getReturnType(method, returnType, 512); 49 | NSLog(@"返回值类型:%s", returnType); 50 | 51 | // type encoding 52 | NSLog(@"TypeEncoding: %s", method_getTypeEncoding(method)); 53 | } 54 | 55 | free(methodList); 56 | } 57 | 58 | 59 | + (void)test { 60 | HYBMethodLearn *m = [[HYBMethodLearn alloc] init]; 61 | // [m getMethods]; 62 | 63 | ((void (*)(id, SEL))objc_msgSend)((id)m, @selector(getMethods)); 64 | 65 | // 这就是为什么有四个参数的原因 66 | int returnValue = ((int (*)(id, SEL, NSString *, NSNumber *)) 67 | objc_msgSend)((id)m, 68 | @selector(testInstanceMethod:andValue:), 69 | @"标哥的技术博客", 70 | @100); 71 | NSLog(@"return value is %d", returnValue); 72 | 73 | // 获取方法 74 | Method method = class_getInstanceMethod([self class], @selector(testInstanceMethod:andValue:)); 75 | 76 | // 调用函数 77 | returnValue = ((int (*)(id, Method, NSString *, NSNumber *))method_invoke)((id)m, method, @"测试使用method_invoke", @11); 78 | NSLog(@"call return vlaue is %d", returnValue); 79 | } 80 | 81 | @end 82 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBMsgSend.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBMsgSend.h 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 16/1/2. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HYBMsgSend : NSObject 12 | 13 | + (void)test; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBMsgSend.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBMsgSend.m 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 16/1/2. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBMsgSend.h" 10 | #import 11 | #import 12 | #import 13 | 14 | @implementation HYBMsgSend 15 | 16 | - (void)noArgumentsAndNoReturnValue { 17 | NSLog(@"%s was called, and it has no arguments and return value", __FUNCTION__); 18 | } 19 | 20 | - (void)hasArguments:(NSString *)arg { 21 | NSLog(@"%s was called, and argument is %@", __FUNCTION__, arg); 22 | } 23 | 24 | - (NSString *)noArgumentsButReturnValue { 25 | NSLog(@"%s was called, and return value is %@", __FUNCTION__, @"不带参数,但是带有返回值"); 26 | return @"不带参数,但是带有返回值"; 27 | } 28 | 29 | - (int)hasArguments:(NSString *)arg andReturnValue:(int)arg1 { 30 | NSLog(@"%s was called, and argument is %@, return value is %d", __FUNCTION__, arg, arg1); 31 | return arg1; 32 | } 33 | 34 | // C函数 35 | int cStyleFunc(id receiver, SEL sel, const void *arg1, const void *arg2) { 36 | NSLog(@"%s was called, arg1 is %@, and arg2 is %@", 37 | __FUNCTION__, 38 | [NSString stringWithUTF8String:arg1], 39 | [NSString stringWithUTF8String:arg1]); 40 | return 1; 41 | } 42 | 43 | - (float)returnFloatType { 44 | NSLog(@"%s was called, and has return value", __FUNCTION__); 45 | return 3.121592612321323123; 46 | } 47 | 48 | - (CGRect)returnTypeIsStruct { 49 | NSLog(@"%s was called", __FUNCTION__); 50 | 51 | return CGRectMake(0, 0, 10, 10); 52 | } 53 | 54 | + (void)test { 55 | // 1.创建对象 56 | HYBMsgSend *msg = ((HYBMsgSend * (*)(id, SEL))objc_msgSend)((id)[HYBMsgSend class], @selector(alloc)); 57 | 58 | // 2.初始化对象 59 | msg = ((HYBMsgSend * (*)(id, SEL))objc_msgSend)((id)msg, @selector(init)); 60 | 61 | // 3.调用无参数无返回值方法 62 | ((void (*)(id, SEL))objc_msgSend)((id)msg, @selector(noArgumentsAndNoReturnValue)); 63 | 64 | // 4.调用带一个参数但无返回值的方法 65 | ((void (*)(id, SEL, NSString *))objc_msgSend)((id)msg, @selector(hasArguments:), @"带一个参数,但无返回值"); 66 | // 5.调用带返回值,但是不带参数 67 | NSString *retValue = ((NSString * (*)(id, SEL))objc_msgSend)((id)msg, @selector(noArgumentsButReturnValue)); 68 | NSLog(@"5. 返回值为:%@", retValue); 69 | // 6.带参数带返回值 70 | int returnValue = ((int (*)(id, SEL, NSString *, int)) 71 | objc_msgSend)(msg, 72 | @selector(hasArguments:andReturnValue:), 73 | @"参数1", 74 | 2016); 75 | NSLog(@"6. return value is %d", returnValue); 76 | NSLog(@"%s", @encode(const void *)); 77 | // 7.动态添加方法,然后调用C函数 78 | class_addMethod(msg.class, NSSelectorFromString(@"cStyleFunc"), (IMP)cStyleFunc, "i@:r^vr^v"); 79 | returnValue = ((int (*)(id, SEL, const void *, const void *)) 80 | objc_msgSend)((id)msg, 81 | NSSelectorFromString(@"cStyleFunc"), 82 | "参数1", 83 | "参数2"); 84 | NSLog(@"7. return value is %d", returnValue); 85 | 86 | // 8.返回浮点型时,调用objc_msgSend/objc_msgSend_fpret,其结果是一样的。 87 | // float retFloatValue = ((float (*)(id, SEL))objc_msgSend_fpret)((id)msg, @selector(returnFloatType)); 88 | // NSLog(@"%f", retFloatValue); 89 | 90 | // retFloatValue = ((float (*)(id, SEL))objc_msgSend)((id)msg, @selector(returnFloatType)); 91 | // NSLog(@"%f", retFloatValue); 92 | 93 | // 9.返回结构体时,不能使用objc_msgSend,而是要使用objc_msgSend_stret,否则会crash 94 | // CGRect frame = ((CGRect (*)(id, SEL))objc_msgSend_stret)((id)msg, @selector(returnTypeIsStruct)); 95 | // NSLog(@"9. return value is %@", NSStringFromCGRect(frame)); 96 | 97 | } 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBPig.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBPig.h 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 15/12/31. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HYBPig : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBPig.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBPig.m 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 15/12/31. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBPig.h" 10 | #import "HYBDog.h" 11 | 12 | @implementation HYBPig 13 | 14 | // 第一步,我们不动态添加方法,返回NO 15 | + (BOOL)resolveInstanceMethod:(SEL)sel { 16 | return NO; 17 | } 18 | 19 | // 第二步,备选提供响应aSelector的对象,我们不备选,因此设置为nil,就会进入第三步 20 | - (id)forwardingTargetForSelector:(SEL)aSelector { 21 | return nil; 22 | } 23 | 24 | // 第三步,先返回方法选择器。如果返回nil,则表示无法处理消息 25 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector { 26 | if ([NSStringFromSelector(aSelector) isEqualToString:@"eat"]) { 27 | return [NSMethodSignature signatureWithObjCTypes:"v@:"]; 28 | } 29 | 30 | return [super methodSignatureForSelector:aSelector]; 31 | } 32 | 33 | // 第三步,只有返回了方法签名,都会进入这一步,这一步用户调用方法 34 | // 改变调用对象等 35 | - (void)forwardInvocation:(NSInvocation *)anInvocation { 36 | // 我们改变调用对象为dog 37 | [anInvocation invokeWithTarget:[[HYBDog alloc] init]]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBPropertyLearn.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBPropertyLearn.h 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 16/1/10. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HYBPropertyLearn : NSObject { 12 | float _websiteTitle; 13 | 14 | @private 15 | float _privateAttribute; 16 | } 17 | 18 | @property (nonatomic, copy) NSString *title; 19 | @property (nonatomic, strong) NSArray *names; 20 | @property (nonatomic, assign) int count; 21 | @property (nonatomic, weak) id delegate; 22 | @property (atomic, strong) NSNumber *atomicProperty; 23 | 24 | + (void)test; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBPropertyLearn.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBPropertyLearn.m 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 16/1/10. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBPropertyLearn.h" 10 | #import 11 | 12 | 13 | @implementation HYBPropertyLearn 14 | 15 | - (void)getAllProperties { 16 | unsigned int outCount = 0; 17 | // Ivar 18 | objc_property_t *properties = class_copyPropertyList(self.class, &outCount); 19 | 20 | for (unsigned int i = 0; i < outCount; ++i) { 21 | objc_property_t property = properties[i]; 22 | const char *propertyName = property_getName(property); 23 | 24 | const char *propertyAttributes = property_getAttributes(property); 25 | NSLog(@"%s %s", propertyName, propertyAttributes); 26 | 27 | unsigned int count = 0; 28 | objc_property_attribute_t *attrbutes = property_copyAttributeList(property, &count); 29 | for (unsigned int j = 0; j < count; ++j) { 30 | objc_property_attribute_t attribute = attrbutes[j]; 31 | 32 | const char *name = attribute.name; 33 | const char *value = attribute.value; 34 | NSLog(@"name: %s value: %s", name, value); 35 | } 36 | 37 | free(attrbutes); 38 | } 39 | 40 | free(properties); 41 | } 42 | 43 | - (void)getAllMemberVariables { 44 | unsigned int outCount = 0; 45 | Ivar *ivars = class_copyIvarList(self.class, &outCount); 46 | 47 | for (unsigned int i = 0; i < outCount; ++i) { 48 | Ivar ivar = ivars[i]; 49 | const char *name = ivar_getName(ivar); 50 | const char *type = ivar_getTypeEncoding(ivar); 51 | 52 | NSLog(@"name: %s encodeType: %s", name, type); 53 | } 54 | 55 | free(ivars); 56 | 57 | } 58 | 59 | + (void)test { 60 | HYBPropertyLearn *p = [[HYBPropertyLearn alloc] init]; 61 | // [p getAllProperties]; 62 | [p getAllMemberVariables]; 63 | } 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBTestEntry.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBTestEntry.h 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 16/1/14. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HYBTestEntry : NSObject 12 | 13 | + (void)test; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBTestEntry.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBTestEntry.m 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 16/1/14. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBTestEntry.h" 10 | 11 | @implementation HYBTestEntry 12 | 13 | 14 | + (void)test { 15 | NSDictionary *originDict = @{@"k1": @"v1", 16 | @"k2": @"v2", 17 | @"k3": @"v3", 18 | @"k4": @"v4", 19 | @"k5": @"v5", 20 | @"k6": @"v6", 21 | @"k7": @"v7", 22 | @"k8": @"v8", 23 | @"k9": @"v9"}; 24 | NSDictionary *paramters = @{@"kk1": @"", 25 | @"kk2": @"vv2"}; 26 | 27 | NSDictionary *resutDict = @{@"k1": @"v1", 28 | @"k2": @"v2", 29 | @"k3": @"v3", 30 | @"k4": @"v4", 31 | @"k5": @"v5", 32 | @"k6": @"v6", 33 | @"k7": @"v7", 34 | @"k8": @"v8", 35 | @"k9": @"v9", 36 | @"kk1": @"", 37 | @"kk2":@"vv2"}; 38 | 39 | for (NSUInteger i = 0; i < 1000000; ++i) { 40 | NSMutableDictionary *allParams = [[NSMutableDictionary alloc] initWithDictionary:paramters]; 41 | [allParams addEntriesFromDictionary:originDict]; 42 | 43 | // 判断是否相等 44 | if (resutDict.count != allParams.count) { 45 | NSLog(@"merge but it is not equal"); 46 | continue; 47 | } 48 | 49 | for (NSString *key in resutDict.allKeys) { 50 | NSString *value1 = [resutDict objectForKey:key]; 51 | NSString *value2 = [allParams objectForKey:key]; 52 | 53 | if (![value1 isEqualToString:value2]) { 54 | NSLog(@"merge but it is not equal"); 55 | continue; 56 | } 57 | } 58 | } 59 | } 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBTestModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBTestModel.h 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 15/12/28. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol HYBEmptyPropertyProperty 12 | 13 | // 设置默认值,若为空,则取出来的就是默认值 14 | - (NSDictionary *)defaultValueForEmptyProperty; 15 | 16 | @end 17 | 18 | @interface HYBTestModel : NSObject 19 | 20 | @property (nonatomic, copy) NSString *name; 21 | @property (nonatomic, copy) NSString *title; 22 | @property (nonatomic, strong) NSNumber *count; 23 | @property (nonatomic, assign) int commentCount; 24 | @property (nonatomic, strong) NSArray *summaries; 25 | @property (nonatomic, strong) NSDictionary *parameters; 26 | @property (nonatomic, strong) NSSet *results; 27 | 28 | @property (nonatomic, strong) HYBTestModel *testModel; 29 | 30 | // 只读属性 31 | @property (nonatomic, assign, readonly) NSString *classVersion; 32 | 33 | // 通过这个方法来实现自动生成model 34 | - (instancetype)initWithDictionary:(NSDictionary *)dictionary; 35 | 36 | // 转换成字典 37 | - (NSDictionary *)toDictionary; 38 | 39 | // 测试 40 | + (void)test; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /RuntimeDemo/HYBTestModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBTestModel.m 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 15/12/28. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBTestModel.h" 10 | #import 11 | #import 12 | 13 | @implementation HYBTestModel 14 | 15 | - (instancetype)initWithDictionary:(NSDictionary *)dictionary { 16 | if (self = [super init]) { 17 | for (NSString *key in dictionary.allKeys) { 18 | id value = [dictionary objectForKey:key]; 19 | 20 | if ([key isEqualToString:@"testModel"]) { 21 | HYBTestModel *testModel = [[HYBTestModel alloc] initWithDictionary:value]; 22 | value = testModel; 23 | self.testModel = testModel; 24 | 25 | continue; 26 | } 27 | 28 | SEL setter = [self propertySetterWithKey:key]; 29 | if (setter != nil) { 30 | ((void (*)(id, SEL, id))objc_msgSend)(self, setter, value); 31 | } 32 | } 33 | } 34 | 35 | return self; 36 | } 37 | 38 | - (NSDictionary *)toDictionary { 39 | unsigned int outCount = 0; 40 | 41 | objc_property_t *properties = class_copyPropertyList([self class], &outCount); 42 | 43 | if (outCount != 0) { 44 | NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithCapacity:outCount]; 45 | 46 | for (unsigned int i = 0; i < outCount; ++i) { 47 | objc_property_t property = properties[i]; 48 | const void *propertyName = property_getName(property); 49 | NSString *key = [NSString stringWithUTF8String:propertyName]; 50 | 51 | // 继承于NSObject的类都会有这几个在NSObject中的属性 52 | if ([key isEqualToString:@"description"] 53 | || [key isEqualToString:@"debugDescription"] 54 | || [key isEqualToString:@"hash"] 55 | || [key isEqualToString:@"superclass"]) { 56 | continue; 57 | } 58 | 59 | // 我们只是测试,不做通用封装,因此这里不额外写方法做通用处理,只是写死测试一下效果 60 | if ([key isEqualToString:@"testModel"]) { 61 | if ([self respondsToSelector:@selector(toDictionary)]) { 62 | id testModel = [self.testModel toDictionary]; 63 | if (testModel != nil) { 64 | [dict setObject:testModel forKey:key]; 65 | } 66 | continue; 67 | } 68 | } 69 | 70 | SEL getter = [self propertyGetterWithKey:key]; 71 | if (getter != nil) { 72 | // 获取方法的签名 73 | NSMethodSignature *signature = [self methodSignatureForSelector:getter]; 74 | 75 | // 根据方法签名获取NSInvocation对象 76 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; 77 | // 设置target 78 | [invocation setTarget:self]; 79 | // 设置selector 80 | [invocation setSelector:getter]; 81 | 82 | // 方法调用 83 | [invocation invoke]; 84 | 85 | // 接收返回的值 86 | __unsafe_unretained NSObject *propertyValue = nil; 87 | [invocation getReturnValue:&propertyValue]; 88 | 89 | // id propertyValue = [self performSelector:getter]; 90 | 91 | if (propertyValue == nil) { 92 | if ([self respondsToSelector:@selector(defaultValueForEmptyProperty)]) { 93 | NSDictionary *defaultValueDict = [self defaultValueForEmptyProperty]; 94 | 95 | id defaultValue = [defaultValueDict objectForKey:key]; 96 | propertyValue = defaultValue; 97 | } 98 | } 99 | 100 | if (propertyValue != nil) { 101 | [dict setObject:propertyValue forKey:key]; 102 | } 103 | } 104 | } 105 | 106 | free(properties); 107 | 108 | return dict; 109 | } 110 | 111 | free(properties); 112 | return nil; 113 | } 114 | 115 | - (SEL)propertyGetterWithKey:(NSString *)key { 116 | if (key != nil) { 117 | SEL getter = NSSelectorFromString(key); 118 | 119 | if ([self respondsToSelector:getter]) { 120 | return getter; 121 | } 122 | } 123 | 124 | return nil; 125 | } 126 | 127 | - (SEL)propertySetterWithKey:(NSString *)key { 128 | NSString *propertySetter = key.capitalizedString; 129 | propertySetter = [NSString stringWithFormat:@"set%@:", propertySetter]; 130 | 131 | // 生成setter方法 132 | SEL setter = NSSelectorFromString(propertySetter); 133 | 134 | if ([self respondsToSelector:setter]) { 135 | return setter; 136 | } 137 | 138 | return nil; 139 | } 140 | 141 | #pragma mark - HYBEmptyPropertyProperty 142 | - (NSDictionary *)defaultValueForEmptyProperty { 143 | return @{@"name" : [NSNull null], 144 | @"title" : [NSNull null], 145 | @"count" : @(1), 146 | @"commentCount" : @(1), 147 | @"classVersion" : @"0.0.1"}; 148 | } 149 | 150 | + (void)test { 151 | NSMutableSet *set = [NSMutableSet setWithArray:@[@"可变集合", @"字典->不可变集合->可变集合"]]; 152 | NSDictionary *dict = @{@"name" : @"标哥的技术博客", 153 | @"title" : @"http://www.henishuo.com", 154 | @"count" : @(11), 155 | @"results" : [NSSet setWithObjects:@"集合值1", @"集合值2", set , nil], 156 | @"summaries" : @[@"sm1", @"sm2", @{@"keysm": @{@"stkey": @"字典->数组->字典->字典"}}], 157 | @"parameters" : @{@"key1" : @"value1", @"key2": @{@"key11" : @"value11", @"key12" : @[@"三层", @"字典->字典->数组"]}}, 158 | @"classVersion" : @(1.1), 159 | @"testModel" : @{@"name" : @"标哥的技术博客", 160 | @"title" : @"http://www.henishuo.com", 161 | @"count" : @(11), 162 | @"results" : [NSSet setWithObjects:@"集合值1", @"集合值2", set , nil], 163 | @"summaries" : @[@"sm1", @"sm2", @{@"keysm": @{@"stkey": @"字典->数组->字典->字典"}}], 164 | @"parameters" : @{@"key1" : @"value1", @"key2": @{@"key11" : @"value11", @"key12" : @[@"三层", @"字典->字典->数组"]}}, 165 | @"classVersion" : @(1.1)}}; 166 | HYBTestModel *model = [[HYBTestModel alloc] initWithDictionary:dict]; 167 | 168 | NSLog(@"%@", model); 169 | 170 | NSLog(@"model->dict: %@", [model toDictionary]); 171 | } 172 | 173 | @end 174 | -------------------------------------------------------------------------------- /RuntimeDemo/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 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | 30 | UILaunchStoryboardName 31 | LaunchScreen 32 | UIMainStoryboardFile 33 | Main 34 | UIRequiredDeviceCapabilities 35 | 36 | armv7 37 | 38 | UISupportedInterfaceOrientations 39 | 40 | UIInterfaceOrientationPortrait 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /RuntimeDemo/NSArray+Swizzling.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+Swizzling.h 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 16/1/12. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSArray (Swizzling) 12 | 13 | @property (nonatomic, weak) id delegate; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /RuntimeDemo/NSArray+Swizzling.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+Swizzling.m 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 16/1/12. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "NSArray+Swizzling.h" 10 | #import 11 | #import "NSObject+Swizzling.h" 12 | 13 | @implementation NSArray (Swizzling) 14 | 15 | //+ (void)load { 16 | // static dispatch_once_t onceToken; 17 | // dispatch_once(&onceToken, ^{ 18 | // [self swizzleSelector:@selector(lastObject) 19 | // withSwizzledSelector:@selector(hdf_lastObject)]; 20 | // }); 21 | //} 22 | 23 | - (id)hdf_lastObject { 24 | if (self.count == 0) { 25 | NSLog(@"%s 数组为空,直接返回nil", __FUNCTION__); 26 | 27 | return nil; 28 | } 29 | 30 | return [self hdf_lastObject]; 31 | } 32 | 33 | - (id)delegate { 34 | 35 | return objc_getAssociatedObject(self, @"__delegate__key"); 36 | } 37 | 38 | - (void)setDelegate:(id)delegate { 39 | objc_setAssociatedObject(self, @"__delegate__key", delegate, OBJC_ASSOCIATION_ASSIGN); 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /RuntimeDemo/NSMutableArray+Swizzling.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableArray+Swizzling.h 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 16/1/12. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSMutableArray (Swizzling) 12 | 13 | //- (void)hdf_safeRemoveObjectAtIndex:(NSUInteger)index; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /RuntimeDemo/NSMutableArray+Swizzling.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableArray+Swizzling.m 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 16/1/12. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "NSMutableArray+Swizzling.h" 10 | #import 11 | #import "NSObject+Swizzling.h" 12 | 13 | @implementation NSMutableArray (Swizzling) 14 | 15 | + (void)load { 16 | static dispatch_once_t onceToken; 17 | dispatch_once(&onceToken, ^{ 18 | [self swizzleSelector:@selector(removeObject:) 19 | withSwizzledSelector:@selector(hdf_safeRemoveObject:)]; 20 | 21 | [objc_getClass("__NSArrayM") swizzleSelector:@selector(addObject:) 22 | withSwizzledSelector:@selector(hdf_safeAddObject:)]; 23 | [objc_getClass("__NSArrayM") swizzleSelector:@selector(removeObjectAtIndex:) 24 | withSwizzledSelector:@selector(hdf_safeRemoveObjectAtIndex:)]; 25 | 26 | [objc_getClass("__NSArrayM") swizzleSelector:@selector(insertObject:atIndex:) 27 | withSwizzledSelector:@selector(hdf_insertObject:atIndex:)]; 28 | 29 | [objc_getClass("__NSPlaceholderArray") swizzleSelector:@selector(initWithObjects:count:) withSwizzledSelector:@selector(hdf_initWithObjects:count:)]; 30 | 31 | [objc_getClass("__NSArrayM") swizzleSelector:@selector(objectAtIndex:) withSwizzledSelector:@selector(hdf_objectAtIndex:)]; 32 | }); 33 | } 34 | 35 | - (instancetype)hdf_initWithObjects:(const id _Nonnull __unsafe_unretained *)objects count:(NSUInteger)cnt { 36 | BOOL hasNilObject = NO; 37 | for (NSUInteger i = 0; i < cnt; i++) { 38 | if ([objects[i] isKindOfClass:[NSArray class]]) { 39 | NSLog(@"%@", objects[i]); 40 | } 41 | if (objects[i] == nil) { 42 | hasNilObject = YES; 43 | NSLog(@"%s object at index %lu is nil, it will be filtered", __FUNCTION__, i); 44 | } 45 | } 46 | 47 | // 因为有值为nil的元素,那么我们可以过滤掉值为nil的元素 48 | if (hasNilObject) { 49 | id __unsafe_unretained newObjects[cnt]; 50 | 51 | NSUInteger index = 0; 52 | for (NSUInteger i = 0; i < cnt; ++i) { 53 | if (objects[i] != nil) { 54 | newObjects[index++] = objects[i]; 55 | } 56 | } 57 | 58 | NSLog(@"%@", [NSThread callStackSymbols]); 59 | return [self hdf_initWithObjects:newObjects count:index]; 60 | } 61 | 62 | return [self hdf_initWithObjects:objects count:cnt]; 63 | } 64 | 65 | 66 | - (void)hdf_safeAddObject:(id)obj { 67 | if (obj == nil) { 68 | NSLog(@"%s can add nil object into NSMutableArray", __FUNCTION__); 69 | } else { 70 | [self hdf_safeAddObject:obj]; 71 | } 72 | } 73 | 74 | - (void)hdf_safeRemoveObject:(id)obj { 75 | if (obj == nil) { 76 | NSLog(@"%s call -removeObject:, but argument obj is nil", __FUNCTION__); 77 | return; 78 | } 79 | 80 | [self hdf_safeRemoveObject:obj]; 81 | } 82 | 83 | - (void)hdf_insertObject:(id)anObject atIndex:(NSUInteger)index { 84 | if (anObject == nil) { 85 | NSLog(@"%s can't insert nil into NSMutableArray", __FUNCTION__); 86 | } else if (index > self.count) { 87 | NSLog(@"%s index is invalid", __FUNCTION__); 88 | } else { 89 | [self hdf_insertObject:anObject atIndex:index]; 90 | } 91 | } 92 | 93 | - (id)hdf_objectAtIndex:(NSUInteger)index { 94 | if (self.count == 0) { 95 | NSLog(@"%s can't get any object from an empty array", __FUNCTION__); 96 | return nil; 97 | } 98 | 99 | if (index > self.count) { 100 | NSLog(@"%s index out of bounds in array", __FUNCTION__); 101 | return nil; 102 | } 103 | 104 | return [self hdf_objectAtIndex:index]; 105 | } 106 | 107 | - (void)hdf_safeRemoveObjectAtIndex:(NSUInteger)index { 108 | if (self.count <= 0) { 109 | NSLog(@"%s can't get any object from an empty array", __FUNCTION__); 110 | return; 111 | } 112 | 113 | if (index >= self.count) { 114 | NSLog(@"%s index out of bound", __FUNCTION__); 115 | return; 116 | } 117 | 118 | [self hdf_safeRemoveObjectAtIndex:index]; 119 | } 120 | 121 | @end 122 | -------------------------------------------------------------------------------- /RuntimeDemo/NSObject+Swizzling.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+Swizzling.h 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 16/1/12. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSObject (Swizzling) 12 | 13 | + (void)swizzleSelector:(SEL)originalSelector withSwizzledSelector:(SEL)swizzledSelector; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /RuntimeDemo/NSObject+Swizzling.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+Swizzling.m 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 16/1/12. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "NSObject+Swizzling.h" 10 | #import 11 | 12 | @implementation NSObject (Swizzling) 13 | 14 | // 全面 15 | + (void)swizzleSelector:(SEL)originalSelector withSwizzledSelector:(SEL)swizzledSelector { 16 | Class class = [self class]; 17 | 18 | Method originalMethod = class_getInstanceMethod(class, originalSelector); 19 | Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector); 20 | 21 | // 若已经存在,则添加会失败 22 | BOOL didAddMethod = class_addMethod(class, 23 | originalSelector, 24 | method_getImplementation(swizzledMethod), 25 | method_getTypeEncoding(swizzledMethod)); 26 | 27 | // 若原来的方法并不存在,则添加即可 28 | if (didAddMethod) { 29 | class_replaceMethod(class, 30 | swizzledSelector, 31 | method_getImplementation(originalMethod), 32 | method_getTypeEncoding(originalMethod)); 33 | } else { 34 | method_exchangeImplementations(originalMethod, swizzledMethod); 35 | } 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /RuntimeDemo/UIControl+HYBBlock.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIControl+HYBBlock.h 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 15/12/27. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef void (^HYBTouchUpBlock)(id sender); 12 | 13 | @interface UIControl (HYBBlock) 14 | 15 | @property (nonatomic, copy) HYBTouchUpBlock hyb_touchUpBlock; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /RuntimeDemo/UIControl+HYBBlock.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIControl+HYBBlock.m 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 15/12/27. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "UIControl+HYBBlock.h" 10 | #import 11 | 12 | static const void *sHYBUIControlTouchUpEventBlockKey = "sHYBUIControlTouchUpEventBlockKey"; 13 | 14 | @implementation UIControl (HYBBlock) 15 | 16 | - (void)setHyb_touchUpBlock:(HYBTouchUpBlock)hyb_touchUpBlock { 17 | objc_setAssociatedObject(self, 18 | sHYBUIControlTouchUpEventBlockKey, 19 | hyb_touchUpBlock, 20 | OBJC_ASSOCIATION_COPY); 21 | 22 | [self removeTarget:self 23 | action:@selector(hybOnTouchUp:) 24 | forControlEvents:UIControlEventTouchUpInside]; 25 | 26 | if (hyb_touchUpBlock) { 27 | [self addTarget:self 28 | action:@selector(hybOnTouchUp:) 29 | forControlEvents:UIControlEventTouchUpInside]; 30 | } 31 | } 32 | 33 | - (HYBTouchUpBlock)hyb_touchUpBlock { 34 | return objc_getAssociatedObject(self, sHYBUIControlTouchUpEventBlockKey); 35 | } 36 | 37 | - (void)hybOnTouchUp:(UIButton *)sender { 38 | HYBTouchUpBlock touchUp = self.hyb_touchUpBlock; 39 | 40 | if (touchUp) { 41 | touchUp(sender); 42 | } 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /RuntimeDemo/UIViewController+Swizzling.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIWebView+Swizzling.h 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 16/1/13. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIViewController (Swizzling) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /RuntimeDemo/UIViewController+Swizzling.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIWebView+Swizzling.m 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 16/1/13. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "UIViewController+Swizzling.h" 10 | #import "NSObject+Swizzling.h" 11 | 12 | @implementation UIViewController (Swizzling) 13 | 14 | + (void)load { 15 | static dispatch_once_t onceToken; 16 | dispatch_once(&onceToken, ^{ 17 | [self swizzleSelector:@selector(webView:shouldStartLoadWithRequest:navigationType:) 18 | withSwizzledSelector:@selector(hdf_webView:shouldStartLoadWithRequest:navigationType:)]; 19 | }); 20 | } 21 | 22 | - (BOOL)hdf_webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { 23 | NSString *url = request.URL.absoluteString; 24 | 25 | // 注意containsString是iOS8以后才有,具体要兼容ios6则需要自己写 26 | // 这里只是为了简便测试 27 | if ([url containsString:@"userId"] && [url containsString:@"token"]) { 28 | return [self hdf_webView:webView shouldStartLoadWithRequest:request navigationType:navigationType]; 29 | } 30 | 31 | if ([url isEqualToString:@"about:blank"]) { 32 | return [self hdf_webView:webView shouldStartLoadWithRequest:request navigationType:navigationType]; 33 | } 34 | 35 | url = [NSString stringWithFormat:@"%@?userId=123&token=ssdfsfdf", url]; 36 | NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:url]]; 37 | [webView loadRequest:req]; 38 | 39 | return NO; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /RuntimeDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 15/12/25. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /RuntimeDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 15/12/25. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import 11 | #import 12 | #import "HYBTestModel.h" 13 | #import "HDFArchiveModel.h" 14 | #import "HYBCat.h" 15 | #import "HYBMsgSend.h" 16 | #import "HYBMethodExchange.h" 17 | #import "HYBPropertyLearn.h" 18 | #import "HYBMethodLearn.h" 19 | #import "UIViewController+Swizzling.h" 20 | #import "HYBTestEntry.h" 21 | 22 | @interface ViewController () 23 | 24 | @property (nonatomic, strong) UIWebView *webView; 25 | 26 | @end 27 | 28 | @implementation ViewController 29 | 30 | - (void)viewDidLoad { 31 | [super viewDidLoad]; 32 | // Do any additional setup after loading the view, typically from a nib. 33 | 34 | // [HYBTestModel test]; 35 | // [HDFArchiveModel test]; 36 | // [HYBCat test]; 37 | [HYBMsgSend test]; 38 | // [HYBMethodExchange test]; 39 | // [HYBPropertyLearn test]; 40 | // [HYBMethodLearn test]; 41 | // [self testWebview]; 42 | // [HYBTestEntry test]; 43 | } 44 | 45 | - (void)testWebview { 46 | self.webView = [[UIWebView alloc] initWithFrame:self.view.bounds]; 47 | self.webView.delegate = self; 48 | NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://t.cn/RbQXJ6j"]]; 49 | [self.webView loadRequest:req]; 50 | [self.view addSubview:self.webView]; 51 | } 52 | 53 | 54 | - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { 55 | NSLog(@"url: %@", request.URL.absoluteString); 56 | NSLog(@"query: %@", request.URL.query); 57 | // [ViewController filterWebView:webView withRequest:request]; 58 | 59 | return YES; 60 | } 61 | 62 | + (BOOL)filterWebView:(UIWebView *)webView withRequest:(NSURLRequest *)request { 63 | // 未登录状态下,不用增加 64 | // if (kIsEmptyString([HDFCipher token])) { 65 | // return YES; 66 | // } 67 | 68 | NSString *url = request.URL.absoluteString; 69 | 70 | if ([url rangeOfString:@"userId"].location != NSNotFound ) { 71 | return YES; 72 | } 73 | 74 | if ([url isEqualToString:@"about:blank"]) { 75 | return YES; 76 | } 77 | 78 | 79 | NSString *query = request.URL.query; 80 | NSString *format = @"%@?userId=%@&token=%@"; 81 | if (query.length != 0) { 82 | format = @"%@&userId=%@&token=%@"; 83 | } 84 | 85 | // if ([HDFCipher isDoctorApp]) { 86 | url = [NSString stringWithFormat:format, 87 | url, 88 | @"xxxxxx", 89 | @"sdhfodsfdf"]; 90 | // } else if ([HDFCipher isPatientApp]) { 91 | // url = [NSString stringWithFormat:format, 92 | // url, 93 | // [[NSClassFromString(@"HaodfUserManager") sharedManager] userIdString], 94 | // [HDFCipher token]]; 95 | // } 96 | NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:url]]; 97 | [webView loadRequest:req]; 98 | 99 | NSString *url1=@"http://unmi.cc?p1=%+&sd &p2=中文"; 100 | NSLog(@"encode: %@", [[self class] encodeURL:url1]); 101 | 102 | return NO; 103 | } 104 | 105 | + (NSString *)encodeURL:(NSString *)url { 106 | NSString *newString = 107 | CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, 108 | (CFStringRef)url, 109 | NULL, 110 | CFSTR(":/?#[]@!$ &'()*+,;=\"<>%{}|\\^~`"), CFStringConvertNSStringEncodingToEncoding(NSUTF8StringEncoding))); 111 | if (newString) { 112 | return newString; 113 | } 114 | 115 | return url; 116 | } 117 | 118 | @end 119 | -------------------------------------------------------------------------------- /RuntimeDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // RuntimeDemo 4 | // 5 | // Created by huangyibiao on 15/12/25. 6 | // Copyright © 2015年 huangyibiao. 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 | -------------------------------------------------------------------------------- /RuntimeDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /RuntimeDemoTests/RuntimeDemoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // RuntimeDemoTests.m 3 | // RuntimeDemoTests 4 | // 5 | // Created by huangyibiao on 15/12/25. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RuntimeDemoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation RuntimeDemoTests 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 | -------------------------------------------------------------------------------- /RuntimeDemoUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /RuntimeDemoUITests/RuntimeDemoUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // RuntimeDemoUITests.m 3 | // RuntimeDemoUITests 4 | // 5 | // Created by huangyibiao on 15/12/25. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RuntimeDemoUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation RuntimeDemoUITests 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 | --------------------------------------------------------------------------------