The Coordinate System: iOS and Swift

The view coordinate system is really important

Photo by Tim Marshall on Unsplash

Prerequisites:

The View coordinate system

The Units and structs used

The origin

The origin for a view

Moving from the origin

The units

The frame of a view

Creating a view

Click for Gist

The center of a view

Click for Gist

The bounds of a view

The difference between bounds and frame

Creating a view

Click for Gist

The center of a view

Click for Gist

CGAffineTransform frame and bounds

Click for Gist

Conclusion

Extend your knowledge

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store