The first thing to do is to have this
[textFieldaddTarget:selfAction: @selector(hintnameclick)forcontrolevents: Uicontroleventeditingchanged];
Monitoring Events
-(void) Hintnameclick
{
searchdataarray = [[nsmutablearrayalloc] Initwithcapacity:0];
for (nsstring *item in allusers< /c18>)
{
if ([itemrangeofstring:TF1. TextField . text ]. Location != Nsnotfound )
{
[searchdataarrayaddobject: item];
}
}
[selfcreatepoptableviewwithframe];
[searchtableviewreloaddata];
}
#pragma mark-searchtableview the initialization and data
-(void) createpoptableviewwithframe
{
if (searchtableview= =nil) {
searchtableview = [[uitableviewalloc] initWithFrame : CGRectMake (G,+h, ()style:uitableviewstyleplain];
[_backviewaddsubview:searchtableview];
searchtableview. Layer . Cornerradius = 3 ;
searchtableview. Separatorstyle = Uitableviewcellseparatorstylenone ;
searchtableview. BackgroundColor = [uicolorclearcolor];
searchtableview. Delegate = Self ;
searchtableview. DataSource = Self ;
}
}
UITableView's proxy method is simply omitted.
Custom Input Hints