iphone - Custom method for UIPageviewController datasource -


i want implement 1 custom method uipageviewcontroller datasource turn page @ index

something this

- (void) pageviewcontroller:(pageviewcontroller *)pageviewcontroller willturntopageatindex:(nsuinteger)currentindex  

i don't know if correct way of implementing custom method uipageviewcontroller datasource.

you can add whatever methods data source class. methods considered public should defined in header file.

but that's not you're asking. you're asking: how can uipageviewcontroller call it?

the short version is: can't.

while method has nice, readable signature, compiler it's no different to:

- (void) pageviewcontroller:(pageviewcontroller *)pageviewcontroller banana:(banana*)banana; 

there's no way controller expected know it.

i'm afraid, in general, have use methods published.

there some exceptions. example, there no delegate method can subscribe notification. or maybe there's delegate use? in case expect "will something" method on delegate rather data source.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -