Show layout bounds in iOS
Contents
On Android, we have an option called Show layout bounds
, which allows us to see bounding areas of your views displayed in vibrant blue and purple.
Border
On iOS, with the help of runtime, we can do the same. Using Border
All you have to do is
1 |
pod 'Border', '~> 1.0' |
How Border works
The idea is to swizzle didMoveToSuperview
in constructor
1 |
static void swizzleInstanceMethod(Class class, SEL originalAction, SEL swizzledAction) { |