-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPrivacyViewController.m
More file actions
55 lines (45 loc) · 1.3 KB
/
PrivacyViewController.m
File metadata and controls
55 lines (45 loc) · 1.3 KB
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
//
// PrivacyViewController.m
// PulseBeat
//
// Created by Omar Metwally on 10/23/13.
// Copyright (c) 2013 Logisome. All rights reserved.
//
#import "PrivacyViewController.h"
#import "GAI.h"
#import "TextFormatter.h"
@interface PrivacyViewController ()
@end
@implementation PrivacyViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectZero];
[TextFormatter formatTitleLabel:titleLabel withTitle:@"Privacy"];
[[self navigationItem] setTitleView:titleLabel];
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
backgroundLabel.layer.cornerRadius = 10.0;
[sendSwitch addTarget:self action:@selector(switchChanged:) forControlEvents:UIControlEventValueChanged];
if ([[GAI sharedInstance] optOut])
sendSwitch.on = NO;
}
-(void)switchChanged:(id)sender
{
UISwitch *inputSwitch = (UISwitch *)sender;
if (inputSwitch.on)
[[GAI sharedInstance] setOptOut:NO];
else
[[GAI sharedInstance] setOptOut:YES];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end