도래울

Display CGRect Frame Values in NSLog 본문

개발/iOS

Display CGRect Frame Values in NSLog

도래울 2016. 3. 28. 17:18

Here is simple tip to display frame values of any UIView with NSLog

1
NSLog(@"My view frame: %@", NSStringFromCGRect(myView.frame));

After this run your app and in Debugger Console you will se output where values are written in x, y, width, height format.

1
My view frame: \{\{0, 0\}, \{320,421\}\}


Comments