├── .gitignore ├── Demo ├── ColorView.h ├── ColorView.m ├── ColorView.xib ├── ColorsViewController.h ├── ColorsViewController.m ├── ColorsViewController.xib ├── NibLoadedViewDemo.xcodeproj │ └── project.pbxproj ├── Suporting Files │ ├── AppDelegate.m │ ├── Default-568h@2x.png │ ├── Default.png │ ├── Default@2x.png │ └── NibLoadedViewDemo-Info.plist ├── TwoViewsWithConfigurableSpace.h ├── TwoViewsWithConfigurableSpace.m └── TwoViewsWithConfigurableSpace.xib ├── LICENSE.md ├── README.md ├── UIView+NibLoading.h ├── UIView+NibLoading.m ├── UIView+NibLoading.podspec └── UIView+NibLoading.xcodeproj └── project.pbxproj /.gitignore: -------------------------------------------------------------------------------- 1 | # osx noise 2 | .DS_Store 3 | profile 4 | 5 | # xcode noise 6 | build/* 7 | *.mode1 8 | *.mode1v3 9 | *.mode2v3 10 | *.perspective 11 | *.perspectivev3 12 | *.pbxuser 13 | *.xcworkspace 14 | xcuserdata 15 | 16 | # svn & cvs 17 | .svn 18 | CVS 19 | -------------------------------------------------------------------------------- /Demo/ColorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ColorView.h 3 | // NibLoadedViewSample 4 | // 5 | // Created by Nicolas Bouilleaud. 6 | // 7 | // https://github.com/n-b/UIView-NibLoading 8 | 9 | #import "UIView+NibLoading.h" 10 | 11 | @interface ColorView : NibLoadedView 12 | @property (nonatomic) UIColor * color; 13 | @end 14 | -------------------------------------------------------------------------------- /Demo/ColorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ColorView.m 3 | // NibLoadedViewSample 4 | // 5 | // Created by Nicolas Bouilleaud. 6 | // 7 | // https://github.com/n-b/UIView-NibLoading 8 | 9 | #import "ColorView.h" 10 | 11 | @implementation ColorView 12 | { 13 | IBOutlet UILabel * _codeLabel; 14 | IBOutlet UIView * _swatch; 15 | } 16 | 17 | - (void)setColor:(UIColor *)color_ 18 | { 19 | _color = color_; 20 | 21 | _swatch.backgroundColor = color_; 22 | 23 | CGFloat red, green, blue, alpha; 24 | [_color getRed:&red green:&green blue:&blue alpha:&alpha]; 25 | _codeLabel.text = [NSString stringWithFormat:@"#%2X%2X%2X",(int)(red*0xFF), (int)(green*0xFF), (int)(blue*0xFF)]; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Demo/ColorView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1552 5 | 12C3006 6 | 3083 7 | 1187.34 8 | 625.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 2083 12 | 13 | 14 | IBProxyObject 15 | IBUILabel 16 | IBUIView 17 | 18 | 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | PluginDependencyRecalculationVersion 23 | 24 | 25 | 26 | 27 | IBFilesOwner 28 | IBCocoaTouchFramework 29 | 30 | 31 | IBFirstResponder 32 | IBCocoaTouchFramework 33 | 34 | 35 | 36 | 274 37 | 38 | 39 | 40 | 300 41 | {{20, 20}, {52, 52}} 42 | 43 | 44 | 45 | _NS:9 46 | 47 | 3 48 | MQA 49 | 50 | 2 51 | 52 | 53 | IBCocoaTouchFramework 54 | 55 | 56 | 57 | 315 58 | {{80, 35}, {169, 21}} 59 | 60 | 61 | _NS:9 62 | NO 63 | YES 64 | 7 65 | NO 66 | IBCocoaTouchFramework 67 | Label 68 | 69 | 1 70 | MCAwIDAAA 71 | darkTextColor 72 | 73 | 74 | 0 75 | 76 | 1 77 | 17 78 | 79 | 80 | Helvetica 81 | 17 82 | 16 83 | 84 | NO 85 | 86 | 87 | {269, 92} 88 | 89 | 90 | 91 | 92 | 3 93 | MQA 94 | 95 | 96 | IBCocoaTouchFramework 97 | 98 | 99 | 100 | 101 | 102 | 103 | _swatch 104 | 105 | 106 | 107 | 26 108 | 109 | 110 | 111 | _codeLabel 112 | 113 | 114 | 115 | 27 116 | 117 | 118 | 119 | 120 | 121 | 0 122 | 123 | 124 | 125 | 126 | 127 | 1 128 | 129 | 130 | 131 | 132 | 133 | 134 | (Container) 135 | 136 | 137 | -1 138 | 139 | 140 | File's Owner 141 | 142 | 143 | -2 144 | 145 | 146 | 147 | 148 | 20 149 | 150 | 151 | 152 | codeLabel 153 | 154 | 155 | 3 156 | 157 | 158 | swatch 159 | 160 | 161 | 162 | 163 | ColorView 164 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 165 | UIResponder 166 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 167 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 168 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 169 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 170 | 171 | 172 | 173 | 174 | 175 | 27 176 | 177 | 178 | 179 | 180 | ColorView 181 | NibLoadedView 182 | 183 | IBProjectSource 184 | ./Classes/ColorView.h 185 | 186 | 187 | 188 | NibLoadedView 189 | UIView 190 | 191 | IBProjectSource 192 | ./Classes/NibLoadedView.h 193 | 194 | 195 | 196 | 197 | 0 198 | IBCocoaTouchFramework 199 | YES 200 | 3 201 | 2083 202 | 203 | 204 | -------------------------------------------------------------------------------- /Demo/ColorsViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ColorsViewController.h 3 | // NibLoadedViewSample 4 | // 5 | // Created by Nicolas Bouilleaud. 6 | // 7 | // https://github.com/n-b/UIView-NibLoading 8 | 9 | #import 10 | 11 | @interface ColorsViewController : UIViewController 12 | @end 13 | -------------------------------------------------------------------------------- /Demo/ColorsViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ColorsViewController.m 3 | // NibLoadedViewSample 4 | // 5 | // Created by Nicolas Bouilleaud. 6 | // 7 | // https://github.com/n-b/UIView-NibLoading 8 | 9 | #import "ColorsViewController.h" 10 | #import "ColorView.h" 11 | 12 | @implementation ColorsViewController 13 | { 14 | IBOutlet ColorView * _colorView1; 15 | ColorView * _colorView2; 16 | ColorView * _colorView3; 17 | } 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | 22 | // _colorView1 is loaded from nib 23 | _colorView1.color = [UIColor colorWithRed:.3 green:.5 blue:.7 alpha:1.0]; 24 | 25 | // _colorView2 is created in code with a specific size 26 | _colorView2 = [[ColorView alloc] initWithFrame:CGRectMake(20, 100, 280, 200)]; 27 | [self.view addSubview:_colorView2]; 28 | _colorView2.backgroundColor = [UIColor darkGrayColor]; 29 | _colorView2.color = [UIColor colorWithRed:.7 green:.3 blue:.5 alpha:1.0]; 30 | 31 | // _colorView3 is created in code, and uses the default size 32 | _colorView3 = [[ColorView alloc] init]; 33 | [self.view addSubview:_colorView3]; 34 | _colorView3.frame = CGRectOffset(_colorView1.frame, 0, CGRectGetMaxY(_colorView2.frame)); 35 | _colorView3.backgroundColor = [UIColor whiteColor]; 36 | _colorView3.color = [UIColor colorWithRed:.5 green:.7 blue:.3 alpha:1.0]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Demo/ColorsViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Demo/NibLoadedViewDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 37446B3C16B1A7630040C52F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37446B3B16B1A7630040C52F /* UIKit.framework */; }; 11 | 37446B3E16B1A7630040C52F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37446B3D16B1A7630040C52F /* Foundation.framework */; }; 12 | 37446B4016B1A7630040C52F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37446B3F16B1A7630040C52F /* CoreGraphics.framework */; }; 13 | 37446B4C16B1A7630040C52F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 37446B4B16B1A7630040C52F /* AppDelegate.m */; }; 14 | 37446B4E16B1A7630040C52F /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 37446B4D16B1A7630040C52F /* Default.png */; }; 15 | 37446B5016B1A7630040C52F /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 37446B4F16B1A7630040C52F /* Default@2x.png */; }; 16 | 37446B5216B1A7630040C52F /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 37446B5116B1A7630040C52F /* Default-568h@2x.png */; }; 17 | 37446B5A16B1A7F50040C52F /* UIView+NibLoading.m in Sources */ = {isa = PBXBuildFile; fileRef = 37446B5916B1A7F50040C52F /* UIView+NibLoading.m */; }; 18 | 37446B6116B1A9AE0040C52F /* ColorsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 37446B5F16B1A9AE0040C52F /* ColorsViewController.m */; }; 19 | 37446B6216B1A9AE0040C52F /* ColorsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 37446B6016B1A9AE0040C52F /* ColorsViewController.xib */; }; 20 | 37446B6516B1A9D70040C52F /* ColorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 37446B6416B1A9D70040C52F /* ColorView.m */; }; 21 | 37446B6916B1AAF40040C52F /* ColorView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 37446B6816B1AAF40040C52F /* ColorView.xib */; }; 22 | 6360C5A019F7071700BE72AC /* TwoViewsWithConfigurableSpace.m in Sources */ = {isa = PBXBuildFile; fileRef = 6360C59F19F7071700BE72AC /* TwoViewsWithConfigurableSpace.m */; }; 23 | 6360C5A219F7075300BE72AC /* TwoViewsWithConfigurableSpace.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6360C5A119F7075300BE72AC /* TwoViewsWithConfigurableSpace.xib */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXFileReference section */ 27 | 37446B3816B1A7630040C52F /* NibLoadedViewDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NibLoadedViewDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | 37446B3B16B1A7630040C52F /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 29 | 37446B3D16B1A7630040C52F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 30 | 37446B3F16B1A7630040C52F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 31 | 37446B4316B1A7630040C52F /* NibLoadedViewDemo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "NibLoadedViewDemo-Info.plist"; sourceTree = ""; }; 32 | 37446B4B16B1A7630040C52F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 33 | 37446B4D16B1A7630040C52F /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 34 | 37446B4F16B1A7630040C52F /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; 35 | 37446B5116B1A7630040C52F /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 36 | 37446B5816B1A7F50040C52F /* UIView+NibLoading.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIView+NibLoading.h"; path = "../UIView+NibLoading.h"; sourceTree = ""; }; 37 | 37446B5916B1A7F50040C52F /* UIView+NibLoading.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIView+NibLoading.m"; path = "../UIView+NibLoading.m"; sourceTree = ""; }; 38 | 37446B5E16B1A9AE0040C52F /* ColorsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorsViewController.h; sourceTree = ""; }; 39 | 37446B5F16B1A9AE0040C52F /* ColorsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ColorsViewController.m; sourceTree = ""; }; 40 | 37446B6016B1A9AE0040C52F /* ColorsViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ColorsViewController.xib; sourceTree = ""; }; 41 | 37446B6316B1A9D70040C52F /* ColorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorView.h; sourceTree = ""; }; 42 | 37446B6416B1A9D70040C52F /* ColorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ColorView.m; sourceTree = ""; }; 43 | 37446B6816B1AAF40040C52F /* ColorView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ColorView.xib; sourceTree = ""; }; 44 | 37446B6A16B27DE70040C52F /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.md; path = ../../README.md; sourceTree = ""; }; 45 | 37446B6C16B27EAF0040C52F /* LICENSE.md */ = {isa = PBXFileReference; lastKnownFileType = text; name = LICENSE.md; path = ../../LICENSE.md; sourceTree = ""; }; 46 | 6360C59E19F7071700BE72AC /* TwoViewsWithConfigurableSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TwoViewsWithConfigurableSpace.h; sourceTree = ""; }; 47 | 6360C59F19F7071700BE72AC /* TwoViewsWithConfigurableSpace.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TwoViewsWithConfigurableSpace.m; sourceTree = ""; }; 48 | 6360C5A119F7075300BE72AC /* TwoViewsWithConfigurableSpace.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TwoViewsWithConfigurableSpace.xib; sourceTree = ""; }; 49 | /* End PBXFileReference section */ 50 | 51 | /* Begin PBXFrameworksBuildPhase section */ 52 | 37446B3516B1A7630040C52F /* Frameworks */ = { 53 | isa = PBXFrameworksBuildPhase; 54 | buildActionMask = 2147483647; 55 | files = ( 56 | 37446B3C16B1A7630040C52F /* UIKit.framework in Frameworks */, 57 | 37446B3E16B1A7630040C52F /* Foundation.framework in Frameworks */, 58 | 37446B4016B1A7630040C52F /* CoreGraphics.framework in Frameworks */, 59 | ); 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | /* End PBXFrameworksBuildPhase section */ 63 | 64 | /* Begin PBXGroup section */ 65 | 37446B2F16B1A7630040C52F = { 66 | isa = PBXGroup; 67 | children = ( 68 | 37446B6616B1A9E20040C52F /* UIView+NibLoading */, 69 | 37446B6716B1A9E80040C52F /* Demo Code */, 70 | 37446B4216B1A7630040C52F /* Supporting Files */, 71 | 37446B3A16B1A7630040C52F /* Frameworks */, 72 | 37446B3916B1A7630040C52F /* Products */, 73 | ); 74 | sourceTree = ""; 75 | }; 76 | 37446B3916B1A7630040C52F /* Products */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | 37446B3816B1A7630040C52F /* NibLoadedViewDemo.app */, 80 | ); 81 | name = Products; 82 | sourceTree = ""; 83 | }; 84 | 37446B3A16B1A7630040C52F /* Frameworks */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 37446B3B16B1A7630040C52F /* UIKit.framework */, 88 | 37446B3D16B1A7630040C52F /* Foundation.framework */, 89 | 37446B3F16B1A7630040C52F /* CoreGraphics.framework */, 90 | ); 91 | name = Frameworks; 92 | sourceTree = ""; 93 | }; 94 | 37446B4216B1A7630040C52F /* Supporting Files */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 37446B4B16B1A7630040C52F /* AppDelegate.m */, 98 | 37446B4316B1A7630040C52F /* NibLoadedViewDemo-Info.plist */, 99 | 37446B4D16B1A7630040C52F /* Default.png */, 100 | 37446B4F16B1A7630040C52F /* Default@2x.png */, 101 | 37446B5116B1A7630040C52F /* Default-568h@2x.png */, 102 | 37446B6A16B27DE70040C52F /* README.md */, 103 | 37446B6C16B27EAF0040C52F /* LICENSE.md */, 104 | ); 105 | name = "Supporting Files"; 106 | path = "Suporting Files"; 107 | sourceTree = ""; 108 | }; 109 | 37446B6616B1A9E20040C52F /* UIView+NibLoading */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 37446B5816B1A7F50040C52F /* UIView+NibLoading.h */, 113 | 37446B5916B1A7F50040C52F /* UIView+NibLoading.m */, 114 | ); 115 | name = "UIView+NibLoading"; 116 | sourceTree = ""; 117 | }; 118 | 37446B6716B1A9E80040C52F /* Demo Code */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 37446B6316B1A9D70040C52F /* ColorView.h */, 122 | 37446B6416B1A9D70040C52F /* ColorView.m */, 123 | 37446B6816B1AAF40040C52F /* ColorView.xib */, 124 | 37446B5E16B1A9AE0040C52F /* ColorsViewController.h */, 125 | 37446B5F16B1A9AE0040C52F /* ColorsViewController.m */, 126 | 37446B6016B1A9AE0040C52F /* ColorsViewController.xib */, 127 | 6360C59E19F7071700BE72AC /* TwoViewsWithConfigurableSpace.h */, 128 | 6360C59F19F7071700BE72AC /* TwoViewsWithConfigurableSpace.m */, 129 | 6360C5A119F7075300BE72AC /* TwoViewsWithConfigurableSpace.xib */, 130 | ); 131 | name = "Demo Code"; 132 | sourceTree = ""; 133 | }; 134 | /* End PBXGroup section */ 135 | 136 | /* Begin PBXNativeTarget section */ 137 | 37446B3716B1A7630040C52F /* NibLoadedViewDemo */ = { 138 | isa = PBXNativeTarget; 139 | buildConfigurationList = 37446B5516B1A7630040C52F /* Build configuration list for PBXNativeTarget "NibLoadedViewDemo" */; 140 | buildPhases = ( 141 | 37446B3416B1A7630040C52F /* Sources */, 142 | 37446B3516B1A7630040C52F /* Frameworks */, 143 | 37446B3616B1A7630040C52F /* Resources */, 144 | ); 145 | buildRules = ( 146 | ); 147 | dependencies = ( 148 | ); 149 | name = NibLoadedViewDemo; 150 | productName = NibLoadedViewSample; 151 | productReference = 37446B3816B1A7630040C52F /* NibLoadedViewDemo.app */; 152 | productType = "com.apple.product-type.application"; 153 | }; 154 | /* End PBXNativeTarget section */ 155 | 156 | /* Begin PBXProject section */ 157 | 37446B3016B1A7630040C52F /* Project object */ = { 158 | isa = PBXProject; 159 | attributes = { 160 | CLASSPREFIX = BOU; 161 | LastUpgradeCheck = 0460; 162 | ORGANIZATIONNAME = "Nicolas Bouilleaud"; 163 | }; 164 | buildConfigurationList = 37446B3316B1A7630040C52F /* Build configuration list for PBXProject "NibLoadedViewDemo" */; 165 | compatibilityVersion = "Xcode 3.2"; 166 | developmentRegion = English; 167 | hasScannedForEncodings = 0; 168 | knownRegions = ( 169 | en, 170 | ); 171 | mainGroup = 37446B2F16B1A7630040C52F; 172 | productRefGroup = 37446B3916B1A7630040C52F /* Products */; 173 | projectDirPath = ""; 174 | projectRoot = ""; 175 | targets = ( 176 | 37446B3716B1A7630040C52F /* NibLoadedViewDemo */, 177 | ); 178 | }; 179 | /* End PBXProject section */ 180 | 181 | /* Begin PBXResourcesBuildPhase section */ 182 | 37446B3616B1A7630040C52F /* Resources */ = { 183 | isa = PBXResourcesBuildPhase; 184 | buildActionMask = 2147483647; 185 | files = ( 186 | 37446B4E16B1A7630040C52F /* Default.png in Resources */, 187 | 37446B5016B1A7630040C52F /* Default@2x.png in Resources */, 188 | 37446B5216B1A7630040C52F /* Default-568h@2x.png in Resources */, 189 | 6360C5A219F7075300BE72AC /* TwoViewsWithConfigurableSpace.xib in Resources */, 190 | 37446B6216B1A9AE0040C52F /* ColorsViewController.xib in Resources */, 191 | 37446B6916B1AAF40040C52F /* ColorView.xib in Resources */, 192 | ); 193 | runOnlyForDeploymentPostprocessing = 0; 194 | }; 195 | /* End PBXResourcesBuildPhase section */ 196 | 197 | /* Begin PBXSourcesBuildPhase section */ 198 | 37446B3416B1A7630040C52F /* Sources */ = { 199 | isa = PBXSourcesBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | 37446B4C16B1A7630040C52F /* AppDelegate.m in Sources */, 203 | 6360C5A019F7071700BE72AC /* TwoViewsWithConfigurableSpace.m in Sources */, 204 | 37446B5A16B1A7F50040C52F /* UIView+NibLoading.m in Sources */, 205 | 37446B6116B1A9AE0040C52F /* ColorsViewController.m in Sources */, 206 | 37446B6516B1A9D70040C52F /* ColorView.m in Sources */, 207 | ); 208 | runOnlyForDeploymentPostprocessing = 0; 209 | }; 210 | /* End PBXSourcesBuildPhase section */ 211 | 212 | /* Begin XCBuildConfiguration section */ 213 | 37446B5316B1A7630040C52F /* Debug */ = { 214 | isa = XCBuildConfiguration; 215 | buildSettings = { 216 | ALWAYS_SEARCH_USER_PATHS = NO; 217 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 218 | CLANG_CXX_LIBRARY = "libc++"; 219 | CLANG_ENABLE_OBJC_ARC = YES; 220 | CLANG_WARN_CONSTANT_CONVERSION = YES; 221 | CLANG_WARN_EMPTY_BODY = YES; 222 | CLANG_WARN_ENUM_CONVERSION = YES; 223 | CLANG_WARN_INT_CONVERSION = YES; 224 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 225 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 226 | COPY_PHASE_STRIP = NO; 227 | GCC_C_LANGUAGE_STANDARD = gnu99; 228 | GCC_DYNAMIC_NO_PIC = NO; 229 | GCC_OPTIMIZATION_LEVEL = 0; 230 | GCC_PREPROCESSOR_DEFINITIONS = ( 231 | "DEBUG=1", 232 | "$(inherited)", 233 | ); 234 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 235 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 236 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 237 | GCC_WARN_UNUSED_VARIABLE = YES; 238 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 239 | ONLY_ACTIVE_ARCH = YES; 240 | SDKROOT = iphoneos; 241 | }; 242 | name = Debug; 243 | }; 244 | 37446B5416B1A7630040C52F /* Release */ = { 245 | isa = XCBuildConfiguration; 246 | buildSettings = { 247 | ALWAYS_SEARCH_USER_PATHS = NO; 248 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 249 | CLANG_CXX_LIBRARY = "libc++"; 250 | CLANG_ENABLE_OBJC_ARC = YES; 251 | CLANG_WARN_CONSTANT_CONVERSION = YES; 252 | CLANG_WARN_EMPTY_BODY = YES; 253 | CLANG_WARN_ENUM_CONVERSION = YES; 254 | CLANG_WARN_INT_CONVERSION = YES; 255 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 256 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 257 | COPY_PHASE_STRIP = YES; 258 | GCC_C_LANGUAGE_STANDARD = gnu99; 259 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 260 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 261 | GCC_WARN_UNUSED_VARIABLE = YES; 262 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 263 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 264 | SDKROOT = iphoneos; 265 | VALIDATE_PRODUCT = YES; 266 | }; 267 | name = Release; 268 | }; 269 | 37446B5616B1A7630040C52F /* Debug */ = { 270 | isa = XCBuildConfiguration; 271 | buildSettings = { 272 | INFOPLIST_FILE = "Suporting Files/NibLoadedViewDemo-Info.plist"; 273 | PRODUCT_NAME = NibLoadedViewDemo; 274 | WRAPPER_EXTENSION = app; 275 | }; 276 | name = Debug; 277 | }; 278 | 37446B5716B1A7630040C52F /* Release */ = { 279 | isa = XCBuildConfiguration; 280 | buildSettings = { 281 | INFOPLIST_FILE = "Suporting Files/NibLoadedViewDemo-Info.plist"; 282 | PRODUCT_NAME = NibLoadedViewDemo; 283 | WRAPPER_EXTENSION = app; 284 | }; 285 | name = Release; 286 | }; 287 | /* End XCBuildConfiguration section */ 288 | 289 | /* Begin XCConfigurationList section */ 290 | 37446B3316B1A7630040C52F /* Build configuration list for PBXProject "NibLoadedViewDemo" */ = { 291 | isa = XCConfigurationList; 292 | buildConfigurations = ( 293 | 37446B5316B1A7630040C52F /* Debug */, 294 | 37446B5416B1A7630040C52F /* Release */, 295 | ); 296 | defaultConfigurationIsVisible = 0; 297 | defaultConfigurationName = Release; 298 | }; 299 | 37446B5516B1A7630040C52F /* Build configuration list for PBXNativeTarget "NibLoadedViewDemo" */ = { 300 | isa = XCConfigurationList; 301 | buildConfigurations = ( 302 | 37446B5616B1A7630040C52F /* Debug */, 303 | 37446B5716B1A7630040C52F /* Release */, 304 | ); 305 | defaultConfigurationIsVisible = 0; 306 | defaultConfigurationName = Release; 307 | }; 308 | /* End XCConfigurationList section */ 309 | }; 310 | rootObject = 37446B3016B1A7630040C52F /* Project object */; 311 | } 312 | -------------------------------------------------------------------------------- /Demo/Suporting Files/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // NibLoadedViewSample 4 | // 5 | // Created by Nicolas Bouilleaud. 6 | // 7 | // https://github.com/n-b/UIView-NibLoading 8 | 9 | #import 10 | 11 | #import "ColorsViewController.h" 12 | 13 | @interface AppDelegate : UIResponder 14 | 15 | @property (strong, nonatomic) UIWindow *window; 16 | 17 | @end 18 | 19 | @implementation AppDelegate 20 | 21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 22 | { 23 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 24 | self.window.rootViewController = [ColorsViewController new]; 25 | [self.window makeKeyAndVisible]; 26 | return YES; 27 | } 28 | 29 | @end 30 | 31 | /****************************************************************************/ 32 | #pragma mark main 33 | 34 | int main(int argc, char *argv[]) 35 | { 36 | @autoreleasepool { 37 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Demo/Suporting Files/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n-b/UIView-NibLoading/2bc1371d7abdc3b94813985f512177c6b5b637d5/Demo/Suporting Files/Default-568h@2x.png -------------------------------------------------------------------------------- /Demo/Suporting Files/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n-b/UIView-NibLoading/2bc1371d7abdc3b94813985f512177c6b5b637d5/Demo/Suporting Files/Default.png -------------------------------------------------------------------------------- /Demo/Suporting Files/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n-b/UIView-NibLoading/2bc1371d7abdc3b94813985f512177c6b5b637d5/Demo/Suporting Files/Default@2x.png -------------------------------------------------------------------------------- /Demo/Suporting Files/NibLoadedViewDemo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | io.bou.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Demo/TwoViewsWithConfigurableSpace.h: -------------------------------------------------------------------------------- 1 | // 2 | // TwoViewsWithConfigurableSpace.h 3 | // NibLoadedViewDemo 4 | // 5 | // Created by meknil on 21.10.14. 6 | // 7 | 8 | #import "UIView+NibLoading.h" 9 | 10 | // 11 | // A view that presents two black squares (as an example for anything else). 12 | // The space between thes squares is configurable at design- and runtime. 13 | // 14 | 15 | IB_DESIGNABLE 16 | @interface TwoViewsWithConfigurableSpace : NibLoadedView 17 | 18 | // use this property to set the space between the two squares in IB or at runtime 19 | @property (assign, nonatomic) IBInspectable NSInteger space; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Demo/TwoViewsWithConfigurableSpace.m: -------------------------------------------------------------------------------- 1 | // 2 | // TwoViewsWithConfigurableSpace.m 3 | // NibLoadedViewDemo 4 | // 5 | // Created by meknil on 21.10.14. 6 | // 7 | 8 | #import "TwoViewsWithConfigurableSpace.h" 9 | 10 | @interface TwoViewsWithConfigurableSpace() 11 | 12 | @property (strong, nonatomic) IBOutlet NSLayoutConstraint *spaceBetweenViews; 13 | 14 | @end 15 | 16 | 17 | @implementation TwoViewsWithConfigurableSpace 18 | 19 | 20 | - (void)setSpace:(NSInteger)space 21 | { 22 | _space = space; 23 | self.spaceBetweenViews.constant = space; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Demo/TwoViewsWithConfigurableSpace.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright © 2013 Nicolas Bouilleaud 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UIView+NibLoading 2 | 3 | A UIView category and a subclass. 4 | It makes writing custom views easier by letting you design their content subviews with Interface Builder. 5 | 6 | More info at [bou.io/UIView-NibLoading.html](http://bou.io/UIView-NibLoading.html). -------------------------------------------------------------------------------- /UIView+NibLoading.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+NibLoading.h 3 | // 4 | // Created by Nicolas Bouilleaud. 5 | // 6 | // https://github.com/n-b/UIView-NibLoading 7 | 8 | #import 9 | 10 | @interface UIView (NibLoading) 11 | 12 | // Loads the views inside a nib and adds it as subviews of the receiver. 13 | // There must be exactly one root UIView in the nib, acting as a container for the subviews of the receiver. 14 | // The subviews are reparented to the receiver, the container view is discarded. 15 | // 16 | // Additionally, the container view's size is used as the default size for the receiver : 17 | // If the receiver's bounds is not CGRectZero, the container view is resized prior reparenting the subviews, so that the subviews are resized. 18 | // If the receiver's bounds is CGRectZero, it's set to the container view's bounds. 19 | // 20 | - (void) loadContentsFromNibNamed:(NSString*)nibName; 21 | 22 | // Convenience method, loads a nib named after the class name. 23 | - (void) loadContentsFromNib; 24 | 25 | @end 26 | 27 | // Convenience UIView subclass. 28 | // 29 | // Custom UIViews can simply subclass NibLoadedView. 30 | // It calls loadContentsFromNib in its initializer. 31 | // 32 | // If you need to subclass another UIView subclass (e.g. a custom UIControl), 33 | // you'll need to call loadContentsFromNib yourself. 34 | // 35 | @interface NibLoadedView : UIView 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /UIView+NibLoading.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+NibLoading.m 3 | // 4 | // Created by Nicolas Bouilleaud. 5 | // 6 | // https://github.com/n-b/UIView-NibLoading 7 | 8 | #import "UIView+NibLoading.h" 9 | #import 10 | 11 | @implementation UIView(NibLoading) 12 | 13 | + (UINib*) _nibLoadingAssociatedNibWithName:(NSString*)nibName 14 | { 15 | static char kUIViewNibLoading_associatedNibsKey; 16 | 17 | NSDictionary * associatedNibs = objc_getAssociatedObject(self, &kUIViewNibLoading_associatedNibsKey); 18 | UINib * nib = associatedNibs[nibName]; 19 | if(nil==nib) 20 | { 21 | nib = [UINib nibWithNibName:nibName bundle:[NSBundle bundleForClass:self]]; 22 | if(nib) 23 | { 24 | NSMutableDictionary * newNibs = [NSMutableDictionary dictionaryWithDictionary:associatedNibs]; 25 | newNibs[nibName] = nib; 26 | objc_setAssociatedObject(self, &kUIViewNibLoading_associatedNibsKey, [NSDictionary dictionaryWithDictionary:newNibs], OBJC_ASSOCIATION_RETAIN); 27 | } 28 | } 29 | 30 | return nib; 31 | } 32 | 33 | static char kUIViewNibLoading_outletsKey; 34 | 35 | - (void) loadContentsFromNibNamed:(NSString*)nibName 36 | { 37 | // Load the nib file, setting self as the owner. 38 | // The root view is only a container and is discarded after loading. 39 | UINib * nib = [[self class] _nibLoadingAssociatedNibWithName:nibName]; 40 | NSAssert(nib!=nil, @"UIView+NibLoading : Can't load nib named %@.",nibName); 41 | 42 | // Instantiate (and keep a list of the outlets set through KVC.) 43 | NSMutableDictionary * outlets = [NSMutableDictionary new]; 44 | objc_setAssociatedObject(self, &kUIViewNibLoading_outletsKey, outlets, OBJC_ASSOCIATION_RETAIN); 45 | NSArray * views = [nib instantiateWithOwner:self options:nil]; 46 | NSAssert(views!=nil, @"UIView+NibLoading : Can't instantiate nib named %@.",nibName); 47 | objc_setAssociatedObject(self, &kUIViewNibLoading_outletsKey, nil, OBJC_ASSOCIATION_RETAIN); 48 | 49 | // Search for the first encountered UIView base object 50 | UIView * containerView = nil; 51 | for (id v in views) 52 | { 53 | if ([v isKindOfClass:[UIView class]]) 54 | { 55 | containerView = v; 56 | break; 57 | } 58 | } 59 | NSAssert(containerView!=nil, @"UIView+NibLoading : There is no container UIView found at the root of nib %@.",nibName); 60 | 61 | [containerView setTranslatesAutoresizingMaskIntoConstraints:NO]; 62 | 63 | if(CGRectEqualToRect(self.bounds, CGRectZero)) 64 | { 65 | // `self` has no size : use the containerView's size, from the nib file 66 | self.bounds = containerView.bounds; 67 | } 68 | else 69 | { 70 | // `self` has a specific size : resize the containerView to this size, so that the subviews are autoresized. 71 | containerView.bounds = self.bounds; 72 | } 73 | 74 | // Save constraints for later 75 | NSArray * constraints = containerView.constraints; 76 | 77 | // reparent the subviews from the nib file 78 | for (UIView * view in containerView.subviews) 79 | { 80 | [self addSubview:view]; 81 | } 82 | 83 | // Recreate constraints, replace containerView with self 84 | for (NSLayoutConstraint *oldConstraint in constraints) 85 | { 86 | id firstItem = oldConstraint.firstItem; 87 | id secondItem = oldConstraint.secondItem; 88 | if (firstItem == containerView) 89 | { 90 | firstItem = self; 91 | } 92 | if (secondItem == containerView) 93 | { 94 | secondItem = self; 95 | } 96 | 97 | NSLayoutConstraint * newConstraint = [NSLayoutConstraint constraintWithItem:firstItem 98 | attribute:oldConstraint.firstAttribute 99 | relatedBy:oldConstraint.relation 100 | toItem:secondItem 101 | attribute:oldConstraint.secondAttribute 102 | multiplier:oldConstraint.multiplier 103 | constant:oldConstraint.constant]; 104 | [self addConstraint:newConstraint]; 105 | 106 | // If there was outlet(s) to the old constraint, replace it with the new constraint. 107 | for (NSString * key in outlets) 108 | { 109 | if (outlets[key]==oldConstraint) 110 | { 111 | NSAssert([self valueForKey:key]==oldConstraint, @"UIView+NibLoading : Unexpected value for outlet %@ of view %@. Expected %@, found %@.", key, self, oldConstraint, [self valueForKey:key]); 112 | [self setValue:newConstraint forKey:key]; 113 | } 114 | } 115 | } 116 | } 117 | 118 | - (void) setValue:(id)value forKey:(NSString *)key 119 | { 120 | // Keep a list of the outlets set during nib loading. 121 | // (See above: This associated object only exists during nib-loading) 122 | NSMutableDictionary * outlets = objc_getAssociatedObject(self, &kUIViewNibLoading_outletsKey); 123 | outlets[key] = value; 124 | [super setValue:value forKey:key]; 125 | } 126 | 127 | - (void) loadContentsFromNib 128 | { 129 | NSString *className = NSStringFromClass([self class]); 130 | // A Swift class name will be in the format of ModuleName.ClassName 131 | // We want to remove the module name so the Nib can have exactly the same file name as the class 132 | NSRange range = [className rangeOfString:@"."]; 133 | if (range.location != NSNotFound) 134 | { 135 | className = [className substringFromIndex:range.location + range.length]; 136 | } 137 | [self loadContentsFromNibNamed:className]; 138 | } 139 | 140 | @end 141 | 142 | #pragma mark NibLoadedView 143 | 144 | @implementation NibLoadedView : UIView 145 | 146 | - (id) initWithCoder:(NSCoder *)aDecoder 147 | { 148 | self = [super initWithCoder:aDecoder]; 149 | [self loadContentsFromNib]; 150 | return self; 151 | } 152 | 153 | - (id) initWithFrame:(CGRect)frame 154 | { 155 | self = [super initWithFrame:frame]; 156 | [self loadContentsFromNib]; 157 | return self; 158 | } 159 | 160 | @end 161 | -------------------------------------------------------------------------------- /UIView+NibLoading.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "UIView+NibLoading" 3 | s.version = "1.2.0" 4 | s.summary = "Makes writing custom views easier by letting you design their content subviews with Interface Builder" 5 | s.homepage = "http://bou.io/UIView-NibLoading.html" 6 | s.license = 'MIT' 7 | s.author = { "Nicolas Bouilleaud" => "nico@bou.io" } 8 | s.platform = :ios, '6.1' 9 | s.source = { :git => "https://github.com/n-b/UIView-NibLoading.git", :tag => "1.2.0" } 10 | s.source_files = '*.{h,m}' 11 | s.requires_arc = true 12 | end 13 | -------------------------------------------------------------------------------- /UIView+NibLoading.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 376835C916D3775400D5A54E /* UIView+NibLoading.h in Headers */ = {isa = PBXBuildFile; fileRef = 376835C716D3775400D5A54E /* UIView+NibLoading.h */; }; 11 | 376835CA16D3775400D5A54E /* UIView+NibLoading.m in Sources */ = {isa = PBXBuildFile; fileRef = 376835C816D3775400D5A54E /* UIView+NibLoading.m */; }; 12 | 376835CC16D3776300D5A54E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 376835CB16D3776300D5A54E /* UIKit.framework */; }; 13 | 376835CE16D3776800D5A54E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 376835CD16D3776800D5A54E /* Foundation.framework */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | 376835C716D3775400D5A54E /* UIView+NibLoading.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+NibLoading.h"; sourceTree = ""; }; 18 | 376835C816D3775400D5A54E /* UIView+NibLoading.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+NibLoading.m"; sourceTree = ""; }; 19 | 376835CB16D3776300D5A54E /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 20 | 376835CD16D3776800D5A54E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 21 | FAEC6DA114875C66000587CA /* libUIView+NibLoading.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libUIView+NibLoading.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | /* End PBXFileReference section */ 23 | 24 | /* Begin PBXFrameworksBuildPhase section */ 25 | FAEC6D9E14875C66000587CA /* Frameworks */ = { 26 | isa = PBXFrameworksBuildPhase; 27 | buildActionMask = 2147483647; 28 | files = ( 29 | 376835CE16D3776800D5A54E /* Foundation.framework in Frameworks */, 30 | 376835CC16D3776300D5A54E /* UIKit.framework in Frameworks */, 31 | ); 32 | runOnlyForDeploymentPostprocessing = 0; 33 | }; 34 | /* End PBXFrameworksBuildPhase section */ 35 | 36 | /* Begin PBXGroup section */ 37 | 08FB7794FE84155DC02AAC07 /* MAKVONotificationCenter */ = { 38 | isa = PBXGroup; 39 | children = ( 40 | 376835C716D3775400D5A54E /* UIView+NibLoading.h */, 41 | 376835C816D3775400D5A54E /* UIView+NibLoading.m */, 42 | FA3E686714E3270D00DA720D /* Frameworks */, 43 | 1AB674ADFE9D54B511CA2CBB /* Products */, 44 | ); 45 | name = MAKVONotificationCenter; 46 | sourceTree = ""; 47 | }; 48 | 1AB674ADFE9D54B511CA2CBB /* Products */ = { 49 | isa = PBXGroup; 50 | children = ( 51 | FAEC6DA114875C66000587CA /* libUIView+NibLoading.a */, 52 | ); 53 | name = Products; 54 | sourceTree = ""; 55 | }; 56 | FA3E686714E3270D00DA720D /* Frameworks */ = { 57 | isa = PBXGroup; 58 | children = ( 59 | 376835CD16D3776800D5A54E /* Foundation.framework */, 60 | 376835CB16D3776300D5A54E /* UIKit.framework */, 61 | ); 62 | name = Frameworks; 63 | sourceTree = ""; 64 | }; 65 | /* End PBXGroup section */ 66 | 67 | /* Begin PBXHeadersBuildPhase section */ 68 | FAEC6D9F14875C66000587CA /* Headers */ = { 69 | isa = PBXHeadersBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | 376835C916D3775400D5A54E /* UIView+NibLoading.h in Headers */, 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | /* End PBXHeadersBuildPhase section */ 77 | 78 | /* Begin PBXNativeTarget section */ 79 | FAEC6DA014875C66000587CA /* UIView+NibLoading */ = { 80 | isa = PBXNativeTarget; 81 | buildConfigurationList = FAEC6DC014875C66000587CA /* Build configuration list for PBXNativeTarget "UIView+NibLoading" */; 82 | buildPhases = ( 83 | FAEC6D9D14875C66000587CA /* Sources */, 84 | FAEC6D9E14875C66000587CA /* Frameworks */, 85 | FAEC6D9F14875C66000587CA /* Headers */, 86 | ); 87 | buildRules = ( 88 | ); 89 | dependencies = ( 90 | ); 91 | name = "UIView+NibLoading"; 92 | productName = "MAKVONotificationCenter-iOS"; 93 | productReference = FAEC6DA114875C66000587CA /* libUIView+NibLoading.a */; 94 | productType = "com.apple.product-type.library.static"; 95 | }; 96 | /* End PBXNativeTarget section */ 97 | 98 | /* Begin PBXProject section */ 99 | 08FB7793FE84155DC02AAC07 /* Project object */ = { 100 | isa = PBXProject; 101 | attributes = { 102 | LastUpgradeCheck = 0460; 103 | }; 104 | buildConfigurationList = 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "UIView+NibLoading" */; 105 | compatibilityVersion = "Xcode 3.2"; 106 | developmentRegion = English; 107 | hasScannedForEncodings = 1; 108 | knownRegions = ( 109 | en, 110 | ); 111 | mainGroup = 08FB7794FE84155DC02AAC07 /* MAKVONotificationCenter */; 112 | projectDirPath = ""; 113 | projectRoot = ""; 114 | targets = ( 115 | FAEC6DA014875C66000587CA /* UIView+NibLoading */, 116 | ); 117 | }; 118 | /* End PBXProject section */ 119 | 120 | /* Begin PBXSourcesBuildPhase section */ 121 | FAEC6D9D14875C66000587CA /* Sources */ = { 122 | isa = PBXSourcesBuildPhase; 123 | buildActionMask = 2147483647; 124 | files = ( 125 | 376835CA16D3775400D5A54E /* UIView+NibLoading.m in Sources */, 126 | ); 127 | runOnlyForDeploymentPostprocessing = 0; 128 | }; 129 | /* End PBXSourcesBuildPhase section */ 130 | 131 | /* Begin XCBuildConfiguration section */ 132 | 1DEB927908733DD40010E9CD /* Debug */ = { 133 | isa = XCBuildConfiguration; 134 | buildSettings = { 135 | ALWAYS_SEARCH_USER_PATHS = NO; 136 | CLANG_ENABLE_OBJC_ARC = YES; 137 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 138 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; 139 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 140 | GCC_CW_ASM_SYNTAX = NO; 141 | GCC_C_LANGUAGE_STANDARD = gnu99; 142 | GCC_ENABLE_PASCAL_STRINGS = NO; 143 | GCC_OPTIMIZATION_LEVEL = 0; 144 | GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; 145 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 146 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 147 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 148 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 149 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 150 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 151 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 152 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 153 | GCC_WARN_UNKNOWN_PRAGMAS = YES; 154 | GCC_WARN_UNUSED_FUNCTION = YES; 155 | GCC_WARN_UNUSED_LABEL = YES; 156 | GCC_WARN_UNUSED_VARIABLE = YES; 157 | ONLY_ACTIVE_ARCH = YES; 158 | RUN_CLANG_STATIC_ANALYZER = YES; 159 | }; 160 | name = Debug; 161 | }; 162 | 1DEB927A08733DD40010E9CD /* Release */ = { 163 | isa = XCBuildConfiguration; 164 | buildSettings = { 165 | ALWAYS_SEARCH_USER_PATHS = NO; 166 | CLANG_ENABLE_OBJC_ARC = YES; 167 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 168 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; 169 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 170 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 171 | GCC_CW_ASM_SYNTAX = NO; 172 | GCC_C_LANGUAGE_STANDARD = gnu99; 173 | GCC_ENABLE_PASCAL_STRINGS = NO; 174 | GCC_PREPROCESSOR_DEFINITIONS = ( 175 | "NS_BLOCK_ASSERTIONS=1", 176 | "NDEBUG=1", 177 | ); 178 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 179 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 180 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 181 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 182 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 183 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 184 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 185 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 186 | GCC_WARN_UNKNOWN_PRAGMAS = YES; 187 | GCC_WARN_UNUSED_FUNCTION = YES; 188 | GCC_WARN_UNUSED_LABEL = YES; 189 | GCC_WARN_UNUSED_VARIABLE = YES; 190 | RUN_CLANG_STATIC_ANALYZER = YES; 191 | }; 192 | name = Release; 193 | }; 194 | FAEC6DC114875C66000587CA /* Debug */ = { 195 | isa = XCBuildConfiguration; 196 | buildSettings = { 197 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 198 | COPY_PHASE_STRIP = NO; 199 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 200 | OTHER_LDFLAGS = "-ObjC"; 201 | PRODUCT_NAME = "$(TARGET_NAME)"; 202 | SDKROOT = iphoneos; 203 | SKIP_INSTALL = YES; 204 | }; 205 | name = Debug; 206 | }; 207 | FAEC6DC214875C66000587CA /* Release */ = { 208 | isa = XCBuildConfiguration; 209 | buildSettings = { 210 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 211 | COPY_PHASE_STRIP = YES; 212 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 213 | OTHER_LDFLAGS = "-ObjC"; 214 | PRODUCT_NAME = "$(TARGET_NAME)"; 215 | SDKROOT = iphoneos; 216 | SKIP_INSTALL = YES; 217 | VALIDATE_PRODUCT = YES; 218 | }; 219 | name = Release; 220 | }; 221 | /* End XCBuildConfiguration section */ 222 | 223 | /* Begin XCConfigurationList section */ 224 | 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "UIView+NibLoading" */ = { 225 | isa = XCConfigurationList; 226 | buildConfigurations = ( 227 | 1DEB927908733DD40010E9CD /* Debug */, 228 | 1DEB927A08733DD40010E9CD /* Release */, 229 | ); 230 | defaultConfigurationIsVisible = 0; 231 | defaultConfigurationName = Release; 232 | }; 233 | FAEC6DC014875C66000587CA /* Build configuration list for PBXNativeTarget "UIView+NibLoading" */ = { 234 | isa = XCConfigurationList; 235 | buildConfigurations = ( 236 | FAEC6DC114875C66000587CA /* Debug */, 237 | FAEC6DC214875C66000587CA /* Release */, 238 | ); 239 | defaultConfigurationIsVisible = 0; 240 | defaultConfigurationName = Release; 241 | }; 242 | /* End XCConfigurationList section */ 243 | }; 244 | rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; 245 | } 246 | --------------------------------------------------------------------------------