【问题标题】:How to construct NSDirectionalEdgeInsets struct如何构造 NSDirectionalEdgeInsets 结构
【发布时间】:2017-09-27 23:04:55
【问题描述】:

如何在 iOS 11 中构造 NSDirectionalEdgeInsets 结构?

有没有像 UIEdgeInsetsMake 这样的 make 助手?

【问题讨论】:

    标签: ios objective-c uiview uikit ios11


    【解决方案1】:

    好的,在 ObjectiveC 中找到了这个的 make 方法:

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

    在 Swift 中:

    NSDirectionalEdgeInsets(top: CGFloat, leading: CGFloat, bottom: CGFloat, trailing: CGFloat)
    

    【讨论】:

      猜你喜欢
      • 2010-09-08
      • 2019-05-29
      • 2016-03-08
      • 1970-01-01
      • 2021-05-26
      • 1970-01-01
      • 2022-01-15
      • 2021-11-29
      • 1970-01-01
      相关资源
      最近更新 更多