Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dummy class UINib and -initWithCoder: method to UIView to be able to... #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions UIKit/Classes/UINib.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// UINib.h
// UIKit
//
// Created by Home on 19/10/12.
//
//

#import <Foundation/Foundation.h>

// dummy class
@interface UINib : NSObject

// not implemented
+ (UINib *)nibWithNibName:(NSString *)name bundle:(NSBundle *)bundleOrNil;

// not implemented
+ (UINib *)nibWithData:(NSData *)data bundle:(NSBundle *)bundleOrNil;

// not implemented
- (NSArray *)instantiateWithOwner:(id)ownerOrNil options:(NSDictionary *)optionsOrNil;

@end
34 changes: 34 additions & 0 deletions UIKit/Classes/UINib.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// UINib.m
// UIKit
//
// Created by Home on 19/10/12.
//
//

#import "UINib.h"

@implementation UINib

// not implemented
+ (UINib *)nibWithNibName:(NSString *)name bundle:(NSBundle *)bundleOrNil
{
NSLog(@"UINib is not implemented.");
return nil;
}

// not implemented
+ (UINib *)nibWithData:(NSData *)data bundle:(NSBundle *)bundleOrNil
{
NSLog(@"UINib is not implemented.");
return nil;
}

// not implemented
- (NSArray *)instantiateWithOwner:(id)ownerOrNil options:(NSDictionary *)optionsOrNil
{
NSLog(@"UINib is not implemented.");
return nil;
}

@end
1 change: 1 addition & 0 deletions UIKit/Classes/UIView.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ typedef NSUInteger UIViewAnimationOptions;
+ (Class)layerClass;

- (id)initWithFrame:(CGRect)frame;
- (id)initwithCoder:(NSCoder *)coder;
- (void)addSubview:(UIView *)subview;
- (void)insertSubview:(UIView *)subview atIndex:(NSInteger)index;
- (void)insertSubview:(UIView *)subview belowSubview:(UIView *)below;
Expand Down
6 changes: 6 additions & 0 deletions UIKit/Classes/UIView.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ - (id)initWithFrame:(CGRect)theFrame
return self;
}

- (id)initwithCoder:(NSCoder *)coder
{
NSLog(@"Not implemented.");
return nil;
}

- (void)dealloc
{
[[_subviews allObjects] makeObjectsPerformSelector:@selector(removeFromSuperview)];
Expand Down
8 changes: 8 additions & 0 deletions UIKit/UIKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@
78D533DD133A9434006F17CA /* UISearchDisplayController.h in Headers */ = {isa = PBXBuildFile; fileRef = 78D533DB133A9434006F17CA /* UISearchDisplayController.h */; settings = {ATTRIBUTES = (Public, ); }; };
78D533DE133A9434006F17CA /* UISearchDisplayController.m in Sources */ = {isa = PBXBuildFile; fileRef = 78D533DC133A9434006F17CA /* UISearchDisplayController.m */; };
8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
FAEF437F163193E3008AA63E /* UINib.h in Headers */ = {isa = PBXBuildFile; fileRef = FAEF437D163193E3008AA63E /* UINib.h */; settings = {ATTRIBUTES = (Public, ); }; };
FAEF4380163193E3008AA63E /* UINib.m in Sources */ = {isa = PBXBuildFile; fileRef = FAEF437E163193E3008AA63E /* UINib.m */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -595,6 +597,8 @@
78D533DC133A9434006F17CA /* UISearchDisplayController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UISearchDisplayController.m; sourceTree = "<group>"; };
8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8DC2EF5B0486A6940098B216 /* UIKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = UIKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
FAEF437D163193E3008AA63E /* UINib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UINib.h; sourceTree = "<group>"; };
FAEF437E163193E3008AA63E /* UINib.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UINib.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -859,6 +863,8 @@
1489856712EE2CFE003D4751 /* UIWebView.m */,
1489856812EE2CFE003D4751 /* UIWindow.h */,
1489856912EE2CFE003D4751 /* UIWindow.m */,
FAEF437D163193E3008AA63E /* UINib.h */,
FAEF437E163193E3008AA63E /* UINib.m */,
);
path = Classes;
sourceTree = "<group>";
Expand Down Expand Up @@ -1122,6 +1128,7 @@
14711394156FC83F00251B2E /* UIImageRep.h in Headers */,
145BE31D15754F2400C41D70 /* UIColorRep.h in Headers */,
145BE3211575523000C41D70 /* UIColor+UIPrivate.h in Headers */,
FAEF437F163193E3008AA63E /* UINib.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -1333,6 +1340,7 @@
14711395156FC83F00251B2E /* UIImageRep.m in Sources */,
14E20663156FE88D0040349D /* UIImageAppKitIntegration.m in Sources */,
145BE31E15754F2400C41D70 /* UIColorRep.m in Sources */,
FAEF4380163193E3008AA63E /* UINib.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down