I have this code in the SearchChanged event of an ios table with a datasource.
The problem is the search bar loses the focus with every character typed, and you have to tap it twice just to enter the first character.
is there a way to set the focus back to the search bar in the table from the SearchChanged event?
listFonts.thefonts.RemoveAll
Var n As Integer = System.FontCount - 1
Var newFonts() As String
Var fontName As String
For i As Integer = 0 To n
fontName = System.FontAt(i)
If value = "" Then
newFonts.add(fontName)
Else
If fontName.IndexOf(value) <> -1 Then newFonts.add(fontName)
End If
Next
listFonts.thefonts = newFonts
Me.DataSource = listFonts
Unfortunately it does the same thing with Me.ReloadDatasource
I also tried installing it on my iPhone, and it still does the same you can only type one letter at a time before having to select the search bar again.
When the app starts, it scrolls to and selects the font Helvetica in the table. When you try typing in the search bar, you can only type one or two characters.
Instead of using declares and code, I tried the UISearchBar from iOSkit.
I now have a working custom search bar for my table with a Datasource that displays fonts. It’s a workaround until Xojo fixes the broken Datasource table search bar.