Forum Archive

Frame Size not affecting button

techteej

Whatever I set my frame size to, the button size stays exactly the same. Also can't tell if the action is working or not.

See line 429.

ccc

Add the the following after line 430.

button.frame=(10, self.size.h - 272, 400, 400)
JonB

Pretty sure root_view is not in scope inside that function.... Hence trying to add a subview that way seems problematic?

techteej

@JonB Just was a test function.

@ccc or @JonB Is there any way to stick this to the bottom right corner?

techteej

button.flex = 'TR'
The button isn't on bottom-left but docs say...
“TR” – the view is anchored to the bottom-left corner of its superview (the top margin and right margin are flexible)