how do i set dynamic constraint for buttons in objective c

Viewed 672

I have simple UIView which has two buttons named "Button1" and "Button2". At certain conditions(suppose X condition), i need to show both buttons as shown in image1.

In another condition (suppose Y condition), i need to hide "Button2" and and also place it in center of UIView as shown in image2.

If you could provide me with example, it will be very much helpful to me. I need to do this in objective only for iPhone.

Thanks

enter image description here enter image description here

2 Answers
Related