Created
May 12, 2009 19:12
-
-
Save saikat/110674 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation WidgetView : CPView | |
{ | |
Widget _widget; | |
} | |
- (void)setSelected:(BOOL)isSelected | |
{ | |
[self setBackgroundColor:isSelected ? [CPColor grayColor] : nil]; | |
} | |
- (void)setRepresentedObject:(id)anObject | |
{ | |
console.log ("Attempting to set..."); | |
console.log (_widget); | |
if (!_widget) | |
{ | |
console.log ("blah"); | |
_widget = [[TextWidget alloc] initWithFrame:CGRectMake (0, 0, 90, 90)]; | |
console.log (_widget); | |
[self addSubview:_widget]; | |
} | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment