I can't figure out how to make the label horizontally center in the image view. The label says "You've been here. What would you rate us , I want What would you rate us be under "You've been here." I tried to do this to add 2 labels to the labels and select the plus label 3 buttons and click βAdd missing restrictions.β When I run the program, this is the result.
"You've been here. What would you rate us
What would you rate us
"You've been here."
How can I fix this so that text is entered on all devices?
Limitations
try adding constraints for your label, for example:
Add restrictions on top, width and height, as shown in the figure below, and make sure that the restrictions on the fields are removed.
And set horizontal limits in the center.
click label
1.Don't set any heights 2.Now set top space to the container view 3.centre horizontal to container view 4.now set the height (or) bottom space to the smiley Add this all constraints you will get what you expected :)
just use this code:
yourLabel.translatesAutoresizingMaskIntoConstraints = YES; CGPoint centerPoint = yourLabel.center; centerPoint.x = yourImageView.center.x; yourLabel.center = centerPoint;
Source: https://habr.com/ru/post/1239111/More articles:Removing all trailing white spaces in a pandas dataframe column - pythonHow can we set up a master process when using PM2 - node.jsScrolling TableView Dynamic Height - iosDockers do not make up volumes - dockerThe default database for Android Realm - androidHow to find duplicate values ββin a multidimensional array in angularjs - arraysAndroid: Is the binding variable bound and switching to tag inclusion? - androidSeveral forms include symfony (on the same page) - phpPg_log directory for postgresql in ubuntu? - postgresql2-factor authentication (2-step verification) with Google compute engine - google-compute-engineAll Articles