Reputation: 2682
I am trying to successfully align 2 UIButton
laying on TOP of a layerView
.
The hierarchy is as following:
The Buttons lay just on top of the layerView (Just a UIView which is black and has a certain alpha). Now I want the buttons to align within this "container".
Like this:
I was setting the constraints
to the left and top + to the right and top. also kept aspect ratio.
This was the result:
So it is just the buttons making problems. Anyone knows another way of solving this?
Upvotes: 0
Views: 42
Reputation: 3519
UIView
UIView
to have fixed width and heightUIView
to horizontally align to Center.Upvotes: 2
Reputation: 309
Try putting both the layer and the buttons inside of a parent UIView
, then have your layer fill up that view and the buttons centered vertically inside it.
Upvotes: 2