Vlad Vlad - 1 year ago 140
iOS Question

How to construct NSDirectionalEdgeInsets struct

How do I construct a NSDirectionalEdgeInsets struct in iOS 11 ?

Is there any make helpers like UIEdgeInsetsMake?

Answer Source

Ok found the make method for this in ObjectiveC:

NSDirectionalEdgeInsetsMake(CGFloat top, CGFloat leading, CGFloat bottom, CGFloat trailing)

and in Swift:

NSDirectionalEdgeInsets(top: CGFloat, leading: CGFloat, bottom: CGFloat, trailing: CGFloat)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download