-5
Если пользователь выбрал более 4 изображений, тогда отобразите окно предупреждения.Выберите максимум 4 изображения на UICollectionView
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
UICollectionViewCell *secell = [collectionView cellForItemAtIndexPath:indexPath];
if (indexPath.row == 4) {
UIAlertView * alert =[[UIAlertView alloc ] initWithTitle:@"OK Dailog"
message:@"This is OK dialog"
delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles: nil];
[alert show];
}
else
{
UIImageView *imgselect = (UIImageView *)[secell viewWithTag:110];
imgselect.image = [UIImage imageNamed:@"selectimg.png"];
}
}