ios - Positioning of object programmatically in Swift -


i want set position of object programmatically. do:

youtubeico.frame.origin.y = 100 

but nothing. doesn't change coordinates @ all. problem?

and second question:

when set in xcode constraints of webview(for ex: 10(top, left, right, bottom) disappears. when not set constraints it, appears. problem?

i want this:

enter image description here

you need set full frame like,

youtubeico.frame = cgrectmake(youtubeico.frame.origin.x, 100,youtubeico.frame.size.width,youtubeico.frame.size.height) 

only y-axis change not it, have provide full frame that. or set centre, or offset.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -