Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Commit 0e33b98

Browse files
committed
Requested changes to PR 3295
Fixing breaks, spaces to match project style Explaining constant 4 in BEMLine (note bug on line76 0+offset should be 0)
1 parent 019aa1e commit 0e33b98

10 files changed

Lines changed: 67 additions & 97 deletions

File tree

Classes/BEMAverageLine.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ - (void) encodeWithCoder: (NSCoder *)coder {
6060

6161

6262

63-
-(void) setLabel:(UILabel *)label {
63+
- (void)setLabel:(UILabel *)label {
6464
if (_label != label) {
6565
[_label removeFromSuperview];
6666
_label = label;
6767
}
6868
}
6969

70-
-(void) dealloc {
70+
- (void)dealloc {
7171
self.label= nil;
7272
}
7373
@end

Classes/BEMLine.m

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,35 +58,36 @@ - (void)drawRect:(CGRect)rect {
5858
referenceFramePath.lineWidth = 0.7f;
5959

6060
if (self.enableReferenceFrame == YES) {
61+
CGFloat offset = self.referenceLineWidth/4; //moves framing ref line slightly into view
6162
if (self.enableBottomReferenceFrameLine) {
6263
// Bottom Line
63-
[referenceFramePath moveToPoint:CGPointMake(0, self.frame.size.height-self.referenceLineWidth/4)];
64-
[referenceFramePath addLineToPoint:CGPointMake(self.frame.size.width, self.frame.size.height-self.referenceLineWidth/4)];
64+
[referenceFramePath moveToPoint: CGPointMake(0, self.frame.size.height-offset)];
65+
[referenceFramePath addLineToPoint:CGPointMake(self.frame.size.width, self.frame.size.height-offset)];
6566
}
6667

6768
if (self.enableLeftReferenceFrameLine) {
6869
// Left Line
69-
[referenceFramePath moveToPoint:CGPointMake(0+self.referenceLineWidth/4, self.frame.size.height)];
70-
[referenceFramePath addLineToPoint:CGPointMake(0+self.referenceLineWidth/4, 0)];
70+
[referenceFramePath moveToPoint: CGPointMake(0+offset, self.frame.size.height)];
71+
[referenceFramePath addLineToPoint:CGPointMake(0+offset, 0)];
7172
}
7273

7374
if (self.enableTopReferenceFrameLine) {
7475
// Top Line
75-
[referenceFramePath moveToPoint:CGPointMake(0+self.referenceLineWidth/4, self.referenceLineWidth/4)];
76-
[referenceFramePath addLineToPoint:CGPointMake(self.frame.size.width, self.referenceLineWidth/4)];
76+
[referenceFramePath moveToPoint: CGPointMake(0+offset, offset)];
77+
[referenceFramePath addLineToPoint:CGPointMake(self.frame.size.width, offset)];
7778
}
7879

7980
if (self.enableRightReferenceFrameLine) {
8081
// Right Line
81-
[referenceFramePath moveToPoint:CGPointMake(self.frame.size.width - self.referenceLineWidth/4, self.frame.size.height)];
82-
[referenceFramePath addLineToPoint:CGPointMake(self.frame.size.width - self.referenceLineWidth/4, 0)];
82+
[referenceFramePath moveToPoint: CGPointMake(self.frame.size.width - offset, self.frame.size.height)];
83+
[referenceFramePath addLineToPoint:CGPointMake(self.frame.size.width - offset, 0)];
8384
}
8485
}
8586

8687
if (self.enableReferenceLines == YES) {
8788
if (self.arrayOfVerticalReferenceLinePoints.count > 0) {
8889
for (NSNumber *xNumber in self.arrayOfVerticalReferenceLinePoints) {
89-
CGFloat xValue =[xNumber doubleValue];
90+
CGFloat xValue = [xNumber doubleValue];
9091
if (self.verticalReferenceHorizontalFringeNegation != 0.0) {
9192
NSUInteger index = [self.arrayOfVerticalReferenceLinePoints indexOfObject:xNumber];
9293
if (index == 0) { // far left reference line
@@ -143,10 +144,10 @@ - (void)drawRect:(CGRect)rect {
143144

144145
self.points = [NSMutableArray arrayWithCapacity:self.arrayOfPoints.count];
145146
for (NSUInteger i = 0; i < self.arrayOfPoints.count; i++) {
146-
CGFloat value = [self.arrayOfPoints[i] CGFloatValue];;
147+
CGFloat value = [self.arrayOfPoints[i] CGFloatValue];
147148
if (value >= BEMNullGraphValue && self.interpolateNullValues) {
148149
//need to interpolate. For midpoints, just don't add a point
149-
if (i ==0) {
150+
if (i == 0) {
150151
//extrapolate a left edge point from next two actual values
151152
NSUInteger firstPos = 1; //look for first real value
152153
while (firstPos < self.arrayOfPoints.count && [self.arrayOfPoints[firstPos] CGFloatValue] >= BEMNullGraphValue) firstPos++;
@@ -341,7 +342,7 @@ - (void)drawRect:(CGRect)rect {
341342
return bottomPoints;
342343
}
343344

344-
+ (UIBezierPath *)linesToPoints:(NSArray <NSValue *> *)points open:(BOOL) canSkipPoints {
345+
+ (UIBezierPath *)linesToPoints:(NSArray <NSValue *> *)points open:(BOOL)open {
345346
UIBezierPath *path = [UIBezierPath bezierPath];
346347
NSValue *value = points[0];
347348
CGPoint p1 = [value CGPointValue];
@@ -351,7 +352,7 @@ + (UIBezierPath *)linesToPoints:(NSArray <NSValue *> *)points open:(BOOL) canSki
351352
if (point == value) continue; //already at first point
352353
CGPoint p2 = [point CGPointValue];
353354

354-
if (canSkipPoints && (p1.y >= BEMNullGraphValue || p2.y >= BEMNullGraphValue)) {
355+
if (open && (p1.y >= BEMNullGraphValue || p2.y >= BEMNullGraphValue)) {
355356
[path moveToPoint:p2];
356357
} else {
357358
[path addLineToPoint:p2];
@@ -361,7 +362,7 @@ + (UIBezierPath *)linesToPoints:(NSArray <NSValue *> *)points open:(BOOL) canSki
361362
return path;
362363
}
363364

364-
+ (UIBezierPath *)quadCurvedPathWithPoints:(NSArray <NSValue *> *)points open:(BOOL) canSkipPoints {
365+
+ (UIBezierPath *)quadCurvedPathWithPoints:(NSArray <NSValue *> *)points open:(BOOL)open {
365366
UIBezierPath *path = [UIBezierPath bezierPath];
366367

367368
NSValue *value = points[0];
@@ -372,7 +373,7 @@ + (UIBezierPath *)quadCurvedPathWithPoints:(NSArray <NSValue *> *)points open:(B
372373
if (point == value) continue; //already at first point
373374
CGPoint p2 = [point CGPointValue];
374375

375-
if (canSkipPoints && (p1.y >= BEMNullGraphValue || p2.y >= BEMNullGraphValue)) {
376+
if (open && (p1.y >= BEMNullGraphValue || p2.y >= BEMNullGraphValue)) {
376377
[path moveToPoint:p2];
377378
} else {
378379
CGPoint midPoint = midPointForPoints(p1, p2);

Classes/BEMSimpleLineGraphView.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,11 +487,13 @@ IB_DESIGNABLE @interface BEMSimpleLineGraphView : UIView <UIGestureRecognizerDel
487487
@return The minimum value of the Y-Axis. */
488488
- (CGFloat)minValueForLineGraph:(BEMSimpleLineGraphView *)graph;
489489

490+
490491
/** Optional method to set the average value for the Average line. If not implemented, the value will be the average point of the graph.
491-
@param graph The graph object requesting the minimum value.
492+
@param graph The graph object requesting the average value.
492493
@return The average value of the Y-Axis. */
493494
- (CGFloat)averageValueForLineGraph:(BEMSimpleLineGraphView *)graph;
494495

496+
495497
/** Optional method to control whether a label indicating NO DATA will be shown while number of data is zero
496498
@param graph The graph object for the NO DATA label
497499
@return The boolean value indicating the availability of the NO DATA label. */

Classes/BEMSimpleLineGraphView.m

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ @interface BEMSimpleLineGraphView () {
6767
@property (strong, nonatomic) NSMutableArray <BEMCircle *> *circleDots;
6868

6969
/// The line itself
70-
@property (strong, nonatomic) BEMLine * masterLine;
70+
@property (strong, nonatomic) BEMLine *masterLine;
7171

7272
/// The vertical line which appears when the user drags across the graph
7373
@property (strong, nonatomic) UIView *touchInputLine;
@@ -133,12 +133,12 @@ - (instancetype) initWithCoder:(NSCoder *)coder {
133133
return self;
134134
}
135135

136-
-(void) decodeRestorableStateWithCoder:(NSCoder *)coder {
136+
- (void)decodeRestorableStateWithCoder:(NSCoder *)coder {
137137
[super decodeRestorableStateWithCoder:coder];
138138
[self restorePropertyWithCoder:coder];
139139
}
140140

141-
-(void) restorePropertyWithCoder:(NSCoder *) coder {
141+
- (void)restorePropertyWithCoder:(NSCoder *)coder {
142142

143143
#define RestoreProperty(property, type) \
144144
if ([coder containsValueForKey:@#property]) { \
@@ -192,7 +192,7 @@ -(void) restorePropertyWithCoder:(NSCoder *) coder {
192192
#pragma clang diagnostic pop
193193
}
194194

195-
-(void) encodeRestorableStateWithCoder:(NSCoder *)coder {
195+
- (void)encodeRestorableStateWithCoder:(NSCoder *)coder {
196196
[super encodeRestorableStateWithCoder:coder];
197197
[self encodePropertiesWithCoder:coder];
198198
}
@@ -202,7 +202,7 @@ - (void) encodeWithCoder: (NSCoder *)coder {
202202
[self encodePropertiesWithCoder:coder];
203203
}
204204

205-
-(void) encodePropertiesWithCoder: (NSCoder *) coder {
205+
- (void)encodePropertiesWithCoder:(NSCoder *)coder {
206206

207207
#define EncodeProperty(property, type) [coder encode ## type: self.property forKey:@#property]
208208

@@ -357,7 +357,7 @@ - (void)layoutSubviews {
357357
[self drawGraph];
358358
}
359359

360-
-(void) clearGraph {
360+
- (void)clearGraph {
361361
for (UIView * subvView in self.subviews) {
362362
[subvView removeFromSuperview];
363363
}
@@ -503,7 +503,7 @@ - (void)drawEntireGraph {
503503
[self drawYAxis];
504504
}
505505

506-
-(CGFloat) labelWidthForValue:(CGFloat) value {
506+
- (CGFloat)labelWidthForValue:(CGFloat)value {
507507
NSDictionary *attributes = @{NSFontAttributeName: self.labelFont};
508508
NSString *valueString = [self yAxisTextForValue:value];
509509
NSString *labelString = [valueString stringByReplacingOccurrencesOfString:@"[0-9-]" withString:@"N" options:NSRegularExpressionSearch range:NSMakeRange(0, [valueString length])];
@@ -520,14 +520,14 @@ - (CGFloat) calculateWidestLabel {
520520
widestNumber = [self labelWidthForValue:self.frame.size.height] ;
521521
}
522522
if (self.averageLine.enableAverageLine) {
523-
return MAX(widestNumber, [self.averageLine.title sizeWithAttributes:attributes].width);
523+
return MAX(widestNumber, [self.averageLine.title sizeWithAttributes:attributes].width);
524524
} else {
525525
return widestNumber;
526526
}
527527
}
528528

529529

530-
-(BEMCircle *) circleDotAtIndex:(NSUInteger) index forValue:(CGFloat) dotValue reuseNumber: (NSUInteger) reuseNumber {
530+
- (BEMCircle *)circleDotAtIndex:(NSUInteger)index forValue:(CGFloat)dotValue reuseNumber:(NSUInteger)reuseNumber {
531531
CGFloat positionOnXAxis = numberOfPoints > 1 ?
532532
(((self.frame.size.width - self.YAxisLabelXOffset) / (numberOfPoints - 1)) * index) :
533533
self.frame.size.width/2;
@@ -895,7 +895,7 @@ - (UILabel *)xAxisLabelWithText:(NSString *)text atIndex:(NSUInteger)index reuse
895895
return labelXAxis;
896896
}
897897

898-
-(NSString *) yAxisTextForValue:(CGFloat) value {
898+
- (NSString *)yAxisTextForValue:(CGFloat) value {
899899
NSString *yAxisSuffix = @"";
900900
NSString *yAxisPrefix = @"";
901901

@@ -1164,7 +1164,7 @@ - (UILabel *)configureLabel: (UILabel *) oldLabel forPoint: (BEMCircle *)circleD
11641164
return newPopUpLabel;
11651165
}
11661166

1167-
-(void) adjustXLocForLabel: (UIView *) popUpLabel avoidingDot: (CGRect) circleDotFrame {
1167+
- (void)adjustXLocForLabel: (UIView *) popUpLabel avoidingDot: (CGRect) circleDotFrame {
11681168

11691169
//now fixup left/right layout issues
11701170
CGFloat xCenter = CGRectGetMidX(circleDotFrame);
@@ -1185,7 +1185,7 @@ -(void) adjustXLocForLabel: (UIView *) popUpLabel avoidingDot: (CGRect) circleDo
11851185
popUpLabel.center = CGPointMake(xCenter, popUpLabel.center.y);
11861186
}
11871187

1188-
-(BOOL) adjustYLocForLabel: (UIView *) popUpLabel avoidingDot: (CGRect) dotFrame andNeighbors: (CGRect) leftNeightbor and: (CGRect) secondNeighbor {
1188+
- (BOOL)adjustYLocForLabel:(UIView *)popUpLabel avoidingDot:(CGRect)dotFrame andNeighbors:(CGRect)leftNeightbor and:(CGRect)secondNeighbor {
11891189
//returns YES if it can avoid those neighbors
11901190
//note: nil.frame == CGRectZero
11911191
//check for bumping into top OR overlap with left neighbors
@@ -1209,7 +1209,6 @@ -(BOOL) adjustYLocForLabel: (UIView *) popUpLabel avoidingDot: (CGRect) dotFrame
12091209
return YES;
12101210
}
12111211

1212-
12131212
- (UIImage *)graphSnapshotImage {
12141213
return [self graphSnapshotImageRenderedWhileInBackground:NO];
12151214
}
@@ -1233,7 +1232,6 @@ - (UIImage *)graphSnapshotImageRenderedWhileInBackground:(BOOL)appIsInBackground
12331232

12341233
- (void)reloadGraph {
12351234
[self drawGraph];
1236-
// [self setNeedsLayout];
12371235
}
12381236

12391237
#pragma mark - Values
@@ -1464,7 +1462,6 @@ - (CGFloat)yPositionForDotValue:(CGFloat)dotValue {
14641462

14651463
#pragma mark - Deprecated Methods
14661464

1467-
14681465
- (NSNumber *)calculatePointValueSum {
14691466
[self printDeprecationTransitionWarningForOldMethod:@"calculatePointValueSum" replacementMethod:@"calculatePointValueSumOnGraph:" newObject:@"BEMGraphCalculator" sharedInstance:YES];
14701467
return [[BEMGraphCalculator sharedCalculator] calculatePointValueSumOnGraph:self];

Sample Project/SimpleLineChart.xcodeproj/project.pbxproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@
7979
1E960A981E7DF9BB000E2BB8 /* ARFontPickerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARFontPickerViewController.h; sourceTree = "<group>"; };
8080
1E960A991E7DF9BB000E2BB8 /* ARFontPickerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARFontPickerViewController.m; sourceTree = "<group>"; };
8181
1E960A9A1E7DF9BB000E2BB8 /* DetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetailViewController.h; sourceTree = "<group>"; };
82-
1E960A9B1E7DF9BB000E2BB8 /* DetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DetailViewController.m; sourceTree = "<group>"; };
82+
1E960A9B1E7DF9BB000E2BB8 /* DetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = DetailViewController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
8383
1E960A9C1E7DF9BB000E2BB8 /* MasterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MasterViewController.h; sourceTree = "<group>"; };
84-
1E960A9D1E7DF9BB000E2BB8 /* MasterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MasterViewController.m; sourceTree = "<group>"; };
84+
1E960A9D1E7DF9BB000E2BB8 /* MasterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = MasterViewController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
8585
1E960A9E1E7DF9BB000E2BB8 /* StatsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StatsViewController.h; sourceTree = "<group>"; };
86-
1E960A9F1E7DF9BC000E2BB8 /* StatsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StatsViewController.m; sourceTree = "<group>"; };
86+
1E960A9F1E7DF9BC000E2BB8 /* StatsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = StatsViewController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
8787
1E960AFC1E7F9C80000E2BB8 /* MSColorComponentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MSColorComponentView.h; sourceTree = "<group>"; };
8888
1E960AFD1E7F9C80000E2BB8 /* MSColorComponentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSColorComponentView.m; sourceTree = "<group>"; };
8989
1E960AFE1E7F9C80000E2BB8 /* MSColorPicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MSColorPicker.h; sourceTree = "<group>"; };
@@ -111,7 +111,7 @@
111111
99B3FA381877898B00539A7B /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
112112
99B3FA391877898B00539A7B /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.md; path = ../README.md; sourceTree = "<group>"; };
113113
A63990B31AD4923900B14D88 /* BEMAverageLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BEMAverageLine.h; sourceTree = "<group>"; };
114-
A63990B41AD4923900B14D88 /* BEMAverageLine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BEMAverageLine.m; sourceTree = "<group>"; };
114+
A63990B41AD4923900B14D88 /* BEMAverageLine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BEMAverageLine.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
115115
A64594511BAB257B00D6B8FD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = "Base.lproj/Launch Screen.storyboard"; sourceTree = "<group>"; };
116116
A6AC89591C5882DD0052AB1C /* BEMGraphCalculator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BEMGraphCalculator.h; sourceTree = "<group>"; };
117117
A6AC895A1C5882DD0052AB1C /* BEMGraphCalculator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BEMGraphCalculator.m; sourceTree = "<group>"; };
@@ -120,7 +120,7 @@
120120
C3B90A5A187D15F7003E407D /* BEMLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BEMLine.h; sourceTree = "<group>"; };
121121
C3B90A5B187D15F7003E407D /* BEMLine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BEMLine.m; sourceTree = "<group>"; };
122122
C3B90A5C187D15F7003E407D /* BEMSimpleLineGraphView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BEMSimpleLineGraphView.h; sourceTree = "<group>"; };
123-
C3B90A5D187D15F7003E407D /* BEMSimpleLineGraphView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BEMSimpleLineGraphView.m; sourceTree = "<group>"; };
123+
C3B90A5D187D15F7003E407D /* BEMSimpleLineGraphView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BEMSimpleLineGraphView.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
124124
C3BCA7E61B8ECCA6007E6090 /* CustomizationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomizationTests.m; sourceTree = "<group>"; };
125125
C3BCA7E81B8ECE4E007E6090 /* contantsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = contantsTests.h; sourceTree = "<group>"; };
126126
C3FD8155186DFD9A00FD8ED3 /* SimpleLineChart.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimpleLineChart.app; sourceTree = BUILT_PRODUCTS_DIR; };

Sample Project/SimpleLineChart/StatsViewController.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ @implementation StatsViewController
1717

1818
- (void)viewDidLoad {
1919
[super viewDidLoad];
20-
// Do any additional setup after loading the view.
2120
}
2221

2322
- (void)viewWillAppear:(BOOL)animated {

Sample Project/TestBed/AppDelegate.m

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ @implementation AppDelegate
1616

1717

1818
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19-
// Override point for customization after application launch.
2019
return YES;
2120
}
2221

@@ -28,32 +27,4 @@ - (BOOL)application:(UIApplication *)application shouldRestoreApplicationState:(
2827
return YES;
2928
}
3029

31-
32-
- (void)applicationWillResignActive:(UIApplication *)application {
33-
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
34-
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
35-
}
36-
37-
38-
- (void)applicationDidEnterBackground:(UIApplication *)application {
39-
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
40-
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
41-
}
42-
43-
44-
- (void)applicationWillEnterForeground:(UIApplication *)application {
45-
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
46-
}
47-
48-
49-
- (void)applicationDidBecomeActive:(UIApplication *)application {
50-
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
51-
}
52-
53-
54-
- (void)applicationWillTerminate:(UIApplication *)application {
55-
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
56-
}
57-
58-
5930
@end

0 commit comments

Comments
 (0)