Frame Vs Bounds

It is important to note that if you transform a view using rotate, scale or do some other transformation, then the frame becomes undefined. That means frame size may vary. In this time you shouldn’t use frame to get the view size but we can use bounds to get exact size of the View.

Both center and frame uses the coordinate system of the parent view.

--

--

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