国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統(tǒng) > iOS > 正文

詳解Swift 之clipped是什么如何用

2020-07-26 02:18:19
字體:
供稿:網(wǎng)友

clipped()函數(shù)介紹

Clips the view to its bounding rectangular frame.

將View裁剪成矩形

By default, a view's bounding frame is used only for layout, so any content that extends beyond the edges of the frame is still visible. Use the clipped(antialiased:)modifier to hide any content that extends beyond these edges.

默認(rèn)情況下,視圖的邊界框架僅用于布局,因此超出框架邊緣的任何內(nèi)容仍然可見。使用clipped(antialiased:)修飾器可以隱藏超出這些邊緣的任何內(nèi)容。

代碼

import SwiftUIstruct ProductCard: View {  var body: some View {    VStack(alignment:.leading,spacing: 0){      Image("circle")        .resizable()        .scaledToFit()        .frame(minWidth:nil,            idealWidth: nil,            maxWidth: UIScreen.main.bounds.width,            minHeight: nil,            idealHeight: nil,            maxHeight: 300,            alignment: .center      )      .clipped()          }  }}

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持武林網(wǎng)。

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 岳阳县| 军事| 雷山县| 彭泽县| 竹山县| 平凉市| 呼伦贝尔市| 凤台县| 米泉市| 海林市| 兴国县| 天峻县| 图片| 襄汾县| 嘉禾县| 曲靖市| 新建县| 巴彦淖尔市| 芜湖市| 沙坪坝区| 瓮安县| 酒泉市| 南宁市| 中超| 沁水县| 尼勒克县| 房山区| 科技| 永平县| 镇宁| 左云县| 莒南县| 麟游县| 涞水县| 富裕县| 华阴市| 洪湖市| 沂水县| 潞西市| 凤庆县| 绥德县|