From 7cf1a343584ff34987d3f061252fe110fcfc7133 Mon Sep 17 00:00:00 2001 From: Carlos Castellanos Date: Fri, 5 Dec 2014 18:12:40 -0600 Subject: [PATCH] =?UTF-8?q?etiqueta=20de=20categor=C3=ADa=20seleccionada?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xcdebugger/Breakpoints_v2.xcbkptlist | 36 +++++++++---------- DejateCaer/Base.lproj/Main_iPhone.storyboard | 15 ++++++-- DejateCaer/NuevoInicioViewController.h | 1 + DejateCaer/NuevoInicioViewController.m | 22 ++++++------ 4 files changed, 43 insertions(+), 31 deletions(-) diff --git a/DejateCaer.xcodeproj/xcuserdata/carloscastellanos.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/DejateCaer.xcodeproj/xcuserdata/carloscastellanos.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index 0379cc3..db7041a 100644 --- a/DejateCaer.xcodeproj/xcuserdata/carloscastellanos.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/DejateCaer.xcodeproj/xcuserdata/carloscastellanos.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -584,11 +584,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "DejateCaer/NuevoInicioViewController.m" - timestampString = "438284292.877217" + timestampString = "439517508.84077" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1211" - endingLineNumber = "1211" + startingLineNumber = "1213" + endingLineNumber = "1213" landmarkName = "-filtrar:" landmarkType = "5"> @@ -600,11 +600,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "DejateCaer/NuevoInicioViewController.m" - timestampString = "438284292.877217" + timestampString = "439517508.84077" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1207" - endingLineNumber = "1207" + startingLineNumber = "1209" + endingLineNumber = "1209" landmarkName = "-filtrar:" landmarkType = "5"> @@ -616,11 +616,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "DejateCaer/NuevoInicioViewController.m" - timestampString = "438284292.877217" + timestampString = "439517508.84077" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1205" - endingLineNumber = "1205" + startingLineNumber = "1207" + endingLineNumber = "1207" landmarkName = "-filtrar:" landmarkType = "5"> @@ -664,11 +664,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "DejateCaer/NuevoInicioViewController.m" - timestampString = "438284292.877217" + timestampString = "439517508.84077" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1188" - endingLineNumber = "1188" + startingLineNumber = "1190" + endingLineNumber = "1190" landmarkName = "-filtrar:" landmarkType = "5"> @@ -680,11 +680,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "DejateCaer/NuevoInicioViewController.m" - timestampString = "438284292.877217" + timestampString = "439517508.84077" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1349" - endingLineNumber = "1349" + startingLineNumber = "1351" + endingLineNumber = "1351" landmarkName = "-filtrar:" landmarkType = "5"> @@ -712,11 +712,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "DejateCaer/NuevoInicioViewController.m" - timestampString = "438284292.877217" + timestampString = "439517508.84077" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1361" - endingLineNumber = "1361" + startingLineNumber = "1363" + endingLineNumber = "1363" landmarkName = "-filtrar:" landmarkType = "5"> diff --git a/DejateCaer/Base.lproj/Main_iPhone.storyboard b/DejateCaer/Base.lproj/Main_iPhone.storyboard index 4cc7bd2..f4fd15b 100644 --- a/DejateCaer/Base.lproj/Main_iPhone.storyboard +++ b/DejateCaer/Base.lproj/Main_iPhone.storyboard @@ -1,7 +1,6 @@ - @@ -359,7 +358,7 @@ - + @@ -379,17 +378,27 @@ + + + - + + diff --git a/DejateCaer/NuevoInicioViewController.h b/DejateCaer/NuevoInicioViewController.h index 64f37f4..e81e994 100644 --- a/DejateCaer/NuevoInicioViewController.h +++ b/DejateCaer/NuevoInicioViewController.h @@ -17,6 +17,7 @@ @property (nonatomic, retain) IBOutlet MKMapView *mapa; @property (nonatomic, retain) IBOutlet UITableView *tableView; @property (nonatomic,strong) NSArray *eventos; +@property (weak, nonatomic) IBOutlet UILabel *categories; @property (nonatomic,strong) NSArray *original; diff --git a/DejateCaer/NuevoInicioViewController.m b/DejateCaer/NuevoInicioViewController.m index 5ab2681..a70123e 100644 --- a/DejateCaer/NuevoInicioViewController.m +++ b/DejateCaer/NuevoInicioViewController.m @@ -85,7 +85,7 @@ - (void)viewDidLoad [buscame setImage:[UIImage imageNamed:@"flecha.png"] forState:UIControlStateNormal]; buscame.frame = CGRectMake(mapa.frame.size.width-30, mapa.frame.size.height-30, 30, 30); buscame.backgroundColor=[UIColor clearColor]; - + [mapa setShowsPointsOfInterest:FALSE]; [mapa addSubview:buscame]; UIButton *todos = [UIButton buttonWithType:UIButtonTypeRoundedRect]; @@ -1054,9 +1054,11 @@ -(IBAction)filtrar:(id)sender{ if ([eventos count]==0) { UIAlertView *alerta=[[UIAlertView alloc]initWithTitle:@"Mensaje" message:@"No encontramos eventos cercanos a ti, intenta ampliando el radio de búsqueda" delegate:nil cancelButtonTitle:@"Aceptar" otherButtonTitles:nil, nil]; [alerta show]; + _categories.text=@"Sin Eventos"; } else{ [self.tableView reloadData]; + _categories.text=@"Todos"; //hay que actualizae el mapa tambien falta pasar lo parametros de donde hará zoom el usuario [self getMapa:posicionAux.latitude Y :posicionAux.longitude]; } @@ -1071,7 +1073,7 @@ -(IBAction)filtrar:(id)sender{ // buscamos en todo el array de eventos la categoria para ir filtrantodolos if ([ [[eventos objectAtIndex:i] objectForKey:@"categoria"] isEqualToString:@"Cine"] ) { - + _categories.text=[[eventos objectAtIndex:i] objectForKey:@"categoria"]; [filtrados addObject:[eventos objectAtIndex:i]]; } @@ -1107,7 +1109,7 @@ -(IBAction)filtrar:(id)sender{ // buscamos en todo el array de eventos la categoria para ir filtrantodolos if ([ [[eventos objectAtIndex:i] objectForKey:@"categoria"] isEqualToString:@"Teatro"] ) { - + _categories.text=[[eventos objectAtIndex:i] objectForKey:@"categoria"]; [filtrados addObject:[eventos objectAtIndex:i]]; } @@ -1142,7 +1144,7 @@ -(IBAction)filtrar:(id)sender{ // buscamos en todo el array de eventos la categoria para ir filtrantodolos if ([ [[eventos objectAtIndex:i] objectForKey:@"categoria"] isEqualToString:@"Infantiles"] ) { - + _categories.text=[[eventos objectAtIndex:i] objectForKey:@"categoria"]; [filtrados addObject:[eventos objectAtIndex:i]]; } @@ -1178,7 +1180,7 @@ -(IBAction)filtrar:(id)sender{ // buscamos en todo el array de eventos la categoria para ir filtrantodolos if ([ [[eventos objectAtIndex:i] objectForKey:@"categoria"] isEqualToString:@"Cultura"] ) { - + _categories.text=[[eventos objectAtIndex:i] objectForKey:@"categoria"]; [filtrados addObject:[eventos objectAtIndex:i]]; } @@ -1213,7 +1215,7 @@ -(IBAction)filtrar:(id)sender{ // buscamos en todo el array de eventos la categoria para ir filtrantodolos if ([ [[eventos objectAtIndex:i] objectForKey:@"categoria"] isEqualToString:@"Música"] ) { - + _categories.text=[[eventos objectAtIndex:i] objectForKey:@"categoria"]; [filtrados addObject:[eventos objectAtIndex:i]]; } @@ -1247,7 +1249,7 @@ -(IBAction)filtrar:(id)sender{ // buscamos en todo el array de eventos la categoria para ir filtrantodolos if ([ [[eventos objectAtIndex:i] objectForKey:@"categoria"] isEqualToString:@"Aprendizaje"] ) { - + _categories.text=[[eventos objectAtIndex:i] objectForKey:@"categoria"]; [filtrados addObject:[eventos objectAtIndex:i]]; } @@ -1282,7 +1284,7 @@ -(IBAction)filtrar:(id)sender{ // buscamos en todo el array de eventos la categoria para ir filtrantodolos if ([ [[eventos objectAtIndex:i] objectForKey:@"categoria"] isEqualToString:@"Tecnología"] ) { - + _categories.text=[[eventos objectAtIndex:i] objectForKey:@"categoria"]; [filtrados addObject:[eventos objectAtIndex:i]]; } @@ -1317,7 +1319,7 @@ -(IBAction)filtrar:(id)sender{ // buscamos en todo el array de eventos la categoria para ir filtrantodolos if ([ [[eventos objectAtIndex:i] objectForKey:@"categoria"] isEqualToString:@"Exposiciones"] ) { - + _categories.text=[[eventos objectAtIndex:i] objectForKey:@"categoria"]; [filtrados addObject:[eventos objectAtIndex:i]]; } @@ -1353,7 +1355,7 @@ -(IBAction)filtrar:(id)sender{ // buscamos en todo el array de eventos la categoria para ir filtrantodolos if ([ [[eventos objectAtIndex:i] objectForKey:@"categoria"] isEqualToString:@"Deportivo"] ) { - + _categories.text=[[eventos objectAtIndex:i] objectForKey:@"categoria"]; [filtrados addObject:[eventos objectAtIndex:i]]; }