-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Not really an issue... more a suggestion: make "- (UIView *)viewAtIndex:(NSInteger)index;" public... #31
Comments
I made this public in a local version but found it often returned This is probably why the method isn't public from the outset, as there are clearly certain caveats regarding its use which aren't currently documented. |
Yep, I agree, and in fact this is already included for 1.5.5 (not yet released) Nick (Sent from my iPhone) On 15 Aug 2011, at 14:23, sgabello reply@reply.github.com wrote:
|
Added in 1.5.5, but it's called |
Does this new method load the view before returning it if it isn't already loaded, to avoid returning |
It returns nil. I thought about triggering the load in that situation, but it's not really useful. The main reason for the method is so you can manipulate visible views in the carousel. Every time a view is loaded, a new instance is created, so loading a view that's not visible in the carousel would be pointless because it it would never get displayed - as soon as it moved into view, a new instance would get loaded anyway. Any manipulation you did to it would be wasted. If for some reason you do want a view that's not been loaded, just call the dataSource method for it yourself, e.g.
|
Ah, okay. Thanks for providing some interesting clarification. I was unaware a new view would be created each time it becomes visible, and this certainly clears up some unintended issues I've run into :) It also explains the slow down/jerkiness which affects scrolling when I lower |
I'm already doing it in my fork because I need to show/hide the current view... But generally speaking I find it a useful method to expose to everyone... What you think?
The text was updated successfully, but these errors were encountered: