Skip to content
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

is not 5.0-compatible? #5

Open
bitwolaiye opened this issue Feb 27, 2013 · 6 comments
Open

is not 5.0-compatible? #5

bitwolaiye opened this issue Feb 27, 2013 · 6 comments

Comments

@bitwolaiye
Copy link

No description provided.

@bitwolaiye
Copy link
Author

I merge this project with PSTCollectionView (https://github.com/steipete/PSTCollectionView )
code in my repo https://github.com/bitwolaiye/RAPageViewController
thanks to evadne.

@jstart
Copy link

jstart commented Mar 12, 2013

👍 should be merged to support 5.0

@evadne
Copy link
Owner

evadne commented Apr 14, 2013

Yay @bitwolaiye @jstart — thank you all!

I’ll take a look and merge.

@evadne
Copy link
Owner

evadne commented Apr 14, 2013

Took a look. I have several concerns and wish to discuss with you:

  • The code is hard coded against PSTCollectionView and will therefore not use UICollectionView on iOS 6. I’m unsure if this is the best course of action.
  • If somebody drops the project as it is on bitwolaiye@a6ca674 in their app, they must not have PSTCollectionView already included in the project. Otherwise, there will be duplicate symbols and the linker will refuse to link.

I think — initially — we can do some typedef-fing for every symbol around UICollectionView and then run this logic at runtime:

  • If there is UICollectionView, use it. Inject the correct values.
  • Otherwise, if there is PSTCollectionView, use it, and inject pointers to classes in this library.
  • Otherwise, throw in the towel and abort().

It appears that PSTCreateUICollectionViewClasses() does roughly the same thing. I’ll greatly appreciate if you can try this path — run RAPageViewController unmodified, compile with iOS 6.0 SDK with distribution target of iOS 5.0+ to steal all the constants at compile time, and invoke PSTCreateUICollectionViewClasses() at run time.

Let me know how it goes.

@bitwolaiye
Copy link
Author

You are right. Thank you.I will try later

@evadne
Copy link
Owner

evadne commented Apr 14, 2013

Ideally we do not have to change anything in RAPageViewController, but it seems that UIKit compatibility in PSTCollectionView is done by forcing use of special classes from the calling site.

I think it’s because otherwise classes will just not be linked correctly if they are not available. (note: fuzzy memory, I can be dead wrong.)

We might have to implement our own mechanism like that and special-code the sniffing in. Can’t have developers who use RAPageViewController to just fork and patch.

On Apr 14, 2013, at 10:38 PM, bitwolaiye [email protected] wrote:

You are right. Thank you.I will try later


Reply to this email directly or view it on GitHub:
#5 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants