美文网首页
UIStackView 间距 UIStackView 边距

UIStackView 间距 UIStackView 边距

作者: 十一岁的加重 | 来源:发表于2023-06-04 16:45 被阅读0次

objc

stv.layoutMarginsRelativeArrangement = YES;
 if (@available(iOS 11.0, *)) {
 stv.directionalLayoutMargins = NSDirectionalEdgeInsetsMake(0, 0, 0, 16);
 } else {
 stv.layoutMargins = UIEdgeInsetsMake(0, 0, 0, 16);
 }

swift

stv.isLayoutMarginsRelativeArrangement = true
if #available(iOS 11.0, *) {
  stv.directionalLayoutMargins = NSDirectionalEdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 16)
} else {
  stv.layoutMargins = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 16)
}

相关文章

  • 【UIKit】UIStackView

    UIStackView UIStackView : UIViewiOS 9.0 基于 Flexbox 思想的布局方...

  • iOS9 新特新介绍

    一. UIStackView 新控件:UIStackView 栈视图, 类似AppleWatch的Group 父类...

  • StackView

    我的博客, 各位看官有时间赏光 UIStackView UIStackView介绍 随着autolayout的推广...

  • UIStackView的应用

    UIStackView的定义 UIStackView控件有两种,横向布局和纵向布局 Axis:设置UIStackV...

  • UIStackView 初探(译)

    UIStackView 用于在列或行中布局视图集合的线性接口。 UIStackView 概览 UIStackVie...

  • UIStackView的妙用

    UIStackView简介 UIStackView是iOS 9+支持的布局控件,主要用于线性布局,可以简化布局,减...

  • iOS9新特性UIStackView

    概述 UIStackView是iOS9中新增的API,类似于Android中的线性布局。UIStackView提供...

  • UIStackView简单理解和使用

    一、UIStackView简介 UIStackView是iOS9中新增的API,类似于Android中的线性布局。...

  • iOS UIStackView

    简介 UIStackView是iOS 9 的新增控件,唯一的作用就是帮助布局 本文会详细介绍UIStackView...

  • UIStackView学习笔记

    UIStackView UIStackView能够利用,创建能够动态适应设备方向、屏幕大小和可用空间中任何更改的用...

网友评论

      本文标题:UIStackView 间距 UIStackView 边距

      本文链接:https://www.haomeiwen.com/subject/loibedtx.html