Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(void) viewWillAppear:(BOOL)animated {
- AppDelegate *appDelegate = (AppDelegate *) [[UIApplication sharedApplication]delegate];
- searchBarVisivel = NO;
- pareAquiClicado = NO;
- ondeParei = NO;
- busca = NO;
- posicao = 0;
- contador = 0;
- tbEstacionamentos.delegate = self;
- _listaEstacionamentos = [[NSMutableArray alloc]init];
- }
- (void)viewDidLoad //só passa por aqui quando for a primeira vez que esta tela aparece.
- {
- [viewLoading setBackgroundColor:[UIColor colorWithRed:53.0/255.0 green:100.0/255.0 blue:162.0/255.0 alpha:1]];
- filtro = @"Distância";
- self.view.frame = [[UIScreen mainScreen] applicationFrame];
- [super viewDidLoad];
- tbSugerir.delegate = self;
- listaSugerir = [[NSMutableArray alloc]init];
- // Do any additional setup after loading the view.
- }
- - (void)searchBarSearchButtonClicked:(UISearchBar *)aSearchBar {
- [NSThread detachNewThreadSelector:@selector(workerThread) toTarget:self withObject:nil];
- // When the search button is tapped, add the search term to recents and conduct the search.
- NSString *searchString = [searchBar text];
- [searchBar resignFirstResponder];
- [self search:searchString];
- }
- -(IBAction)btnSearchClick:(id)sender {
- if (!searchBarVisivel) {
- [self inserirTap];
- [searchBar setHidden:NO];
- searchBarVisivel = YES;
- [self.view bringSubviewToFront:searchBar];
- }
- else
- {
- [self removerTap];
- searchBar.text = @"";
- searchBarVisivel = NO;
- [searchBar setHidden:YES];
- [searchBar resignFirstResponder];
- }
- }
- -(BOOL) searchBar:(UISearchBar *)searchBar shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text {
- return YES;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement