I need to update UIView size.
Now i use
var titleSize = CGRectMake(0, 30, 40 , 1000)
self.contentCoverScrollView.frame = titleSize
in viewDidLoad, but nothing happens.
I need to update UIView size.
Now i use
var titleSize = CGRectMake(0, 30, 40 , 1000)
self.contentCoverScrollView.frame = titleSize
in viewDidLoad, but nothing happens.
I thought you had used the AutoLayout in your application that's why it can not change the view frame, please write the below code.
var titleSize = CGRectMake(0, 30, 40 , 1000)
self.contentCoverScrollView.frame = titleSize
[self.contentCoverScrollView updateConstraintsIfNeeded];
Note : updateConstraintsIfNeeded will tell the system to recalculate the constraints in that particular moment of execution.
Look like you want to change ScrollView size use:
[self.contentCoverScrollView setContentSize:(CGSizeMake(40, 1000))];
self.contentCoverScrollView.contentSize = CGSize(width:40, height: 1000)