views:

51

answers:

1

Hi,

I see many post dealing with the UIScrollView like in the PhotoApp, but I don't really understand them, thats why I want to reopen a post about it and have a simple solution.

What I want is to create (without IB) a simple UIViewController who will contain a UIScrollView (inside my scrollView there will be image and the scrollView will be set to pagingEnable to YES of course).

I want to be able with a simple touch of the screen to display the navigationController.navigationBar inside my UIViewController and with another touch not displaying it of course.

Can anyone show me how to implement that?

thanks,

+1  A: 

Use UIButton instead of UIImageView within scroll. Or add transparent button with window size before adding your image view.

Skie
thats not a bad idea I will try it, but I don't think thats the best one too and I really want to do that without using any tiers object
ludo
Unfortunately UIScrollView have a lot of side effects and restrictions so in most cases there need to implement custom workarounds like that. Also you can add transparent button in UIScrollView subclass.
Skie
yeah I implemented your method, thats the easiest way for the moment I think.
ludo