iphone - Can I set frame for UIView when use Adaptive Layout -


i trying use setframe uiview, use auto layout on it. trouble can setframe uiview, in spite of use setframe(x, y, w, h) it. realise because of adaptive layout deny it, can setframe first @ runtime before adaptive layout adapt? thank you

if trying use adaptive layout auto layout should not think in terms of frames.

however, edge cases, auto layout engine allows "fine tuning" after has calculated position of elements. in uiviewcode set layout constraints

- (void)updateconstraints {    [self applymyviewconstraints];    [super updateconstraints]; } 

after system updates constraints, call layoutsubviews in uiview. @ stage frames related items set , final. can overwrite auto layout frames desire.

- (void)layoutsubviews {     [super layoutsubviews];     self.myview.frame = cgrectmake(0, 0, 10, 200); } 

Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -