在我看来,我有很多文本和周围的边框,但有时会被切断并在末尾有“...”。我尝试过使用 .layout.layoutPriority()和.fixedSize(),奇怪的是,根据我使用的地点和频率,.layoutPriority()它不会在同一位置和每台设备上被切断。iPhone 8 iOS 13.3 模拟器中的屏幕截图。\n提前感谢您的帮助。
这是我当前的代码
\n\nimport SwiftUI\nimport SafariServices\n\nstruct WhatIsStopView: View {\n\n @State var show4 = false\n\n var body: some View {\n GeometryReader { geometry in\n ScrollView(.vertical) {\n VStack(alignment: .leading, spacing: 30) {\n HStack(spacing: 15) {\n Text("whatIsAStop")\n Image(systemName: "camera")\n }.font(.largeTitle)\n VStack(alignment: .leading, spacing: 45) {\n VStack(alignment: .leading, spacing: 25) {\n Text("inPhotographyAStop").layoutPriority(2)\n\n Text("stopDoubling").fontWeight(.semibold).layoutPriority(2)\n\n Text("forExample").layoutPriority(2)\n\n VStack {\n Image("exposure-stops").resizable()\n .aspectRatio(contentMode: .fit)\n Text("stopIsAMeasure").italic().layoutPriority(2)\n }\n\n Text("amountOfLightCaptured").layoutPriority(2)\n\n }\n\n VStack(alignment: .leading, spacing: 25) {\n Text("stopsAndShutterSpeed").font(.headline).layoutPriority(2)\n\n Text("shutterSpeedMeasures").layoutPriority(2)\n\n …Run Code Online (Sandbox Code Playgroud)