iphone - CGRectOffset Causes Swiping The Wrong Way -


trying able swipe away cell , view show up. code far, unable see rightview. instead limits me seeing leftview(i want opposite...leftview not exist). confused cgrects , cgrectoffsets. if correct code great. thanks.

- (void)layoutsubviews { [super layoutsubviews];  cgrect frame = self.bounds; self.scrollview.frame = frame; self.scrollview.contentsize = cgsizemake(frame.size.width*2, frame.size.height);  self.centerview.frame = cgrectoffset(frame, frame.size.width, 0); self.rightview.frame = cgrectoffset(frame, frame.size.width*2, 0);  [self.scrollview scrollrecttovisible:self.centerview.frame animated:no]; [self.scrollview setuserinteractionenabled:yes]; self.scrollview.scrollenabled = yes; } 

you setting centerview , rightview's offset frame.size.width , frame.size.width*2 respectively. want center 0 , right view frame.size.width.

you moving views on left frame.size.width number of pixels dont have view.


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -