diff --git a/Sources/Earthquake Network.xcodeproj/project.pbxproj b/Sources/Earthquake Network.xcodeproj/project.pbxproj index eea4bc0..7900b48 100644 --- a/Sources/Earthquake Network.xcodeproj/project.pbxproj +++ b/Sources/Earthquake Network.xcodeproj/project.pbxproj @@ -109,9 +109,7 @@ 8CF66053214C12DC009F4314 /* EQNMath.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CF66052214C12DC009F4314 /* EQNMath.m */; }; 8CF66058214C566B009F4314 /* ServerRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CF66055214C566A009F4314 /* ServerRequest.m */; }; 8CF66059214C566B009F4314 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CF66056214C566A009F4314 /* Reachability.m */; }; - 8CFA63202197F9C10099EB0E /* TsunamiViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CFA631F2197F9C10099EB0E /* TsunamiViewController.m */; }; 8CFA6323219A2C610099EB0E /* Tsunami.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CFA6322219A2C610099EB0E /* Tsunami.m */; }; - 8CFA6326219A41590099EB0E /* DettagliTsunamiViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CFA6325219A41590099EB0E /* DettagliTsunamiViewController.m */; }; C89115902FEA7A0A31514912 /* Pods_Earthquake_Network.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25A8BFFE29D46740E8A8A7A3 /* Pods_Earthquake_Network.framework */; }; DC3ADD3924CB2F3D00737919 /* alert_star_trek.wav in Resources */ = {isa = PBXBuildFile; fileRef = 8CF12CC721DE43A400613AC5 /* alert_star_trek.wav */; }; DC3BA11124D1A9C90062EE7F /* SubscriptionsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC3BA11024D1A9C90062EE7F /* SubscriptionsViewController.swift */; }; @@ -328,12 +326,8 @@ 8CF66055214C566A009F4314 /* ServerRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ServerRequest.m; sourceTree = ""; }; 8CF66056214C566A009F4314 /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = ""; }; 8CF66057214C566B009F4314 /* ServerRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServerRequest.h; sourceTree = ""; }; - 8CFA631E2197F9C10099EB0E /* TsunamiViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TsunamiViewController.h; sourceTree = ""; }; - 8CFA631F2197F9C10099EB0E /* TsunamiViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TsunamiViewController.m; sourceTree = ""; }; 8CFA6321219A2C610099EB0E /* Tsunami.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Tsunami.h; sourceTree = ""; }; 8CFA6322219A2C610099EB0E /* Tsunami.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tsunami.m; sourceTree = ""; }; - 8CFA6324219A41590099EB0E /* DettagliTsunamiViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DettagliTsunamiViewController.h; sourceTree = ""; }; - 8CFA6325219A41590099EB0E /* DettagliTsunamiViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DettagliTsunamiViewController.m; sourceTree = ""; }; C4FB0D7EEA34F8222369E1BB /* Pods-Earthquake Network.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Earthquake Network.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Earthquake Network/Pods-Earthquake Network.debug.xcconfig"; sourceTree = ""; }; DC3BA11024D1A9C90062EE7F /* SubscriptionsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionsViewController.swift; sourceTree = ""; }; DC414C0024CDA09A008D9AE4 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = CHANGELOG.md; path = ../CHANGELOG.md; sourceTree = ""; }; @@ -432,10 +426,6 @@ 8CAFD7C72182648600F8BD29 /* EQNRetiSismiViewController.m */, 8CABD71F2194B7C700C3E09C /* ImpostazioniViewController.h */, 8CABD7202194B7C700C3E09C /* ImpostazioniViewController.m */, - 8CFA631E2197F9C10099EB0E /* TsunamiViewController.h */, - 8CFA631F2197F9C10099EB0E /* TsunamiViewController.m */, - 8CFA6324219A41590099EB0E /* DettagliTsunamiViewController.h */, - 8CFA6325219A41590099EB0E /* DettagliTsunamiViewController.m */, 8CADAA9221B2627D0044E256 /* LogViewController.h */, 8CADAA9321B2627D0044E256 /* LogViewController.m */, 8C13E849220B2E7E0009CFE4 /* MenuSelezioneEntiViewController.h */, @@ -1061,7 +1051,6 @@ 8CCE165E21EB9F2400173CD9 /* NotificheTsunamiTableViewController.m in Sources */, 8C7E945A21E548A600B0B770 /* DettadliMenuTableViewController.m in Sources */, 8CABD7212194B7C700C3E09C /* ImpostazioniViewController.m in Sources */, - 8CFA63202197F9C10099EB0E /* TsunamiViewController.m in Sources */, 8CCE164421E67F1300173CD9 /* EQNImpostazioniNotifiche.m in Sources */, 8C14113721EE502800A59729 /* EQNAllertaSismica.m in Sources */, 8C483CBC21FDACE500259FD2 /* VersioneProProducts.swift in Sources */, @@ -1082,7 +1071,6 @@ 8CBD3DCA2149B9AD0070C963 /* ReteSmartphone.m in Sources */, DCF10DCD24D2C935009F34C3 /* EQNPurchaseAvailability.swift in Sources */, 8C13E84F220B89360009CFE4 /* ElencoFiltroEntiTableViewController.m in Sources */, - 8CFA6326219A41590099EB0E /* DettagliTsunamiViewController.m in Sources */, 8CAFD7C521825E4A00F8BD29 /* EQNSisma.m in Sources */, DCC23DEC24D281CE003A2404 /* SubscriptionsActiveTableViewCell.swift in Sources */, 8CF6604F214C0E58009F4314 /* EQNCalibrazione.m in Sources */, diff --git a/Sources/Earthquake Network/Storyboards/Base.lproj/Main.storyboard b/Sources/Earthquake Network/Storyboards/Base.lproj/Main.storyboard index c3a22f2..4278a52 100644 --- a/Sources/Earthquake Network/Storyboards/Base.lproj/Main.storyboard +++ b/Sources/Earthquake Network/Storyboards/Base.lproj/Main.storyboard @@ -2979,155 +2979,6 @@ In più sostieni il progetto di ricerca il quale non riceve finanziamenti estern - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -4653,7 +4504,6 @@ In più sostieni il progetto di ricerca il quale non riceve finanziamenti estern - diff --git a/Sources/Earthquake Network/ViewController/DettagliTsunamiViewController.h b/Sources/Earthquake Network/ViewController/DettagliTsunamiViewController.h deleted file mode 100644 index e770b53..0000000 --- a/Sources/Earthquake Network/ViewController/DettagliTsunamiViewController.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// DettagliTsunamiViewController.h -// Earthquake Network -// -// Created by Luca Beretta on 13/11/18. -// Copyright © 2018 Luca Beretta. All rights reserved. -// - -#import - -@interface DettagliTsunamiViewController : UIViewController - -@property (nonatomic, strong) NSURL *link; -@end diff --git a/Sources/Earthquake Network/ViewController/DettagliTsunamiViewController.m b/Sources/Earthquake Network/ViewController/DettagliTsunamiViewController.m deleted file mode 100644 index d1c7035..0000000 --- a/Sources/Earthquake Network/ViewController/DettagliTsunamiViewController.m +++ /dev/null @@ -1,48 +0,0 @@ -// -// DettagliTsunamiViewController.m -// Earthquake Network -// -// Created by Luca Beretta on 13/11/18. -// Copyright © 2018 Luca Beretta. All rights reserved. -// - -#import "DettagliTsunamiViewController.h" - -@interface DettagliTsunamiViewController () - -@property (weak, nonatomic) IBOutlet UIWebView *webView; -- (IBAction)chiudi:(id)sender; - -@end - -@implementation DettagliTsunamiViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - NSURLRequest *requestObj = [NSURLRequest requestWithURL:self.link]; - [self.webView loadRequest:requestObj]; - - //Load the request in the UIWebView. -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -- (IBAction)chiudi:(id)sender { - - [self dismissViewControllerAnimated:YES completion:nil]; -} -@end diff --git a/Sources/Earthquake Network/ViewController/MasterViewController.m b/Sources/Earthquake Network/ViewController/MasterViewController.m index 93ad41d..a883310 100644 --- a/Sources/Earthquake Network/ViewController/MasterViewController.m +++ b/Sources/Earthquake Network/ViewController/MasterViewController.m @@ -11,7 +11,6 @@ #import "ReteSmartphone.h" #import "SegnalazioniViewController.h" #import "EQNRetiSismiViewController.h" -#import "TsunamiViewController.h" #import "Costanti.h" #import "EQNUtility.h" #import "EQNManager.h" @@ -30,7 +29,6 @@ @property (strong, nonatomic) ReteSmartphone *reteSmartphone; @property (strong, nonatomic) SegnalazioniViewController *segnalazioni; @property (strong, nonatomic) EQNRetiSismiViewController *restiSismi; -@property (strong, nonatomic) TsunamiViewController *tsunami; @property(nonatomic, strong) GADBannerView *bannerView; @property (nonatomic, strong) UIStoryboard *mainStoreBoard; @@ -91,7 +89,7 @@ [self registraNotifiche]; - self.listaAzioniCollectView = @[NSLocalizedString(@"RETE SMARTPHONE", @"pulsanti orrizontale"), NSLocalizedString(@"SEGNALAZIONI", @"pulsanti orrizontale"), NSLocalizedString(@"RETI SISMICHE", @"pulsanti orrizontale"), NSLocalizedString(@"TSUNAMI", @"pulsanti orrizontale")/*, NSLocalizedString(@"CHAT", @"pulsanti orrizontale"), NSLocalizedString(@"E-MAIL/SMS", @"pulsanti orrizontale"), NSLocalizedString(@"ALTRO", @"pulsanti orrizontale"), NSLocalizedString(@"SPONSOR", @"pulsanti orrizontale")*/]; + self.listaAzioniCollectView = @[NSLocalizedString(@"RETE SMARTPHONE", @"pulsanti orrizontale"), NSLocalizedString(@"SEGNALAZIONI", @"pulsanti orrizontale"), NSLocalizedString(@"RETI SISMICHE", @"pulsanti orrizontale"), /*, NSLocalizedString(@"CHAT", @"pulsanti orrizontale"), NSLocalizedString(@"E-MAIL/SMS", @"pulsanti orrizontale"), NSLocalizedString(@"ALTRO", @"pulsanti orrizontale"), NSLocalizedString(@"SPONSOR", @"pulsanti orrizontale")*/]; [self caricaChildrenViewController:[NSIndexPath indexPathForRow:0 inSection:0]]; @@ -150,15 +148,6 @@ } break; - case 3:{ - if (!self.tsunami) - self.tsunami = (TsunamiViewController *)[self.mainStoreBoard instantiateViewControllerWithIdentifier:@"TsunamiViewController"]; - self.navigationItem.rightBarButtonItems = [EQNUtility getButtonForControllerTipe:tsunamiControler withController:self]; - - [self add:self.tsunami]; - - } - break; default: break; } diff --git a/Sources/Earthquake Network/ViewController/TsunamiViewController.h b/Sources/Earthquake Network/ViewController/TsunamiViewController.h deleted file mode 100644 index 6e107fb..0000000 --- a/Sources/Earthquake Network/ViewController/TsunamiViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// TsunamiViewController.h -// Earthquake Network -// -// Created by Luca Beretta on 11/11/18. -// Copyright © 2018 Luca Beretta. All rights reserved. -// - -#import - -@interface TsunamiViewController : UIViewController - -@end diff --git a/Sources/Earthquake Network/ViewController/TsunamiViewController.m b/Sources/Earthquake Network/ViewController/TsunamiViewController.m deleted file mode 100644 index bf81782..0000000 --- a/Sources/Earthquake Network/ViewController/TsunamiViewController.m +++ /dev/null @@ -1,127 +0,0 @@ -// -// TsunamiViewController.m -// Earthquake Network -// -// Created by Luca Beretta on 11/11/18. -// Copyright © 2018 Luca Beretta. All rights reserved. -// - -#import "TsunamiViewController.h" -#import "Costanti.h" -#import "EQNManager.h" -#import "Tsunami.h" -#import "DettagliTsunamiViewController.h" - -@interface TsunamiViewController () - -@property (nonatomic, weak) IBOutlet UITableView *tableView; -@property (nonatomic, strong) NSArray *listaTsunami; -@property (weak, nonatomic) IBOutlet NSLayoutConstraint *fooTable; - -@end - -@implementation TsunamiViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(aggiornaTabella:) name:NOTIFICA_DOWNLOAD_TERMINATO object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setupView) name:IAPHelperPurchaseNotification object:nil]; - - - [self setupView]; - self.listaTsunami = [EQNManager defaultManager].listaTsunami; -} - -- (void)setupView -{ - if ([EQNPurchaseUtility isProVersionEnabled]) { - self.fooTable.constant = 0; - } -} - --(void)aggiornaTabella:(id)sender{ - - // self.listaSismi = [NSArray arrayWithArray:[EQNManager defaultManager].retiSismiche]; - - [self.tableView reloadData]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - - -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. - if ([segue.identifier isEqualToString:@"apriDettagliTsunami"]) { - - DettagliTsunamiViewController *dettagli = (DettagliTsunamiViewController *)segue.destinationViewController; - NSURL *link = (NSURL *)sender; - dettagli.link = link; - } -} - - -#pragma table view - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ - - return 1; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ - - return self.listaTsunami.count; -} - -- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ - - return 150; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ - - Tsunami *anTsunami = self.listaTsunami[indexPath.row]; - - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"tsunami" forIndexPath:indexPath]; - - UILabel *titolo = (UILabel *)[cell viewWithTag:1]; - titolo.text = [anTsunami.message uppercaseString]; - - UILabel *descrizione = (UILabel *)[cell viewWithTag:3]; - - NSString *place = NSLocalizedString(@"Oceano Pacifico", @""); - if ([anTsunami.receiver isEqualToString:@"Car"]) { - place = NSLocalizedString(@"Mar dei Caraibi", @""); - } - if ([anTsunami.receiver isEqualToString:@"Haw"]) { - place = NSLocalizedString(@"Isole Hawaii", @""); - } - - descrizione.text = [NSString stringWithFormat:@"%@: %@", NSLocalizedString(@"Area di interesse", @""), place]; - UILabel *dettagli = (UILabel *)[cell viewWithTag:5]; - dettagli.text = [NSString stringWithFormat:@"%@: %@ %@ - %@",NSLocalizedString(@"Data", @""), anTsunami.date, NSLocalizedString(@"(Ora tua)", @""), anTsunami.differenza]; - - return cell; - -} - --(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ - - Tsunami *anTsunami = self.listaTsunami[indexPath.row]; - [self performSegueWithIdentifier:@"apriDettagliTsunami" sender:anTsunami.link]; -} - --(void)dealloc{ - - [[NSNotificationCenter defaultCenter] removeObserver:self]; - -} - -@end