Post

Replies

Boosts

Views

Activity

Reply to Clipping image prevents button from being tapped
For example struct TestView: View { let url = "https://ts1.cn.mm.bing.net/th/id/R-C.3da9ce39e8e1f19875002d44dcf26244?rik=sYOvBjjpRUOkng&pid=ImgRaw&r=0" @State var touchedIndex: Int = 0 var body: some View { VStack { Text("touched index : \(touchedIndex)") ScrollView(.horizontal) { HStack { ForEach(0..<10) { index in Text("index: \(index)") .onTapGesture { touchedIndex = index } } } .frame(height: 50) } AsyncImage(url: URL(string: url)) { image in image .resizable() .scaledToFill() .frame(width: UIScreen.main.bounds.size.width, height: 200) .clipped() .contentShape(Rectangle()) } placeholder: { ProgressView() } .frame(width: UIScreen.main.bounds.size.width, height: 200) .clipped() .contentShape(Rectangle()) } } } #Preview(body: { TestView() }) The content in ScrollView is clickable but cannot be scrolled horizontally
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’24
Reply to NFC class "NFFieldNotification" not loaded or does not exist
Is your problem solved? How was it solved?
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Apr ’25
Reply to Clipping image prevents button from being tapped
For example struct TestView: View { let url = "https://ts1.cn.mm.bing.net/th/id/R-C.3da9ce39e8e1f19875002d44dcf26244?rik=sYOvBjjpRUOkng&pid=ImgRaw&r=0" @State var touchedIndex: Int = 0 var body: some View { VStack { Text("touched index : \(touchedIndex)") ScrollView(.horizontal) { HStack { ForEach(0..<10) { index in Text("index: \(index)") .onTapGesture { touchedIndex = index } } } .frame(height: 50) } AsyncImage(url: URL(string: url)) { image in image .resizable() .scaledToFill() .frame(width: UIScreen.main.bounds.size.width, height: 200) .clipped() .contentShape(Rectangle()) } placeholder: { ProgressView() } .frame(width: UIScreen.main.bounds.size.width, height: 200) .clipped() .contentShape(Rectangle()) } } } #Preview(body: { TestView() }) The content in ScrollView is clickable but cannot be scrolled horizontally
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’24
Reply to Clipping image prevents button from being tapped
contentShape only makes the cropped part of my image unable to receive touch events, but the actual extended image will still block the sliding events of the scroll component.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’24
Reply to Xcode 14.3: App built is not able to open on iOS 13.6
I don’t know if xcode15 has fixed this problem?
Replies
Boosts
Views
Activity
Sep ’23
Reply to Cannot add provisioning profile to any devices with Xcode
我们遇到了相同的问题。情况大致是这样: 设备类型:iPhone6s 系统版本:iOS13.6.1 xcode版本:Version 14.3 (14E222b) 我已经确认 development.mobileprovision 文件中包含这台iPhone6s的UDID,证书也没有过期,双击 development.mobileprovision 文件,提示如下错误:
Replies
Boosts
Views
Activity
Apr ’23