ios - Why can't I change the view's frame size in Swift? -


so weirdest thing came across ever.

i add simple uiview on top of uiview on uiviewcontroller. change size 200 x 200 , want change uiview's size placing line of code inside viewdidload method:

self.gamebackgroundview.frame.size.height = 10 

which seems normal in swift. though, nothing happens. can change color, corner radius etc...

edit:

i have deleted constraints view , still not work.

ok, found solution here on stack ..

change frame programmatically auto layout

the correct answer, works is, that:

  1. i need create iboutlet of heightconstraint
  2. change value of constraint accordingly

thank all!


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -