If I understand correctly, the swift button is a custom view.
The ide does not know what a custom view "is", nor what view it mimics... to the idea, the custom view is just a panel.
I would use the tag property of the base panel and use it as a means of getting that type of info.
Like
Dim swiftbuttontag( code as int, Viewtype as string)
Dim siftbuttontag1 as swiftbuttontag
Swifbuttontag1.initialize(0,"swftbtn1")
Switftbutton1.tag = swiftbutyontag1
I read it last month.. I was reread right now!! bookmarked in my firefox
The solution is
B4X:
For Each swb As B4XView In MainForm.RootPane.GetAllViewsRecursive
If swb.Tag Is SwiftButton Then
Dim kk As SwiftButton = swb.Tag
Log(kk.Tag)
'.........Rest of code
End If
Next
The same principle applies...
But "we" tend to use that tag property in a simplistic way, setting a single value to it... but since it can hold an object, it can do much more, even hold a reference to another view.