iphone - UIScrollView Horizontal scrolling - Disable left scroll -


how can disable scrolling left on uiscrollview. users can scroll right?

thanks

*** update *****

this have now. have subclassed uiscrollview , overwritten following methods

@implementation touchscrollview  - (bool)touchesshouldbegin:(nsset *)touches withevent:(uievent *)event incontentview:(uiview *)view {     nslog(@"touchesshouldbegin: touched!");     return yes; }  - (bool)touchesshouldcancelincontentview:(uiview *)view {     nslog(@"touchesshouldcancelincontentview: touched!");     return no; } 

in viewcontroller have set following attributes:

scrollview.delayscontenttouches = no; scrollview.cancancelcontenttouches = yes; 

touchesshouldbegin being called touchesshouldcancelincontentview not being called , cant figure out why!!

thanks

just add in uiviewcontroller uiscrollviewdelegate

float oldx; // here or better in .h interface  - (void)scrollviewdidscroll:(uiscrollview *)ascrollview {     if (scrollview.contentoffset.x < oldx) {         [ascrollview setcontentoffset: cgpointmake(oldx, ascrollview.contentoffset.y)];     } else {         oldx = ascrollview.contentoffset.x;     }  } 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -