Button in ScrollView not responding

Using XCode Beta 3 and the simulator, I have a ScrollView (with a ForEach generating the items) with a button in a View inside that view. It does not seem to get any user interaction.


This used to be a List but could not stop the Cells from getting the tap (so I thought that the Button was blocked from UI interaction). Now, with the Button in the ScrollView still does not react and I am wondering if I have the base Button code working.


My code looks like:


Button(action: { self.tappedExtendArticle() }) {

Image(systemName: "text.append").font(.subheadline)

}


func tappedExtendArticle() {

self.extendArticleHandler?()

}


I am not seeing any calls to 'tappedExtendArticle'. Is there something wrong in my Button code?

Replies

Any chance you can post the code (or a simplified version of it) for the wrapping view, and for the function extendArticleHandler. The button code you posted should work fine as a standalone unit, so I doubt the problem is with the button itself.