Skip to content

Commit

Permalink
fix init multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
stcui committed Sep 6, 2012
1 parent 834e645 commit 85aac41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions BeeFramework/MVC/View/Bee_UIGridCell.m
Expand Up @@ -72,11 +72,11 @@ + (BeeUIGridCell *)spawn

- (id)init
{
self = [super init];
self = [super init]; // will call initWithFrame
if ( self )
{
[self initSelf];
[self load];
// [self initSelf];
// [self load];
}
return self;
}
Expand Down
5 changes: 3 additions & 2 deletions BeeFramework/MVC/View/Bee_UISegmentedControl.m
Expand Up @@ -79,7 +79,8 @@ - (id)initWithItems:(NSArray *)items
self = [super initWithItems:items];
if ( self )
{
[self initSelf];
// initWithItems willl call initWithFrame
// [self initSelf];
}
return self;
}
Expand All @@ -91,7 +92,7 @@ - (void)initSelf
self.segmentedControlStyle = UISegmentedControlStyleBar;
self.selectedSegmentIndex = 0;
// self.tintColor = [UIColor darkGrayColor];

assert(nil == _tags);
_tags = [[NSMutableArray alloc] init];

[self addTarget:self action:@selector(didSelectionChanged:) forControlEvents:UIControlEventValueChanged];
Expand Down

0 comments on commit 85aac41

Please sign in to comment.