objective c - Full responsive UIView inside a UIScrollView using autolayout -


I'm trying to understand how works under XCode6, but my mind is far away from the mysterious things that run away. Autolayout and obstacles can be very difficult to learn philosofy, but I realized that using these tools can be a lot easier ...

For your information, give me a table (message) and A visual field (Message Send panel) that is nested in the UIView View view again in UIScrollView, so I can make changes to the scroll view as it appears under the text of the keyboard.

I've read a lot of tutorials and lots of videos until I have found useful tutorials. Github has an Xcode project that explains the tutorial, too.

In my tutorial, Mike Vommelr states that

In the old way of setting up a UIScrollView, one of the major pain points is communicating in a scroll size to the scroll view Was there. If the content of the UIScrollView was an image, then it was quite simple to calculate your content size. But it was not easy that your scroll view included a mixed bag of buttons, labels, custom views, and text fields. There was a long code adjustment required for continuous change in device rotation and phone size difference.

So Mike tells you how to optimize UIViv, fits to use the placeholder and forcing the view inside Scrollview to see the device's screen, some NSLout Constant Made in needleload:

The solution is to look outside the scroll view and attach the main view of the view controller to an obstacle. This can not be done in the interface builder, so we have to write some code. The interface builder is still complaining, however, we have to add a placeholder width barrier to make it happy.

I tried to use parts of the code for the tutorial for my project, but I did not get a working view controller for my needs (I always get errors) May What is the best way to do this? Am I on the right track?

enter image details here

last But not least, I am Italian, so sorry for my English if something is not clear enough, please give me a comment.

Actually you have to set both alignments for Autolayout to take care of the rest of your size Decrease. If you do not provide enough information, you get a warning if you provide conflicting information, you get errors.

You need to calculate a UIView frame property (i.e., x-condition, y-position, width, height) to provide enough information for the basically autolayout.

For example, by providing obstacles of distance from top, bottom, and left edges, Autolayout has enough information to attract UIView's frame rectangle, but you are just obstacles of distance between the top and left edges Can provide and then provide a size and height barrier.

You can also configure the key constraints that you need and then click on 'Resize the automatic layout problem' and select 'Adding the missing obstacles', though sometimes it will It does not give what you want. It is better to understand how Autolayout completes what I have described above.

If you get disturbed, then it is usually easy to clean and start all the obstacles and do it several times and you will hang it.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -