Sorry
I am really new in swift and Xcode... I am learning
I am a php and android developper
Please forgive me
when I put only
.searchable(text: $searchText)
the code works well, all the titles are there, but the search bar do not seems to call or change the function fetchCantiqueTitles(searchText: String)
the error is shown for this line:
.navigationTitle("Hymnes et Louanges")
if I remove this line, the error will still appear but for
VStack {
infos on this code,
when a item is clicked, the new view
destination: hymnesetlouangesafficher(cantique: cantique)
is call
I pass the item id to this view
so
what I want to do:
when the view starts,
the function fetchCantiqueTitles(searchText: String) is called
all the titles ar shown
What I want:
when something is typed in the search bar, this entry is sent to the function fetchCantiqueTitles(searchText: String)
only the titles containing the entry are shown
let query = "SELECT ref, titre FROM cantiques WHERE titre LIKE '%(searchText)%'"
there is a better way to do this?
Maybe my code is a strange mess
English is my second language
I tried to explain my situation the best I could
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: