Changing UIView size programmatically

If I understand correctly, you want to change the size of self.myview. However at no point you are setting the frame of it. Instead you are trying to call sendFrame: on the view controller and some search field. I’m surprised, that the former one didn’t give you a compiler error.

Objective C

CGRect newFrame = self.myview.frame;

newFrame.size.width = 200;
newFrame.size.height = 200;
[self.myview setFrame:newFrame];

Swift

var newFrame = myview.frame

newFrame.size.width = 200
newFrame.size.height = 200
myview.frame = newFrame

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)