-
Notifications
You must be signed in to change notification settings - Fork 2
/
backgroundMainChange.rtf
57 lines (56 loc) · 2.28 KB
/
backgroundMainChange.rtf
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
{\rtf1\ansi\ansicpg1252\cocoartf1265
{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;}
{\colortbl;\red255\green255\blue255;\red0\green116\blue0;}
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\deftab529
\pard\tx529\pardeftab529\pardirnatural
\f0\fs22 \cf2 \CocoaLigature0 /*if(self.user.BAC < 0.02)\
\{\
UIGraphicsBeginImageContext(self.view.frame.size);\
[[UIImage imageNamed:@"SoberState.png"] drawInRect:self.view.bounds];\
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();\
UIGraphicsEndImageContext();\
\
self.view.backgroundColor = [UIColor colorWithPatternImage:image];\
\
\
\
\} else if(0.02 < self.user.BAC && self.user.BAC < 0.06)\
\{\
UIGraphicsBeginImageContext(self.view.frame.size);\
[[UIImage imageNamed:@"TipsyState.png"] drawInRect:self.view.bounds];\
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();\
UIGraphicsEndImageContext();\
\
self.view.backgroundColor = [UIColor colorWithPatternImage:image];\
\
\
\
\} else if(0.06 < self.user.BAC && self.user.BAC < 0.2)\
\{\
UIGraphicsBeginImageContext(self.view.frame.size);\
[[UIImage imageNamed:@"DrunkState.png"] drawInRect:self.view.bounds];\
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();\
UIGraphicsEndImageContext();\
\
self.view.backgroundColor = [UIColor colorWithPatternImage:image];\
\
\} else if(0.2 < self.user.BAC && self.drinkStepper.value != 100 )\
\{\
UIGraphicsBeginImageContext(self.view.frame.size);\
[[UIImage imageNamed:@"DangerState.png"] drawInRect:self.view.bounds];\
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();\
UIGraphicsEndImageContext();\
\
self.view.backgroundColor = [UIColor colorWithPatternImage:image];\
\
\}if(3.4 < self.user.BAC)\
\{\
UIGraphicsBeginImageContext(self.view.frame.size);\
[[UIImage imageNamed:@"DeadState.png"] drawInRect:self.view.bounds];\
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();\
UIGraphicsEndImageContext();\
\
self.view.backgroundColor = [UIColor colorWithPatternImage:image];\
\}*/\cf0 \
}