diff --git a/Sources/Earthquake Network.xcodeproj/project.pbxproj b/Sources/Earthquake Network.xcodeproj/project.pbxproj index 921cc36..e9f783e 100644 --- a/Sources/Earthquake Network.xcodeproj/project.pbxproj +++ b/Sources/Earthquake Network.xcodeproj/project.pbxproj @@ -50,8 +50,6 @@ 8C4E344B2152EE5B008B0D2A /* EQNGeneratoreURLServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C4E344A2152EE5B008B0D2A /* EQNGeneratoreURLServer.m */; }; 8C593E8A217BA2470008B260 /* EQNSegnalazione.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C593E89217BA2470008B260 /* EQNSegnalazione.m */; }; 8C5EA22D21763103002DC156 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C5EA22C21763102002DC156 /* MapKit.framework */; }; - 8C5EA23121764816002DC156 /* PrioritaViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C5EA23021764816002DC156 /* PrioritaViewController.m */; }; - 8C5EA2342176820B002DC156 /* VersionePROViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C5EA2332176820B002DC156 /* VersionePROViewController.m */; }; 8C5EA23A2177B3ED002DC156 /* MasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C5EA2392177B3ED002DC156 /* MasterViewController.m */; }; 8C5EA23D2177B51C002DC156 /* SegnalazioniViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C5EA23C2177B51C002DC156 /* SegnalazioniViewController.m */; }; 8C602246218D9DB200C799C2 /* PastquakesDettagliMappa.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C602245218D9DB200C799C2 /* PastquakesDettagliMappa.m */; }; @@ -225,10 +223,6 @@ 8C593E88217BA2470008B260 /* EQNSegnalazione.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNSegnalazione.h; sourceTree = ""; }; 8C593E89217BA2470008B260 /* EQNSegnalazione.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNSegnalazione.m; sourceTree = ""; }; 8C5EA22C21763102002DC156 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; - 8C5EA22F21764816002DC156 /* PrioritaViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrioritaViewController.h; sourceTree = ""; }; - 8C5EA23021764816002DC156 /* PrioritaViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PrioritaViewController.m; sourceTree = ""; }; - 8C5EA2322176820B002DC156 /* VersionePROViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VersionePROViewController.h; sourceTree = ""; }; - 8C5EA2332176820B002DC156 /* VersionePROViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VersionePROViewController.m; sourceTree = ""; }; 8C5EA2382177B3ED002DC156 /* MasterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MasterViewController.h; sourceTree = ""; }; 8C5EA2392177B3ED002DC156 /* MasterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MasterViewController.m; sourceTree = ""; }; 8C5EA23B2177B51C002DC156 /* SegnalazioniViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SegnalazioniViewController.h; sourceTree = ""; }; @@ -450,10 +444,6 @@ 8CBD3DC92149B9AD0070C963 /* ReteSmartphone.m */, 8CF4F4DC2175352E0057110B /* WaitViewController.h */, 8CF4F4DD2175352E0057110B /* WaitViewController.m */, - 8C5EA22F21764816002DC156 /* PrioritaViewController.h */, - 8C5EA23021764816002DC156 /* PrioritaViewController.m */, - 8C5EA2322176820B002DC156 /* VersionePROViewController.h */, - 8C5EA2332176820B002DC156 /* VersionePROViewController.m */, 8C5EA2382177B3ED002DC156 /* MasterViewController.h */, 8C5EA2392177B3ED002DC156 /* MasterViewController.m */, 8C5EA23B2177B51C002DC156 /* SegnalazioniViewController.h */, @@ -1037,7 +1027,6 @@ 8CCE166121EBA37500173CD9 /* EQNNotificheTsunami.m in Sources */, DCAB01E524CEC12E00E8B54C /* MenuHeaderTableViewCell.swift in Sources */, 8C483CCD21FDB52500259FD2 /* MasterViewController1.swift in Sources */, - 8C5EA23121764816002DC156 /* PrioritaViewController.m in Sources */, 8CCE165121E7BAEC00173CD9 /* EQNNotificeReteSismiche.m in Sources */, 8C13E84B220B2E7E0009CFE4 /* MenuSelezioneEntiViewController.m in Sources */, 8CF4F4DB216D44930057110B /* EQNPastquakes.m in Sources */, @@ -1094,7 +1083,6 @@ 8C7A3B66225A5EA40045B266 /* NSDictionary+BVJSONString.m in Sources */, 8CF66053214C12DC009F4314 /* EQNMath.m in Sources */, 8C60224A218EDBE200C799C2 /* PastquakesAnnotation.m in Sources */, - 8C5EA2342176820B002DC156 /* VersionePROViewController.m in Sources */, 8CC1B15A217CB09100F22178 /* DettagliMappaViewController.m in Sources */, 8C5EA23D2177B51C002DC156 /* SegnalazioniViewController.m in Sources */, 8CF4F4D8216D3A110057110B /* EQNAreaCheck.m in Sources */, diff --git a/Sources/Earthquake Network/ViewController/PrioritaViewController.h b/Sources/Earthquake Network/ViewController/PrioritaViewController.h deleted file mode 100644 index 479490f..0000000 --- a/Sources/Earthquake Network/ViewController/PrioritaViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// PrioritaViewController.h -// Earthquake Network -// -// Created by Luca Beretta on 16/10/18. -// Copyright © 2018 Luca Beretta. All rights reserved. -// - -#import - -@interface PrioritaViewController : UIViewController - -@end diff --git a/Sources/Earthquake Network/ViewController/PrioritaViewController.m b/Sources/Earthquake Network/ViewController/PrioritaViewController.m deleted file mode 100644 index 6dadc6b..0000000 --- a/Sources/Earthquake Network/ViewController/PrioritaViewController.m +++ /dev/null @@ -1,120 +0,0 @@ -// -// PrioritaViewController.m -// Earthquake Network -// -// Created by Luca Beretta on 16/10/18. -// Copyright © 2018 Luca Beretta. All rights reserved. -// - -#import "PrioritaViewController.h" -#import "ServerRequest.h" -#import "Costanti.h" - -@interface PrioritaViewController () - -@property (nonatomic, strong) NSArray *lista; -@property (nonatomic, strong) IBOutlet UITableView *tableView; -@property (nonatomic, strong) NSString *top_10k_available; -@property (nonatomic, strong) NSString *top_100k_available; - -@end - -@implementation PrioritaViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - [self scaricautentiDisponibili]; - - UIView *viewNavigationBar = [[UIView alloc] initWithFrame:CGRectMake(-18, 5, 150, 44)]; - UIImageView *imageLogo = [[UIImageView alloc] initWithFrame:CGRectMake(-18, 5, 38, 38)]; - imageLogo.image = [UIImage imageNamed:@"distquake_app_wave"]; - [viewNavigationBar addSubview:imageLogo]; - UILabel *textForNavi = [[UILabel alloc] initWithFrame:CGRectMake(25, 5, 160, 38)]; - textForNavi.text = NSLocalizedString(@"Rilevatore Terremoti", @"titolo navigation bar"); - [viewNavigationBar addSubview:textForNavi]; - self.navigationItem.titleView = viewNavigationBar; - -} - --(void)scaricautentiDisponibili{ - - [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[NSURL URLWithString:URL_SERVER_UTENTI_DISPONIBILI] richiesta:utentiDisponibili success:^(id result) { - - NSArray *disp = result; - for (NSDictionary *dict in disp) { - - if ([dict objectForKey:@"top_10k_available"]) { - self.top_10k_available = [dict objectForKey:@"top_10k_available"]; - } - - if ([dict objectForKey:@"top_100k_available"]) { - self.top_100k_available = [dict objectForKey:@"top_100k_available"]; - } - - } - - self.lista = @[@"1",@"2"]; - dispatch_async(dispatch_get_main_queue(), ^{ - [self.tableView reloadData]; - }); - - } failure:^(NSError * error) { - - }]; - -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} -#pragma table view - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ - - return 1; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ - - return self.lista.count; -} - -- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ - - switch (indexPath.row) { - case 0: - return 126; - break; - default: - return 372; - break; - } -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ - - // modalita base - switch (indexPath.row) { - case 0:{ - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"sottoscrizioniAttive" forIndexPath:indexPath]; - return cell; - } - break; - default:{ - - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"servizioPriorità" forIndexPath:indexPath]; - - UILabel *descrizione = (UILabel *)[cell viewWithTag:100]; - descrizione.text = [NSString stringWithFormat:@"Top 10K: %@ %@\n\nTop 100K: %@ %@", self.top_10k_available, NSLocalizedString(@"sottoscrizioni ancora disponibiliper essere allertato in meno di 1 secondo dal rilevamento del sistema", @"descrizione Top 10K"), self.top_100k_available, NSLocalizedString(@"sottoscrizioni ancora disponibiliper essere allertato in meno di 5 secondi dal rilevamento del sistema", @"descrizione Top 100K")]; - - return cell; - } - break; - } - -} - - -@end diff --git a/Sources/Earthquake Network/ViewController/VersionePROViewController.h b/Sources/Earthquake Network/ViewController/VersionePROViewController.h deleted file mode 100644 index bc0e32e..0000000 --- a/Sources/Earthquake Network/ViewController/VersionePROViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// VersionePROViewController.h -// Earthquake Network -// -// Created by Luca Beretta on 16/10/18. -// Copyright © 2018 Luca Beretta. All rights reserved. -// - -#import - -@interface VersionePROViewController : UIViewController -@property (weak, nonatomic) IBOutlet UILabel *descrizioneAcquisto; -@property (weak, nonatomic) IBOutlet UILabel *prezzo_Acquisto; -@property (weak, nonatomic) IBOutlet UIButton *pilsanteAcquisto; - -@end diff --git a/Sources/Earthquake Network/ViewController/VersionePROViewController.m b/Sources/Earthquake Network/ViewController/VersionePROViewController.m deleted file mode 100644 index 003ce86..0000000 --- a/Sources/Earthquake Network/ViewController/VersionePROViewController.m +++ /dev/null @@ -1,75 +0,0 @@ -// -// VersionePROViewController.m -// Earthquake Network -// -// Created by Luca Beretta on 16/10/18. -// Copyright © 2018 Luca Beretta. All rights reserved. -// - -#import "VersionePROViewController.h" -#import "Earthquake_Network-Swift.h" -#import "costanti.h" -#import "EQNUtility.h" - -@interface VersionePROViewController () - -@end - -@implementation VersionePROViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - UIView *viewNavigationBar = [[UIView alloc] initWithFrame:CGRectMake(-18, 5, 150, 44)]; - UIImageView *imageLogo = [[UIImageView alloc] initWithFrame:CGRectMake(-18, 5, 38, 38)]; - imageLogo.image = [UIImage imageNamed:@"distquake_app_wave"]; - [viewNavigationBar addSubview:imageLogo]; - UILabel *textForNavi = [[UILabel alloc] initWithFrame:CGRectMake(25, 5, 160, 38)]; - textForNavi.text = NSLocalizedString(@"Rilevatore Terremoti", @"titolo navigation bar"); - [viewNavigationBar addSubview:textForNavi]; - self.navigationItem.titleView = viewNavigationBar; - - /* - VersioneProProducts.store.requestProducts{ [weak self] success, products in - guard let self = self else { return } - if success { - self.products = products! - - self.tableView.reloadData() - } - - self.refreshControl?.endRefreshing() - } -*/ - -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - --(BOOL)prezzoScontato{ - - NSUInteger i = [[NSUserDefaults standardUserDefaults] integerForKey:CONTEGGIO_APERTURE_PER_SCONTO]; - NSDate *date = [[NSUserDefaults standardUserDefaults] objectForKey:DATA_APERTURE_PER_SCONTO]; - NSUInteger minute = [EQNUtility getDifferenceMinute:date]; - - if (i >= 15 && minute <= TEMPO_APERTURE_PER_SCONTO) - return YES; - else - return NO; - -} - -/* -#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. -} -*/ - -@end