Is this code, for horizontal page curl in iPhone, valid?

为君一笑 提交于 2019-12-14 02:35:37

问题


I was Googling for applying horizontal page curl in iPhone. I also tried this, but it wasn't appropriate for me (To change orientation and work in different ori.). I tried to search the web more. Finally I got this link. From where, I could understand the horizontal page curl.

But when I went to code deeply, I found some confusing points:

  1. extern NSString *kCAFilterPageCurl; // From QuartzCore.framework
    is it valid to use internal variable ? ( as it's mentioned - from QuartzCore )

  2. CAFilter *previousFilter = [[CAFilter filterWithType:kCAFilterPageCurl] retain];

    Above statement is giving warning ( not error ) -> no '+filterWithType:' method found. Might be using internal (apple's private) method.

  3. [previousFilter setDefaults];

    Above statement is giving warning ( not error ) -> no '-setDefaults:' method found. Might be using internal (apple's private) method.

Now my queries.

  1. I have above doubts in the project (that might be using Apple's private methods).
  2. Is this code safe for apple store approval ?
  3. If 2's answer is wrong, what should be done for horizontal page curl ?

In short, I want a horizontal page curl, and need your suggestions for having the proper solution, which might not trouble me in future.


回答1:


CAFilter is private API, that's why you see compiler errors and warnings. What's worse is that Apple may reject your application for use of private API.




回答2:


Some fantastic work on this topic at this blog, and a couple great github projects linked: http://blog.steventroughtonsmith.com/2010/02/apples-ibooks-dynamic-page-curl.html



来源:https://stackoverflow.com/questions/2879706/is-this-code-for-horizontal-page-curl-in-iphone-valid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!