开发者

UIScrollView in "U" shaped

I want to know whether it is possible to create a scrollview that has a "U" shape or 开发者_开发技巧consisting of any other curvy patterns??

Any ideas??


You can write a Custom Gesture Recognizer to recognize a "U".

It involves implementing the following methods:

- (void)reset;
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;

and doing the geometry to find the pattern you are looking for.


For rendering, probably some kind of transform layer could help. For touch processing, however, you probably are on your own.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜