I create a UIProgressView inside UICollectionViewCell, I try to setFrame for UIProgressView to change position in UICollectionViewCell but when do that, some cells not display progressView.
When I delete setFrame, It’s OK but default width at the top of UICollectionViewCell
What’s the problem?How to change UIProgressView size, origin? Please help!
//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;
}
I have modified you code. Now, progress view is working properly. All cells are showing the progress view. Also, width & position of the cell can be modified, if you change the frame of
self.downloadBin the below codeI have modified the code of cell.m from the github url which you have provided.