How to Create layout constraints programmatically
I am displaying a view in the bottom of the universal application and adding this view dynamically in my view. I want to show this view in bottom every time like iAd. in both orientation. How can I add constraints for this. Please suggest. Thanks To fix a view to the bottom of the screen you need following constraints to set. Leading Constraint with respect of Parent View for - X Trailing Constraint with respect of Parent View for - Width Bottom Constraint with respect of Parent View for - Y Height Constraint attached to self for - Height . Lets add. UIView *subView=bottomView; UIView *parent