-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppDelegate.m
78 lines (49 loc) · 2.15 KB
/
AppDelegate.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//
// AppDelegate.m
// NotificationCenterPractice
//
// Created by Alexey Sergeev on 4/2/20.
// Copyright © 2020 Alexey Sergeev. All rights reserved.
//
#import "AppDelegate.h"
#import "ASGovernment.h"
#import "Doctors.h"
#import "Businessmen.h"
#import "Pensioners.h"
@interface AppDelegate()
@property (nonatomic,strong) ASGovernment* government;
@end
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.government = [[ASGovernment alloc]init];
Doctors *Alec = [[Doctors alloc]init];
Alec.salary = self.government.salary;
Businessmen *Bob = [[Businessmen alloc]init];
Bob.taxLevel = self.government.taxLevel;
Pensioners *Grin = [[Pensioners alloc]init];
Grin.averagePrice = self.government.averagePrice;
self.government.salary = 900;
self.government.salary = 1010;
self.government.averagePrice = 201;
self.government.averagePrice = 301;
self.government.taxLevel = 10;
self.government.taxLevel = 20;
return YES;
}
-(void)dealloc{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
#pragma mark - UISceneSession lifecycle
- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
}
- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet<UISceneSession *> *)sceneSessions {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
@end