Permalink
Browse files

TUIViewNSViewContainer's designated initializer should be -initWithFr…

…ame:, not -init
  • Loading branch information...
1 parent 8645822 commit 816df19b317fe4e2124a5e6b45dbea67b1ebce51 @jspahrsummers jspahrsummers committed Jul 23, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/UIKit/TUIViewNSViewContainer.m
@@ -108,8 +108,8 @@ - (BOOL)isRenderingContainedView {
#pragma mark Lifecycle
-- (id)init {
- self = [super init];
+- (id)initWithFrame:(CGRect)frame {
+ self = [super initWithFrame:frame];
if (!self)
return nil;
@@ -124,12 +124,11 @@ - (id)init {
- (id)initWithNSView:(NSView *)view; {
NSAssert1([NSThread isMainThread], @"%s should only be called from the main thread", __func__);
- self = [self init];
+ self = [self initWithFrame:view.frame];
if (!self)
return nil;
self.rootView = view;
- self.frame = view.frame;
return self;
}

0 comments on commit 816df19

Please sign in to comment.