I have folowing problem.
I got 2 views in my project,one is created programmicaly (and it has touch events) and another is interface view created via xib file.
I create
UIScrollView
in my ViewController and set it as view,and after I add my views as subviews.
But I cant see that one that programmicaly created,only white screen and interface view..
Also can I disable somehow ScrollView’s touchs intercepting? I want to add some sort of minimap for it.
Since you pass
CGRectZeroto your view’sinitWithFrame:, it gets created with the size of zero. You need to pass a rectangle where the view is to be displayed, usingCGRectMake.As far as handling touches goes, you can customize it in your subclass of the scroll view by intercepting
touchesShouldBegin:withEvent:inContentView:. There is also adelaysContentTouchesflag that lets you control the timing of the events sent to your handling code.