I am learning about auto layout and giving the layout using constraint manually on lable and button.
Now if I create two controls dynamically and add as a subview to my main view and give constraint to it .
It is working fine but if I put that control on xib and give IBOutlet to them and then give constraint to it by code.
It is not displaying both label and button in proper way.
My understanding is When we put control on xib (my autolayout feature is on) It has already defined some constraint to it and when we give constraint by code it is conflict with xib constraint.
So can I give constraint by code to controls that is defined in XIB and if not what is the way to define manual constraint to control that is already defined in XIB
Should I create them dynamically only or Is there any way to meet my criteria?