New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate items #2
Labels
Comments
How about the following: func pagingView(pagingView: PagingView, numberOfItemsInSection section: Int) -> Int {
return 4
}
func pagingView(pagingView: PagingView, cellForItemAtIndexPath indexPath: NSIndexPath) -> PagingViewCell {
pageControl.currentPage = indexPath.row
let cell = pagingView.dequeueReusableCellWithReuseIdentifier("ImagePagingViewCell")
var url : String = ""
if indexPath.row % 2 == 0 {
url = (self.data?.img0)!
} else if indexPath.row % 2 == 1 {
url = (self.data?.img1)!
}
let imageURL = NSURL(string: "\(Const.URL_BASE_IMAGE)\(url)")
if let cell = cell as? ImagePageViewCell {
cell.imageView.af_setImageWithURL(imageURL!)
}
return cell
} |
I think you misunderstood what I'm asking... I only want 2 images. But for some reason I'm getting those 2 images duplicated giving me 4 images... It's been driving me insane since I'm specifying |
I'm sorry. I misunderstood. All of the Cell is case of two or less, bug occurs. |
FIx in 0.4.2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So.. What I want is a PagingView with 2 images. Without infinite scrolling.
I followed your example and made ImagePagingCell extending PagingViewCell (basically just a UIImageView that fills the entire nib like the one in your demo). But the problem is that instead of only having 2 images I have 4, the 2 images duplicated.
Here's some code:
Any ideas why I'm getting 4 pages instead of 2?
Thanks
The text was updated successfully, but these errors were encountered: