From 4895c174ce41071ef6584c6d626e977267866c54 Mon Sep 17 00:00:00 2001 From: nvtu Date: Fri, 4 Aug 2017 11:43:05 +0700 Subject: [PATCH] Add UI history screen --- LifeLog/LifeLog.xcodeproj/project.pbxproj | 46 +++ LifeLog/LifeLog/AppDelegate.m | 3 +- LifeLog/LifeLog/CollectionView.h | 36 +++ LifeLog/LifeLog/CollectionView.m | 97 ++++++ LifeLog/LifeLog/CollectionView.xib | 46 +++ LifeLog/LifeLog/HistoryListTableViewCell.h | 19 ++ LifeLog/LifeLog/HistoryListTableViewCell.m | 24 ++ LifeLog/LifeLog/HistoryListTableViewCell.xib | 159 ++++++++++ LifeLog/LifeLog/HistoryViewController.h | 11 +- LifeLog/LifeLog/HistoryViewController.m | 40 +++ LifeLog/LifeLog/HistoryViewController.xib | 442 ++++++++++++++++++++++++++- LifeLog/LifeLog/LabelCollectionViewCell.h | 13 + LifeLog/LifeLog/LabelCollectionViewCell.m | 19 ++ LifeLog/LifeLog/LabelCollectionViewCell.xib | 42 +++ 14 files changed, 991 insertions(+), 6 deletions(-) create mode 100644 LifeLog/LifeLog/CollectionView.h create mode 100644 LifeLog/LifeLog/CollectionView.m create mode 100644 LifeLog/LifeLog/CollectionView.xib create mode 100644 LifeLog/LifeLog/HistoryListTableViewCell.h create mode 100644 LifeLog/LifeLog/HistoryListTableViewCell.m create mode 100644 LifeLog/LifeLog/HistoryListTableViewCell.xib create mode 100644 LifeLog/LifeLog/LabelCollectionViewCell.h create mode 100644 LifeLog/LifeLog/LabelCollectionViewCell.m create mode 100644 LifeLog/LifeLog/LabelCollectionViewCell.xib diff --git a/LifeLog/LifeLog.xcodeproj/project.pbxproj b/LifeLog/LifeLog.xcodeproj/project.pbxproj index db29ef1..8748849 100644 --- a/LifeLog/LifeLog.xcodeproj/project.pbxproj +++ b/LifeLog/LifeLog.xcodeproj/project.pbxproj @@ -44,6 +44,12 @@ 9CBDA0FA1F2ECE2C0055DED1 /* BaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBDA0F91F2ECE2C0055DED1 /* BaseViewController.m */; }; 9CBDA0FF1F2F03810055DED1 /* RegisterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBDA0FD1F2F03810055DED1 /* RegisterViewController.m */; }; 9CBDA1001F2F03810055DED1 /* RegisterViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBDA0FE1F2F03810055DED1 /* RegisterViewController.xib */; }; + E99E13AB1F336F3600C78787 /* CollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = E99E13AA1F336F3600C78787 /* CollectionView.m */; }; + E99E13AD1F336F4500C78787 /* CollectionView.xib in Resources */ = {isa = PBXBuildFile; fileRef = E99E13AC1F336F4500C78787 /* CollectionView.xib */; }; + E99E13B11F33720600C78787 /* LabelCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E99E13AF1F33720600C78787 /* LabelCollectionViewCell.m */; }; + E99E13B21F33720600C78787 /* LabelCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E99E13B01F33720600C78787 /* LabelCollectionViewCell.xib */; }; + E9F73DCC1F338A0F004A3A6F /* HistoryListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E9F73DCA1F338A0F004A3A6F /* HistoryListTableViewCell.m */; }; + E9F73DCD1F338A0F004A3A6F /* HistoryListTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E9F73DCB1F338A0F004A3A6F /* HistoryListTableViewCell.xib */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -131,6 +137,15 @@ 9CBDA0FC1F2F03810055DED1 /* RegisterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterViewController.h; sourceTree = ""; }; 9CBDA0FD1F2F03810055DED1 /* RegisterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegisterViewController.m; sourceTree = ""; }; 9CBDA0FE1F2F03810055DED1 /* RegisterViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RegisterViewController.xib; sourceTree = ""; }; + E99E13A91F336F3600C78787 /* CollectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectionView.h; sourceTree = ""; }; + E99E13AA1F336F3600C78787 /* CollectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CollectionView.m; sourceTree = ""; }; + E99E13AC1F336F4500C78787 /* CollectionView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CollectionView.xib; sourceTree = ""; }; + E99E13AE1F33720600C78787 /* LabelCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LabelCollectionViewCell.h; sourceTree = ""; }; + E99E13AF1F33720600C78787 /* LabelCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LabelCollectionViewCell.m; sourceTree = ""; }; + E99E13B01F33720600C78787 /* LabelCollectionViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LabelCollectionViewCell.xib; sourceTree = ""; }; + E9F73DC91F338A0F004A3A6F /* HistoryListTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistoryListTableViewCell.h; sourceTree = ""; }; + E9F73DCA1F338A0F004A3A6F /* HistoryListTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HistoryListTableViewCell.m; sourceTree = ""; }; + E9F73DCB1F338A0F004A3A6F /* HistoryListTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HistoryListTableViewCell.xib; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -241,6 +256,7 @@ 6E18CED51F2E3C0E0029891F /* ServerAPI */, 6EDC8BEB1F2C2F3300765ACC /* Common */, 6ECC406D1F2A5FA500AAEB97 /* Library */, + E99E13A71F336F0C00C78787 /* CustomView */, 6E84E3A81F27A8A9001EB88E /* ViewControllers */, 6E84E3A71F27A887001EB88E /* AppDelegate */, 6E84E3801F27A701001EB88E /* Assets.xcassets */, @@ -319,6 +335,9 @@ 6E84E3B21F27A98B001EB88E /* HistoryViewController.h */, 6E84E3B31F27A98B001EB88E /* HistoryViewController.m */, 6E84E3B41F27A98B001EB88E /* HistoryViewController.xib */, + E9F73DC91F338A0F004A3A6F /* HistoryListTableViewCell.h */, + E9F73DCA1F338A0F004A3A6F /* HistoryListTableViewCell.m */, + E9F73DCB1F338A0F004A3A6F /* HistoryListTableViewCell.xib */, ); name = History; sourceTree = ""; @@ -432,6 +451,27 @@ name = Pods; sourceTree = ""; }; + E99E13A71F336F0C00C78787 /* CustomView */ = { + isa = PBXGroup; + children = ( + E99E13A81F336F1700C78787 /* CollectionView */, + ); + name = CustomView; + sourceTree = ""; + }; + E99E13A81F336F1700C78787 /* CollectionView */ = { + isa = PBXGroup; + children = ( + E99E13AE1F33720600C78787 /* LabelCollectionViewCell.h */, + E99E13AF1F33720600C78787 /* LabelCollectionViewCell.m */, + E99E13B01F33720600C78787 /* LabelCollectionViewCell.xib */, + E99E13A91F336F3600C78787 /* CollectionView.h */, + E99E13AA1F336F3600C78787 /* CollectionView.m */, + E99E13AC1F336F4500C78787 /* CollectionView.xib */, + ); + name = CollectionView; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -544,6 +584,7 @@ files = ( 9CBDA1001F2F03810055DED1 /* RegisterViewController.xib in Resources */, 6E18CED41F2E39DB0029891F /* LoginViewController.xib in Resources */, + E99E13AD1F336F4500C78787 /* CollectionView.xib in Resources */, 6E84E3BB1F27A9A0001EB88E /* RankingViewController.xib in Resources */, 9CA8AEEB1F31BB4600C5FC74 /* ConfirmForgetPassViewController.xib in Resources */, 6E84E3C01F27A9B1001EB88E /* SNSViewController.xib in Resources */, @@ -554,6 +595,8 @@ 6EF1630A1F29069300DA306C /* Localizable.strings in Resources */, 6E84E3B11F27A975001EB88E /* HomeViewController.xib in Resources */, 6E84E3B61F27A98B001EB88E /* HistoryViewController.xib in Resources */, + E99E13B21F33720600C78787 /* LabelCollectionViewCell.xib in Resources */, + E9F73DCD1F338A0F004A3A6F /* HistoryListTableViewCell.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -633,13 +676,16 @@ 6E8DA0F71F2BAC3400CCE941 /* TodayViewController.m in Sources */, 6E7F93451F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.m in Sources */, 6E48AF0D1F2F9D3300C1D184 /* CustomTextField.m in Sources */, + E99E13AB1F336F3600C78787 /* CollectionView.m in Sources */, 6E84E3B01F27A975001EB88E /* HomeViewController.m in Sources */, 6E84E3791F27A701001EB88E /* AppDelegate.m in Sources */, 6E84E3BA1F27A9A0001EB88E /* RankingViewController.m in Sources */, 6E7F93441F35872B00EFBC71 /* TPKeyboardAvoidingTableView.m in Sources */, + E9F73DCC1F338A0F004A3A6F /* HistoryListTableViewCell.m in Sources */, 6EDC8BF41F2C68D700765ACC /* CMMotionActivityExtra.m in Sources */, 9CBDA0FF1F2F03810055DED1 /* RegisterViewController.m in Sources */, 9CA8AEEA1F31BB4600C5FC74 /* ConfirmForgetPassViewController.m in Sources */, + E99E13B11F33720600C78787 /* LabelCollectionViewCell.m in Sources */, 6EDC8BEE1F2C2FB800765ACC /* Utilities.m in Sources */, 6E84E3C51F27ACAE001EB88E /* MapViewController.m in Sources */, 6E18CEDC1F2E40F50029891F /* User.m in Sources */, diff --git a/LifeLog/LifeLog/AppDelegate.m b/LifeLog/LifeLog/AppDelegate.m index 08ceefe..1336688 100644 --- a/LifeLog/LifeLog/AppDelegate.m +++ b/LifeLog/LifeLog/AppDelegate.m @@ -83,7 +83,8 @@ HistoryViewController *historyVC = [[HistoryViewController alloc] initWithNibName:@"HistoryViewController" bundle:nil]; UINavigationController *naviHistory = [[UINavigationController alloc] initWithRootViewController:historyVC]; naviHistory.tabBarItem = [[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"lifelog.tapbar.history", @"") image:[UIImage imageNamed:@"tapbar_history"] tag:2]; - + naviHistory.navigationBar.hidden = YES; + RankingViewController *rankingVC = [[RankingViewController alloc] initWithNibName:@"RankingViewController" bundle:nil]; UINavigationController *naviRanking = [[UINavigationController alloc] initWithRootViewController:rankingVC]; naviRanking.tabBarItem = [[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"lifelog.tapbar.ranking", @"") image:[UIImage imageNamed:@"tapbar_ranking"] tag:3]; diff --git a/LifeLog/LifeLog/CollectionView.h b/LifeLog/LifeLog/CollectionView.h new file mode 100644 index 0000000..72e672c --- /dev/null +++ b/LifeLog/LifeLog/CollectionView.h @@ -0,0 +1,36 @@ +// +// CollectionView.h +// LifeLog +// +// Created by nvtu on 8/3/17. +// Copyright © 2017 PhongNV. All rights reserved. +// + +#import + +@interface CollectionView : UIView { + int _number; + int _selectedIndex; + + float _spacing; + float _cornerRadius; + + UIColor * _highlightColor; + UIColor * _normalColor; + UIColor * _textColor; + + NSArray * _arrayTitle; +} + +@property (weak, nonatomic) IBOutlet UIView *view; +@property (weak, nonatomic) IBOutlet UICollectionView *collectionView; + +-(void) setButtonNumber: (int) number; +-(void) setSpacing: (float) spacing; +-(void) setCornerRadius: (float) radius; +-(void) setSelectedIndex: (int) index; +-(void) setNormalColor: (UIColor *) normal highlightColor: (UIColor *) highlight textColor: (UIColor *) text; +-(void) setArrayTitle: (NSArray *) title; + +-(int) getCurrentIndex; +@end diff --git a/LifeLog/LifeLog/CollectionView.m b/LifeLog/LifeLog/CollectionView.m new file mode 100644 index 0000000..3b0d85f --- /dev/null +++ b/LifeLog/LifeLog/CollectionView.m @@ -0,0 +1,97 @@ +// +// CollectionView.m +// LifeLog +// +// Created by nvtu on 8/3/17. +// Copyright © 2017 PhongNV. All rights reserved. +// + +#import "CollectionView.h" +#import "LabelCollectionViewCell.h" +#import "Utilities.h" + +@implementation CollectionView + +-(id) initWithCoder:(NSCoder *)aDecoder { + self = [super initWithCoder:aDecoder]; + if(self) { + [[UINib nibWithNibName:@"CollectionView" bundle:nil] instantiateWithOwner:self options:nil]; + [self addSubview:self.view]; + self.view.frame = self.bounds; + _number = 0; + _spacing = 1; + _cornerRadius = 5.0; + _highlightColor = [Utilities convertHecToColor:0x999999]; + _normalColor = [UIColor whiteColor]; + _textColor = [UIColor blackColor]; + } + return self; +} + +-(void) awakeFromNib { + [super awakeFromNib]; + [self.collectionView registerNib:[UINib nibWithNibName:@"LabelCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:@"LabelCell"]; +} + +-(void) setButtonNumber: (int) number { + _number = number; +} + +-(void) setSpacing: (float) spacing { + _spacing = spacing; +} + +-(void) setCornerRadius: (float) radius { + _cornerRadius = radius; +} + +-(void) setSelectedIndex: (int) index { + _selectedIndex = index; + [_collectionView reloadData]; +} + +-(void) setNormalColor: (UIColor *) normal highlightColor: (UIColor *) highlight textColor: (UIColor *) text { + _normalColor = normal; + _highlightColor = highlight; + _textColor = text; +} + +-(void) setArrayTitle: (NSArray *) title { + _arrayTitle = title; +} + +-(int) getCurrentIndex { + return _selectedIndex; +} + +#pragma mark - UICollectionView Delegate +- (NSInteger) numberOfSectionsInCollectionView:(UICollectionView *)collectionView { + return 1; +} + +- (NSInteger) collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { + return _number; +} + +- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { + LabelCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"LabelCell" forIndexPath:indexPath]; + cell.lblTitle.text = [_arrayTitle objectAtIndex:indexPath.row]; + cell.lblTitle.textColor = _textColor; + cell.lblTitle.layer.cornerRadius = _cornerRadius; + cell.lblTitle.backgroundColor = (indexPath.row == _selectedIndex) ? _highlightColor : _normalColor; + return cell; +} + +- (CGSize) collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { + return CGSizeMake((self.frame.size.width - (_spacing * _number)) / _number, collectionView.frame.size.height); +} + +- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section { + return _spacing; +} + +-(void) collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { + _selectedIndex = indexPath.row; + [collectionView reloadData]; +} +@end diff --git a/LifeLog/LifeLog/CollectionView.xib b/LifeLog/LifeLog/CollectionView.xib new file mode 100644 index 0000000..c088d70 --- /dev/null +++ b/LifeLog/LifeLog/CollectionView.xib @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LifeLog/LifeLog/HistoryListTableViewCell.h b/LifeLog/LifeLog/HistoryListTableViewCell.h new file mode 100644 index 0000000..73bdf56 --- /dev/null +++ b/LifeLog/LifeLog/HistoryListTableViewCell.h @@ -0,0 +1,19 @@ +// +// HistoryListTableViewCell.h +// LifeLog +// +// Created by nvtu on 8/3/17. +// Copyright © 2017 PhongNV. All rights reserved. +// + +#import + +@interface HistoryListTableViewCell : UITableViewCell + +@property (weak, nonatomic) IBOutlet UILabel *lblTitle; +@property (weak, nonatomic) IBOutlet UILabel *lblStep; +@property (weak, nonatomic) IBOutlet UILabel *lblDistance; +@property (weak, nonatomic) IBOutlet UILabel *lblPower; +@property (weak, nonatomic) IBOutlet UILabel *lblDuration; + +@end diff --git a/LifeLog/LifeLog/HistoryListTableViewCell.m b/LifeLog/LifeLog/HistoryListTableViewCell.m new file mode 100644 index 0000000..b26b130 --- /dev/null +++ b/LifeLog/LifeLog/HistoryListTableViewCell.m @@ -0,0 +1,24 @@ +// +// HistoryListTableViewCell.m +// LifeLog +// +// Created by nvtu on 8/3/17. +// Copyright © 2017 PhongNV. All rights reserved. +// + +#import "HistoryListTableViewCell.h" + +@implementation HistoryListTableViewCell + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/LifeLog/LifeLog/HistoryListTableViewCell.xib b/LifeLog/LifeLog/HistoryListTableViewCell.xib new file mode 100644 index 0000000..766f74c --- /dev/null +++ b/LifeLog/LifeLog/HistoryListTableViewCell.xib @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LifeLog/LifeLog/HistoryViewController.h b/LifeLog/LifeLog/HistoryViewController.h index 43155ea..67d0d67 100644 --- a/LifeLog/LifeLog/HistoryViewController.h +++ b/LifeLog/LifeLog/HistoryViewController.h @@ -8,6 +8,15 @@ #import -@interface HistoryViewController : UIViewController +#import "CollectionView.h" +@interface HistoryViewController : UIViewController + +@property (weak, nonatomic) IBOutlet UILabel *lblHeader; +@property (weak, nonatomic) IBOutlet CollectionView *viewCollectionTime; +@property (weak, nonatomic) IBOutlet CollectionView *viewCollectionType; +@property (weak, nonatomic) IBOutlet CollectionView *viewCollectionShare; + +@property (weak, nonatomic) IBOutlet UITableView *tableListHistory; +@property (weak, nonatomic) IBOutlet UIScrollView *scrollView; @end diff --git a/LifeLog/LifeLog/HistoryViewController.m b/LifeLog/LifeLog/HistoryViewController.m index 67b3740..184d6e8 100644 --- a/LifeLog/LifeLog/HistoryViewController.m +++ b/LifeLog/LifeLog/HistoryViewController.m @@ -7,6 +7,9 @@ // #import "HistoryViewController.h" +#import "Utilities.h" + +#import "HistoryListTableViewCell.h" @interface HistoryViewController () @@ -18,6 +21,33 @@ [super viewDidLoad]; // Do any additional setup after loading the view from its nib. self.title = NSLocalizedString(@"lifelog.tapbar.history", nil); + self.lblHeader.text = NSLocalizedString(@"lifelog.tapbar.history", nil); + + [self.viewCollectionTime setButtonNumber:5]; + [self.viewCollectionTime setSpacing:2]; + [self.viewCollectionTime setArrayTitle:[NSArray arrayWithObjects:@"1日", @"1週間", @"1ヶ月", @"3ヶ月", @"6ヶ月", nil]]; + + [self.viewCollectionType setButtonNumber:3]; + [self.viewCollectionType setSpacing:0]; + [self.viewCollectionType setCornerRadius:0]; + [self.viewCollectionType setNormalColor:[Utilities convertHecToColor:0x191919] highlightColor:[Utilities convertHecToColor:0x474747] textColor:[UIColor whiteColor]]; + [self.viewCollectionType setArrayTitle:[NSArray arrayWithObjects:@"BIKE", @"WALKING", @"RUNNING", nil]]; + + [self.viewCollectionShare setButtonNumber:5]; + [self.viewCollectionShare setSpacing:3]; + [self.viewCollectionShare setSelectedIndex:-1]; + [self.viewCollectionShare setArrayTitle:[NSArray arrayWithObjects:@"facebook", @"twitter", @"line", @"メール", @"その他", nil]]; + + [self.tableListHistory registerNib:[UINib nibWithNibName:@"HistoryListTableViewCell" bundle:nil] forCellReuseIdentifier:@"HistoryListCell"]; +} + +- (void)viewDidAppear:(BOOL) animated +{ + [super viewDidAppear:animated]; + self.scrollView.contentSize = CGSizeMake(self.view.frame.size.width, 400); + [self.scrollView setNeedsLayout]; + [self.scrollView setNeedsUpdateConstraints]; + } - (void)didReceiveMemoryWarning { @@ -25,4 +55,14 @@ // Dispose of any resources that can be recreated. } +#pragma mark UITableView Delegate +- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return 4; +} + +- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + HistoryListTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"HistoryListCell"]; + return cell; +} + @end diff --git a/LifeLog/LifeLog/HistoryViewController.xib b/LifeLog/LifeLog/HistoryViewController.xib index 38e1996..e7dffaf 100644 --- a/LifeLog/LifeLog/HistoryViewController.xib +++ b/LifeLog/LifeLog/HistoryViewController.xib @@ -1,20 +1,454 @@ - - + + + + + - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LifeLog/LifeLog/LabelCollectionViewCell.h b/LifeLog/LifeLog/LabelCollectionViewCell.h new file mode 100644 index 0000000..9912f37 --- /dev/null +++ b/LifeLog/LifeLog/LabelCollectionViewCell.h @@ -0,0 +1,13 @@ +// +// LabelCollectionViewCell.h +// LifeLog +// +// Created by nvtu on 8/3/17. +// Copyright © 2017 PhongNV. All rights reserved. +// + +#import + +@interface LabelCollectionViewCell : UICollectionViewCell +@property (weak, nonatomic) IBOutlet UILabel *lblTitle; +@end diff --git a/LifeLog/LifeLog/LabelCollectionViewCell.m b/LifeLog/LifeLog/LabelCollectionViewCell.m new file mode 100644 index 0000000..48bf19a --- /dev/null +++ b/LifeLog/LifeLog/LabelCollectionViewCell.m @@ -0,0 +1,19 @@ +// +// LabelCollectionViewCell.m +// LifeLog +// +// Created by nvtu on 8/3/17. +// Copyright © 2017 PhongNV. All rights reserved. +// + +#import "LabelCollectionViewCell.h" + +@implementation LabelCollectionViewCell + +- (void)awakeFromNib { + [super awakeFromNib]; + self.lblTitle.layer.masksToBounds = true; + // Initialization code +} + +@end diff --git a/LifeLog/LifeLog/LabelCollectionViewCell.xib b/LifeLog/LifeLog/LabelCollectionViewCell.xib new file mode 100644 index 0000000..7128396 --- /dev/null +++ b/LifeLog/LifeLog/LabelCollectionViewCell.xib @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 1.8.5.3