have a little problem with this code:
UITableViewCell *cell = (UITableViewCell *)[[button superview] superview];
[button setBackgroundImage: [UIImage imageNamed:@"blueButton.png"] forState:UIControlStateNormal];
VersionsPopover* content = [[[VersionsPopover alloc] initwithChapter:button.chapter]autorelease];
UIPopoverController* aPopover = [[UIPopoverController alloc] initWithContentViewController:content];
aPopover.delegate = self;
aPopover.popoverContentSize = CGSizeMake(500,[self filesFromFolderWithChapter:button.chapter] * 60);
This
VersionsPopover* content = [[[VersionsPopover alloc] initwithChapter:button.chapter]autorelease];
is always getting me potential leaks.
With autorelease I get for aPopover “Object sent autorelease too many times”.
When I use [content release] Xcode tells me that I don’t own this object.
Without a release it says “potential leak”.
Don’t know what else I could try to solve this…
Do like this.