lakesoft/LKbadgeView — Issue #1: addsubview overlapping
Author: flexmcpee
Created: 2012-01-22 19:37:45+00:00
State: open

Hello,

Firstly I really love this much better than the standard badge so thanks! I add the below to my viewwillappear.

LKBadgeView* badgeView =[[[LKBadgeView alloc] initWithFrame:CGRectMake(262, 366, 65, 20)]autorelease];
[self.view addSubview:badgeView];
badgeView.text = [NSString stringWithFormat:@"%d", [theProducts count]];

However when the badge count reaches say 2 digits i.e 20 then I remove my objects from my array and the view loads again. It resets the count to 0 which is correct however when going from 2 digits or more to 1 digit you can see the badge is not resizing even though I am using: It looks like its adding another subview over the old subview for 2 digits in the background if that makes sense. I apologise if this is my fault loading it into the view like this maybe i somehow have to unload the subview when the view disappears?

self.widthMode = LKBadgeViewWidthModeSmall;