I've found a bug when loading it from a XIB, and trying to initialize it in the awakeFromNib method of my cell.
In fact, you've implemented the awakeFromNib constructor. A component loaded from a XIB should implement initWithCoder: instead.
When using your control in a UICollectionViewCell for example, and trying to configure it in the awakeFromNib method of the UICollectionViewCell, the awakeFromNib method of your control is called after. So configuration aren't kept.
CustomCollecitonViewCell.h
- (void)awakeFromNib
{
[super awakeFromNib];
MDRadialProgressTheme *theme = _progressView.theme;
theme.completedColor = [UIColor redColor];
theme.centerColor = [UIColor whiteColor];
theme.labelShadowColor = [UIColor blackColor];
// _progressView is an outlet defined in the xib
_progressView.theme = theme;
}
// Past this point, awakeFromNib method will be called in your MDRadialProgressView. Perhaps a change in iOS7 xib loading ?
To fix that, you have to replace your awakeFromNib method by the initWithCoder constructor.
Hi,
thanks for your control.
I've found a bug when loading it from a XIB, and trying to initialize it in the awakeFromNib method of my cell.
In fact, you've implemented the awakeFromNib constructor. A component loaded from a XIB should implement initWithCoder: instead.
When using your control in a UICollectionViewCell for example, and trying to configure it in the awakeFromNib method of the UICollectionViewCell, the awakeFromNib method of your control is called after. So configuration aren't kept.
CustomCollecitonViewCell.h
To fix that, you have to replace your awakeFromNib method by the initWithCoder constructor.
Regards,