-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hi, Thankyou for this library and as i know you haven't updated it for 2 years, but i am stuck at a thing where i added a CaroselView and appended image view in a tableView it works fine on first viewDidLoad , but as I scroll down and bring up, if the images in pageController were 4 before , they become 8 and this goes on, i dun know now how to handle this thing, any help would be appreciated.. as shown in image.
this is what I am doing in code.
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell: FeedsCollectionViewCell = collectionView.dequeueReusableCell(withReuseIdentifier: "FeedsCollectionViewCell", for: indexPath) as! FeedsCollectionViewCell
if postObject.contents.count > 0 {
for content in postObject.contents {
cell.feedImageHeightConstaint.constant = 200
cell.carouselViewHightContaint.constant = 200
let postContent: PostContent = postObject.contents[0]
let imageSlide = UIImageView()
let tap = UITapGestureRecognizer(target: self, action: #selector(showImage(_:)))
imageSlide.isUserInteractionEnabled = true
imageSlide.addGestureRecognizer(tap)
imageSlide.contentMode = UIView.ContentMode.scaleAspectFill
imageSlide.clipsToBounds = true
imageSlide.sd_setImage(with: URL(string: content.contentURL!), placeholderImage: nil) { [weak self](image, error, imageCacheType, url) in
guard let self = self else { return }
self.popUpFeedImage = image
}
cell.carouselView.appendContent(view: imageSlide) }
}
Metadata
Metadata
Assignees
Labels
No labels
