diff --git a/DejateCaer.xcodeproj/project.pbxproj b/DejateCaer.xcodeproj/project.pbxproj index fd41a05..07f411b 100644 --- a/DejateCaer.xcodeproj/project.pbxproj +++ b/DejateCaer.xcodeproj/project.pbxproj @@ -26,6 +26,7 @@ F30A68901A3259D700F3DA61 /* Lato-Thin.ttf in Resources */ = {isa = PBXBuildFile; fileRef = F30A687D1A3259D700F3DA61 /* Lato-Thin.ttf */; }; F30A68911A3259D700F3DA61 /* Lato-ThinItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = F30A687E1A3259D700F3DA61 /* Lato-ThinItalic.ttf */; }; F30A68921A3259D700F3DA61 /* SIL Open Font License.txt in Resources */ = {isa = PBXBuildFile; fileRef = F30A687F1A3259D700F3DA61 /* SIL Open Font License.txt */; }; + F30A68941A33634900F3DA61 /* share.png in Resources */ = {isa = PBXBuildFile; fileRef = F30A68931A33634900F3DA61 /* share.png */; }; F312730A192ABEBB002E4119 /* ResenaViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F3127309192ABEBB002E4119 /* ResenaViewController.m */; }; F324E8241947CA390002A6FB /* Teatro.png in Resources */ = {isa = PBXBuildFile; fileRef = F324E8231947CA390002A6FB /* Teatro.png */; }; F32CF00618F5A9220098A5CF /* flechas.xib in Resources */ = {isa = PBXBuildFile; fileRef = F32CF00518F5A9220098A5CF /* flechas.xib */; }; @@ -160,6 +161,7 @@ F30A687D1A3259D700F3DA61 /* Lato-Thin.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Lato-Thin.ttf"; sourceTree = ""; }; F30A687E1A3259D700F3DA61 /* Lato-ThinItalic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Lato-ThinItalic.ttf"; sourceTree = ""; }; F30A687F1A3259D700F3DA61 /* SIL Open Font License.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "SIL Open Font License.txt"; sourceTree = ""; }; + F30A68931A33634900F3DA61 /* share.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = share.png; sourceTree = ""; }; F3127308192ABEBB002E4119 /* ResenaViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResenaViewController.h; sourceTree = ""; }; F3127309192ABEBB002E4119 /* ResenaViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ResenaViewController.m; sourceTree = ""; }; F324E8231947CA390002A6FB /* Teatro.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Teatro.png; sourceTree = ""; }; @@ -368,6 +370,7 @@ children = ( F3CF5DF61A15BCB700092E07 /* FututroViewController.h */, F3CF5DF71A15BCB700092E07 /* FututroViewController.m */, + F30A68931A33634900F3DA61 /* share.png */, F332E83A18D161BA00DF538D /* DejateCaer */, F332E85C18D161BA00DF538D /* DejateCaerTests */, F332E83318D161BA00DF538D /* Frameworks */, @@ -824,6 +827,7 @@ F342E0D1193E663B00A4FF4E /* tools.png in Resources */, F36521471A0FECB000DFD69B /* aquiTab.png in Resources */, F3C680B518FCA9520092D6D8 /* icono58.png in Resources */, + F30A68941A33634900F3DA61 /* share.png in Resources */, F30A68901A3259D700F3DA61 /* Lato-Thin.ttf in Resources */, F30A68921A3259D700F3DA61 /* SIL Open Font License.txt in Resources */, F32CF01818F5F5AF0098A5CF /* flechas_cierran.xib in Resources */, diff --git a/DejateCaer.xcodeproj/xcuserdata/carloscastellanos.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/DejateCaer.xcodeproj/xcuserdata/carloscastellanos.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index db7041a..387ce92 100644 --- a/DejateCaer.xcodeproj/xcuserdata/carloscastellanos.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/DejateCaer.xcodeproj/xcuserdata/carloscastellanos.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -408,11 +408,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "DejateCaer/DescripcionViewController.m" - timestampString = "439515944.141347" + timestampString = "439575659.155891" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "465" - endingLineNumber = "465" + startingLineNumber = "444" + endingLineNumber = "444" landmarkName = "-web:" landmarkType = "5"> @@ -584,11 +584,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "DejateCaer/NuevoInicioViewController.m" - timestampString = "439517508.84077" + timestampString = "439573377.059305" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1213" - endingLineNumber = "1213" + startingLineNumber = "1212" + endingLineNumber = "1212" landmarkName = "-filtrar:" landmarkType = "5"> @@ -600,11 +600,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "DejateCaer/NuevoInicioViewController.m" - timestampString = "439517508.84077" + timestampString = "439573377.059305" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1209" - endingLineNumber = "1209" + startingLineNumber = "1208" + endingLineNumber = "1208" landmarkName = "-filtrar:" landmarkType = "5"> @@ -616,11 +616,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "DejateCaer/NuevoInicioViewController.m" - timestampString = "439517508.84077" + timestampString = "439573377.059305" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1207" - endingLineNumber = "1207" + startingLineNumber = "1206" + endingLineNumber = "1206" landmarkName = "-filtrar:" landmarkType = "5"> @@ -664,11 +664,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "DejateCaer/NuevoInicioViewController.m" - timestampString = "439517508.84077" + timestampString = "439573377.059305" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1190" - endingLineNumber = "1190" + startingLineNumber = "1189" + endingLineNumber = "1189" landmarkName = "-filtrar:" landmarkType = "5"> @@ -680,11 +680,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "DejateCaer/NuevoInicioViewController.m" - timestampString = "439517508.84077" + timestampString = "439573377.059305" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1351" - endingLineNumber = "1351" + startingLineNumber = "1350" + endingLineNumber = "1350" landmarkName = "-filtrar:" landmarkType = "5"> @@ -712,11 +712,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "DejateCaer/NuevoInicioViewController.m" - timestampString = "439517508.84077" + timestampString = "439573377.059305" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1363" - endingLineNumber = "1363" + startingLineNumber = "1362" + endingLineNumber = "1362" landmarkName = "-filtrar:" landmarkType = "5"> @@ -728,11 +728,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "DejateCaer/NuevoInicioViewController.m" - timestampString = "438284292.877217" + timestampString = "439573377.059305" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1048" - endingLineNumber = "1048" + startingLineNumber = "1047" + endingLineNumber = "1047" landmarkName = "-filtrar:" landmarkType = "5"> diff --git a/DejateCaer/Base.lproj/Main_iPhone.storyboard b/DejateCaer/Base.lproj/Main_iPhone.storyboard index f4fd15b..a825938 100644 --- a/DejateCaer/Base.lproj/Main_iPhone.storyboard +++ b/DejateCaer/Base.lproj/Main_iPhone.storyboard @@ -1,6 +1,7 @@ + @@ -65,31 +66,21 @@ - - + @@ -441,12 +432,7 @@ - - - - - - + @@ -456,7 +442,7 @@ - + @@ -471,12 +457,7 @@ - - - - - - + @@ -930,6 +911,7 @@ + diff --git a/DejateCaer/CalendarioViewController.m b/DejateCaer/CalendarioViewController.m index bd18566..e8f926c 100644 --- a/DejateCaer/CalendarioViewController.m +++ b/DejateCaer/CalendarioViewController.m @@ -14,6 +14,10 @@ @interface CalendarioViewController () @end @implementation CalendarioViewController +- (UIStatusBarStyle)preferredStatusBarStyle +{ + return UIStatusBarStyleLightContent; +} - (void)viewDidLoad { diff --git a/DejateCaer/DescripcionViewController.h b/DejateCaer/DescripcionViewController.h index fbd957b..cd695a8 100644 --- a/DejateCaer/DescripcionViewController.h +++ b/DejateCaer/DescripcionViewController.h @@ -31,8 +31,7 @@ -(IBAction)regresar:(id)sender; --(IBAction)twittear:(id)sender; -- (IBAction)postToFacebook:(id)sender; + @property (weak, nonatomic) IBOutlet UIScrollView *scrollView; @end diff --git a/DejateCaer/DescripcionViewController.m b/DejateCaer/DescripcionViewController.m index 894c69c..05a2acf 100644 --- a/DejateCaer/DescripcionViewController.m +++ b/DejateCaer/DescripcionViewController.m @@ -70,7 +70,7 @@ - (void)viewDidLoad { - self.screenName = @"Descripción de Evento"; + self.screenName = [_evento objectForKey:@"nombre"]; @@ -338,40 +338,19 @@ - (void)didReceiveMemoryWarning // Dispose of any resources that can be recreated. } --(IBAction)twittear:(id)sender -{ - if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]) - { - SLComposeViewController *tweetSheet = [SLComposeViewController - composeViewControllerForServiceType:SLServiceTypeTwitter]; - NSString *cuerpo=[NSString stringWithFormat:@"Me gusta el evento:%@ @EventarioCDMX #EventarioApp %@",[_evento objectForKey:@"nombre"],[_evento objectForKey:@"url"]]; - [tweetSheet setInitialText:cuerpo]; - [self presentViewController:tweetSheet animated:YES completion:nil]; - } +-(IBAction)compartir:(id)sender{ + + NSString *url=[NSString stringWithFormat:@"Me gusta el evento:%@ @EventarioCDMX %@",[_evento objectForKey:@"nombre"],[_evento objectForKey:@"url"]]; + + NSArray *objectsToShare = [NSArray arrayWithObjects:url, nil]; + + UIActivityViewController *compatir=[[UIActivityViewController alloc]initWithActivityItems:objectsToShare applicationActivities:nil]; + [self presentViewController:compatir animated:YES completion:nil]; - else{ - UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Mensaje" message:@"No tiene una cuenta de Twitter configurada. Configurala en Ajustes -> Twitter -> Añadir Cuenta" delegate:nil cancelButtonTitle:@"Aceptar" otherButtonTitles:nil, nil]; - [alert show]; - } -} -- (IBAction)postToFacebook:(id)sender { - if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) { - SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook]; - - [controller setInitialText:[NSString stringWithFormat:@"Me gusta el evento:%@. #EventarioApp #EventarioCDMX %@",[_evento objectForKey:@"nombre"],[_evento objectForKey:@"url"]]]; - [self presentViewController:controller animated:YES completion:Nil]; - } - else{ - - UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Mensaje" message:@"No tiene una cuenta de Facebook configurada. Configurala en Ajustes -> Facebook -> Añadir Cuenta" delegate:nil cancelButtonTitle:@"Aceptar" otherButtonTitles:nil, nil]; - [alert show]; - - } } - #pragma mark - MapView Delegate - (MKAnnotationView *) mapView: (MKMapView *) mapView viewForAnnotation: (id) annotation { diff --git a/DejateCaer/NuevoInicioViewController.m b/DejateCaer/NuevoInicioViewController.m index a70123e..2a78015 100644 --- a/DejateCaer/NuevoInicioViewController.m +++ b/DejateCaer/NuevoInicioViewController.m @@ -1041,8 +1041,7 @@ - (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated } -(void)viewDidAppear:(BOOL)animated{ - [self viewDidLoad]; -} + } -(IBAction)filtrar:(id)sender{ UIButton *a=(UIButton *)sender; diff --git a/DejateCaer/NuevoOpcionesViewController.m b/DejateCaer/NuevoOpcionesViewController.m index 46f1c97..9d50340 100644 --- a/DejateCaer/NuevoOpcionesViewController.m +++ b/DejateCaer/NuevoOpcionesViewController.m @@ -17,6 +17,11 @@ @implementation NuevoOpcionesViewController AppDelegate *delegate; double radio; } +- (UIStatusBarStyle)preferredStatusBarStyle +{ + return UIStatusBarStyleLightContent; +} + - (void)viewDidLoad { diff --git a/FututroViewController.m b/FututroViewController.m index d91a40e..e47bcbd 100644 --- a/FututroViewController.m +++ b/FututroViewController.m @@ -334,12 +334,10 @@ -(void)obtenerEventos :(float) latitud Y : (float) longitud { //obtenemos la posicion del usuario currentLatitud=[NSString stringWithFormat:@"%.8f", latitud]; currentLongitud=[NSString stringWithFormat:@"%.8f", longitud]; - radio=delegate.user_radio; - // guardamos el radio anteriot - radio_anterior=radio; - //http://eventario.mx/eventos.json?fecha=2014-10-08 + //http://eventario.mx/eventos.json?fecha=2014-10-08 + //http://eventario.mx/eventos.json?fecha=2014/12/08&lon=-103.346925807&lat=20.676203715886&dist=20 NSString *urlString =@"http://eventario.mx/eventos.json"; - NSString *url=[NSString stringWithFormat:@"%@?fecha=%@",urlString,_fecha]; + NSString *url=[NSString stringWithFormat:@"%@?fecha=%@&lon=%@&lat=%@&dist=20",urlString,_fecha,[NSString stringWithFormat:@"%.8f", longitud],[NSString stringWithFormat:@"%.8f", latitud]]; // NSString *url=@"http://dev.codigo.labplc.mx/EventarioWeb/eventos.json"; NSLog(@"%@",url); dispatch_async(dispatch_get_main_queue(), ^{ @@ -1037,7 +1035,7 @@ - (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated } -(void)viewDidAppear:(BOOL)animated{ - [self viewDidLoad]; + } -(IBAction)filtrar:(id)sender{ diff --git a/share.png b/share.png new file mode 100644 index 0000000..b54c1df Binary files /dev/null and b/share.png differ