Commit 73a5aaa681b81bf66f6f739e66489b4a02007bca
1 parent
168c4f0402
Exists in
master
and in
1 other branch
Fix check null of result from History API, add some function to convert seconds …
…to string, add other share
Showing 7 changed files with 47 additions and 27 deletions Inline Diff
LifeLog/LifeLog/HistoryObject.h
| 1 | // | 1 | // |
| 2 | // HistoryObject.h | 2 | // HistoryObject.h |
| 3 | // LifeLog | 3 | // LifeLog |
| 4 | // | 4 | // |
| 5 | // Created by nvtu on 8/5/17. | 5 | // Created by nvtu on 8/5/17. |
| 6 | // Copyright © 2017 PhongNV. All rights reserved. | 6 | // Copyright © 2017 PhongNV. All rights reserved. |
| 7 | // | 7 | // |
| 8 | 8 | ||
| 9 | #import <Foundation/Foundation.h> | 9 | #import <Foundation/Foundation.h> |
| 10 | 10 | ||
| 11 | @interface HistoryObject : NSObject | 11 | @interface HistoryObject : NSObject |
| 12 | 12 | ||
| 13 | @property (nonatomic) int step; | 13 | @property (nonatomic) int step; |
| 14 | @property (nonatomic) int missing; | 14 | @property (nonatomic) int missing; |
| 15 | @property (nonatomic) int target; | 15 | @property (nonatomic) int target; |
| 16 | @property (nonatomic) int time; | ||
| 16 | @property (nonatomic) float percent; | 17 | @property (nonatomic) float percent; |
| 17 | @property (nonatomic) float distance; | 18 | @property (nonatomic) float distance; |
| 18 | @property (nonatomic) float calories; | 19 | @property (nonatomic) float calories; |
| 19 | @property (nonatomic, strong) NSString * time; | ||
| 20 | @property (nonatomic, strong) NSDate *date; | 20 | @property (nonatomic, strong) NSDate *date; |
| 21 | @property (nonatomic, strong) NSMutableArray *dataGraph; | 21 | @property (nonatomic, strong) NSMutableArray *dataGraph; |
| 22 | 22 | ||
| 23 | -(id) initWithData : (NSDictionary *) dict; | 23 | -(id) initWithData : (NSDictionary *) dict; |
| 24 | 24 | ||
| 25 | @end | 25 | @end |
LifeLog/LifeLog/HistoryObject.m
| 1 | // | 1 | // |
| 2 | // HistoryObject.m | 2 | // HistoryObject.m |
| 3 | // LifeLog | 3 | // LifeLog |
| 4 | // | 4 | // |
| 5 | // Created by nvtu on 8/5/17. | 5 | // Created by nvtu on 8/5/17. |
| 6 | // Copyright © 2017 PhongNV. All rights reserved. | 6 | // Copyright © 2017 PhongNV. All rights reserved. |
| 7 | // | 7 | // |
| 8 | 8 | ||
| 9 | #import "HistoryObject.h" | 9 | #import "HistoryObject.h" |
| 10 | 10 | ||
| 11 | @implementation HistoryObject | 11 | @implementation HistoryObject |
| 12 | 12 | ||
| 13 | -(id) initWithData : (NSDictionary *) dict { | 13 | -(id) initWithData : (NSDictionary *) dict { |
| 14 | if([dict objectForKey:@"steps"] != nil) { | 14 | if([dict objectForKey:@"steps"] != nil) { |
| 15 | self.step = [dict[@"step"] intValue]; | 15 | self.step = [dict[@"steps"] intValue]; |
| 16 | } | 16 | } |
| 17 | if([dict objectForKey:@"target"] != nil) { | 17 | if([dict objectForKey:@"target"] != nil) { |
| 18 | self.target = [dict[@"target"] intValue]; | 18 | self.target = [dict[@"target"] intValue]; |
| 19 | } | 19 | } |
| 20 | if([dict objectForKey:@"step_remain"] != nil) { | 20 | if([dict objectForKey:@"step_remain"] != nil) { |
| 21 | self.missing = [dict[@"step_remain"] intValue]; | 21 | self.missing = [dict[@"step_remain"] intValue]; |
| 22 | } | 22 | } |
| 23 | if([dict objectForKey:@"complete_percent"] != nil) { | 23 | if([dict objectForKey:@"complete_percent"] != nil) { |
| 24 | self.percent = [dict[@"complete_percent"] floatValue]; | 24 | self.percent = [dict[@"complete_percent"] floatValue]; |
| 25 | } | 25 | } |
| 26 | if([dict objectForKey:@"distance"] != nil) { | 26 | if([dict objectForKey:@"distance"] != nil) { |
| 27 | if([dict[@"distance"] isKindOfClass:[NSString class]]) { | 27 | if([dict[@"distance"] isKindOfClass:[NSString class]]) { |
| 28 | NSString *distance = dict[@"distance"]; | 28 | NSString *distance = dict[@"distance"]; |
| 29 | self.distance = [distance floatValue]; | 29 | self.distance = [distance floatValue]; |
| 30 | } | 30 | } |
| 31 | else { | 31 | else { |
| 32 | self.distance = [dict[@"distance"] floatValue]; | 32 | self.distance = [dict[@"distance"] floatValue]; |
| 33 | } | 33 | } |
| 34 | } | 34 | } |
| 35 | if([dict objectForKey:@"kcal"] != nil) { | 35 | if([dict objectForKey:@"kcal"] != nil) { |
| 36 | self.calories = [dict[@"kcal"] floatValue]; | 36 | self.calories = [dict[@"kcal"] floatValue]; |
| 37 | } | 37 | } |
| 38 | if([dict objectForKey:@"time"] != nil) { | 38 | if([dict objectForKey:@"time"] != nil) { |
| 39 | if([dict[@"time"] isKindOfClass:[NSString class]]) { | 39 | self.time = [dict[@"time"] intValue]; |
| 40 | self.time = dict[@"time"]; | ||
| 41 | } | ||
| 42 | else { | ||
| 43 | self.time = @"0:0"; | ||
| 44 | } | ||
| 45 | } | 40 | } |
| 46 | if([dict objectForKey:@"date"] != nil) { | 41 | if([dict objectForKey:@"date"] != nil) { |
| 47 | NSString *dateString = dict[@"date"]; | 42 | NSString *dateString = dict[@"date"]; |
| 48 | NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; | 43 | NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; |
| 49 | [dateFormat setDateFormat:@"yyyy-MM-dd"]; | 44 | [dateFormat setDateFormat:@"yyyy-MM-dd"]; |
| 50 | self.date = [dateFormat dateFromString:dateString]; | 45 | self.date = [dateFormat dateFromString:dateString]; |
| 51 | } | 46 | } |
| 52 | else { | 47 | else { |
| 53 | self.date = [NSDate date]; | 48 | self.date = [NSDate date]; |
| 54 | } | 49 | } |
| 55 | if([dict objectForKey:@"data_chart"] != nil) { | 50 | if([dict objectForKey:@"data_chart"] != nil) { |
| 56 | self.dataGraph = [[NSMutableArray alloc] init]; | 51 | self.dataGraph = [[NSMutableArray alloc] init]; |
| 57 | NSDictionary * graph = [dict objectForKey:@"data_chart"]; | 52 | NSDictionary * graph = [dict objectForKey:@"data_chart"]; |
| 58 | if([graph count] == 24) { | 53 | if([graph count] == 24) { |
| 59 | for(int i = 0; i < 24; i++) { | 54 | for(int i = 0; i < 24; i++) { |
| 60 | [self.dataGraph addObject:[graph objectForKey:[NSString stringWithFormat:@"%d", i]]]; | 55 | [self.dataGraph addObject:[graph objectForKey:[NSString stringWithFormat:@"%d", i]]]; |
| 61 | } | 56 | } |
| 62 | } | 57 | } |
| 63 | } | 58 | } |
| 64 | return self; | 59 | return self; |
| 65 | } | 60 | } |
| 66 | @end | 61 | @end |
| 67 | 62 |
LifeLog/LifeLog/HistoryViewController.m
| 1 | // | 1 | // |
| 2 | // HistoryViewController.m | 2 | // HistoryViewController.m |
| 3 | // LifeLog | 3 | // LifeLog |
| 4 | // | 4 | // |
| 5 | // Created by Nguyen Van Phong on 7/25/17. | 5 | // Created by Nguyen Van Phong on 7/25/17. |
| 6 | // Copyright © 2017 PhongNV. All rights reserved. | 6 | // Copyright © 2017 PhongNV. All rights reserved. |
| 7 | // | 7 | // |
| 8 | 8 | ||
| 9 | #import "HistoryViewController.h" | 9 | #import "HistoryViewController.h" |
| 10 | #import "Utilities.h" | 10 | #import "Utilities.h" |
| 11 | #import "ServerAPI.h" | 11 | #import "ServerAPI.h" |
| 12 | 12 | ||
| 13 | #import "HistoryListTableViewCell.h" | 13 | #import "HistoryListTableViewCell.h" |
| 14 | 14 | ||
| 15 | @interface HistoryViewController () | 15 | @interface HistoryViewController () |
| 16 | 16 | ||
| 17 | @end | 17 | @end |
| 18 | 18 | ||
| 19 | @implementation HistoryViewController | 19 | @implementation HistoryViewController |
| 20 | 20 | ||
| 21 | - (void)viewDidLoad { | 21 | - (void)viewDidLoad { |
| 22 | [super viewDidLoad]; | 22 | [super viewDidLoad]; |
| 23 | // Do any additional setup after loading the view from its nib. | 23 | // Do any additional setup after loading the view from its nib. |
| 24 | self.title = NSLocalizedString(@"lifelog.history.title", nil); | 24 | self.title = NSLocalizedString(@"lifelog.history.title", nil); |
| 25 | 25 | ||
| 26 | [self setupView]; | 26 | [self setupView]; |
| 27 | [self setupChartView]; | 27 | [self setupChartView]; |
| 28 | 28 | ||
| 29 | _startDate = [NSDate date]; | 29 | _startDate = [NSDate date]; |
| 30 | _endDate = _startDate; | 30 | _endDate = _startDate; |
| 31 | 31 | ||
| 32 | self.lblDatetime.text = [Utilities stringFromDate:_endDate withFormat:@"YYYY年MM月dd日 EEEE" locale:@"ja_JP"]; | 32 | self.lblDatetime.text = [Utilities stringFromDate:_endDate withFormat:@"YYYY年MM月dd日 EEEE" locale:@"ja_JP"]; |
| 33 | 33 | ||
| 34 | [self checkRequestData]; | 34 | [self checkRequestData]; |
| 35 | 35 | ||
| 36 | //register nib for table view | 36 | //register nib for table view |
| 37 | [self.tableBase registerNib:[UINib nibWithNibName:@"HistoryListTableViewCell" bundle:nil] forCellReuseIdentifier:@"HistoryListCell"]; | 37 | [self.tableBase registerNib:[UINib nibWithNibName:@"HistoryListTableViewCell" bundle:nil] forCellReuseIdentifier:@"HistoryListCell"]; |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | - (void)viewDidAppear:(BOOL) animated | 40 | - (void)viewDidAppear:(BOOL) animated |
| 41 | { | 41 | { |
| 42 | [super viewDidAppear:animated]; | 42 | [super viewDidAppear:animated]; |
| 43 | self.scrollView.contentSize = CGSizeMake(self.view.frame.size.width, 400); | 43 | self.scrollView.contentSize = CGSizeMake(self.view.frame.size.width, 400); |
| 44 | [self.scrollView setNeedsLayout]; | 44 | [self.scrollView setNeedsLayout]; |
| 45 | [self.scrollView setNeedsUpdateConstraints]; | 45 | [self.scrollView setNeedsUpdateConstraints]; |
| 46 | 46 | ||
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | - (void)didReceiveMemoryWarning { | 49 | - (void)didReceiveMemoryWarning { |
| 50 | [super didReceiveMemoryWarning]; | 50 | [super didReceiveMemoryWarning]; |
| 51 | // Dispose of any resources that can be recreated. | 51 | // Dispose of any resources that can be recreated. |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | - (void)setupView { | 54 | - (void)setupView { |
| 55 | NSArray *typeTitle = [NSArray arrayWithObjects:NSLocalizedString(@"lifelog.history.type.1", nil), NSLocalizedString(@"lifelog.history.type.2", nil), NSLocalizedString(@"lifelog.history.type.3", nil), NSLocalizedString(@"lifelog.history.type.4", nil), NSLocalizedString(@"lifelog.history.type.5", nil), nil]; | 55 | NSArray *typeTitle = [NSArray arrayWithObjects:NSLocalizedString(@"lifelog.history.type.1", nil), NSLocalizedString(@"lifelog.history.type.2", nil), NSLocalizedString(@"lifelog.history.type.3", nil), NSLocalizedString(@"lifelog.history.type.4", nil), NSLocalizedString(@"lifelog.history.type.5", nil), nil]; |
| 56 | [self.viewCollectionType setButtonNumber:typeTitle.count]; | 56 | [self.viewCollectionType setButtonNumber:typeTitle.count]; |
| 57 | [self.viewCollectionType setSpacing:2]; | 57 | [self.viewCollectionType setSpacing:2]; |
| 58 | [self.viewCollectionType setArrayTitle:typeTitle]; | 58 | [self.viewCollectionType setArrayTitle:typeTitle]; |
| 59 | self.viewCollectionType.changeCurrentIndex = ^(int index){ | 59 | self.viewCollectionType.changeCurrentIndex = ^(int index){ |
| 60 | [self changeDate]; | 60 | [self changeDate]; |
| 61 | }; | 61 | }; |
| 62 | 62 | ||
| 63 | NSArray *modeTitle = [NSArray arrayWithObjects:NSLocalizedString(@"lifelog.history.mode.1", nil), NSLocalizedString(@"lifelog.history.mode.2", nil), NSLocalizedString(@"lifelog.history.mode.3", nil), nil]; | 63 | NSArray *modeTitle = [NSArray arrayWithObjects:NSLocalizedString(@"lifelog.history.mode.1", nil), NSLocalizedString(@"lifelog.history.mode.2", nil), NSLocalizedString(@"lifelog.history.mode.3", nil), nil]; |
| 64 | [self.viewCollectionMode setButtonNumber:modeTitle.count]; | 64 | [self.viewCollectionMode setButtonNumber:modeTitle.count]; |
| 65 | [self.viewCollectionMode setSpacing:0]; | 65 | [self.viewCollectionMode setSpacing:0]; |
| 66 | [self.viewCollectionMode setCornerRadius:0]; | 66 | [self.viewCollectionMode setCornerRadius:0]; |
| 67 | [self.viewCollectionMode setNormalColor:[Utilities convertHecToColor:0x191919] highlightColor:[Utilities convertHecToColor:0x474747] textColor:[UIColor whiteColor]]; | 67 | [self.viewCollectionMode setNormalColor:[Utilities convertHecToColor:0x191919] highlightColor:[Utilities convertHecToColor:0x474747] textColor:[UIColor whiteColor]]; |
| 68 | [self.viewCollectionMode setArrayTitle:modeTitle]; | 68 | [self.viewCollectionMode setArrayTitle:modeTitle]; |
| 69 | self.viewCollectionMode.changeCurrentIndex = ^(int index){ | 69 | self.viewCollectionMode.changeCurrentIndex = ^(int index){ |
| 70 | [self updateView]; | 70 | [self updateView]; |
| 71 | }; | 71 | }; |
| 72 | 72 | ||
| 73 | NSArray *shareTitle = [NSArray arrayWithObjects:NSLocalizedString(@"lifelog.history.share.1", nil), NSLocalizedString(@"lifelog.history.share.2", nil), NSLocalizedString(@"lifelog.history.share.3", nil), NSLocalizedString(@"lifelog.history.share.4", nil), NSLocalizedString(@"lifelog.history.share.5", nil), nil]; | 73 | NSArray *shareTitle = [NSArray arrayWithObjects:NSLocalizedString(@"lifelog.history.share.1", nil), NSLocalizedString(@"lifelog.history.share.2", nil), NSLocalizedString(@"lifelog.history.share.3", nil), NSLocalizedString(@"lifelog.history.share.4", nil), NSLocalizedString(@"lifelog.history.share.5", nil), nil]; |
| 74 | [self.viewCollectionShare setButtonNumber:typeTitle.count]; | 74 | [self.viewCollectionShare setButtonNumber:typeTitle.count]; |
| 75 | [self.viewCollectionShare setSpacing:3]; | 75 | [self.viewCollectionShare setSpacing:3]; |
| 76 | [self.viewCollectionShare setArrayTitle:shareTitle]; | 76 | [self.viewCollectionShare setArrayTitle:shareTitle]; |
| 77 | [self.viewCollectionShare disableSelection]; | 77 | [self.viewCollectionShare disableSelection]; |
| 78 | 78 | ||
| 79 | //add tap gesture for enable tap on gesture on CollectionView in ScrollView | 79 | //add tap gesture for enable tap on gesture on CollectionView in ScrollView |
| 80 | UITapGestureRecognizer *recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gestureAction:)]; | 80 | UITapGestureRecognizer *recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gestureAction:)]; |
| 81 | [recognizer setNumberOfTapsRequired:1]; | 81 | [recognizer setNumberOfTapsRequired:1]; |
| 82 | self.scrollView.userInteractionEnabled = YES; | 82 | self.scrollView.userInteractionEnabled = YES; |
| 83 | [self.scrollView addGestureRecognizer:recognizer]; | 83 | [self.scrollView addGestureRecognizer:recognizer]; |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | - (void)setupChartView { | 86 | - (void)setupChartView { |
| 87 | self.viewBarChart.chartDescription.enabled = NO; | 87 | self.viewBarChart.chartDescription.enabled = NO; |
| 88 | self.viewBarChart.leftAxis.drawGridLinesEnabled = NO; | 88 | self.viewBarChart.leftAxis.drawGridLinesEnabled = NO; |
| 89 | self.viewBarChart.rightAxis.drawGridLinesEnabled = NO; | 89 | self.viewBarChart.rightAxis.drawGridLinesEnabled = NO; |
| 90 | self.viewBarChart.legend.enabled = NO; | 90 | self.viewBarChart.legend.enabled = NO; |
| 91 | 91 | ||
| 92 | ChartXAxis *xAxis = self.viewBarChart.xAxis; | 92 | ChartXAxis *xAxis = self.viewBarChart.xAxis; |
| 93 | xAxis.labelPosition = XAxisLabelPositionBottom; | 93 | xAxis.labelPosition = XAxisLabelPositionBottom; |
| 94 | xAxis.drawGridLinesEnabled = NO; | 94 | xAxis.drawGridLinesEnabled = NO; |
| 95 | xAxis.drawAxisLineEnabled = NO; | 95 | xAxis.drawAxisLineEnabled = NO; |
| 96 | xAxis.drawLabelsEnabled = YES; | 96 | xAxis.drawLabelsEnabled = YES; |
| 97 | xAxis.labelPosition = XAxisLabelPositionBottom; | 97 | xAxis.labelPosition = XAxisLabelPositionBottom; |
| 98 | xAxis.labelFont = [UIFont systemFontOfSize:10.f]; | 98 | xAxis.labelFont = [UIFont systemFontOfSize:10.f]; |
| 99 | xAxis.labelTextColor = [UIColor whiteColor]; | 99 | xAxis.labelTextColor = [UIColor whiteColor]; |
| 100 | xAxis.granularity = 1.0; // only intervals of 1 day | 100 | xAxis.granularity = 1.0; // only intervals of 1 day |
| 101 | xAxis.labelCount = 8; | 101 | xAxis.labelCount = 8; |
| 102 | 102 | ||
| 103 | self.viewBarChart.leftAxis.drawAxisLineEnabled = NO; | 103 | self.viewBarChart.leftAxis.drawAxisLineEnabled = NO; |
| 104 | self.viewBarChart.rightAxis.drawAxisLineEnabled = NO; | 104 | self.viewBarChart.rightAxis.drawAxisLineEnabled = NO; |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | -(void) updateView { | 107 | -(void) updateView { |
| 108 | HistoryObject * obj = [_curHisArray objectAtIndex:self.viewCollectionMode.getCurrentIndex]; | 108 | HistoryObject * obj = [_curHisArray objectAtIndex:self.viewCollectionMode.getCurrentIndex]; |
| 109 | self.lblStep.text = [NSString stringWithFormat:@"%d", obj.step]; | 109 | self.lblStep.text = [NSString stringWithFormat:@"%d step", obj.step]; |
| 110 | self.lblRemaining.text = [NSString stringWithFormat:@"%d", obj.missing]; | 110 | self.lblCircleStep.text = self.lblStep.text; |
| 111 | self.lblPercent.text = [NSString stringWithFormat:@"%0.2f", obj.percent * 100]; | 111 | self.lblRemaining.text = [NSString stringWithFormat:@"%d step", obj.missing]; |
| 112 | self.lblCalories.text = [NSString stringWithFormat:@"%0.2f", obj.calories]; | 112 | self.lblCircleRemain.text = [NSString stringWithFormat:@"目標まであと\n%d stepです", obj.missing]; |
| 113 | self.lblDistance.text = [NSString stringWithFormat:@"%0.1f", obj.distance]; | 113 | self.lblPercent.text = [NSString stringWithFormat:@"%0.2f%%", obj.percent]; |
| 114 | self.lblTime.text = obj.time; | 114 | self.lblCalories.text = [NSString stringWithFormat:@"%0.2f kcal", obj.calories]; |
| 115 | self.lblDistance.text = [NSString stringWithFormat:@"%0.1f KM", obj.distance]; | ||
| 116 | self.lblTime.text = [Utilities convertSecondToShortTime:obj.time]; | ||
| 115 | [self updateGraphView]; | 117 | [self updateGraphView]; |
| 116 | } | 118 | } |
| 117 | 119 | ||
| 118 | -(void) updateGraphView { | 120 | -(void) updateGraphView { |
| 119 | HistoryObject * obj = [_curHisArray objectAtIndex:self.viewCollectionMode.getCurrentIndex]; | 121 | HistoryObject * obj = [_curHisArray objectAtIndex:self.viewCollectionMode.getCurrentIndex]; |
| 120 | 122 | ||
| 121 | NSMutableArray *yVals = [[NSMutableArray alloc] init]; | 123 | NSMutableArray *yVals = [[NSMutableArray alloc] init]; |
| 122 | for (int i = 0; i < obj.dataGraph.count; i++) | 124 | for (int i = 0; i < obj.dataGraph.count; i++) |
| 123 | { | 125 | { |
| 124 | [yVals addObject:[[BarChartDataEntry alloc] initWithX:i y:[[obj.dataGraph objectAtIndex:i] doubleValue]]]; | 126 | [yVals addObject:[[BarChartDataEntry alloc] initWithX:i y:[[obj.dataGraph objectAtIndex:i] doubleValue]]]; |
| 125 | } | 127 | } |
| 126 | 128 | ||
| 127 | BarChartDataSet *set1 = nil; | 129 | BarChartDataSet *set1 = nil; |
| 128 | if (self.viewBarChart.data.dataSetCount > 0) | 130 | if (self.viewBarChart.data.dataSetCount > 0) |
| 129 | { | 131 | { |
| 130 | set1 = (BarChartDataSet *)self.viewBarChart.data.dataSets[0]; | 132 | set1 = (BarChartDataSet *)self.viewBarChart.data.dataSets[0]; |
| 131 | set1.values = yVals; | 133 | set1.values = yVals; |
| 132 | [self.viewBarChart.data notifyDataChanged]; | 134 | [self.viewBarChart.data notifyDataChanged]; |
| 133 | [self.viewBarChart notifyDataSetChanged]; | 135 | [self.viewBarChart notifyDataSetChanged]; |
| 134 | } | 136 | } |
| 135 | else | 137 | else |
| 136 | { | 138 | { |
| 137 | set1 = [[BarChartDataSet alloc] initWithValues:yVals label:@""]; | 139 | set1 = [[BarChartDataSet alloc] initWithValues:yVals label:@""]; |
| 138 | [set1 setColor:[UIColor whiteColor]]; | 140 | [set1 setColor:[UIColor whiteColor]]; |
| 139 | 141 | ||
| 140 | NSMutableArray *dataSets = [[NSMutableArray alloc] init]; | 142 | NSMutableArray *dataSets = [[NSMutableArray alloc] init]; |
| 141 | [dataSets addObject:set1]; | 143 | [dataSets addObject:set1]; |
| 142 | 144 | ||
| 143 | BarChartData *data = [[BarChartData alloc] initWithDataSets:dataSets]; | 145 | BarChartData *data = [[BarChartData alloc] initWithDataSets:dataSets]; |
| 144 | data.barWidth = 0.5f; | 146 | data.barWidth = 0.5f; |
| 145 | 147 | ||
| 146 | self.viewBarChart.data = data; | 148 | self.viewBarChart.data = data; |
| 147 | } | 149 | } |
| 148 | } | 150 | } |
| 149 | 151 | ||
| 150 | -(void) checkRequestData { | 152 | -(void) checkRequestData { |
| 151 | if(self.tableBase.alpha == 0.0) { | 153 | if(self.tableBase.alpha == 0.0) { |
| 152 | NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken]; | 154 | NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken]; |
| 153 | MBProgressHUD *hudView = [MBProgressHUD showHUDAddedTo:self.view animated:true]; | 155 | MBProgressHUD *hudView = [MBProgressHUD showHUDAddedTo:self.view animated:true]; |
| 154 | [[ServerAPI server] requestHistory:token startDate:_startDate endDate:_endDate CompletionHandler:^(NSArray *array, NSError *error) { | 156 | [[ServerAPI server] requestHistory:token startDate:_startDate endDate:_endDate CompletionHandler:^(NSArray *array, NSError *error) { |
| 155 | HistoryViewController __weak *weakSelf = self; | 157 | HistoryViewController __weak *weakSelf = self; |
| 156 | dispatch_async(dispatch_get_main_queue(), ^{ | 158 | dispatch_async(dispatch_get_main_queue(), ^{ |
| 157 | if(hudView != nil) { | 159 | if(hudView != nil) { |
| 158 | [hudView hideAnimated:true]; | 160 | [hudView hideAnimated:true]; |
| 159 | } | 161 | } |
| 160 | }); | 162 | }); |
| 161 | if(error == nil) { | 163 | if(error == nil) { |
| 162 | _curHisArray = array; | 164 | _curHisArray = array; |
| 163 | dispatch_async(dispatch_get_main_queue(), ^{ | 165 | dispatch_async(dispatch_get_main_queue(), ^{ |
| 164 | [weakSelf updateView]; | 166 | [weakSelf updateView]; |
| 165 | }); | 167 | }); |
| 166 | } | 168 | } |
| 167 | else { | 169 | else { |
| 168 | dispatch_async(dispatch_get_main_queue(), ^{ | 170 | dispatch_async(dispatch_get_main_queue(), ^{ |
| 169 | NSString *message = [error.userInfo objectForKey:@"message"]; | 171 | NSString *message = [error.userInfo objectForKey:@"message"]; |
| 170 | [Utilities showErrorMessage:message withViewController:weakSelf]; | 172 | [Utilities showErrorMessage:message withViewController:weakSelf]; |
| 171 | }); | 173 | }); |
| 172 | } | 174 | } |
| 173 | }]; | 175 | }]; |
| 174 | } | 176 | } |
| 175 | else { | 177 | else { |
| 176 | [self resetData]; | 178 | [self resetData]; |
| 177 | } | 179 | } |
| 178 | } | 180 | } |
| 179 | 181 | ||
| 180 | -(void) callRequestToUpdateData { | 182 | -(void) callRequestToUpdateData { |
| 181 | [super callRequestToUpdateData]; | 183 | [super callRequestToUpdateData]; |
| 182 | NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken]; | 184 | NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken]; |
| 183 | int type = self.viewCollectionType.getCurrentIndex; | 185 | int type = self.viewCollectionType.getCurrentIndex; |
| 184 | int mode = self.viewCollectionMode.getCurrentIndex + 1; | 186 | int mode = self.viewCollectionMode.getCurrentIndex + 1; |
| 185 | 187 | ||
| 186 | MBProgressHUD *hudView = nil; | 188 | MBProgressHUD *hudView = nil; |
| 187 | if(_curPage == 1 && !self.refreshControl.isRefreshing) { | 189 | if(_curPage == 1 && !self.refreshControl.isRefreshing) { |
| 188 | hudView = [MBProgressHUD showHUDAddedTo:self.view animated:true]; | 190 | hudView = [MBProgressHUD showHUDAddedTo:self.view animated:true]; |
| 189 | } | 191 | } |
| 190 | [[ServerAPI server] requestHistoryList:token withType:type andMode:mode AtPage:_curPage CompletionHandler:^(NSArray *array, NSError *error) { | 192 | [[ServerAPI server] requestHistoryList:token withType:type andMode:mode AtPage:_curPage CompletionHandler:^(NSArray *array, NSError *error) { |
| 191 | dispatch_async(dispatch_get_main_queue(), ^{ | 193 | dispatch_async(dispatch_get_main_queue(), ^{ |
| 192 | if(hudView != nil) { | 194 | if(hudView != nil) { |
| 193 | [hudView hideAnimated:true]; | 195 | [hudView hideAnimated:true]; |
| 194 | } | 196 | } |
| 195 | }); | 197 | }); |
| 196 | HistoryViewController __weak *weakSelf = self; | 198 | HistoryViewController __weak *weakSelf = self; |
| 197 | [weakSelf updateTableData:array error:error]; | 199 | [weakSelf updateTableData:array error:error]; |
| 198 | }]; | 200 | }]; |
| 199 | } | 201 | } |
| 200 | 202 | ||
| 201 | - (void) changeDate { | 203 | - (void) changeDate { |
| 202 | switch (self.viewCollectionType.getCurrentIndex) { | 204 | switch (self.viewCollectionType.getCurrentIndex) { |
| 203 | case 1: | 205 | case 1: |
| 204 | _startDate = [_endDate dateByAddingTimeInterval:-86400 * 7]; | 206 | _startDate = [_endDate dateByAddingTimeInterval:-86400 * 7]; |
| 205 | break; | 207 | break; |
| 206 | case 2: | 208 | case 2: |
| 207 | _startDate = [_endDate dateByAddingTimeInterval:-86400 * 30]; | 209 | _startDate = [_endDate dateByAddingTimeInterval:-86400 * 30]; |
| 208 | break; | 210 | break; |
| 209 | case 3: | 211 | case 3: |
| 210 | _startDate = [_endDate dateByAddingTimeInterval:-86400 * 30 * 3]; | 212 | _startDate = [_endDate dateByAddingTimeInterval:-86400 * 30 * 3]; |
| 211 | break; | 213 | break; |
| 212 | case 4: | 214 | case 4: |
| 213 | _startDate = [_endDate dateByAddingTimeInterval:-86400 * 30 * 6]; | 215 | _startDate = [_endDate dateByAddingTimeInterval:-86400 * 30 * 6]; |
| 214 | break; | 216 | break; |
| 215 | default: | 217 | default: |
| 216 | _startDate = _endDate; | 218 | _startDate = _endDate; |
| 217 | break; | 219 | break; |
| 218 | } | 220 | } |
| 219 | [self checkRequestData]; | 221 | [self checkRequestData]; |
| 220 | } | 222 | } |
| 221 | 223 | ||
| 222 | #pragma mark IBAction | 224 | #pragma mark IBAction |
| 223 | -(void) swipeAction:(UISwipeGestureRecognizer *)sender { | 225 | -(void) swipeAction:(UISwipeGestureRecognizer *)sender { |
| 224 | bool alphaValue = self.scrollView.alpha == 1.0 ? 1.0 : 0.0; | 226 | bool alphaValue = self.scrollView.alpha == 1.0 ? 1.0 : 0.0; |
| 225 | [UIView animateWithDuration:0.5 animations:^{ | 227 | [UIView animateWithDuration:0.5 animations:^{ |
| 226 | self.tableBase.alpha = alphaValue; | 228 | self.tableBase.alpha = alphaValue; |
| 227 | self.scrollView.alpha = 1.0 - alphaValue; | 229 | self.scrollView.alpha = 1.0 - alphaValue; |
| 228 | } completion:^(BOOL completed) { | 230 | } completion:^(BOOL completed) { |
| 229 | [self checkRequestData]; | 231 | [self checkRequestData]; |
| 230 | }]; | 232 | }]; |
| 231 | } | 233 | } |
| 232 | 234 | ||
| 233 | - (IBAction)clickBackward:(UIButton *)sender { | 235 | - (IBAction)clickBackward:(UIButton *)sender { |
| 234 | _endDate = [_endDate dateByAddingTimeInterval:-86400]; | 236 | _endDate = [_endDate dateByAddingTimeInterval:-86400]; |
| 235 | self.lblDatetime.text = [Utilities stringFromDate:_endDate withFormat:@"YYYY年MM月dd日 EEEE" locale:@"ja_JP"]; | 237 | self.lblDatetime.text = [Utilities stringFromDate:_endDate withFormat:@"YYYY年MM月dd日 EEEE" locale:@"ja_JP"]; |
| 236 | [self changeDate]; | 238 | [self changeDate]; |
| 237 | } | 239 | } |
| 238 | 240 | ||
| 239 | - (IBAction)clickForward:(UIButton *)sender { | 241 | - (IBAction)clickForward:(UIButton *)sender { |
| 240 | _endDate = [_endDate dateByAddingTimeInterval:86400]; | 242 | _endDate = [_endDate dateByAddingTimeInterval:86400]; |
| 241 | self.lblDatetime.text = [Utilities stringFromDate:_endDate withFormat:@"YYYY年MM月dd日 EEEE" locale:@"ja_JP"]; | 243 | self.lblDatetime.text = [Utilities stringFromDate:_endDate withFormat:@"YYYY年MM月dd日 EEEE" locale:@"ja_JP"]; |
| 242 | [self changeDate]; | 244 | [self changeDate]; |
| 243 | } | 245 | } |
| 244 | 246 | ||
| 245 | -(void)gestureAction:(UITapGestureRecognizer *) sender | 247 | -(void)gestureAction:(UITapGestureRecognizer *) sender |
| 246 | { | 248 | { |
| 247 | CGPoint touchLocation = [sender locationOfTouch:0 inView:self.viewCollectionShare]; | 249 | CGPoint touchLocation = [sender locationOfTouch:0 inView:self.viewCollectionShare]; |
| 248 | NSIndexPath *indexPath = [self.viewCollectionShare.collectionView indexPathForItemAtPoint:touchLocation]; | 250 | NSIndexPath *indexPath = [self.viewCollectionShare.collectionView indexPathForItemAtPoint:touchLocation]; |
| 249 | NSString * content = @"Finish 500 steps"; | 251 | NSString * content = @"Finish 500 steps"; |
| 250 | HistoryViewController __weak *weakSelf = self; | 252 | HistoryViewController __weak *weakSelf = self; |
| 251 | if(indexPath != NULL) { | 253 | if(indexPath != NULL) { |
| 252 | switch (indexPath.row) { | 254 | switch (indexPath.row) { |
| 253 | case 0: //share facebook | 255 | case 0: //share facebook |
| 254 | [Utilities shareFacebook:content withViewController:weakSelf]; | 256 | [Utilities shareFacebook:content withViewController:weakSelf]; |
| 255 | break; | 257 | break; |
| 256 | case 1: //share twitter | 258 | case 1: //share twitter |
| 257 | [Utilities shareTwitter:content withViewController:weakSelf]; | 259 | [Utilities shareTwitter:content withViewController:weakSelf]; |
| 258 | break; | 260 | break; |
| 259 | case 2 : //share line | 261 | case 2 : //share line |
| 260 | [Utilities shareLine:content withViewController:weakSelf]; | 262 | [Utilities shareLine:content withViewController:weakSelf]; |
| 261 | break; | 263 | break; |
| 262 | case 3: // share email | 264 | case 3: // share email |
| 263 | [Utilities shareEmail:content withViewController:weakSelf]; | 265 | [Utilities shareEmail:content withViewController:weakSelf]; |
| 264 | break; | 266 | break; |
| 265 | default: | 267 | default: //share other |
| 268 | [Utilities shareOther:content withViewController:weakSelf]; | ||
| 266 | break; | 269 | break; |
| 267 | } | 270 | } |
| 268 | } | 271 | } |
| 269 | } | 272 | } |
| 270 | 273 | ||
| 271 | #pragma mark UITableView Delegate | 274 | #pragma mark UITableView Delegate |
| 272 | - (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | 275 | - (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
| 273 | HistoryListTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"HistoryListCell"]; | 276 | HistoryListTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"HistoryListCell"]; |
| 274 | HistoryObject * obj = [_curDataList objectAtIndex:indexPath.row]; | 277 | HistoryObject * obj = [_curDataList objectAtIndex:indexPath.row]; |
| 275 | cell.lblStep.text = [NSString stringWithFormat:@"%d", obj.step]; | 278 | cell.lblStep.text = [NSString stringWithFormat:@"%d", obj.step]; |
| 276 | cell.lblPower.text = [NSString stringWithFormat:@"%0.2f", obj.calories]; | 279 | cell.lblPower.text = [NSString stringWithFormat:@"%0.2f", obj.calories]; |
| 277 | cell.lblDistance.text = [NSString stringWithFormat:@"%0.1f", obj.distance]; | 280 | cell.lblDistance.text = [NSString stringWithFormat:@"%0.1f", obj.distance]; |
| 278 | cell.lblDuration.text = obj.time; | 281 | cell.lblDuration.text = [Utilities convertSecondToShortTime:obj.time]; |
| 279 | return cell; | 282 | return cell; |
| 280 | } | 283 | } |
| 281 | 284 | ||
| 282 | @end | 285 | @end |
| 283 | 286 |
LifeLog/LifeLog/HistoryViewController.xib
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12118" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> | 2 | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> |
| 3 | <device id="retina4_7" orientation="portrait"> | 3 | <device id="retina4_7" orientation="portrait"> |
| 4 | <adaptation id="fullscreen"/> | 4 | <adaptation id="fullscreen"/> |
| 5 | </device> | 5 | </device> |
| 6 | <dependencies> | 6 | <dependencies> |
| 7 | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/> | 7 | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/> |
| 8 | <capability name="Aspect ratio constraints" minToolsVersion="5.1"/> | 8 | <capability name="Aspect ratio constraints" minToolsVersion="5.1"/> |
| 9 | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | 9 | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
| 10 | </dependencies> | 10 | </dependencies> |
| 11 | <objects> | 11 | <objects> |
| 12 | <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="HistoryViewController"> | 12 | <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="HistoryViewController"> |
| 13 | <connections> | 13 | <connections> |
| 14 | <outlet property="lblCalories" destination="dAE-C8-QLr" id="WaS-S3-Qxh"/> | 14 | <outlet property="lblCalories" destination="dAE-C8-QLr" id="WaS-S3-Qxh"/> |
| 15 | <outlet property="lblCircleRemain" destination="Kr7-S0-Fpl" id="UQe-Bt-i0X"/> | 15 | <outlet property="lblCircleRemain" destination="Kr7-S0-Fpl" id="UQe-Bt-i0X"/> |
| 16 | <outlet property="lblCircleStep" destination="oWg-A8-aCr" id="Q9g-UY-hyv"/> | 16 | <outlet property="lblCircleStep" destination="oWg-A8-aCr" id="Q9g-UY-hyv"/> |
| 17 | <outlet property="lblDatetime" destination="EM7-vA-s1e" id="0fK-4u-TaK"/> | 17 | <outlet property="lblDatetime" destination="EM7-vA-s1e" id="0fK-4u-TaK"/> |
| 18 | <outlet property="lblDistance" destination="1tR-JC-pyw" id="q4s-Ru-vLO"/> | 18 | <outlet property="lblDistance" destination="1tR-JC-pyw" id="q4s-Ru-vLO"/> |
| 19 | <outlet property="lblPercent" destination="8Ru-Jc-Ouv" id="ZHn-Kt-0Qk"/> | 19 | <outlet property="lblPercent" destination="8Ru-Jc-Ouv" id="ZHn-Kt-0Qk"/> |
| 20 | <outlet property="lblRemaining" destination="1NH-b3-ST8" id="hFc-q9-b0h"/> | 20 | <outlet property="lblRemaining" destination="1NH-b3-ST8" id="hFc-q9-b0h"/> |
| 21 | <outlet property="lblStep" destination="0pf-fX-QXT" id="jK4-9Y-89Q"/> | 21 | <outlet property="lblStep" destination="0pf-fX-QXT" id="jK4-9Y-89Q"/> |
| 22 | <outlet property="lblTime" destination="PfZ-7x-LAR" id="NQv-fs-rl7"/> | 22 | <outlet property="lblTime" destination="PfZ-7x-LAR" id="NQv-fs-rl7"/> |
| 23 | <outlet property="scrollView" destination="rey-N3-l8b" id="s3w-fi-n5l"/> | 23 | <outlet property="scrollView" destination="rey-N3-l8b" id="s3w-fi-n5l"/> |
| 24 | <outlet property="tableBase" destination="FXQ-4O-sRc" id="UHy-Nk-f7u"/> | 24 | <outlet property="tableBase" destination="FXQ-4O-sRc" id="UHy-Nk-f7u"/> |
| 25 | <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> | 25 | <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> |
| 26 | <outlet property="viewBarChart" destination="VqD-Y3-cYQ" id="RdJ-G5-pPy"/> | 26 | <outlet property="viewBarChart" destination="VqD-Y3-cYQ" id="RdJ-G5-pPy"/> |
| 27 | <outlet property="viewCollectionMode" destination="BVv-qD-EHM" id="A6n-32-oxg"/> | 27 | <outlet property="viewCollectionMode" destination="BVv-qD-EHM" id="A6n-32-oxg"/> |
| 28 | <outlet property="viewCollectionShare" destination="Iw2-nW-e7g" id="LW3-j0-yEY"/> | 28 | <outlet property="viewCollectionShare" destination="Iw2-nW-e7g" id="LW3-j0-yEY"/> |
| 29 | <outlet property="viewCollectionType" destination="yxY-4d-tB6" id="K1D-Gc-kWV"/> | 29 | <outlet property="viewCollectionType" destination="yxY-4d-tB6" id="K1D-Gc-kWV"/> |
| 30 | </connections> | 30 | </connections> |
| 31 | </placeholder> | 31 | </placeholder> |
| 32 | <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | 32 | <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> |
| 33 | <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> | 33 | <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> |
| 34 | <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | 34 | <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
| 35 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | 35 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
| 36 | <subviews> | 36 | <subviews> |
| 37 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="clL-JG-rbd" userLabel="ViewHeader"> | 37 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="clL-JG-rbd" userLabel="ViewHeader"> |
| 38 | <rect key="frame" x="0.0" y="0.0" width="375" height="46"/> | 38 | <rect key="frame" x="0.0" y="0.0" width="375" height="46"/> |
| 39 | <subviews> | 39 | <subviews> |
| 40 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="履歴" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ht6-rd-JXF" customClass="AutoTransLabel"> | 40 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="履歴" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ht6-rd-JXF" customClass="AutoTransLabel"> |
| 41 | <rect key="frame" x="0.0" y="0.0" width="375" height="46"/> | 41 | <rect key="frame" x="0.0" y="0.0" width="375" height="46"/> |
| 42 | <fontDescription key="fontDescription" type="system" pointSize="17"/> | 42 | <fontDescription key="fontDescription" type="system" pointSize="17"/> |
| 43 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 43 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 44 | <nil key="highlightedColor"/> | 44 | <nil key="highlightedColor"/> |
| 45 | <userDefinedRuntimeAttributes> | 45 | <userDefinedRuntimeAttributes> |
| 46 | <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title"/> | 46 | <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title"/> |
| 47 | </userDefinedRuntimeAttributes> | 47 | </userDefinedRuntimeAttributes> |
| 48 | </label> | 48 | </label> |
| 49 | <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ytc-zM-ZGC"> | 49 | <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ytc-zM-ZGC"> |
| 50 | <rect key="frame" x="0.0" y="5" width="70" height="36"/> | 50 | <rect key="frame" x="0.0" y="5" width="70" height="36"/> |
| 51 | <constraints> | 51 | <constraints> |
| 52 | <constraint firstAttribute="width" constant="70" id="xAE-oP-WEf"/> | 52 | <constraint firstAttribute="width" constant="70" id="xAE-oP-WEf"/> |
| 53 | </constraints> | 53 | </constraints> |
| 54 | <state key="normal" image="today_back_button"/> | 54 | <state key="normal" image="today_back_button"/> |
| 55 | </button> | 55 | </button> |
| 56 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CFx-sO-MAH"> | 56 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CFx-sO-MAH"> |
| 57 | <rect key="frame" x="330" y="0.0" width="45" height="46"/> | 57 | <rect key="frame" x="330" y="0.0" width="45" height="46"/> |
| 58 | <constraints> | 58 | <constraints> |
| 59 | <constraint firstAttribute="width" constant="45" id="V0g-Ii-pNQ"/> | 59 | <constraint firstAttribute="width" constant="45" id="V0g-Ii-pNQ"/> |
| 60 | </constraints> | 60 | </constraints> |
| 61 | <state key="normal" image="icon_menu"/> | 61 | <state key="normal" image="icon_menu"/> |
| 62 | </button> | 62 | </button> |
| 63 | </subviews> | 63 | </subviews> |
| 64 | <color key="backgroundColor" red="0.098039215686274508" green="0.098039215686274508" blue="0.098039215686274508" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | 64 | <color key="backgroundColor" red="0.098039215686274508" green="0.098039215686274508" blue="0.098039215686274508" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| 65 | <constraints> | 65 | <constraints> |
| 66 | <constraint firstAttribute="trailing" secondItem="Ht6-rd-JXF" secondAttribute="trailing" id="Fr9-Yj-q5e"/> | 66 | <constraint firstAttribute="trailing" secondItem="Ht6-rd-JXF" secondAttribute="trailing" id="Fr9-Yj-q5e"/> |
| 67 | <constraint firstItem="ytc-zM-ZGC" firstAttribute="leading" secondItem="clL-JG-rbd" secondAttribute="leading" id="LDb-Pq-Z5k"/> | 67 | <constraint firstItem="ytc-zM-ZGC" firstAttribute="leading" secondItem="clL-JG-rbd" secondAttribute="leading" id="LDb-Pq-Z5k"/> |
| 68 | <constraint firstAttribute="trailing" secondItem="CFx-sO-MAH" secondAttribute="trailing" id="PTh-vI-2DI"/> | 68 | <constraint firstAttribute="trailing" secondItem="CFx-sO-MAH" secondAttribute="trailing" id="PTh-vI-2DI"/> |
| 69 | <constraint firstItem="Ht6-rd-JXF" firstAttribute="top" secondItem="clL-JG-rbd" secondAttribute="top" id="URG-nj-C2r"/> | 69 | <constraint firstItem="Ht6-rd-JXF" firstAttribute="top" secondItem="clL-JG-rbd" secondAttribute="top" id="URG-nj-C2r"/> |
| 70 | <constraint firstItem="CFx-sO-MAH" firstAttribute="top" secondItem="clL-JG-rbd" secondAttribute="top" id="Uxg-Wl-DlF"/> | 70 | <constraint firstItem="CFx-sO-MAH" firstAttribute="top" secondItem="clL-JG-rbd" secondAttribute="top" id="Uxg-Wl-DlF"/> |
| 71 | <constraint firstAttribute="bottom" secondItem="CFx-sO-MAH" secondAttribute="bottom" id="X9D-m3-QXF"/> | 71 | <constraint firstAttribute="bottom" secondItem="CFx-sO-MAH" secondAttribute="bottom" id="X9D-m3-QXF"/> |
| 72 | <constraint firstAttribute="bottom" secondItem="ytc-zM-ZGC" secondAttribute="bottom" constant="5" id="hWb-ga-1wm"/> | 72 | <constraint firstAttribute="bottom" secondItem="ytc-zM-ZGC" secondAttribute="bottom" constant="5" id="hWb-ga-1wm"/> |
| 73 | <constraint firstAttribute="bottom" secondItem="Ht6-rd-JXF" secondAttribute="bottom" id="iqI-Bi-QI1"/> | 73 | <constraint firstAttribute="bottom" secondItem="Ht6-rd-JXF" secondAttribute="bottom" id="iqI-Bi-QI1"/> |
| 74 | <constraint firstItem="Ht6-rd-JXF" firstAttribute="leading" secondItem="clL-JG-rbd" secondAttribute="leading" id="uzc-SO-7mw"/> | 74 | <constraint firstItem="Ht6-rd-JXF" firstAttribute="leading" secondItem="clL-JG-rbd" secondAttribute="leading" id="uzc-SO-7mw"/> |
| 75 | <constraint firstItem="ytc-zM-ZGC" firstAttribute="top" secondItem="clL-JG-rbd" secondAttribute="top" constant="5" id="vFt-FE-klC"/> | 75 | <constraint firstItem="ytc-zM-ZGC" firstAttribute="top" secondItem="clL-JG-rbd" secondAttribute="top" constant="5" id="vFt-FE-klC"/> |
| 76 | <constraint firstAttribute="height" constant="46" id="xGd-BD-bgs"/> | 76 | <constraint firstAttribute="height" constant="46" id="xGd-BD-bgs"/> |
| 77 | </constraints> | 77 | </constraints> |
| 78 | </view> | 78 | </view> |
| 79 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Cf1-lP-zbB" userLabel="ViewTime"> | 79 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Cf1-lP-zbB" userLabel="ViewTime"> |
| 80 | <rect key="frame" x="10" y="46" width="355" height="35"/> | 80 | <rect key="frame" x="10" y="46" width="355" height="35"/> |
| 81 | <subviews> | 81 | <subviews> |
| 82 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6T2-M9-9wV"> | 82 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6T2-M9-9wV"> |
| 83 | <rect key="frame" x="0.0" y="0.0" width="35" height="35"/> | 83 | <rect key="frame" x="0.0" y="0.0" width="35" height="35"/> |
| 84 | <constraints> | 84 | <constraints> |
| 85 | <constraint firstAttribute="width" secondItem="6T2-M9-9wV" secondAttribute="height" multiplier="1:1" id="RlM-6u-eer"/> | 85 | <constraint firstAttribute="width" secondItem="6T2-M9-9wV" secondAttribute="height" multiplier="1:1" id="RlM-6u-eer"/> |
| 86 | </constraints> | 86 | </constraints> |
| 87 | <state key="normal" backgroundImage="arrow_back"/> | 87 | <state key="normal" backgroundImage="arrow_back"/> |
| 88 | <connections> | 88 | <connections> |
| 89 | <action selector="clickBackward:" destination="-1" eventType="touchUpInside" id="pwN-yT-qyp"/> | 89 | <action selector="clickBackward:" destination="-1" eventType="touchUpInside" id="pwN-yT-qyp"/> |
| 90 | </connections> | 90 | </connections> |
| 91 | </button> | 91 | </button> |
| 92 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Cwb-8M-pDi"> | 92 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Cwb-8M-pDi"> |
| 93 | <rect key="frame" x="320" y="0.0" width="35" height="35"/> | 93 | <rect key="frame" x="320" y="0.0" width="35" height="35"/> |
| 94 | <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 94 | <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 95 | <state key="normal" backgroundImage="arrow_next"/> | 95 | <state key="normal" backgroundImage="arrow_next"/> |
| 96 | <connections> | 96 | <connections> |
| 97 | <action selector="clickForward:" destination="-1" eventType="touchUpInside" id="1NC-km-Lfe"/> | 97 | <action selector="clickForward:" destination="-1" eventType="touchUpInside" id="1NC-km-Lfe"/> |
| 98 | </connections> | 98 | </connections> |
| 99 | </button> | 99 | </button> |
| 100 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2017年1月1日 日曜日" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EM7-vA-s1e"> | 100 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2017年1月1日 日曜日" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EM7-vA-s1e"> |
| 101 | <rect key="frame" x="40" y="2" width="275" height="31"/> | 101 | <rect key="frame" x="40" y="2" width="275" height="31"/> |
| 102 | <fontDescription key="fontDescription" type="system" pointSize="17"/> | 102 | <fontDescription key="fontDescription" type="system" pointSize="17"/> |
| 103 | <nil key="textColor"/> | 103 | <nil key="textColor"/> |
| 104 | <nil key="highlightedColor"/> | 104 | <nil key="highlightedColor"/> |
| 105 | </label> | 105 | </label> |
| 106 | </subviews> | 106 | </subviews> |
| 107 | <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 107 | <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 108 | <constraints> | 108 | <constraints> |
| 109 | <constraint firstItem="Cwb-8M-pDi" firstAttribute="top" secondItem="Cf1-lP-zbB" secondAttribute="top" id="4Jr-r7-y6d"/> | 109 | <constraint firstItem="Cwb-8M-pDi" firstAttribute="top" secondItem="Cf1-lP-zbB" secondAttribute="top" id="4Jr-r7-y6d"/> |
| 110 | <constraint firstAttribute="bottom" secondItem="6T2-M9-9wV" secondAttribute="bottom" id="8bU-NI-m32"/> | 110 | <constraint firstAttribute="bottom" secondItem="6T2-M9-9wV" secondAttribute="bottom" id="8bU-NI-m32"/> |
| 111 | <constraint firstItem="EM7-vA-s1e" firstAttribute="leading" secondItem="6T2-M9-9wV" secondAttribute="trailing" constant="5" id="9G1-I6-nSV"/> | 111 | <constraint firstItem="EM7-vA-s1e" firstAttribute="leading" secondItem="6T2-M9-9wV" secondAttribute="trailing" constant="5" id="9G1-I6-nSV"/> |
| 112 | <constraint firstItem="EM7-vA-s1e" firstAttribute="top" secondItem="Cf1-lP-zbB" secondAttribute="top" constant="2" id="9Yk-sv-gkx"/> | 112 | <constraint firstItem="EM7-vA-s1e" firstAttribute="top" secondItem="Cf1-lP-zbB" secondAttribute="top" constant="2" id="9Yk-sv-gkx"/> |
| 113 | <constraint firstItem="Cwb-8M-pDi" firstAttribute="leading" secondItem="EM7-vA-s1e" secondAttribute="trailing" constant="5" id="JQI-18-cWP"/> | 113 | <constraint firstItem="Cwb-8M-pDi" firstAttribute="leading" secondItem="EM7-vA-s1e" secondAttribute="trailing" constant="5" id="JQI-18-cWP"/> |
| 114 | <constraint firstAttribute="height" constant="35" id="Pdg-IR-g8y"/> | 114 | <constraint firstAttribute="height" constant="35" id="Pdg-IR-g8y"/> |
| 115 | <constraint firstItem="6T2-M9-9wV" firstAttribute="leading" secondItem="Cf1-lP-zbB" secondAttribute="leading" id="Pgh-zZ-vrG"/> | 115 | <constraint firstItem="6T2-M9-9wV" firstAttribute="leading" secondItem="Cf1-lP-zbB" secondAttribute="leading" id="Pgh-zZ-vrG"/> |
| 116 | <constraint firstAttribute="bottom" secondItem="Cwb-8M-pDi" secondAttribute="bottom" id="WWs-Ey-osm"/> | 116 | <constraint firstAttribute="bottom" secondItem="Cwb-8M-pDi" secondAttribute="bottom" id="WWs-Ey-osm"/> |
| 117 | <constraint firstItem="Cwb-8M-pDi" firstAttribute="width" secondItem="Cwb-8M-pDi" secondAttribute="height" multiplier="1:1" id="YHa-MU-GKi"/> | 117 | <constraint firstItem="Cwb-8M-pDi" firstAttribute="width" secondItem="Cwb-8M-pDi" secondAttribute="height" multiplier="1:1" id="YHa-MU-GKi"/> |
| 118 | <constraint firstItem="6T2-M9-9wV" firstAttribute="top" secondItem="Cf1-lP-zbB" secondAttribute="top" id="fiM-o3-Us0"/> | 118 | <constraint firstItem="6T2-M9-9wV" firstAttribute="top" secondItem="Cf1-lP-zbB" secondAttribute="top" id="fiM-o3-Us0"/> |
| 119 | <constraint firstAttribute="trailing" secondItem="Cwb-8M-pDi" secondAttribute="trailing" id="oCE-RP-EmX"/> | 119 | <constraint firstAttribute="trailing" secondItem="Cwb-8M-pDi" secondAttribute="trailing" id="oCE-RP-EmX"/> |
| 120 | <constraint firstAttribute="bottom" secondItem="EM7-vA-s1e" secondAttribute="bottom" constant="2" id="oOd-ip-MZy"/> | 120 | <constraint firstAttribute="bottom" secondItem="EM7-vA-s1e" secondAttribute="bottom" constant="2" id="oOd-ip-MZy"/> |
| 121 | </constraints> | 121 | </constraints> |
| 122 | </view> | 122 | </view> |
| 123 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yxY-4d-tB6" customClass="CollectionView"> | 123 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yxY-4d-tB6" customClass="CollectionView"> |
| 124 | <rect key="frame" x="2" y="96" width="371" height="40"/> | 124 | <rect key="frame" x="2" y="96" width="371" height="40"/> |
| 125 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | 125 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
| 126 | <constraints> | 126 | <constraints> |
| 127 | <constraint firstAttribute="height" constant="40" id="U7Q-wa-CDi"/> | 127 | <constraint firstAttribute="height" constant="40" id="U7Q-wa-CDi"/> |
| 128 | </constraints> | 128 | </constraints> |
| 129 | </view> | 129 | </view> |
| 130 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BVv-qD-EHM" customClass="CollectionView"> | 130 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BVv-qD-EHM" customClass="CollectionView"> |
| 131 | <rect key="frame" x="0.0" y="577" width="375" height="40"/> | 131 | <rect key="frame" x="0.0" y="577" width="375" height="40"/> |
| 132 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | 132 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
| 133 | <constraints> | 133 | <constraints> |
| 134 | <constraint firstAttribute="height" constant="40" id="6wc-NQ-UAH"/> | 134 | <constraint firstAttribute="height" constant="40" id="6wc-NQ-UAH"/> |
| 135 | </constraints> | 135 | </constraints> |
| 136 | </view> | 136 | </view> |
| 137 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FLa-rV-Aas" userLabel="ViewContent"> | 137 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FLa-rV-Aas" userLabel="ViewContent"> |
| 138 | <rect key="frame" x="0.0" y="151" width="375" height="421"/> | 138 | <rect key="frame" x="0.0" y="151" width="375" height="421"/> |
| 139 | <subviews> | 139 | <subviews> |
| 140 | <tableView clipsSubviews="YES" alpha="0.0" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="100" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="FXQ-4O-sRc"> | 140 | <tableView clipsSubviews="YES" alpha="0.0" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="100" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="FXQ-4O-sRc"> |
| 141 | <rect key="frame" x="5" y="0.0" width="365" height="421"/> | 141 | <rect key="frame" x="5" y="0.0" width="365" height="421"/> |
| 142 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | 142 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
| 143 | <connections> | 143 | <connections> |
| 144 | <outlet property="dataSource" destination="-1" id="GQy-lg-1Af"/> | 144 | <outlet property="dataSource" destination="-1" id="GQy-lg-1Af"/> |
| 145 | <outlet property="delegate" destination="-1" id="Jka-Ij-zNq"/> | 145 | <outlet property="delegate" destination="-1" id="Jka-Ij-zNq"/> |
| 146 | </connections> | 146 | </connections> |
| 147 | </tableView> | 147 | </tableView> |
| 148 | <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rey-N3-l8b"> | 148 | <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rey-N3-l8b"> |
| 149 | <rect key="frame" x="0.0" y="0.0" width="375" height="421"/> | 149 | <rect key="frame" x="0.0" y="0.0" width="375" height="421"/> |
| 150 | <subviews> | 150 | <subviews> |
| 151 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Cam-ML-IEO"> | 151 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Cam-ML-IEO"> |
| 152 | <rect key="frame" x="0.0" y="0.0" width="375" height="421"/> | 152 | <rect key="frame" x="0.0" y="0.0" width="375" height="421"/> |
| 153 | <subviews> | 153 | <subviews> |
| 154 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Kzk-mN-AOf"> | 154 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Kzk-mN-AOf"> |
| 155 | <rect key="frame" x="20" y="30" width="120" height="120"/> | 155 | <rect key="frame" x="20" y="30" width="120" height="120"/> |
| 156 | <subviews> | 156 | <subviews> |
| 157 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="500 step" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oWg-A8-aCr"> | 157 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0 step" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oWg-A8-aCr"> |
| 158 | <rect key="frame" x="18" y="35" width="82" height="21"/> | 158 | <rect key="frame" x="18" y="35" width="82" height="21"/> |
| 159 | <constraints> | 159 | <constraints> |
| 160 | <constraint firstAttribute="height" constant="21" id="zOX-0d-IVv"/> | 160 | <constraint firstAttribute="height" constant="21" id="zOX-0d-IVv"/> |
| 161 | </constraints> | 161 | </constraints> |
| 162 | <fontDescription key="fontDescription" type="system" pointSize="17"/> | 162 | <fontDescription key="fontDescription" type="system" pointSize="17"/> |
| 163 | <nil key="textColor"/> | 163 | <nil key="textColor"/> |
| 164 | <nil key="highlightedColor"/> | 164 | <nil key="highlightedColor"/> |
| 165 | </label> | 165 | </label> |
| 166 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Kr7-S0-Fpl"> | 166 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Kr7-S0-Fpl"> |
| 167 | <rect key="frame" x="20" y="61" width="80" height="42"/> | 167 | <rect key="frame" x="20" y="61" width="80" height="42"/> |
| 168 | <constraints> | 168 | <constraints> |
| 169 | <constraint firstAttribute="width" constant="80" id="IOc-sB-dA2"/> | 169 | <constraint firstAttribute="width" constant="80" id="IOc-sB-dA2"/> |
| 170 | <constraint firstAttribute="height" constant="42" id="zRP-Fu-qZ9"/> | 170 | <constraint firstAttribute="height" constant="42" id="zRP-Fu-qZ9"/> |
| 171 | </constraints> | 171 | </constraints> |
| 172 | <string key="text">目標まであと | 172 | <string key="text">目標まであと |
| 173 | 500 stepです</string> | 173 | 0 stepです</string> |
| 174 | <fontDescription key="fontDescription" type="system" pointSize="11"/> | 174 | <fontDescription key="fontDescription" type="system" pointSize="11"/> |
| 175 | <nil key="textColor"/> | 175 | <nil key="textColor"/> |
| 176 | <nil key="highlightedColor"/> | 176 | <nil key="highlightedColor"/> |
| 177 | </label> | 177 | </label> |
| 178 | </subviews> | 178 | </subviews> |
| 179 | <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 179 | <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 180 | <constraints> | 180 | <constraints> |
| 181 | <constraint firstItem="Kr7-S0-Fpl" firstAttribute="top" secondItem="oWg-A8-aCr" secondAttribute="bottom" constant="5" id="2KK-Lm-h74"/> | 181 | <constraint firstItem="Kr7-S0-Fpl" firstAttribute="top" secondItem="oWg-A8-aCr" secondAttribute="bottom" constant="5" id="2KK-Lm-h74"/> |
| 182 | <constraint firstItem="oWg-A8-aCr" firstAttribute="leading" secondItem="Kzk-mN-AOf" secondAttribute="leading" constant="18" id="CdG-qa-ud5"/> | 182 | <constraint firstItem="oWg-A8-aCr" firstAttribute="leading" secondItem="Kzk-mN-AOf" secondAttribute="leading" constant="18" id="CdG-qa-ud5"/> |
| 183 | <constraint firstAttribute="width" constant="120" id="E48-cC-dsc"/> | 183 | <constraint firstAttribute="width" constant="120" id="E48-cC-dsc"/> |
| 184 | <constraint firstAttribute="height" constant="120" id="SlY-sr-tR9"/> | 184 | <constraint firstAttribute="height" constant="120" id="SlY-sr-tR9"/> |
| 185 | <constraint firstItem="Kr7-S0-Fpl" firstAttribute="centerX" secondItem="Kzk-mN-AOf" secondAttribute="centerX" id="jJV-RH-pk1"/> | 185 | <constraint firstItem="Kr7-S0-Fpl" firstAttribute="centerX" secondItem="Kzk-mN-AOf" secondAttribute="centerX" id="jJV-RH-pk1"/> |
| 186 | <constraint firstItem="oWg-A8-aCr" firstAttribute="top" secondItem="Kzk-mN-AOf" secondAttribute="top" constant="35" id="oBl-zo-td5"/> | 186 | <constraint firstItem="oWg-A8-aCr" firstAttribute="top" secondItem="Kzk-mN-AOf" secondAttribute="top" constant="35" id="oBl-zo-td5"/> |
| 187 | <constraint firstAttribute="trailing" secondItem="oWg-A8-aCr" secondAttribute="trailing" constant="20" id="xgh-d4-jOF"/> | 187 | <constraint firstAttribute="trailing" secondItem="oWg-A8-aCr" secondAttribute="trailing" constant="20" id="xgh-d4-jOF"/> |
| 188 | </constraints> | 188 | </constraints> |
| 189 | <userDefinedRuntimeAttributes> | 189 | <userDefinedRuntimeAttributes> |
| 190 | <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> | 190 | <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> |
| 191 | <integer key="value" value="60"/> | 191 | <integer key="value" value="60"/> |
| 192 | </userDefinedRuntimeAttribute> | 192 | </userDefinedRuntimeAttribute> |
| 193 | </userDefinedRuntimeAttributes> | 193 | </userDefinedRuntimeAttributes> |
| 194 | </view> | 194 | </view> |
| 195 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4ix-HE-d9T"> | 195 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4ix-HE-d9T"> |
| 196 | <rect key="frame" x="148" y="30" width="219" height="120"/> | 196 | <rect key="frame" x="148" y="30" width="219" height="120"/> |
| 197 | <subviews> | 197 | <subviews> |
| 198 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="目標" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YE6-wh-77T" customClass="AutoTransLabel"> | 198 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="目標" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YE6-wh-77T" customClass="AutoTransLabel"> |
| 199 | <rect key="frame" x="10" y="38" width="45" height="15"/> | 199 | <rect key="frame" x="10" y="38" width="45" height="15"/> |
| 200 | <constraints> | 200 | <constraints> |
| 201 | <constraint firstAttribute="width" constant="45" id="6Ce-YE-wbx"/> | 201 | <constraint firstAttribute="width" constant="45" id="6Ce-YE-wbx"/> |
| 202 | <constraint firstAttribute="height" constant="15" id="eFR-Ao-75U"/> | 202 | <constraint firstAttribute="height" constant="15" id="eFR-Ao-75U"/> |
| 203 | </constraints> | 203 | </constraints> |
| 204 | <fontDescription key="fontDescription" type="system" pointSize="12"/> | 204 | <fontDescription key="fontDescription" type="system" pointSize="12"/> |
| 205 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 205 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 206 | <nil key="highlightedColor"/> | 206 | <nil key="highlightedColor"/> |
| 207 | <userDefinedRuntimeAttributes> | 207 | <userDefinedRuntimeAttributes> |
| 208 | <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.total"/> | 208 | <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.total"/> |
| 209 | </userDefinedRuntimeAttributes> | 209 | </userDefinedRuntimeAttributes> |
| 210 | </label> | 210 | </label> |
| 211 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="残歩数" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HOl-Tj-xiT" customClass="AutoTransLabel"> | 211 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="残歩数" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HOl-Tj-xiT" customClass="AutoTransLabel"> |
| 212 | <rect key="frame" x="10" y="53" width="45" height="15"/> | 212 | <rect key="frame" x="10" y="53" width="45" height="15"/> |
| 213 | <fontDescription key="fontDescription" type="system" pointSize="12"/> | 213 | <fontDescription key="fontDescription" type="system" pointSize="12"/> |
| 214 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 214 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 215 | <nil key="highlightedColor"/> | 215 | <nil key="highlightedColor"/> |
| 216 | <userDefinedRuntimeAttributes> | 216 | <userDefinedRuntimeAttributes> |
| 217 | <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.remaining"/> | 217 | <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.remaining"/> |
| 218 | </userDefinedRuntimeAttributes> | 218 | </userDefinedRuntimeAttributes> |
| 219 | </label> | 219 | </label> |
| 220 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="達成率" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="l0h-qA-2Ai" customClass="AutoTransLabel"> | 220 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="達成率" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="l0h-qA-2Ai" customClass="AutoTransLabel"> |
| 221 | <rect key="frame" x="10" y="68" width="45" height="15"/> | 221 | <rect key="frame" x="10" y="68" width="45" height="15"/> |
| 222 | <fontDescription key="fontDescription" type="system" pointSize="12"/> | 222 | <fontDescription key="fontDescription" type="system" pointSize="12"/> |
| 223 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 223 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 224 | <nil key="highlightedColor"/> | 224 | <nil key="highlightedColor"/> |
| 225 | <userDefinedRuntimeAttributes> | 225 | <userDefinedRuntimeAttributes> |
| 226 | <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.percent"/> | 226 | <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.percent"/> |
| 227 | </userDefinedRuntimeAttributes> | 227 | </userDefinedRuntimeAttributes> |
| 228 | </label> | 228 | </label> |
| 229 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1000 step" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0pf-fX-QXT"> | 229 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0 step" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0pf-fX-QXT"> |
| 230 | <rect key="frame" x="63" y="38" width="118" height="15"/> | 230 | <rect key="frame" x="63" y="38" width="118" height="15"/> |
| 231 | <constraints> | 231 | <constraints> |
| 232 | <constraint firstAttribute="height" constant="15" id="Z6o-LI-Eu9"/> | 232 | <constraint firstAttribute="height" constant="15" id="Z6o-LI-Eu9"/> |
| 233 | </constraints> | 233 | </constraints> |
| 234 | <fontDescription key="fontDescription" type="system" pointSize="12"/> | 234 | <fontDescription key="fontDescription" type="system" pointSize="12"/> |
| 235 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 235 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 236 | <nil key="highlightedColor"/> | 236 | <nil key="highlightedColor"/> |
| 237 | </label> | 237 | </label> |
| 238 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="500 step" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1NH-b3-ST8"> | 238 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0 step" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1NH-b3-ST8"> |
| 239 | <rect key="frame" x="63" y="53" width="118" height="15"/> | 239 | <rect key="frame" x="63" y="53" width="118" height="15"/> |
| 240 | <fontDescription key="fontDescription" type="system" pointSize="12"/> | 240 | <fontDescription key="fontDescription" type="system" pointSize="12"/> |
| 241 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 241 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 242 | <nil key="highlightedColor"/> | 242 | <nil key="highlightedColor"/> |
| 243 | </label> | 243 | </label> |
| 244 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="50 %" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Ru-Jc-Ouv"> | 244 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0 %" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Ru-Jc-Ouv"> |
| 245 | <rect key="frame" x="63" y="68" width="118" height="15"/> | 245 | <rect key="frame" x="63" y="68" width="118" height="15"/> |
| 246 | <fontDescription key="fontDescription" type="system" pointSize="12"/> | 246 | <fontDescription key="fontDescription" type="system" pointSize="12"/> |
| 247 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 247 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 248 | <nil key="highlightedColor"/> | 248 | <nil key="highlightedColor"/> |
| 249 | </label> | 249 | </label> |
| 250 | </subviews> | 250 | </subviews> |
| 251 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | 251 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
| 252 | <constraints> | 252 | <constraints> |
| 253 | <constraint firstItem="l0h-qA-2Ai" firstAttribute="top" secondItem="HOl-Tj-xiT" secondAttribute="bottom" id="0dv-3h-eHs"/> | 253 | <constraint firstItem="l0h-qA-2Ai" firstAttribute="top" secondItem="HOl-Tj-xiT" secondAttribute="bottom" id="0dv-3h-eHs"/> |
| 254 | <constraint firstItem="l0h-qA-2Ai" firstAttribute="leading" secondItem="YE6-wh-77T" secondAttribute="leading" id="7z3-ph-BM4"/> | 254 | <constraint firstItem="l0h-qA-2Ai" firstAttribute="leading" secondItem="YE6-wh-77T" secondAttribute="leading" id="7z3-ph-BM4"/> |
| 255 | <constraint firstItem="1NH-b3-ST8" firstAttribute="leading" secondItem="0pf-fX-QXT" secondAttribute="leading" id="ACu-BV-ieg"/> | 255 | <constraint firstItem="1NH-b3-ST8" firstAttribute="leading" secondItem="0pf-fX-QXT" secondAttribute="leading" id="ACu-BV-ieg"/> |
| 256 | <constraint firstItem="8Ru-Jc-Ouv" firstAttribute="top" secondItem="1NH-b3-ST8" secondAttribute="bottom" id="Abh-FK-4X7"/> | 256 | <constraint firstItem="8Ru-Jc-Ouv" firstAttribute="top" secondItem="1NH-b3-ST8" secondAttribute="bottom" id="Abh-FK-4X7"/> |
| 257 | <constraint firstItem="1NH-b3-ST8" firstAttribute="top" secondItem="0pf-fX-QXT" secondAttribute="bottom" id="B3I-n2-Oks"/> | 257 | <constraint firstItem="1NH-b3-ST8" firstAttribute="top" secondItem="0pf-fX-QXT" secondAttribute="bottom" id="B3I-n2-Oks"/> |
| 258 | <constraint firstItem="1NH-b3-ST8" firstAttribute="height" secondItem="0pf-fX-QXT" secondAttribute="height" id="BAn-7O-jBX"/> | 258 | <constraint firstItem="1NH-b3-ST8" firstAttribute="height" secondItem="0pf-fX-QXT" secondAttribute="height" id="BAn-7O-jBX"/> |
| 259 | <constraint firstItem="0pf-fX-QXT" firstAttribute="leading" secondItem="YE6-wh-77T" secondAttribute="trailing" constant="8" id="G20-xx-HEH"/> | 259 | <constraint firstItem="0pf-fX-QXT" firstAttribute="leading" secondItem="YE6-wh-77T" secondAttribute="trailing" constant="8" id="G20-xx-HEH"/> |
| 260 | <constraint firstItem="8Ru-Jc-Ouv" firstAttribute="leading" secondItem="0pf-fX-QXT" secondAttribute="leading" id="NIm-Zw-fnf"/> | 260 | <constraint firstItem="8Ru-Jc-Ouv" firstAttribute="leading" secondItem="0pf-fX-QXT" secondAttribute="leading" id="NIm-Zw-fnf"/> |
| 261 | <constraint firstItem="8Ru-Jc-Ouv" firstAttribute="height" secondItem="0pf-fX-QXT" secondAttribute="height" id="PdQ-qd-Sqc"/> | 261 | <constraint firstItem="8Ru-Jc-Ouv" firstAttribute="height" secondItem="0pf-fX-QXT" secondAttribute="height" id="PdQ-qd-Sqc"/> |
| 262 | <constraint firstItem="HOl-Tj-xiT" firstAttribute="width" secondItem="YE6-wh-77T" secondAttribute="width" id="WpC-o9-bDa"/> | 262 | <constraint firstItem="HOl-Tj-xiT" firstAttribute="width" secondItem="YE6-wh-77T" secondAttribute="width" id="WpC-o9-bDa"/> |
| 263 | <constraint firstItem="l0h-qA-2Ai" firstAttribute="height" secondItem="YE6-wh-77T" secondAttribute="height" id="bR8-Ki-lS1"/> | 263 | <constraint firstItem="l0h-qA-2Ai" firstAttribute="height" secondItem="YE6-wh-77T" secondAttribute="height" id="bR8-Ki-lS1"/> |
| 264 | <constraint firstItem="HOl-Tj-xiT" firstAttribute="height" secondItem="YE6-wh-77T" secondAttribute="height" id="c0u-hz-5O9"/> | 264 | <constraint firstItem="HOl-Tj-xiT" firstAttribute="height" secondItem="YE6-wh-77T" secondAttribute="height" id="c0u-hz-5O9"/> |
| 265 | <constraint firstItem="1NH-b3-ST8" firstAttribute="leading" secondItem="0pf-fX-QXT" secondAttribute="leading" id="chf-kb-ClX"/> | 265 | <constraint firstItem="1NH-b3-ST8" firstAttribute="leading" secondItem="0pf-fX-QXT" secondAttribute="leading" id="chf-kb-ClX"/> |
| 266 | <constraint firstItem="8Ru-Jc-Ouv" firstAttribute="leading" secondItem="0pf-fX-QXT" secondAttribute="leading" id="din-4T-V5w"/> | 266 | <constraint firstItem="8Ru-Jc-Ouv" firstAttribute="leading" secondItem="0pf-fX-QXT" secondAttribute="leading" id="din-4T-V5w"/> |
| 267 | <constraint firstItem="l0h-qA-2Ai" firstAttribute="width" secondItem="YE6-wh-77T" secondAttribute="width" id="eo0-xw-d1f"/> | 267 | <constraint firstItem="l0h-qA-2Ai" firstAttribute="width" secondItem="YE6-wh-77T" secondAttribute="width" id="eo0-xw-d1f"/> |
| 268 | <constraint firstItem="8Ru-Jc-Ouv" firstAttribute="width" secondItem="0pf-fX-QXT" secondAttribute="width" id="gjt-3e-Pkx"/> | 268 | <constraint firstItem="8Ru-Jc-Ouv" firstAttribute="width" secondItem="0pf-fX-QXT" secondAttribute="width" id="gjt-3e-Pkx"/> |
| 269 | <constraint firstItem="1NH-b3-ST8" firstAttribute="width" secondItem="0pf-fX-QXT" secondAttribute="width" id="kOM-6S-Amv"/> | 269 | <constraint firstItem="1NH-b3-ST8" firstAttribute="width" secondItem="0pf-fX-QXT" secondAttribute="width" id="kOM-6S-Amv"/> |
| 270 | <constraint firstItem="HOl-Tj-xiT" firstAttribute="leading" secondItem="YE6-wh-77T" secondAttribute="leading" id="oOc-TB-k4j"/> | 270 | <constraint firstItem="HOl-Tj-xiT" firstAttribute="leading" secondItem="YE6-wh-77T" secondAttribute="leading" id="oOc-TB-k4j"/> |
| 271 | <constraint firstItem="1NH-b3-ST8" firstAttribute="centerY" secondItem="HOl-Tj-xiT" secondAttribute="centerY" id="pGW-dw-56G"/> | 271 | <constraint firstItem="1NH-b3-ST8" firstAttribute="centerY" secondItem="HOl-Tj-xiT" secondAttribute="centerY" id="pGW-dw-56G"/> |
| 272 | <constraint firstItem="HOl-Tj-xiT" firstAttribute="top" secondItem="YE6-wh-77T" secondAttribute="bottom" id="s6n-mU-Sp6"/> | 272 | <constraint firstItem="HOl-Tj-xiT" firstAttribute="top" secondItem="YE6-wh-77T" secondAttribute="bottom" id="s6n-mU-Sp6"/> |
| 273 | <constraint firstItem="HOl-Tj-xiT" firstAttribute="centerY" secondItem="4ix-HE-d9T" secondAttribute="centerY" id="vB9-RR-pao"/> | 273 | <constraint firstItem="HOl-Tj-xiT" firstAttribute="centerY" secondItem="4ix-HE-d9T" secondAttribute="centerY" id="vB9-RR-pao"/> |
| 274 | <constraint firstAttribute="trailing" secondItem="0pf-fX-QXT" secondAttribute="trailing" constant="38" id="xiP-fg-Ozi"/> | 274 | <constraint firstAttribute="trailing" secondItem="0pf-fX-QXT" secondAttribute="trailing" constant="38" id="xiP-fg-Ozi"/> |
| 275 | <constraint firstItem="YE6-wh-77T" firstAttribute="leading" secondItem="4ix-HE-d9T" secondAttribute="leading" constant="10" id="xj6-In-ihz"/> | 275 | <constraint firstItem="YE6-wh-77T" firstAttribute="leading" secondItem="4ix-HE-d9T" secondAttribute="leading" constant="10" id="xj6-In-ihz"/> |
| 276 | </constraints> | 276 | </constraints> |
| 277 | </view> | 277 | </view> |
| 278 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iEh-Ze-suq"> | 278 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iEh-Ze-suq"> |
| 279 | <rect key="frame" x="20" y="158" width="335" height="35"/> | 279 | <rect key="frame" x="20" y="158" width="335" height="35"/> |
| 280 | <subviews> | 280 | <subviews> |
| 281 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UwA-5Q-gdv"> | 281 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UwA-5Q-gdv"> |
| 282 | <rect key="frame" x="0.0" y="0.0" width="111.5" height="35"/> | 282 | <rect key="frame" x="0.0" y="0.0" width="111.5" height="35"/> |
| 283 | <subviews> | 283 | <subviews> |
| 284 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="消費カロリー" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zRU-L6-Ed4" customClass="AutoTransLabel"> | 284 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="消費カロリー" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zRU-L6-Ed4" customClass="AutoTransLabel"> |
| 285 | <rect key="frame" x="0.0" y="0.0" width="111.5" height="18"/> | 285 | <rect key="frame" x="0.0" y="0.0" width="111.5" height="18"/> |
| 286 | <constraints> | 286 | <constraints> |
| 287 | <constraint firstAttribute="height" constant="18" id="Ywp-RA-6am"/> | 287 | <constraint firstAttribute="height" constant="18" id="Ywp-RA-6am"/> |
| 288 | </constraints> | 288 | </constraints> |
| 289 | <fontDescription key="fontDescription" type="system" pointSize="12"/> | 289 | <fontDescription key="fontDescription" type="system" pointSize="12"/> |
| 290 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 290 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 291 | <nil key="highlightedColor"/> | 291 | <nil key="highlightedColor"/> |
| 292 | <userDefinedRuntimeAttributes> | 292 | <userDefinedRuntimeAttributes> |
| 293 | <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.calories"/> | 293 | <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.calories"/> |
| 294 | </userDefinedRuntimeAttributes> | 294 | </userDefinedRuntimeAttributes> |
| 295 | </label> | 295 | </label> |
| 296 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1000 kcal" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dAE-C8-QLr"> | 296 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0 kcal" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dAE-C8-QLr"> |
| 297 | <rect key="frame" x="0.0" y="17" width="111.5" height="18"/> | 297 | <rect key="frame" x="0.0" y="17" width="111.5" height="18"/> |
| 298 | <constraints> | 298 | <constraints> |
| 299 | <constraint firstAttribute="height" constant="18" id="r0d-xi-3u7"/> | 299 | <constraint firstAttribute="height" constant="18" id="r0d-xi-3u7"/> |
| 300 | </constraints> | 300 | </constraints> |
| 301 | <fontDescription key="fontDescription" type="system" pointSize="12"/> | 301 | <fontDescription key="fontDescription" type="system" pointSize="12"/> |
| 302 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 302 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 303 | <nil key="highlightedColor"/> | 303 | <nil key="highlightedColor"/> |
| 304 | </label> | 304 | </label> |
| 305 | </subviews> | 305 | </subviews> |
| 306 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | 306 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
| 307 | <constraints> | 307 | <constraints> |
| 308 | <constraint firstItem="zRU-L6-Ed4" firstAttribute="leading" secondItem="UwA-5Q-gdv" secondAttribute="leading" id="Zbe-7f-cuR"/> | 308 | <constraint firstItem="zRU-L6-Ed4" firstAttribute="leading" secondItem="UwA-5Q-gdv" secondAttribute="leading" id="Zbe-7f-cuR"/> |
| 309 | <constraint firstAttribute="bottom" secondItem="dAE-C8-QLr" secondAttribute="bottom" id="aZH-zh-M1V"/> | 309 | <constraint firstAttribute="bottom" secondItem="dAE-C8-QLr" secondAttribute="bottom" id="aZH-zh-M1V"/> |
| 310 | <constraint firstItem="zRU-L6-Ed4" firstAttribute="top" secondItem="UwA-5Q-gdv" secondAttribute="top" id="bsw-KU-Tcu"/> | 310 | <constraint firstItem="zRU-L6-Ed4" firstAttribute="top" secondItem="UwA-5Q-gdv" secondAttribute="top" id="bsw-KU-Tcu"/> |
| 311 | <constraint firstAttribute="trailing" secondItem="zRU-L6-Ed4" secondAttribute="trailing" id="iMB-ch-u4B"/> | 311 | <constraint firstAttribute="trailing" secondItem="zRU-L6-Ed4" secondAttribute="trailing" id="iMB-ch-u4B"/> |
| 312 | <constraint firstItem="dAE-C8-QLr" firstAttribute="leading" secondItem="UwA-5Q-gdv" secondAttribute="leading" id="qNu-WH-Jjj"/> | 312 | <constraint firstItem="dAE-C8-QLr" firstAttribute="leading" secondItem="UwA-5Q-gdv" secondAttribute="leading" id="qNu-WH-Jjj"/> |
| 313 | <constraint firstAttribute="trailing" secondItem="dAE-C8-QLr" secondAttribute="trailing" id="wRF-1x-XC1"/> | 313 | <constraint firstAttribute="trailing" secondItem="dAE-C8-QLr" secondAttribute="trailing" id="wRF-1x-XC1"/> |
| 314 | </constraints> | 314 | </constraints> |
| 315 | </view> | 315 | </view> |
| 316 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BVs-KG-fDF"> | 316 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BVs-KG-fDF"> |
| 317 | <rect key="frame" x="111.5" y="0.0" width="112" height="35"/> | 317 | <rect key="frame" x="111.5" y="0.0" width="112" height="35"/> |
| 318 | <subviews> | 318 | <subviews> |
| 319 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="距離" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XGt-pc-sd7" customClass="AutoTransLabel"> | 319 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="距離" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XGt-pc-sd7" customClass="AutoTransLabel"> |
| 320 | <rect key="frame" x="0.0" y="0.0" width="112" height="18"/> | 320 | <rect key="frame" x="0.0" y="0.0" width="112" height="18"/> |
| 321 | <constraints> | 321 | <constraints> |
| 322 | <constraint firstAttribute="height" constant="18" id="tct-pY-7wo"/> | 322 | <constraint firstAttribute="height" constant="18" id="tct-pY-7wo"/> |
| 323 | </constraints> | 323 | </constraints> |
| 324 | <fontDescription key="fontDescription" type="system" pointSize="12"/> | 324 | <fontDescription key="fontDescription" type="system" pointSize="12"/> |
| 325 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 325 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 326 | <nil key="highlightedColor"/> | 326 | <nil key="highlightedColor"/> |
| 327 | <userDefinedRuntimeAttributes> | 327 | <userDefinedRuntimeAttributes> |
| 328 | <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.distance"/> | 328 | <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.distance"/> |
| 329 | </userDefinedRuntimeAttributes> | 329 | </userDefinedRuntimeAttributes> |
| 330 | </label> | 330 | </label> |
| 331 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="4.0 KM" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1tR-JC-pyw"> | 331 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0.0 KM" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1tR-JC-pyw"> |
| 332 | <rect key="frame" x="0.0" y="17" width="112" height="18"/> | 332 | <rect key="frame" x="0.0" y="17" width="112" height="18"/> |
| 333 | <constraints> | 333 | <constraints> |
| 334 | <constraint firstAttribute="height" constant="18" id="sNT-xl-BKH"/> | 334 | <constraint firstAttribute="height" constant="18" id="sNT-xl-BKH"/> |
| 335 | </constraints> | 335 | </constraints> |
| 336 | <fontDescription key="fontDescription" type="system" pointSize="12"/> | 336 | <fontDescription key="fontDescription" type="system" pointSize="12"/> |
| 337 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 337 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 338 | <nil key="highlightedColor"/> | 338 | <nil key="highlightedColor"/> |
| 339 | </label> | 339 | </label> |
| 340 | </subviews> | 340 | </subviews> |
| 341 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | 341 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
| 342 | <constraints> | 342 | <constraints> |
| 343 | <constraint firstItem="XGt-pc-sd7" firstAttribute="leading" secondItem="BVs-KG-fDF" secondAttribute="leading" id="Bd8-ZX-shc"/> | 343 | <constraint firstItem="XGt-pc-sd7" firstAttribute="leading" secondItem="BVs-KG-fDF" secondAttribute="leading" id="Bd8-ZX-shc"/> |
| 344 | <constraint firstAttribute="trailing" secondItem="1tR-JC-pyw" secondAttribute="trailing" id="Mrw-gb-r3n"/> | 344 | <constraint firstAttribute="trailing" secondItem="1tR-JC-pyw" secondAttribute="trailing" id="Mrw-gb-r3n"/> |
| 345 | <constraint firstAttribute="trailing" secondItem="XGt-pc-sd7" secondAttribute="trailing" id="cTc-te-Pc1"/> | 345 | <constraint firstAttribute="trailing" secondItem="XGt-pc-sd7" secondAttribute="trailing" id="cTc-te-Pc1"/> |
| 346 | <constraint firstItem="XGt-pc-sd7" firstAttribute="top" secondItem="BVs-KG-fDF" secondAttribute="top" id="cs1-A7-e5C"/> | 346 | <constraint firstItem="XGt-pc-sd7" firstAttribute="top" secondItem="BVs-KG-fDF" secondAttribute="top" id="cs1-A7-e5C"/> |
| 347 | <constraint firstAttribute="bottom" secondItem="1tR-JC-pyw" secondAttribute="bottom" id="vsZ-FE-X5m"/> | 347 | <constraint firstAttribute="bottom" secondItem="1tR-JC-pyw" secondAttribute="bottom" id="vsZ-FE-X5m"/> |
| 348 | <constraint firstItem="1tR-JC-pyw" firstAttribute="leading" secondItem="BVs-KG-fDF" secondAttribute="leading" id="xOd-ZK-rZn"/> | 348 | <constraint firstItem="1tR-JC-pyw" firstAttribute="leading" secondItem="BVs-KG-fDF" secondAttribute="leading" id="xOd-ZK-rZn"/> |
| 349 | </constraints> | 349 | </constraints> |
| 350 | </view> | 350 | </view> |
| 351 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="j5h-QD-Igf"> | 351 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="j5h-QD-Igf"> |
| 352 | <rect key="frame" x="223.5" y="0.0" width="111.5" height="35"/> | 352 | <rect key="frame" x="223.5" y="0.0" width="111.5" height="35"/> |
| 353 | <subviews> | 353 | <subviews> |
| 354 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="時間" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OEO-l8-Ibg" customClass="AutoTransLabel"> | 354 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="時間" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OEO-l8-Ibg" customClass="AutoTransLabel"> |
| 355 | <rect key="frame" x="0.0" y="0.0" width="111.5" height="18"/> | 355 | <rect key="frame" x="0.0" y="0.0" width="111.5" height="18"/> |
| 356 | <constraints> | 356 | <constraints> |
| 357 | <constraint firstAttribute="height" constant="18" id="EVe-qW-qqp"/> | 357 | <constraint firstAttribute="height" constant="18" id="EVe-qW-qqp"/> |
| 358 | </constraints> | 358 | </constraints> |
| 359 | <fontDescription key="fontDescription" type="system" pointSize="12"/> | 359 | <fontDescription key="fontDescription" type="system" pointSize="12"/> |
| 360 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 360 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 361 | <nil key="highlightedColor"/> | 361 | <nil key="highlightedColor"/> |
| 362 | <userDefinedRuntimeAttributes> | 362 | <userDefinedRuntimeAttributes> |
| 363 | <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.time"/> | 363 | <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.time"/> |
| 364 | </userDefinedRuntimeAttributes> | 364 | </userDefinedRuntimeAttributes> |
| 365 | </label> | 365 | </label> |
| 366 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1:00 時間" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PfZ-7x-LAR"> | 366 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="00:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PfZ-7x-LAR"> |
| 367 | <rect key="frame" x="0.0" y="17" width="111.5" height="18"/> | 367 | <rect key="frame" x="0.0" y="17" width="111.5" height="18"/> |
| 368 | <constraints> | 368 | <constraints> |
| 369 | <constraint firstAttribute="height" constant="18" id="lno-Dx-ZNm"/> | 369 | <constraint firstAttribute="height" constant="18" id="lno-Dx-ZNm"/> |
| 370 | </constraints> | 370 | </constraints> |
| 371 | <fontDescription key="fontDescription" type="system" pointSize="12"/> | 371 | <fontDescription key="fontDescription" type="system" pointSize="12"/> |
| 372 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 372 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 373 | <nil key="highlightedColor"/> | 373 | <nil key="highlightedColor"/> |
| 374 | </label> | 374 | </label> |
| 375 | </subviews> | 375 | </subviews> |
| 376 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | 376 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
| 377 | <constraints> | 377 | <constraints> |
| 378 | <constraint firstAttribute="trailing" secondItem="PfZ-7x-LAR" secondAttribute="trailing" id="3Ir-mZ-xmI"/> | 378 | <constraint firstAttribute="trailing" secondItem="PfZ-7x-LAR" secondAttribute="trailing" id="3Ir-mZ-xmI"/> |
| 379 | <constraint firstItem="OEO-l8-Ibg" firstAttribute="leading" secondItem="j5h-QD-Igf" secondAttribute="leading" id="5oW-CQ-vWi"/> | 379 | <constraint firstItem="OEO-l8-Ibg" firstAttribute="leading" secondItem="j5h-QD-Igf" secondAttribute="leading" id="5oW-CQ-vWi"/> |
| 380 | <constraint firstItem="PfZ-7x-LAR" firstAttribute="leading" secondItem="j5h-QD-Igf" secondAttribute="leading" id="Qur-SO-10d"/> | 380 | <constraint firstItem="PfZ-7x-LAR" firstAttribute="leading" secondItem="j5h-QD-Igf" secondAttribute="leading" id="Qur-SO-10d"/> |
| 381 | <constraint firstAttribute="trailing" secondItem="OEO-l8-Ibg" secondAttribute="trailing" id="WQn-Gv-plQ"/> | 381 | <constraint firstAttribute="trailing" secondItem="OEO-l8-Ibg" secondAttribute="trailing" id="WQn-Gv-plQ"/> |
| 382 | <constraint firstItem="OEO-l8-Ibg" firstAttribute="top" secondItem="j5h-QD-Igf" secondAttribute="top" id="lt7-Qt-rBM"/> | 382 | <constraint firstItem="OEO-l8-Ibg" firstAttribute="top" secondItem="j5h-QD-Igf" secondAttribute="top" id="lt7-Qt-rBM"/> |
| 383 | <constraint firstAttribute="bottom" secondItem="PfZ-7x-LAR" secondAttribute="bottom" id="qcA-M9-NYS"/> | 383 | <constraint firstAttribute="bottom" secondItem="PfZ-7x-LAR" secondAttribute="bottom" id="qcA-M9-NYS"/> |
| 384 | </constraints> | 384 | </constraints> |
| 385 | </view> | 385 | </view> |
| 386 | </subviews> | 386 | </subviews> |
| 387 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | 387 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
| 388 | <constraints> | 388 | <constraints> |
| 389 | <constraint firstAttribute="bottom" secondItem="j5h-QD-Igf" secondAttribute="bottom" id="IsO-UX-w9t"/> | 389 | <constraint firstAttribute="bottom" secondItem="j5h-QD-Igf" secondAttribute="bottom" id="IsO-UX-w9t"/> |
| 390 | <constraint firstItem="j5h-QD-Igf" firstAttribute="top" secondItem="iEh-Ze-suq" secondAttribute="top" id="Msr-oS-nFH"/> | 390 | <constraint firstItem="j5h-QD-Igf" firstAttribute="top" secondItem="iEh-Ze-suq" secondAttribute="top" id="Msr-oS-nFH"/> |
| 391 | <constraint firstItem="BVs-KG-fDF" firstAttribute="top" secondItem="iEh-Ze-suq" secondAttribute="top" id="Ohk-mJ-oCK"/> | 391 | <constraint firstItem="BVs-KG-fDF" firstAttribute="top" secondItem="iEh-Ze-suq" secondAttribute="top" id="Ohk-mJ-oCK"/> |
| 392 | <constraint firstItem="UwA-5Q-gdv" firstAttribute="top" secondItem="iEh-Ze-suq" secondAttribute="top" id="Pue-sC-wfB"/> | 392 | <constraint firstItem="UwA-5Q-gdv" firstAttribute="top" secondItem="iEh-Ze-suq" secondAttribute="top" id="Pue-sC-wfB"/> |
| 393 | <constraint firstAttribute="height" constant="35" id="WDe-uC-4Qb"/> | 393 | <constraint firstAttribute="height" constant="35" id="WDe-uC-4Qb"/> |
| 394 | <constraint firstItem="BVs-KG-fDF" firstAttribute="leading" secondItem="UwA-5Q-gdv" secondAttribute="trailing" id="f8Q-F0-hjc"/> | 394 | <constraint firstItem="BVs-KG-fDF" firstAttribute="leading" secondItem="UwA-5Q-gdv" secondAttribute="trailing" id="f8Q-F0-hjc"/> |
| 395 | <constraint firstItem="BVs-KG-fDF" firstAttribute="width" secondItem="UwA-5Q-gdv" secondAttribute="width" id="fdz-YH-1kJ"/> | 395 | <constraint firstItem="BVs-KG-fDF" firstAttribute="width" secondItem="UwA-5Q-gdv" secondAttribute="width" id="fdz-YH-1kJ"/> |
| 396 | <constraint firstAttribute="bottom" secondItem="UwA-5Q-gdv" secondAttribute="bottom" id="gxD-wy-TgL"/> | 396 | <constraint firstAttribute="bottom" secondItem="UwA-5Q-gdv" secondAttribute="bottom" id="gxD-wy-TgL"/> |
| 397 | <constraint firstItem="j5h-QD-Igf" firstAttribute="width" secondItem="UwA-5Q-gdv" secondAttribute="width" id="i3o-n4-fZN"/> | 397 | <constraint firstItem="j5h-QD-Igf" firstAttribute="width" secondItem="UwA-5Q-gdv" secondAttribute="width" id="i3o-n4-fZN"/> |
| 398 | <constraint firstAttribute="trailing" secondItem="j5h-QD-Igf" secondAttribute="trailing" id="nT6-nS-H9z"/> | 398 | <constraint firstAttribute="trailing" secondItem="j5h-QD-Igf" secondAttribute="trailing" id="nT6-nS-H9z"/> |
| 399 | <constraint firstAttribute="bottom" secondItem="BVs-KG-fDF" secondAttribute="bottom" id="nqB-N3-F3F"/> | 399 | <constraint firstAttribute="bottom" secondItem="BVs-KG-fDF" secondAttribute="bottom" id="nqB-N3-F3F"/> |
| 400 | <constraint firstItem="UwA-5Q-gdv" firstAttribute="leading" secondItem="iEh-Ze-suq" secondAttribute="leading" id="oV9-IH-tYC"/> | 400 | <constraint firstItem="UwA-5Q-gdv" firstAttribute="leading" secondItem="iEh-Ze-suq" secondAttribute="leading" id="oV9-IH-tYC"/> |
| 401 | <constraint firstItem="j5h-QD-Igf" firstAttribute="leading" secondItem="BVs-KG-fDF" secondAttribute="trailing" id="zOb-WE-3CI"/> | 401 | <constraint firstItem="j5h-QD-Igf" firstAttribute="leading" secondItem="BVs-KG-fDF" secondAttribute="trailing" id="zOb-WE-3CI"/> |
| 402 | </constraints> | 402 | </constraints> |
| 403 | </view> | 403 | </view> |
| 404 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="VqD-Y3-cYQ" customClass="BarChartView" customModule="Charts"> | 404 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="VqD-Y3-cYQ" customClass="BarChartView" customModule="Charts"> |
| 405 | <rect key="frame" x="0.0" y="201" width="375" height="100"/> | 405 | <rect key="frame" x="0.0" y="201" width="375" height="100"/> |
| 406 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | 406 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
| 407 | <constraints> | 407 | <constraints> |
| 408 | <constraint firstAttribute="height" constant="100" id="aQR-hf-MhR"/> | 408 | <constraint firstAttribute="height" constant="100" id="aQR-hf-MhR"/> |
| 409 | </constraints> | 409 | </constraints> |
| 410 | </view> | 410 | </view> |
| 411 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Iw2-nW-e7g" customClass="CollectionView"> | 411 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Iw2-nW-e7g" customClass="CollectionView"> |
| 412 | <rect key="frame" x="20" y="316" width="335" height="50"/> | 412 | <rect key="frame" x="20" y="316" width="335" height="50"/> |
| 413 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | 413 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
| 414 | <constraints> | 414 | <constraints> |
| 415 | <constraint firstAttribute="height" constant="50" id="Yzh-hD-r0n"/> | 415 | <constraint firstAttribute="height" constant="50" id="Yzh-hD-r0n"/> |
| 416 | </constraints> | 416 | </constraints> |
| 417 | </view> | 417 | </view> |
| 418 | </subviews> | 418 | </subviews> |
| 419 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | 419 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
| 420 | <constraints> | 420 | <constraints> |
| 421 | <constraint firstItem="VqD-Y3-cYQ" firstAttribute="top" secondItem="iEh-Ze-suq" secondAttribute="bottom" constant="8" id="0BA-6p-JLT"/> | 421 | <constraint firstItem="VqD-Y3-cYQ" firstAttribute="top" secondItem="iEh-Ze-suq" secondAttribute="bottom" constant="8" id="0BA-6p-JLT"/> |
| 422 | <constraint firstItem="Iw2-nW-e7g" firstAttribute="leading" secondItem="Cam-ML-IEO" secondAttribute="leading" constant="20" id="2lH-sF-Mp0"/> | 422 | <constraint firstItem="Iw2-nW-e7g" firstAttribute="leading" secondItem="Cam-ML-IEO" secondAttribute="leading" constant="20" id="2lH-sF-Mp0"/> |
| 423 | <constraint firstItem="iEh-Ze-suq" firstAttribute="top" secondItem="4ix-HE-d9T" secondAttribute="bottom" constant="8" id="9Sm-IQ-feL"/> | 423 | <constraint firstItem="iEh-Ze-suq" firstAttribute="top" secondItem="4ix-HE-d9T" secondAttribute="bottom" constant="8" id="9Sm-IQ-feL"/> |
| 424 | <constraint firstItem="VqD-Y3-cYQ" firstAttribute="leading" secondItem="Cam-ML-IEO" secondAttribute="leading" id="Gbd-bD-rFf"/> | 424 | <constraint firstItem="VqD-Y3-cYQ" firstAttribute="leading" secondItem="Cam-ML-IEO" secondAttribute="leading" id="Gbd-bD-rFf"/> |
| 425 | <constraint firstItem="4ix-HE-d9T" firstAttribute="top" secondItem="Cam-ML-IEO" secondAttribute="top" constant="30" id="JyQ-KD-MhR"/> | 425 | <constraint firstItem="4ix-HE-d9T" firstAttribute="top" secondItem="Cam-ML-IEO" secondAttribute="top" constant="30" id="JyQ-KD-MhR"/> |
| 426 | <constraint firstAttribute="trailing" secondItem="iEh-Ze-suq" secondAttribute="trailing" constant="20" id="RcZ-yN-56e"/> | 426 | <constraint firstAttribute="trailing" secondItem="iEh-Ze-suq" secondAttribute="trailing" constant="20" id="RcZ-yN-56e"/> |
| 427 | <constraint firstAttribute="trailing" secondItem="Iw2-nW-e7g" secondAttribute="trailing" constant="20" id="Xso-Or-Fgf"/> | 427 | <constraint firstAttribute="trailing" secondItem="Iw2-nW-e7g" secondAttribute="trailing" constant="20" id="Xso-Or-Fgf"/> |
| 428 | <constraint firstItem="Kzk-mN-AOf" firstAttribute="top" secondItem="Cam-ML-IEO" secondAttribute="top" constant="30" id="YzU-Mb-veC"/> | 428 | <constraint firstItem="Kzk-mN-AOf" firstAttribute="top" secondItem="Cam-ML-IEO" secondAttribute="top" constant="30" id="YzU-Mb-veC"/> |
| 429 | <constraint firstAttribute="trailing" secondItem="4ix-HE-d9T" secondAttribute="trailing" constant="8" id="del-xz-Tos"/> | 429 | <constraint firstAttribute="trailing" secondItem="4ix-HE-d9T" secondAttribute="trailing" constant="8" id="del-xz-Tos"/> |
| 430 | <constraint firstItem="4ix-HE-d9T" firstAttribute="height" secondItem="Kzk-mN-AOf" secondAttribute="height" id="duV-wT-9wp"/> | 430 | <constraint firstItem="4ix-HE-d9T" firstAttribute="height" secondItem="Kzk-mN-AOf" secondAttribute="height" id="duV-wT-9wp"/> |
| 431 | <constraint firstItem="Iw2-nW-e7g" firstAttribute="top" secondItem="VqD-Y3-cYQ" secondAttribute="bottom" constant="15" id="ekR-kS-L5v"/> | 431 | <constraint firstItem="Iw2-nW-e7g" firstAttribute="top" secondItem="VqD-Y3-cYQ" secondAttribute="bottom" constant="15" id="ekR-kS-L5v"/> |
| 432 | <constraint firstItem="Kzk-mN-AOf" firstAttribute="leading" secondItem="Cam-ML-IEO" secondAttribute="leading" constant="20" id="hFq-WM-gLq"/> | 432 | <constraint firstItem="Kzk-mN-AOf" firstAttribute="leading" secondItem="Cam-ML-IEO" secondAttribute="leading" constant="20" id="hFq-WM-gLq"/> |
| 433 | <constraint firstItem="4ix-HE-d9T" firstAttribute="leading" secondItem="Kzk-mN-AOf" secondAttribute="trailing" constant="8" id="hzO-hA-cNG"/> | 433 | <constraint firstItem="4ix-HE-d9T" firstAttribute="leading" secondItem="Kzk-mN-AOf" secondAttribute="trailing" constant="8" id="hzO-hA-cNG"/> |
| 434 | <constraint firstAttribute="trailing" secondItem="VqD-Y3-cYQ" secondAttribute="trailing" id="ptF-2O-CNR"/> | 434 | <constraint firstAttribute="trailing" secondItem="VqD-Y3-cYQ" secondAttribute="trailing" id="ptF-2O-CNR"/> |
| 435 | <constraint firstItem="iEh-Ze-suq" firstAttribute="leading" secondItem="Cam-ML-IEO" secondAttribute="leading" constant="20" id="u5o-P4-qkL"/> | 435 | <constraint firstItem="iEh-Ze-suq" firstAttribute="leading" secondItem="Cam-ML-IEO" secondAttribute="leading" constant="20" id="u5o-P4-qkL"/> |
| 436 | </constraints> | 436 | </constraints> |
| 437 | </view> | 437 | </view> |
| 438 | </subviews> | 438 | </subviews> |
| 439 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | 439 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
| 440 | <constraints> | 440 | <constraints> |
| 441 | <constraint firstItem="Cam-ML-IEO" firstAttribute="centerY" secondItem="rey-N3-l8b" secondAttribute="centerY" id="0WD-1q-SWm"/> | 441 | <constraint firstItem="Cam-ML-IEO" firstAttribute="centerY" secondItem="rey-N3-l8b" secondAttribute="centerY" id="0WD-1q-SWm"/> |
| 442 | <constraint firstItem="Cam-ML-IEO" firstAttribute="width" secondItem="rey-N3-l8b" secondAttribute="width" id="LbF-3h-cxa"/> | 442 | <constraint firstItem="Cam-ML-IEO" firstAttribute="width" secondItem="rey-N3-l8b" secondAttribute="width" id="LbF-3h-cxa"/> |
| 443 | <constraint firstAttribute="trailing" secondItem="Cam-ML-IEO" secondAttribute="trailing" id="UHb-6d-wF8"/> | 443 | <constraint firstAttribute="trailing" secondItem="Cam-ML-IEO" secondAttribute="trailing" id="UHb-6d-wF8"/> |
| 444 | <constraint firstItem="Cam-ML-IEO" firstAttribute="leading" secondItem="rey-N3-l8b" secondAttribute="leading" id="Y4U-kD-V28"/> | 444 | <constraint firstItem="Cam-ML-IEO" firstAttribute="leading" secondItem="rey-N3-l8b" secondAttribute="leading" id="Y4U-kD-V28"/> |
| 445 | <constraint firstItem="Cam-ML-IEO" firstAttribute="top" secondItem="rey-N3-l8b" secondAttribute="top" id="ohS-iH-IIM"/> | 445 | <constraint firstItem="Cam-ML-IEO" firstAttribute="top" secondItem="rey-N3-l8b" secondAttribute="top" id="ohS-iH-IIM"/> |
| 446 | <constraint firstAttribute="bottom" secondItem="Cam-ML-IEO" secondAttribute="bottom" id="th8-dH-zv1"/> | 446 | <constraint firstAttribute="bottom" secondItem="Cam-ML-IEO" secondAttribute="bottom" id="th8-dH-zv1"/> |
| 447 | </constraints> | 447 | </constraints> |
| 448 | <connections> | 448 | <connections> |
| 449 | <outlet property="delegate" destination="-1" id="3Fl-Qy-gjm"/> | 449 | <outlet property="delegate" destination="-1" id="3Fl-Qy-gjm"/> |
| 450 | </connections> | 450 | </connections> |
| 451 | </scrollView> | 451 | </scrollView> |
| 452 | </subviews> | 452 | </subviews> |
| 453 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | 453 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
| 454 | <constraints> | 454 | <constraints> |
| 455 | <constraint firstAttribute="trailing" secondItem="FXQ-4O-sRc" secondAttribute="trailing" constant="5" id="5y0-NC-rHp"/> | 455 | <constraint firstAttribute="trailing" secondItem="FXQ-4O-sRc" secondAttribute="trailing" constant="5" id="5y0-NC-rHp"/> |
| 456 | <constraint firstItem="FXQ-4O-sRc" firstAttribute="leading" secondItem="FLa-rV-Aas" secondAttribute="leading" constant="5" id="C0U-21-SKl"/> | 456 | <constraint firstItem="FXQ-4O-sRc" firstAttribute="leading" secondItem="FLa-rV-Aas" secondAttribute="leading" constant="5" id="C0U-21-SKl"/> |
| 457 | <constraint firstItem="FXQ-4O-sRc" firstAttribute="top" secondItem="FLa-rV-Aas" secondAttribute="top" id="CB0-VD-h5m"/> | 457 | <constraint firstItem="FXQ-4O-sRc" firstAttribute="top" secondItem="FLa-rV-Aas" secondAttribute="top" id="CB0-VD-h5m"/> |
| 458 | <constraint firstAttribute="bottom" secondItem="FXQ-4O-sRc" secondAttribute="bottom" id="FbP-FY-h1E"/> | 458 | <constraint firstAttribute="bottom" secondItem="FXQ-4O-sRc" secondAttribute="bottom" id="FbP-FY-h1E"/> |
| 459 | <constraint firstAttribute="trailing" secondItem="rey-N3-l8b" secondAttribute="trailing" id="KFD-f5-xci"/> | 459 | <constraint firstAttribute="trailing" secondItem="rey-N3-l8b" secondAttribute="trailing" id="KFD-f5-xci"/> |
| 460 | <constraint firstItem="rey-N3-l8b" firstAttribute="top" secondItem="FLa-rV-Aas" secondAttribute="top" id="SpB-31-H3a"/> | 460 | <constraint firstItem="rey-N3-l8b" firstAttribute="top" secondItem="FLa-rV-Aas" secondAttribute="top" id="SpB-31-H3a"/> |
| 461 | <constraint firstItem="rey-N3-l8b" firstAttribute="leading" secondItem="FLa-rV-Aas" secondAttribute="leading" id="YvS-I2-8Dg"/> | 461 | <constraint firstItem="rey-N3-l8b" firstAttribute="leading" secondItem="FLa-rV-Aas" secondAttribute="leading" id="YvS-I2-8Dg"/> |
| 462 | <constraint firstAttribute="bottom" secondItem="rey-N3-l8b" secondAttribute="bottom" id="enX-7g-Eib"/> | 462 | <constraint firstAttribute="bottom" secondItem="rey-N3-l8b" secondAttribute="bottom" id="enX-7g-Eib"/> |
| 463 | </constraints> | 463 | </constraints> |
| 464 | <connections> | 464 | <connections> |
| 465 | <outletCollection property="gestureRecognizers" destination="Qjg-St-rCc" appends="YES" id="egt-sX-aBC"/> | 465 | <outletCollection property="gestureRecognizers" destination="Qjg-St-rCc" appends="YES" id="egt-sX-aBC"/> |
| 466 | <outletCollection property="gestureRecognizers" destination="VSZ-i0-Jhb" appends="YES" id="UKr-c3-9pp"/> | 466 | <outletCollection property="gestureRecognizers" destination="VSZ-i0-Jhb" appends="YES" id="UKr-c3-9pp"/> |
| 467 | </connections> | 467 | </connections> |
| 468 | </view> | 468 | </view> |
| 469 | </subviews> | 469 | </subviews> |
| 470 | <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> | 470 | <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> |
| 471 | <gestureRecognizers/> | 471 | <gestureRecognizers/> |
| 472 | <constraints> | 472 | <constraints> |
| 473 | <constraint firstAttribute="trailing" secondItem="Cf1-lP-zbB" secondAttribute="trailing" constant="10" id="20C-UL-MCu"/> | 473 | <constraint firstAttribute="trailing" secondItem="Cf1-lP-zbB" secondAttribute="trailing" constant="10" id="20C-UL-MCu"/> |
| 474 | <constraint firstItem="clL-JG-rbd" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="3tf-ab-v41"/> | 474 | <constraint firstItem="clL-JG-rbd" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="3tf-ab-v41"/> |
| 475 | <constraint firstItem="Cf1-lP-zbB" firstAttribute="top" secondItem="clL-JG-rbd" secondAttribute="bottom" id="5vy-x5-G38"/> | 475 | <constraint firstItem="Cf1-lP-zbB" firstAttribute="top" secondItem="clL-JG-rbd" secondAttribute="bottom" id="5vy-x5-G38"/> |
| 476 | <constraint firstItem="Cf1-lP-zbB" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="10" id="974-wJ-aRb"/> | 476 | <constraint firstItem="Cf1-lP-zbB" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="10" id="974-wJ-aRb"/> |
| 477 | <constraint firstItem="yxY-4d-tB6" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="2" id="Jqg-nE-6dv"/> | 477 | <constraint firstItem="yxY-4d-tB6" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="2" id="Jqg-nE-6dv"/> |
| 478 | <constraint firstAttribute="trailing" secondItem="BVv-qD-EHM" secondAttribute="trailing" id="MCi-Tl-hSp"/> | 478 | <constraint firstAttribute="trailing" secondItem="BVv-qD-EHM" secondAttribute="trailing" id="MCi-Tl-hSp"/> |
| 479 | <constraint firstAttribute="trailing" secondItem="yxY-4d-tB6" secondAttribute="trailing" constant="2" id="Qs5-ky-nmB"/> | 479 | <constraint firstAttribute="trailing" secondItem="yxY-4d-tB6" secondAttribute="trailing" constant="2" id="Qs5-ky-nmB"/> |
| 480 | <constraint firstAttribute="bottom" secondItem="BVv-qD-EHM" secondAttribute="bottom" constant="50" id="SbT-PG-8MJ"/> | 480 | <constraint firstAttribute="bottom" secondItem="BVv-qD-EHM" secondAttribute="bottom" constant="50" id="SbT-PG-8MJ"/> |
| 481 | <constraint firstItem="BVv-qD-EHM" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="SqH-AA-Z2K"/> | 481 | <constraint firstItem="BVv-qD-EHM" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="SqH-AA-Z2K"/> |
| 482 | <constraint firstItem="FLa-rV-Aas" firstAttribute="top" secondItem="yxY-4d-tB6" secondAttribute="bottom" constant="15" id="cWw-RX-1Kp"/> | 482 | <constraint firstItem="FLa-rV-Aas" firstAttribute="top" secondItem="yxY-4d-tB6" secondAttribute="bottom" constant="15" id="cWw-RX-1Kp"/> |
| 483 | <constraint firstItem="yxY-4d-tB6" firstAttribute="top" secondItem="Cf1-lP-zbB" secondAttribute="bottom" constant="15" id="dSN-ey-gQ7"/> | 483 | <constraint firstItem="yxY-4d-tB6" firstAttribute="top" secondItem="Cf1-lP-zbB" secondAttribute="bottom" constant="15" id="dSN-ey-gQ7"/> |
| 484 | <constraint firstItem="clL-JG-rbd" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="i5Z-XR-Msb"/> | 484 | <constraint firstItem="clL-JG-rbd" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="i5Z-XR-Msb"/> |
| 485 | <constraint firstItem="FLa-rV-Aas" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="iiN-Zj-1uu"/> | 485 | <constraint firstItem="FLa-rV-Aas" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="iiN-Zj-1uu"/> |
| 486 | <constraint firstAttribute="trailing" secondItem="FLa-rV-Aas" secondAttribute="trailing" id="jme-cz-cFt"/> | 486 | <constraint firstAttribute="trailing" secondItem="FLa-rV-Aas" secondAttribute="trailing" id="jme-cz-cFt"/> |
| 487 | <constraint firstItem="BVv-qD-EHM" firstAttribute="top" secondItem="FLa-rV-Aas" secondAttribute="bottom" constant="5" id="qbT-yT-phN"/> | 487 | <constraint firstItem="BVv-qD-EHM" firstAttribute="top" secondItem="FLa-rV-Aas" secondAttribute="bottom" constant="5" id="qbT-yT-phN"/> |
| 488 | <constraint firstAttribute="trailing" secondItem="clL-JG-rbd" secondAttribute="trailing" id="ri5-LG-xJH"/> | 488 | <constraint firstAttribute="trailing" secondItem="clL-JG-rbd" secondAttribute="trailing" id="ri5-LG-xJH"/> |
| 489 | </constraints> | 489 | </constraints> |
| 490 | <point key="canvasLocation" x="26.5" y="52.5"/> | 490 | <point key="canvasLocation" x="26.5" y="52.5"/> |
| 491 | </view> | 491 | </view> |
| 492 | <swipeGestureRecognizer cancelsTouchesInView="NO" direction="left" id="Qjg-St-rCc"> | 492 | <swipeGestureRecognizer cancelsTouchesInView="NO" direction="left" id="Qjg-St-rCc"> |
| 493 | <connections> | 493 | <connections> |
| 494 | <action selector="swipeAction:" destination="-1" id="2Vl-bM-Ta7"/> | 494 | <action selector="swipeAction:" destination="-1" id="2Vl-bM-Ta7"/> |
| 495 | </connections> | 495 | </connections> |
| 496 | </swipeGestureRecognizer> | 496 | </swipeGestureRecognizer> |
| 497 | <swipeGestureRecognizer cancelsTouchesInView="NO" direction="right" id="VSZ-i0-Jhb"> | 497 | <swipeGestureRecognizer cancelsTouchesInView="NO" direction="right" id="VSZ-i0-Jhb"> |
| 498 | <connections> | 498 | <connections> |
| 499 | <action selector="swipeAction:" destination="-1" id="hoY-6M-DoS"/> | 499 | <action selector="swipeAction:" destination="-1" id="hoY-6M-DoS"/> |
| 500 | </connections> | 500 | </connections> |
| 501 | </swipeGestureRecognizer> | 501 | </swipeGestureRecognizer> |
| 502 | </objects> | 502 | </objects> |
| 503 | <resources> | 503 | <resources> |
| 504 | <image name="arrow_back" width="22" height="22"/> | 504 | <image name="arrow_back" width="22" height="22"/> |
| 505 | <image name="arrow_next" width="22" height="22"/> | 505 | <image name="arrow_next" width="22" height="22"/> |
| 506 | <image name="icon_menu" width="30" height="30"/> | 506 | <image name="icon_menu" width="30" height="30"/> |
| 507 | <image name="today_back_button" width="73" height="37"/> | 507 | <image name="today_back_button" width="73" height="37"/> |
| 508 | </resources> | 508 | </resources> |
| 509 | </document> | 509 | </document> |
| 510 | 510 |
LifeLog/LifeLog/ServerAPI.m
| 1 | // | 1 | // |
| 2 | // ServerAPI.m | 2 | // ServerAPI.m |
| 3 | // LifeLog | 3 | // LifeLog |
| 4 | // | 4 | // |
| 5 | // Created by Nguyen Van Phong on 7/30/17. | 5 | // Created by Nguyen Van Phong on 7/30/17. |
| 6 | // Copyright © 2017 PhongNV. All rights reserved. | 6 | // Copyright © 2017 PhongNV. All rights reserved. |
| 7 | // | 7 | // |
| 8 | 8 | ||
| 9 | #import "ServerAPI.h" | 9 | #import "ServerAPI.h" |
| 10 | #import "Utilities.h" | 10 | #import "Utilities.h" |
| 11 | 11 | ||
| 12 | NSString *const kServerAddress = @"http://clover.timesfun.jp:9001/"; | 12 | NSString *const kServerAddress = @"http://clover.timesfun.jp:9001/"; |
| 13 | NSString *const kUser = @"KEY_USER"; | 13 | NSString *const kUser = @"KEY_USER"; |
| 14 | NSString *const kToken = @"KEY_TOKEN"; | 14 | NSString *const kToken = @"KEY_TOKEN"; |
| 15 | NSString *const kNotificationToken = @"TOKEN_INVALID"; | 15 | NSString *const kNotificationToken = @"TOKEN_INVALID"; |
| 16 | 16 | ||
| 17 | @implementation NSString (NSString_Extended) | 17 | @implementation NSString (NSString_Extended) |
| 18 | - (NSString *)urlencode { | 18 | - (NSString *)urlencode { |
| 19 | NSMutableString *output = [NSMutableString string]; | 19 | NSMutableString *output = [NSMutableString string]; |
| 20 | const unsigned char *source = (const unsigned char *)[self UTF8String]; | 20 | const unsigned char *source = (const unsigned char *)[self UTF8String]; |
| 21 | int sourceLen = (int)strlen((const char *)source); | 21 | int sourceLen = (int)strlen((const char *)source); |
| 22 | for (int i = 0; i < sourceLen; ++i) { | 22 | for (int i = 0; i < sourceLen; ++i) { |
| 23 | const unsigned char thisChar = source[i]; | 23 | const unsigned char thisChar = source[i]; |
| 24 | if (thisChar == ' '){ | 24 | if (thisChar == ' '){ |
| 25 |