objective c - how to change contentSize,height,setContentOffset of the UIScrollView with iOS 8 Size Classes and Autolayout -
i using uiscrollview in storyboard , subview on top of scrollview not able update contentsize,height,setcontentoffset of uiscrollview @ run time .i have added constraints of scrollview .in storyboard. uiscrollview taking height =800 added in storyboard. @ run time want change contentsize <=1195 .
i used code update
upperscrol.contentsize = cgsizemake(upperscrol.frame.size.width, hieght); upperscrol.delegate=self; upperscrol.userinteractionenabled=yes;
setting setcontentoffset
cgpoint bottomoffset = cgpointmake(0, [upperscrol contentsize].height - upperscrol.frame.size.height); [upperscrol setcontentoffset:bottomoffset animated:yes]; [self.view addsubview:upperscrol];
this view hierarchy
what way update height of uiscrollview @ run time
Comments
Post a Comment