I need to set up relative top space of view to its superview. e.g. Suppose top space to view to its superview is 5px and it should proportionately increase for iPhone 7,8,X,Xr etc. I have attached image for better idea.
How can I achieve it?
I need to set up relative top space of view to its superview. e.g. Suppose top space to view to its superview is 5px and it should proportionately increase for iPhone 7,8,X,Xr etc. I have attached image for better idea.
How can I achieve it?
Set IBOutlet of Top LayoutConstraint that you marked in red circle in above image. ans set top according to device.. https://stackoverflow.com/a/11197770/6783598