FSPagerView
FSPagerView copied to clipboard
Change access modifier numberOfItems
What is the purpose of opening this? The numberOfItems
are asked by the dataSource, which is implemented by the client side. So the client side already knows better about the number.
Hi After pager.reloadData() I call: pager.scrollToItem(at: index, animated: true) (index I get from datasource) The app crash because the pager doesn't have the item at index
Vào Th 2, 27 thg 9, 2021 vào lúc 16:23 Wenchao Ding < @.***> đã viết:
What is the purpose of opening this? The numberOfItems are asked by the dataSource, which is implemented by the client side. So the client side already knows better about the number.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WenchaoD/FSPagerView/pull/325#issuecomment-927687154, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEOT3SQCPKABYPKKX5OM5SLUEAZZPANCNFSM5DR4IKJQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
confirm.
pager.reloadData() {
//has to call it immediately:
self.numberOfItems = dataSource.numberOfItems(in: self)
}