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.
精彩评论