Scrolling content but not background
Hi
I need some advice from you guys about the following problem:
I'm using cocos2d. I've created a view, to which I attached the "Director" and created a "Scene" in (cocos2d's classes). I need to enable scrolling the view's content, so I've placed the view in a UIScrollView. So far so good.
The problem is I also need a background image which the UIScrollView wouldn't scroll. I need the UIScrollView to scroll anything but the background image.
The straight forward solution is to create the background in a different view behind the scroll view, but I couldn't make all the elements in front of the background (UIScrollView, UIView, Scene) transparent so the background image will be seen.
I've also tried to place the background image inside the scrolling view, and manually keep the background image in place by moving it (according to the UIScrollView contentOffset) while the UIScrollView scrolls (implemented the scrollViewDidScroll method of the UIScrollViewDelegate), but it doesn't manage to change its position fast enough, so the background image heavily flickers while scrolling.
I really don't know what to do. Do I have to implement scrolling myself without the UIScrollView?
Any advice???
thanks!
I need some advice from you guys about the following problem:
I'm using cocos2d. I've created a view, to which I attached the "Director" and created a "Scene" in (cocos2d's classes). I need to enable scrolling the view's content, so I've placed the view in a UIScrollView. So far so good.
The problem is I also need a background image which the UIScrollView wouldn't scroll. I need the UIScrollView to scroll anything but the background image.
The straight forward solution is to create the background in a different view behind the scroll view, but I couldn't make all the elements in front of the background (UIScrollView, UIView, Scene) transparent so the background image will be seen.
I've also tried to place the background image inside the scrolling view, and manually keep the background image in place by moving it (according to the UIScrollView contentOffset) while the UIScrollView scrolls (implemented the scrollViewDidScroll method of the UIScrollViewDelegate), but it doesn't manage to change its position fast enough, so the background image heavily flickers while scrolling.
I really don't know what to do. Do I have to implement scrolling myself without the UIScrollView?
Any advice???
thanks!
omriykl Wrote:Hi
I need some advice from you guys about the following problem:
I'm using cocos2d. I've created a view, to which I attached the "Director" and created a "Scene" in (cocos2d's classes). I need to enable scrolling the view's content, so I've placed the view in a UIScrollView. So far so good.
The problem is I also need a background image which the UIScrollView wouldn't scroll. I need the UIScrollView to scroll anything but the background image.
The straight forward solution is to create the background in a different view behind the scroll view, but I couldn't make all the elements in front of the background (UIScrollView, UIView, Scene) transparent so the background image will be seen.
I've also tried to place the background image inside the scrolling view, and manually keep the background image in place by moving it (according to the UIScrollView contentOffset) while the UIScrollView scrolls (implemented the scrollViewDidScroll method of the UIScrollViewDelegate), but it doesn't manage to change its position fast enough, so the background image heavily flickers while scrolling.
I really don't know what to do. Do I have to implement scrolling myself without the UIScrollView?
Any advice???
thanks!
I don't think that's possible (am I wrong?)
I think you have to implement your own scrolling for that. Has anyone here done something like that and can share some info with us?
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Downloadable user content: what is allowed and what is the best way to do it? | alerus | 0 | 2,297 |
Jul 19, 2011 01:35 PM Last Post: alerus |
|
| App launches, tab bar shows, but content is white and viewWillAppear not called | funkboy | 3 | 3,966 |
Oct 21, 2009 12:13 AM Last Post: sthaqu |
|
| Images with partial transparency in content | kendric | 1 | 2,145 |
Mar 19, 2009 07:24 AM Last Post: kendric |
|
| OpenGL ES Scrolling Background | abdm436 | 5 | 5,109 |
Oct 21, 2008 09:30 AM Last Post: AnotherJake |
|
| A Collectable Card Game with User Created Content, please? | palenoue | 6 | 4,919 |
Jun 12, 2008 10:37 AM Last Post: palenoue |
|

