objective c - UIScrollView change subview position -
i have uiscrollview
resized depending on context. subviews repositioned based on context.
when loads, goes fine. but, when touch scrollview, subviews go original position.
that messes layout.
i specified:
self.automaticallyadjustsscrollviewinsets = no;
without result.
does know why?
here code position subview , resize scrollview. btnsave
button goes it's original position when scroll.
float more = 0; float height = 900; if (is_iphone_6) { height = 1050; } else if (is_iphone_6p) { more = 200; height = 1100; } status = [avcapturedevice authorizationstatusformediatype:avmediatypevideo]; if (appdelegate.driverfisrtname != nil && ![appdelegate.driverplateimage isequaltostring:@""]) { height = 1300; self.scrollview.contentsize = cgsizemake(self.view.frame.size.width, height); self.btnsave.frame = cgrectmake(self.btnsave.frame.origin.x, self.btnsave.frame.origin.y - more, self.btnsave.frame.size.width, self.btnsave.frame.size.height); } else { self.scrollview.contentsize = cgsizemake(self.view.frame.size.width, height); }
Comments
Post a Comment