Я создаю UIProgressView внутри UICollectionViewCell, пытаюсь установить setFrame для UIProgressView, чтобы изменить позицию в UICollectionViewCell, но при этом некоторые ячейки не отображают progressView. Когда я удаляю setFrame, это нормально, но ширина по умолчанию вверху UICollectionViewCell
В чем проблема? Как изменить размер UIProgressView, происхождение? Пожалуйста помоги!
//Cell:UICollectionViewCell
//Cell.m
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
//ProgressView
self.progressView = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleBar];
[self.progressView setFrame:progressViewFrame];//Some cells not display progressView
[self.progressView addSubview:self.downloadBar];
}
return self;
}