Skip to content

addsubview overlapping #1

Description

@flexmcpee

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;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions