Compare View

switch
from
...
to
 
Commits (7)

Changes

Showing 36 changed files Inline Diff

LifeLog/LifeLog.xcodeproj/project.pbxproj
1 // !$*UTF8*$! 1 // !$*UTF8*$!
2 { 2 {
3 archiveVersion = 1; 3 archiveVersion = 1;
4 classes = { 4 classes = {
5 }; 5 };
6 objectVersion = 46; 6 objectVersion = 46;
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
10 011799F0F2B47D80472673CE /* Pods_LifeLog.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D9F4ED6F06C8F252B9EAF48 /* Pods_LifeLog.framework */; }; 10 011799F0F2B47D80472673CE /* Pods_LifeLog.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D9F4ED6F06C8F252B9EAF48 /* Pods_LifeLog.framework */; };
11 6E18CED31F2E39DB0029891F /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E18CED11F2E39DB0029891F /* LoginViewController.m */; }; 11 6E18CED31F2E39DB0029891F /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E18CED11F2E39DB0029891F /* LoginViewController.m */; };
12 6E18CED41F2E39DB0029891F /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6E18CED21F2E39DB0029891F /* LoginViewController.xib */; }; 12 6E18CED41F2E39DB0029891F /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6E18CED21F2E39DB0029891F /* LoginViewController.xib */; };
13 6E18CED81F2E3C840029891F /* ServerAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E18CED71F2E3C840029891F /* ServerAPI.m */; }; 13 6E18CED81F2E3C840029891F /* ServerAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E18CED71F2E3C840029891F /* ServerAPI.m */; };
14 6E18CEDC1F2E40F50029891F /* User.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E18CEDB1F2E40F50029891F /* User.m */; }; 14 6E18CEDC1F2E40F50029891F /* User.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E18CEDB1F2E40F50029891F /* User.m */; };
15 6E48AF0D1F2F9D3300C1D184 /* CustomTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E48AF0C1F2F9D3200C1D184 /* CustomTextField.m */; }; 15 6E48AF0D1F2F9D3300C1D184 /* CustomTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E48AF0C1F2F9D3200C1D184 /* CustomTextField.m */; };
16 6E7F93421F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7F933B1F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.m */; }; 16 6E7F93421F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7F933B1F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.m */; };
17 6E7F93431F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7F933D1F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.m */; }; 17 6E7F93431F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7F933D1F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.m */; };
18 6E7F93441F35872B00EFBC71 /* TPKeyboardAvoidingTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7F933F1F35872B00EFBC71 /* TPKeyboardAvoidingTableView.m */; }; 18 6E7F93441F35872B00EFBC71 /* TPKeyboardAvoidingTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7F933F1F35872B00EFBC71 /* TPKeyboardAvoidingTableView.m */; };
19 6E7F93451F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7F93411F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.m */; }; 19 6E7F93451F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7F93411F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.m */; };
20 6E84E3761F27A701001EB88E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3751F27A701001EB88E /* main.m */; }; 20 6E84E3761F27A701001EB88E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3751F27A701001EB88E /* main.m */; };
21 6E84E3791F27A701001EB88E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3781F27A701001EB88E /* AppDelegate.m */; }; 21 6E84E3791F27A701001EB88E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3781F27A701001EB88E /* AppDelegate.m */; };
22 6E84E3811F27A701001EB88E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6E84E3801F27A701001EB88E /* Assets.xcassets */; }; 22 6E84E3811F27A701001EB88E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6E84E3801F27A701001EB88E /* Assets.xcassets */; };
23 6E84E3841F27A701001EB88E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6E84E3821F27A701001EB88E /* LaunchScreen.storyboard */; }; 23 6E84E3841F27A701001EB88E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6E84E3821F27A701001EB88E /* LaunchScreen.storyboard */; };
24 6E84E38F1F27A703001EB88E /* LifeLogTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E38E1F27A703001EB88E /* LifeLogTests.m */; }; 24 6E84E38F1F27A703001EB88E /* LifeLogTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E38E1F27A703001EB88E /* LifeLogTests.m */; };
25 6E84E39A1F27A703001EB88E /* LifeLogUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3991F27A703001EB88E /* LifeLogUITests.m */; }; 25 6E84E39A1F27A703001EB88E /* LifeLogUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3991F27A703001EB88E /* LifeLogUITests.m */; };
26 6E84E3B01F27A975001EB88E /* HomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3AE1F27A975001EB88E /* HomeViewController.m */; }; 26 6E84E3B01F27A975001EB88E /* HomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3AE1F27A975001EB88E /* HomeViewController.m */; };
27 6E84E3B11F27A975001EB88E /* HomeViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6E84E3AF1F27A975001EB88E /* HomeViewController.xib */; }; 27 6E84E3B11F27A975001EB88E /* HomeViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6E84E3AF1F27A975001EB88E /* HomeViewController.xib */; };
28 6E84E3B51F27A98B001EB88E /* HistoryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3B31F27A98B001EB88E /* HistoryViewController.m */; }; 28 6E84E3B51F27A98B001EB88E /* HistoryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3B31F27A98B001EB88E /* HistoryViewController.m */; };
29 6E84E3B61F27A98B001EB88E /* HistoryViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6E84E3B41F27A98B001EB88E /* HistoryViewController.xib */; }; 29 6E84E3B61F27A98B001EB88E /* HistoryViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6E84E3B41F27A98B001EB88E /* HistoryViewController.xib */; };
30 6E84E3BA1F27A9A0001EB88E /* RankingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3B81F27A9A0001EB88E /* RankingViewController.m */; }; 30 6E84E3BA1F27A9A0001EB88E /* RankingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3B81F27A9A0001EB88E /* RankingViewController.m */; };
31 6E84E3BB1F27A9A0001EB88E /* RankingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6E84E3B91F27A9A0001EB88E /* RankingViewController.xib */; }; 31 6E84E3BB1F27A9A0001EB88E /* RankingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6E84E3B91F27A9A0001EB88E /* RankingViewController.xib */; };
32 6E84E3BF1F27A9B1001EB88E /* SNSViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3BD1F27A9B1001EB88E /* SNSViewController.m */; }; 32 6E84E3BF1F27A9B1001EB88E /* SNSViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3BD1F27A9B1001EB88E /* SNSViewController.m */; };
33 6E84E3C01F27A9B1001EB88E /* SNSViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6E84E3BE1F27A9B1001EB88E /* SNSViewController.xib */; }; 33 6E84E3C01F27A9B1001EB88E /* SNSViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6E84E3BE1F27A9B1001EB88E /* SNSViewController.xib */; };
34 6E84E3C51F27ACAE001EB88E /* MapViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3C31F27ACAE001EB88E /* MapViewController.m */; }; 34 6E84E3C51F27ACAE001EB88E /* MapViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3C31F27ACAE001EB88E /* MapViewController.m */; };
35 6E84E3C61F27ACAE001EB88E /* MapViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6E84E3C41F27ACAE001EB88E /* MapViewController.xib */; }; 35 6E84E3C61F27ACAE001EB88E /* MapViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6E84E3C41F27ACAE001EB88E /* MapViewController.xib */; };
36 6E8DA0F71F2BAC3400CCE941 /* TodayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E8DA0F51F2BAC3400CCE941 /* TodayViewController.m */; }; 36 6E8DA0F71F2BAC3400CCE941 /* TodayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E8DA0F51F2BAC3400CCE941 /* TodayViewController.m */; };
37 6E8DA0F81F2BAC3500CCE941 /* TodayViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6E8DA0F61F2BAC3400CCE941 /* TodayViewController.xib */; }; 37 6E8DA0F81F2BAC3500CCE941 /* TodayViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6E8DA0F61F2BAC3400CCE941 /* TodayViewController.xib */; };
38 6EA4AF311F40BB7A00F52CFE /* StepObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EA4AF2C1F40BB7A00F52CFE /* StepObject.m */; }; 38 6EA4AF311F40BB7A00F52CFE /* StepObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EA4AF2C1F40BB7A00F52CFE /* StepObject.m */; };
39 6EA4AF321F40BB7A00F52CFE /* TargetInfor.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EA4AF2E1F40BB7A00F52CFE /* TargetInfor.m */; }; 39 6EA4AF321F40BB7A00F52CFE /* TargetInfor.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EA4AF2E1F40BB7A00F52CFE /* TargetInfor.m */; };
40 6EA4AF331F40BB7A00F52CFE /* TopObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EA4AF301F40BB7A00F52CFE /* TopObject.m */; }; 40 6EA4AF331F40BB7A00F52CFE /* TopObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EA4AF301F40BB7A00F52CFE /* TopObject.m */; };
41 6ECC40711F2A5FEB00AAEB97 /* NSDate+helper.m in Sources */ = {isa = PBXBuildFile; fileRef = 6ECC40701F2A5FEB00AAEB97 /* NSDate+helper.m */; }; 41 6ECC40711F2A5FEB00AAEB97 /* NSDate+helper.m in Sources */ = {isa = PBXBuildFile; fileRef = 6ECC40701F2A5FEB00AAEB97 /* NSDate+helper.m */; };
42 6EDC8BEE1F2C2FB800765ACC /* Utilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EDC8BED1F2C2FB800765ACC /* Utilities.m */; }; 42 6EDC8BEE1F2C2FB800765ACC /* Utilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EDC8BED1F2C2FB800765ACC /* Utilities.m */; };
43 6EDC8BF41F2C68D700765ACC /* CMMotionActivityExtra.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EDC8BF31F2C68D700765ACC /* CMMotionActivityExtra.m */; }; 43 6EDC8BF41F2C68D700765ACC /* CMMotionActivityExtra.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EDC8BF31F2C68D700765ACC /* CMMotionActivityExtra.m */; };
44 6EF1630A1F29069300DA306C /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6EF163091F29069300DA306C /* Localizable.strings */; }; 44 6EF1630A1F29069300DA306C /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6EF163091F29069300DA306C /* Localizable.strings */; };
45 9CA8AEEA1F31BB4600C5FC74 /* ConfirmForgetPassViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CA8AEE81F31BB4600C5FC74 /* ConfirmForgetPassViewController.m */; }; 45 9CA8AEEA1F31BB4600C5FC74 /* ConfirmForgetPassViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CA8AEE81F31BB4600C5FC74 /* ConfirmForgetPassViewController.m */; };
46 9CA8AEEB1F31BB4600C5FC74 /* ConfirmForgetPassViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CA8AEE91F31BB4600C5FC74 /* ConfirmForgetPassViewController.xib */; }; 46 9CA8AEEB1F31BB4600C5FC74 /* ConfirmForgetPassViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CA8AEE91F31BB4600C5FC74 /* ConfirmForgetPassViewController.xib */; };
47 9CBDA0FA1F2ECE2C0055DED1 /* BaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBDA0F91F2ECE2C0055DED1 /* BaseViewController.m */; }; 47 9CBDA0FA1F2ECE2C0055DED1 /* BaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBDA0F91F2ECE2C0055DED1 /* BaseViewController.m */; };
48 9CBDA0FF1F2F03810055DED1 /* RegisterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBDA0FD1F2F03810055DED1 /* RegisterViewController.m */; }; 48 9CBDA0FF1F2F03810055DED1 /* RegisterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBDA0FD1F2F03810055DED1 /* RegisterViewController.m */; };
49 9CBDA1001F2F03810055DED1 /* RegisterViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBDA0FE1F2F03810055DED1 /* RegisterViewController.xib */; }; 49 9CBDA1001F2F03810055DED1 /* RegisterViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBDA0FE1F2F03810055DED1 /* RegisterViewController.xib */; };
50 E933E66B1F3E04A6002926F5 /* SearchGroupViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E933E6691F3E04A6002926F5 /* SearchGroupViewController.m */; }; 50 E933E66B1F3E04A6002926F5 /* SearchGroupViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E933E6691F3E04A6002926F5 /* SearchGroupViewController.m */; };
51 E933E66C1F3E04A6002926F5 /* SearchGroupViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E933E66A1F3E04A6002926F5 /* SearchGroupViewController.xib */; }; 51 E933E66C1F3E04A6002926F5 /* SearchGroupViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E933E66A1F3E04A6002926F5 /* SearchGroupViewController.xib */; };
52 E933E6701F3E09B6002926F5 /* SearchGroupTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E933E66E1F3E09B6002926F5 /* SearchGroupTableViewCell.m */; }; 52 E933E6701F3E09B6002926F5 /* SearchGroupTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E933E66E1F3E09B6002926F5 /* SearchGroupTableViewCell.m */; };
53 E933E6711F3E09B6002926F5 /* SearchGroupTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E933E66F1F3E09B6002926F5 /* SearchGroupTableViewCell.xib */; }; 53 E933E6711F3E09B6002926F5 /* SearchGroupTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E933E66F1F3E09B6002926F5 /* SearchGroupTableViewCell.xib */; };
54 E933E6741F3E0E4E002926F5 /* GroupObject.m in Sources */ = {isa = PBXBuildFile; fileRef = E933E6731F3E0E4E002926F5 /* GroupObject.m */; }; 54 E933E6741F3E0E4E002926F5 /* GroupObject.m in Sources */ = {isa = PBXBuildFile; fileRef = E933E6731F3E0E4E002926F5 /* GroupObject.m */; };
55 E933E6791F40513C002926F5 /* GroupDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E933E6771F40513C002926F5 /* GroupDetailViewController.m */; }; 55 E933E6791F40513C002926F5 /* GroupDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E933E6771F40513C002926F5 /* GroupDetailViewController.m */; };
56 E933E67A1F40513C002926F5 /* GroupDetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E933E6781F40513C002926F5 /* GroupDetailViewController.xib */; }; 56 E933E67A1F40513C002926F5 /* GroupDetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E933E6781F40513C002926F5 /* GroupDetailViewController.xib */; };
57 E9373E471F3596940059355A /* AutoTransLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = E9373E461F3596940059355A /* AutoTransLabel.m */; }; 57 E9373E471F3596940059355A /* AutoTransLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = E9373E461F3596940059355A /* AutoTransLabel.m */; };
58 E9373E4A1F35AA180059355A /* HistoryObject.m in Sources */ = {isa = PBXBuildFile; fileRef = E9373E491F35AA180059355A /* HistoryObject.m */; }; 58 E9373E4A1F35AA180059355A /* HistoryObject.m in Sources */ = {isa = PBXBuildFile; fileRef = E9373E491F35AA180059355A /* HistoryObject.m */; };
59 E9373E4D1F361A230059355A /* HistoryGraphObject.m in Sources */ = {isa = PBXBuildFile; fileRef = E9373E4C1F361A230059355A /* HistoryGraphObject.m */; }; 59 E9373E4D1F361A230059355A /* HistoryGraphObject.m in Sources */ = {isa = PBXBuildFile; fileRef = E9373E4C1F361A230059355A /* HistoryGraphObject.m */; };
60 E9497FD51F46EC1100E6AF8D /* MemberObject.m in Sources */ = {isa = PBXBuildFile; fileRef = E9497FD41F46EC1100E6AF8D /* MemberObject.m */; };
61 E95F4CED1F475C6A00D27E80 /* CreateGroupViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E95F4CEB1F475C6A00D27E80 /* CreateGroupViewController.m */; };
62 E95F4CEE1F475C6A00D27E80 /* CreateGroupViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E95F4CEC1F475C6A00D27E80 /* CreateGroupViewController.xib */; };
63 E95F4CF31F48B39200D27E80 /* MyGroupViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E95F4CF11F48B39200D27E80 /* MyGroupViewController.m */; };
64 E95F4CF41F48B39200D27E80 /* MyGroupViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E95F4CF21F48B39200D27E80 /* MyGroupViewController.xib */; };
60 E9497FD51F46EC1100E6AF8D /* MemberObject.m in Sources */ = {isa = PBXBuildFile; fileRef = E9497FD41F46EC1100E6AF8D /* MemberObject.m */; }; 65 E9682E2E1F39675A00FE05A2 /* RankingTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E9682E2C1F39675A00FE05A2 /* RankingTableViewCell.m */; };
61 E95F4CED1F475C6A00D27E80 /* CreateGroupViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E95F4CEB1F475C6A00D27E80 /* CreateGroupViewController.m */; }; 66 E9682E2F1F39675A00FE05A2 /* RankingTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E9682E2D1F39675A00FE05A2 /* RankingTableViewCell.xib */; };
62 E95F4CEE1F475C6A00D27E80 /* CreateGroupViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E95F4CEC1F475C6A00D27E80 /* CreateGroupViewController.xib */; }; 67 E968550A1F3C444900317CEF /* AutoTransButton.m in Sources */ = {isa = PBXBuildFile; fileRef = E96855091F3C444900317CEF /* AutoTransButton.m */; };
63 E95F4CF31F48B39200D27E80 /* MyGroupViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E95F4CF11F48B39200D27E80 /* MyGroupViewController.m */; }; 68 E96855111F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E968550F1F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.m */; };
64 E95F4CF41F48B39200D27E80 /* MyGroupViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E95F4CF21F48B39200D27E80 /* MyGroupViewController.xib */; }; 69 E96855121F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E96855101F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.xib */; };
65 E9682E2E1F39675A00FE05A2 /* RankingTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E9682E2C1F39675A00FE05A2 /* RankingTableViewCell.m */; }; 70 E997E0261F3AB66500709FB1 /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E997E0251F3AB66500709FB1 /* Social.framework */; };
66 E9682E2F1F39675A00FE05A2 /* RankingTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E9682E2D1F39675A00FE05A2 /* RankingTableViewCell.xib */; }; 71 E99E13AB1F336F3600C78787 /* CollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = E99E13AA1F336F3600C78787 /* CollectionView.m */; };
67 E968550A1F3C444900317CEF /* AutoTransButton.m in Sources */ = {isa = PBXBuildFile; fileRef = E96855091F3C444900317CEF /* AutoTransButton.m */; }; 72 E99E13AD1F336F4500C78787 /* CollectionView.xib in Resources */ = {isa = PBXBuildFile; fileRef = E99E13AC1F336F4500C78787 /* CollectionView.xib */; };
68 E96855111F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E968550F1F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.m */; }; 73 E99E13B11F33720600C78787 /* LabelCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E99E13AF1F33720600C78787 /* LabelCollectionViewCell.m */; };
69 E96855121F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E96855101F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.xib */; }; 74 E99E13B21F33720600C78787 /* LabelCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E99E13B01F33720600C78787 /* LabelCollectionViewCell.xib */; };
70 E997E0261F3AB66500709FB1 /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E997E0251F3AB66500709FB1 /* Social.framework */; }; 75 E9D909211F3D559D004CF99F /* TweetObject.m in Sources */ = {isa = PBXBuildFile; fileRef = E9D909201F3D559D004CF99F /* TweetObject.m */; };
71 E99E13AB1F336F3600C78787 /* CollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = E99E13AA1F336F3600C78787 /* CollectionView.m */; }; 76 E9D909241F3D6E8C004CF99F /* BaseTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E9D909231F3D6E8C004CF99F /* BaseTableViewController.m */; };
72 E99E13AD1F336F4500C78787 /* CollectionView.xib in Resources */ = {isa = PBXBuildFile; fileRef = E99E13AC1F336F4500C78787 /* CollectionView.xib */; }; 77 E9F73DCC1F338A0F004A3A6F /* HistoryListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E9F73DCA1F338A0F004A3A6F /* HistoryListTableViewCell.m */; };
73 E99E13B11F33720600C78787 /* LabelCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E99E13AF1F33720600C78787 /* LabelCollectionViewCell.m */; }; 78 E9F73DCD1F338A0F004A3A6F /* HistoryListTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E9F73DCB1F338A0F004A3A6F /* HistoryListTableViewCell.xib */; };
74 E99E13B21F33720600C78787 /* LabelCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E99E13B01F33720600C78787 /* LabelCollectionViewCell.xib */; }; 79 /* End PBXBuildFile section */
75 E9D909211F3D559D004CF99F /* TweetObject.m in Sources */ = {isa = PBXBuildFile; fileRef = E9D909201F3D559D004CF99F /* TweetObject.m */; }; 80
76 E9D909241F3D6E8C004CF99F /* BaseTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E9D909231F3D6E8C004CF99F /* BaseTableViewController.m */; }; 81 /* Begin PBXContainerItemProxy section */
77 E9F73DCC1F338A0F004A3A6F /* HistoryListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E9F73DCA1F338A0F004A3A6F /* HistoryListTableViewCell.m */; }; 82 6E84E38B1F27A703001EB88E /* PBXContainerItemProxy */ = {
78 E9F73DCD1F338A0F004A3A6F /* HistoryListTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E9F73DCB1F338A0F004A3A6F /* HistoryListTableViewCell.xib */; }; 83 isa = PBXContainerItemProxy;
79 /* End PBXBuildFile section */ 84 containerPortal = 6E84E3691F27A700001EB88E /* Project object */;
80 85 proxyType = 1;
81 /* Begin PBXContainerItemProxy section */ 86 remoteGlobalIDString = 6E84E3701F27A700001EB88E;
82 6E84E38B1F27A703001EB88E /* PBXContainerItemProxy */ = { 87 remoteInfo = LifeLog;
83 isa = PBXContainerItemProxy; 88 };
84 containerPortal = 6E84E3691F27A700001EB88E /* Project object */; 89 6E84E3961F27A703001EB88E /* PBXContainerItemProxy */ = {
85 proxyType = 1; 90 isa = PBXContainerItemProxy;
86 remoteGlobalIDString = 6E84E3701F27A700001EB88E; 91 containerPortal = 6E84E3691F27A700001EB88E /* Project object */;
87 remoteInfo = LifeLog; 92 proxyType = 1;
88 }; 93 remoteGlobalIDString = 6E84E3701F27A700001EB88E;
89 6E84E3961F27A703001EB88E /* PBXContainerItemProxy */ = { 94 remoteInfo = LifeLog;
90 isa = PBXContainerItemProxy; 95 };
91 containerPortal = 6E84E3691F27A700001EB88E /* Project object */; 96 /* End PBXContainerItemProxy section */
92 proxyType = 1; 97
93 remoteGlobalIDString = 6E84E3701F27A700001EB88E; 98 /* Begin PBXFileReference section */
94 remoteInfo = LifeLog; 99 0FC2D57087AF4571C57FAE08 /* Pods-LifeLog.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LifeLog.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LifeLog/Pods-LifeLog.debug.xcconfig"; sourceTree = "<group>"; };
95 }; 100 2D9F4ED6F06C8F252B9EAF48 /* Pods_LifeLog.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LifeLog.framework; sourceTree = BUILT_PRODUCTS_DIR; };
96 /* End PBXContainerItemProxy section */ 101 4CFDA5714AF852358A1EB515 /* Pods-LifeLog.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LifeLog.release.xcconfig"; path = "Pods/Target Support Files/Pods-LifeLog/Pods-LifeLog.release.xcconfig"; sourceTree = "<group>"; };
97 102 6E18CED01F2E39DB0029891F /* LoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginViewController.h; sourceTree = "<group>"; };
98 /* Begin PBXFileReference section */ 103 6E18CED11F2E39DB0029891F /* LoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginViewController.m; sourceTree = "<group>"; };
99 0FC2D57087AF4571C57FAE08 /* Pods-LifeLog.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LifeLog.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LifeLog/Pods-LifeLog.debug.xcconfig"; sourceTree = "<group>"; }; 104 6E18CED21F2E39DB0029891F /* LoginViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = "<group>"; };
100 2D9F4ED6F06C8F252B9EAF48 /* Pods_LifeLog.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LifeLog.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 105 6E18CED61F2E3C840029891F /* ServerAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServerAPI.h; sourceTree = "<group>"; };
101 4CFDA5714AF852358A1EB515 /* Pods-LifeLog.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LifeLog.release.xcconfig"; path = "Pods/Target Support Files/Pods-LifeLog/Pods-LifeLog.release.xcconfig"; sourceTree = "<group>"; }; 106 6E18CED71F2E3C840029891F /* ServerAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ServerAPI.m; sourceTree = "<group>"; };
102 6E18CED01F2E39DB0029891F /* LoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginViewController.h; sourceTree = "<group>"; }; 107 6E18CEDA1F2E40F50029891F /* User.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = User.h; sourceTree = "<group>"; };
103 6E18CED11F2E39DB0029891F /* LoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginViewController.m; sourceTree = "<group>"; }; 108 6E18CEDB1F2E40F50029891F /* User.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = User.m; sourceTree = "<group>"; };
104 6E18CED21F2E39DB0029891F /* LoginViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = "<group>"; }; 109 6E18CEDD1F2E46570029891F /* Entities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Entities.h; sourceTree = "<group>"; };
105 6E18CED61F2E3C840029891F /* ServerAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServerAPI.h; sourceTree = "<group>"; }; 110 6E48AF0B1F2F9D3200C1D184 /* CustomTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomTextField.h; sourceTree = "<group>"; };
106 6E18CED71F2E3C840029891F /* ServerAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ServerAPI.m; sourceTree = "<group>"; }; 111 6E48AF0C1F2F9D3200C1D184 /* CustomTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomTextField.m; sourceTree = "<group>"; };
107 6E18CEDA1F2E40F50029891F /* User.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = User.h; sourceTree = "<group>"; }; 112 6E7F933A1F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPKeyboardAvoidingCollectionView.h; sourceTree = "<group>"; };
108 6E18CEDB1F2E40F50029891F /* User.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = User.m; sourceTree = "<group>"; }; 113 6E7F933B1F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPKeyboardAvoidingCollectionView.m; sourceTree = "<group>"; };
109 6E18CEDD1F2E46570029891F /* Entities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Entities.h; sourceTree = "<group>"; }; 114 6E7F933C1F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPKeyboardAvoidingScrollView.h; sourceTree = "<group>"; };
110 6E48AF0B1F2F9D3200C1D184 /* CustomTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomTextField.h; sourceTree = "<group>"; }; 115 6E7F933D1F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPKeyboardAvoidingScrollView.m; sourceTree = "<group>"; };
111 6E48AF0C1F2F9D3200C1D184 /* CustomTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomTextField.m; sourceTree = "<group>"; }; 116 6E7F933E1F35872B00EFBC71 /* TPKeyboardAvoidingTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPKeyboardAvoidingTableView.h; sourceTree = "<group>"; };
112 6E7F933A1F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPKeyboardAvoidingCollectionView.h; sourceTree = "<group>"; }; 117 6E7F933F1F35872B00EFBC71 /* TPKeyboardAvoidingTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPKeyboardAvoidingTableView.m; sourceTree = "<group>"; };
113 6E7F933B1F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPKeyboardAvoidingCollectionView.m; sourceTree = "<group>"; }; 118 6E7F93401F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIScrollView+TPKeyboardAvoidingAdditions.h"; sourceTree = "<group>"; };
114 6E7F933C1F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPKeyboardAvoidingScrollView.h; sourceTree = "<group>"; }; 119 6E7F93411F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+TPKeyboardAvoidingAdditions.m"; sourceTree = "<group>"; };
115 6E7F933D1F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPKeyboardAvoidingScrollView.m; sourceTree = "<group>"; }; 120 6E84E3711F27A700001EB88E /* LifeLog.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LifeLog.app; sourceTree = BUILT_PRODUCTS_DIR; };
116 6E7F933E1F35872B00EFBC71 /* TPKeyboardAvoidingTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPKeyboardAvoidingTableView.h; sourceTree = "<group>"; }; 121 6E84E3751F27A701001EB88E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
117 6E7F933F1F35872B00EFBC71 /* TPKeyboardAvoidingTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPKeyboardAvoidingTableView.m; sourceTree = "<group>"; }; 122 6E84E3771F27A701001EB88E /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
118 6E7F93401F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIScrollView+TPKeyboardAvoidingAdditions.h"; sourceTree = "<group>"; }; 123 6E84E3781F27A701001EB88E /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
119 6E7F93411F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+TPKeyboardAvoidingAdditions.m"; sourceTree = "<group>"; }; 124 6E84E3801F27A701001EB88E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
120 6E84E3711F27A700001EB88E /* LifeLog.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LifeLog.app; sourceTree = BUILT_PRODUCTS_DIR; }; 125 6E84E3831F27A701001EB88E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
121 6E84E3751F27A701001EB88E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; 126 6E84E3851F27A701001EB88E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
122 6E84E3771F27A701001EB88E /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; 127 6E84E38A1F27A703001EB88E /* LifeLogTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LifeLogTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
123 6E84E3781F27A701001EB88E /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; 128 6E84E38E1F27A703001EB88E /* LifeLogTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LifeLogTests.m; sourceTree = "<group>"; };
124 6E84E3801F27A701001EB88E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 129 6E84E3901F27A703001EB88E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
125 6E84E3831F27A701001EB88E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 130 6E84E3951F27A703001EB88E /* LifeLogUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LifeLogUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
126 6E84E3851F27A701001EB88E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 131 6E84E3991F27A703001EB88E /* LifeLogUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LifeLogUITests.m; sourceTree = "<group>"; };
127 6E84E38A1F27A703001EB88E /* LifeLogTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LifeLogTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 132 6E84E39B1F27A703001EB88E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
128 6E84E38E1F27A703001EB88E /* LifeLogTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LifeLogTests.m; sourceTree = "<group>"; }; 133 6E84E3AD1F27A975001EB88E /* HomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeViewController.h; sourceTree = "<group>"; };
129 6E84E3901F27A703001EB88E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 134 6E84E3AE1F27A975001EB88E /* HomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeViewController.m; sourceTree = "<group>"; };
130 6E84E3951F27A703001EB88E /* LifeLogUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LifeLogUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 135 6E84E3AF1F27A975001EB88E /* HomeViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HomeViewController.xib; sourceTree = "<group>"; };
131 6E84E3991F27A703001EB88E /* LifeLogUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LifeLogUITests.m; sourceTree = "<group>"; }; 136 6E84E3B21F27A98B001EB88E /* HistoryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistoryViewController.h; sourceTree = "<group>"; };
132 6E84E39B1F27A703001EB88E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 137 6E84E3B31F27A98B001EB88E /* HistoryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HistoryViewController.m; sourceTree = "<group>"; };
133 6E84E3AD1F27A975001EB88E /* HomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeViewController.h; sourceTree = "<group>"; }; 138 6E84E3B41F27A98B001EB88E /* HistoryViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HistoryViewController.xib; sourceTree = "<group>"; };
134 6E84E3AE1F27A975001EB88E /* HomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeViewController.m; sourceTree = "<group>"; }; 139 6E84E3B71F27A9A0001EB88E /* RankingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RankingViewController.h; sourceTree = "<group>"; };
135 6E84E3AF1F27A975001EB88E /* HomeViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HomeViewController.xib; sourceTree = "<group>"; }; 140 6E84E3B81F27A9A0001EB88E /* RankingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RankingViewController.m; sourceTree = "<group>"; };
136 6E84E3B21F27A98B001EB88E /* HistoryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistoryViewController.h; sourceTree = "<group>"; }; 141 6E84E3B91F27A9A0001EB88E /* RankingViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RankingViewController.xib; sourceTree = "<group>"; };
137 6E84E3B31F27A98B001EB88E /* HistoryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HistoryViewController.m; sourceTree = "<group>"; }; 142 6E84E3BC1F27A9B1001EB88E /* SNSViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SNSViewController.h; sourceTree = "<group>"; };
138 6E84E3B41F27A98B001EB88E /* HistoryViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HistoryViewController.xib; sourceTree = "<group>"; }; 143 6E84E3BD1F27A9B1001EB88E /* SNSViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SNSViewController.m; sourceTree = "<group>"; };
139 6E84E3B71F27A9A0001EB88E /* RankingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RankingViewController.h; sourceTree = "<group>"; }; 144 6E84E3BE1F27A9B1001EB88E /* SNSViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SNSViewController.xib; sourceTree = "<group>"; };
140 6E84E3B81F27A9A0001EB88E /* RankingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RankingViewController.m; sourceTree = "<group>"; }; 145 6E84E3C21F27ACAE001EB88E /* MapViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapViewController.h; sourceTree = "<group>"; };
141 6E84E3B91F27A9A0001EB88E /* RankingViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RankingViewController.xib; sourceTree = "<group>"; }; 146 6E84E3C31F27ACAE001EB88E /* MapViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MapViewController.m; sourceTree = "<group>"; };
142 6E84E3BC1F27A9B1001EB88E /* SNSViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SNSViewController.h; sourceTree = "<group>"; }; 147 6E84E3C41F27ACAE001EB88E /* MapViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MapViewController.xib; sourceTree = "<group>"; };
143 6E84E3BD1F27A9B1001EB88E /* SNSViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SNSViewController.m; sourceTree = "<group>"; }; 148 6E8DA0F41F2BAC3400CCE941 /* TodayViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TodayViewController.h; sourceTree = "<group>"; };
144 6E84E3BE1F27A9B1001EB88E /* SNSViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SNSViewController.xib; sourceTree = "<group>"; }; 149 6E8DA0F51F2BAC3400CCE941 /* TodayViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TodayViewController.m; sourceTree = "<group>"; };
145 6E84E3C21F27ACAE001EB88E /* MapViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapViewController.h; sourceTree = "<group>"; }; 150 6E8DA0F61F2BAC3400CCE941 /* TodayViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TodayViewController.xib; sourceTree = "<group>"; };
146 6E84E3C31F27ACAE001EB88E /* MapViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MapViewController.m; sourceTree = "<group>"; }; 151 6EA4AF2B1F40BB7A00F52CFE /* StepObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StepObject.h; sourceTree = "<group>"; };
147 6E84E3C41F27ACAE001EB88E /* MapViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MapViewController.xib; sourceTree = "<group>"; }; 152 6EA4AF2C1F40BB7A00F52CFE /* StepObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StepObject.m; sourceTree = "<group>"; };
148 6E8DA0F41F2BAC3400CCE941 /* TodayViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TodayViewController.h; sourceTree = "<group>"; }; 153 6EA4AF2D1F40BB7A00F52CFE /* TargetInfor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetInfor.h; sourceTree = "<group>"; };
149 6E8DA0F51F2BAC3400CCE941 /* TodayViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TodayViewController.m; sourceTree = "<group>"; }; 154 6EA4AF2E1F40BB7A00F52CFE /* TargetInfor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TargetInfor.m; sourceTree = "<group>"; };
150 6E8DA0F61F2BAC3400CCE941 /* TodayViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TodayViewController.xib; sourceTree = "<group>"; }; 155 6EA4AF2F1F40BB7A00F52CFE /* TopObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TopObject.h; sourceTree = "<group>"; };
151 6EA4AF2B1F40BB7A00F52CFE /* StepObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StepObject.h; sourceTree = "<group>"; }; 156 6EA4AF301F40BB7A00F52CFE /* TopObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TopObject.m; sourceTree = "<group>"; };
152 6EA4AF2C1F40BB7A00F52CFE /* StepObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StepObject.m; sourceTree = "<group>"; }; 157 6ECC406F1F2A5FEB00AAEB97 /* NSDate+helper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+helper.h"; sourceTree = "<group>"; };
153 6EA4AF2D1F40BB7A00F52CFE /* TargetInfor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetInfor.h; sourceTree = "<group>"; }; 158 6ECC40701F2A5FEB00AAEB97 /* NSDate+helper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+helper.m"; sourceTree = "<group>"; };
154 6EA4AF2E1F40BB7A00F52CFE /* TargetInfor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TargetInfor.m; sourceTree = "<group>"; }; 159 6EDC8BEC1F2C2FB800765ACC /* Utilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Utilities.h; sourceTree = "<group>"; };
155 6EA4AF2F1F40BB7A00F52CFE /* TopObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TopObject.h; sourceTree = "<group>"; }; 160 6EDC8BED1F2C2FB800765ACC /* Utilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Utilities.m; sourceTree = "<group>"; };
156 6EA4AF301F40BB7A00F52CFE /* TopObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TopObject.m; sourceTree = "<group>"; }; 161 6EDC8BF21F2C68D700765ACC /* CMMotionActivityExtra.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMMotionActivityExtra.h; sourceTree = "<group>"; };
157 6ECC406F1F2A5FEB00AAEB97 /* NSDate+helper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+helper.h"; sourceTree = "<group>"; }; 162 6EDC8BF31F2C68D700765ACC /* CMMotionActivityExtra.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CMMotionActivityExtra.m; sourceTree = "<group>"; };
158 6ECC40701F2A5FEB00AAEB97 /* NSDate+helper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+helper.m"; sourceTree = "<group>"; }; 163 6EF163091F29069300DA306C /* Localizable.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = "<group>"; };
159 6EDC8BEC1F2C2FB800765ACC /* Utilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Utilities.h; sourceTree = "<group>"; }; 164 9CA8AEE71F31BB4600C5FC74 /* ConfirmForgetPassViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConfirmForgetPassViewController.h; sourceTree = "<group>"; };
160 6EDC8BED1F2C2FB800765ACC /* Utilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Utilities.m; sourceTree = "<group>"; }; 165 9CA8AEE81F31BB4600C5FC74 /* ConfirmForgetPassViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConfirmForgetPassViewController.m; sourceTree = "<group>"; };
161 6EDC8BF21F2C68D700765ACC /* CMMotionActivityExtra.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMMotionActivityExtra.h; sourceTree = "<group>"; }; 166 9CA8AEE91F31BB4600C5FC74 /* ConfirmForgetPassViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ConfirmForgetPassViewController.xib; sourceTree = "<group>"; };
162 6EDC8BF31F2C68D700765ACC /* CMMotionActivityExtra.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CMMotionActivityExtra.m; sourceTree = "<group>"; }; 167 9CBDA0F81F2ECE2C0055DED1 /* BaseViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseViewController.h; sourceTree = "<group>"; };
163 6EF163091F29069300DA306C /* Localizable.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = "<group>"; }; 168 9CBDA0F91F2ECE2C0055DED1 /* BaseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BaseViewController.m; sourceTree = "<group>"; };
164 9CA8AEE71F31BB4600C5FC74 /* ConfirmForgetPassViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConfirmForgetPassViewController.h; sourceTree = "<group>"; }; 169 9CBDA0FC1F2F03810055DED1 /* RegisterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterViewController.h; sourceTree = "<group>"; };
165 9CA8AEE81F31BB4600C5FC74 /* ConfirmForgetPassViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConfirmForgetPassViewController.m; sourceTree = "<group>"; }; 170 9CBDA0FD1F2F03810055DED1 /* RegisterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegisterViewController.m; sourceTree = "<group>"; };
166 9CA8AEE91F31BB4600C5FC74 /* ConfirmForgetPassViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ConfirmForgetPassViewController.xib; sourceTree = "<group>"; }; 171 9CBDA0FE1F2F03810055DED1 /* RegisterViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RegisterViewController.xib; sourceTree = "<group>"; };
167 9CBDA0F81F2ECE2C0055DED1 /* BaseViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseViewController.h; sourceTree = "<group>"; }; 172 E933E6681F3E04A6002926F5 /* SearchGroupViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchGroupViewController.h; sourceTree = "<group>"; };
168 9CBDA0F91F2ECE2C0055DED1 /* BaseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BaseViewController.m; sourceTree = "<group>"; }; 173 E933E6691F3E04A6002926F5 /* SearchGroupViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchGroupViewController.m; sourceTree = "<group>"; };
169 9CBDA0FC1F2F03810055DED1 /* RegisterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterViewController.h; sourceTree = "<group>"; }; 174 E933E66A1F3E04A6002926F5 /* SearchGroupViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SearchGroupViewController.xib; sourceTree = "<group>"; };
170 9CBDA0FD1F2F03810055DED1 /* RegisterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegisterViewController.m; sourceTree = "<group>"; }; 175 E933E66D1F3E09B6002926F5 /* SearchGroupTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchGroupTableViewCell.h; sourceTree = "<group>"; };
171 9CBDA0FE1F2F03810055DED1 /* RegisterViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RegisterViewController.xib; sourceTree = "<group>"; }; 176 E933E66E1F3E09B6002926F5 /* SearchGroupTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchGroupTableViewCell.m; sourceTree = "<group>"; };
172 E933E6681F3E04A6002926F5 /* SearchGroupViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchGroupViewController.h; sourceTree = "<group>"; }; 177 E933E66F1F3E09B6002926F5 /* SearchGroupTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SearchGroupTableViewCell.xib; sourceTree = "<group>"; };
173 E933E6691F3E04A6002926F5 /* SearchGroupViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchGroupViewController.m; sourceTree = "<group>"; }; 178 E933E6721F3E0E4E002926F5 /* GroupObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupObject.h; sourceTree = "<group>"; };
174 E933E66A1F3E04A6002926F5 /* SearchGroupViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SearchGroupViewController.xib; sourceTree = "<group>"; }; 179 E933E6731F3E0E4E002926F5 /* GroupObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GroupObject.m; sourceTree = "<group>"; };
175 E933E66D1F3E09B6002926F5 /* SearchGroupTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchGroupTableViewCell.h; sourceTree = "<group>"; }; 180 E933E6761F40513C002926F5 /* GroupDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupDetailViewController.h; sourceTree = "<group>"; };
176 E933E66E1F3E09B6002926F5 /* SearchGroupTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchGroupTableViewCell.m; sourceTree = "<group>"; }; 181 E933E6771F40513C002926F5 /* GroupDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GroupDetailViewController.m; sourceTree = "<group>"; };
177 E933E66F1F3E09B6002926F5 /* SearchGroupTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SearchGroupTableViewCell.xib; sourceTree = "<group>"; }; 182 E933E6781F40513C002926F5 /* GroupDetailViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = GroupDetailViewController.xib; sourceTree = "<group>"; };
178 E933E6721F3E0E4E002926F5 /* GroupObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupObject.h; sourceTree = "<group>"; }; 183 E9373E451F3596940059355A /* AutoTransLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutoTransLabel.h; sourceTree = "<group>"; };
179 E933E6731F3E0E4E002926F5 /* GroupObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GroupObject.m; sourceTree = "<group>"; }; 184 E9373E461F3596940059355A /* AutoTransLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AutoTransLabel.m; sourceTree = "<group>"; };
180 E933E6761F40513C002926F5 /* GroupDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupDetailViewController.h; sourceTree = "<group>"; }; 185 E9373E481F35AA180059355A /* HistoryObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistoryObject.h; sourceTree = "<group>"; };
181 E933E6771F40513C002926F5 /* GroupDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GroupDetailViewController.m; sourceTree = "<group>"; }; 186 E9373E491F35AA180059355A /* HistoryObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HistoryObject.m; sourceTree = "<group>"; };
182 E933E6781F40513C002926F5 /* GroupDetailViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = GroupDetailViewController.xib; sourceTree = "<group>"; }; 187 E9373E4B1F361A230059355A /* HistoryGraphObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistoryGraphObject.h; sourceTree = "<group>"; };
183 E9373E451F3596940059355A /* AutoTransLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutoTransLabel.h; sourceTree = "<group>"; }; 188 E9373E4C1F361A230059355A /* HistoryGraphObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HistoryGraphObject.m; sourceTree = "<group>"; };
189 E9497FD31F46EC1100E6AF8D /* MemberObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemberObject.h; sourceTree = "<group>"; };
190 E9497FD41F46EC1100E6AF8D /* MemberObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MemberObject.m; sourceTree = "<group>"; };
191 E95F4CEA1F475C6A00D27E80 /* CreateGroupViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CreateGroupViewController.h; sourceTree = "<group>"; };
192 E95F4CEB1F475C6A00D27E80 /* CreateGroupViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CreateGroupViewController.m; sourceTree = "<group>"; };
193 E95F4CEC1F475C6A00D27E80 /* CreateGroupViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CreateGroupViewController.xib; sourceTree = "<group>"; };
194 E95F4CF01F48B39200D27E80 /* MyGroupViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyGroupViewController.h; sourceTree = "<group>"; };
195 E95F4CF11F48B39200D27E80 /* MyGroupViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyGroupViewController.m; sourceTree = "<group>"; };
196 E95F4CF21F48B39200D27E80 /* MyGroupViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MyGroupViewController.xib; sourceTree = "<group>"; };
184 E9373E461F3596940059355A /* AutoTransLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AutoTransLabel.m; sourceTree = "<group>"; }; 197 E9682E2B1F39675A00FE05A2 /* RankingTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RankingTableViewCell.h; sourceTree = "<group>"; };
185 E9373E481F35AA180059355A /* HistoryObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistoryObject.h; sourceTree = "<group>"; }; 198 E9682E2C1F39675A00FE05A2 /* RankingTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RankingTableViewCell.m; sourceTree = "<group>"; };
186 E9373E491F35AA180059355A /* HistoryObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HistoryObject.m; sourceTree = "<group>"; }; 199 E9682E2D1F39675A00FE05A2 /* RankingTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RankingTableViewCell.xib; sourceTree = "<group>"; };
187 E9373E4B1F361A230059355A /* HistoryGraphObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistoryGraphObject.h; sourceTree = "<group>"; }; 200 E96855081F3C444900317CEF /* AutoTransButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutoTransButton.h; sourceTree = "<group>"; };
188 E9373E4C1F361A230059355A /* HistoryGraphObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HistoryGraphObject.m; sourceTree = "<group>"; }; 201 E96855091F3C444900317CEF /* AutoTransButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AutoTransButton.m; sourceTree = "<group>"; };
189 E9497FD31F46EC1100E6AF8D /* MemberObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemberObject.h; sourceTree = "<group>"; }; 202 E968550E1F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SNSRecentTopicTableViewCell.h; sourceTree = "<group>"; };
190 E9497FD41F46EC1100E6AF8D /* MemberObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MemberObject.m; sourceTree = "<group>"; }; 203 E968550F1F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SNSRecentTopicTableViewCell.m; sourceTree = "<group>"; };
191 E95F4CEA1F475C6A00D27E80 /* CreateGroupViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CreateGroupViewController.h; sourceTree = "<group>"; }; 204 E96855101F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SNSRecentTopicTableViewCell.xib; sourceTree = "<group>"; };
192 E95F4CEB1F475C6A00D27E80 /* CreateGroupViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CreateGroupViewController.m; sourceTree = "<group>"; }; 205 E997E0251F3AB66500709FB1 /* Social.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Social.framework; path = System/Library/Frameworks/Social.framework; sourceTree = SDKROOT; };
193 E95F4CEC1F475C6A00D27E80 /* CreateGroupViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CreateGroupViewController.xib; sourceTree = "<group>"; }; 206 E99E13A91F336F3600C78787 /* CollectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectionView.h; sourceTree = "<group>"; };
194 E95F4CF01F48B39200D27E80 /* MyGroupViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyGroupViewController.h; sourceTree = "<group>"; }; 207 E99E13AA1F336F3600C78787 /* CollectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CollectionView.m; sourceTree = "<group>"; };
195 E95F4CF11F48B39200D27E80 /* MyGroupViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyGroupViewController.m; sourceTree = "<group>"; }; 208 E99E13AC1F336F4500C78787 /* CollectionView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CollectionView.xib; sourceTree = "<group>"; };
196 E95F4CF21F48B39200D27E80 /* MyGroupViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MyGroupViewController.xib; sourceTree = "<group>"; }; 209 E99E13AE1F33720600C78787 /* LabelCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LabelCollectionViewCell.h; sourceTree = "<group>"; };
197 E9682E2B1F39675A00FE05A2 /* RankingTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RankingTableViewCell.h; sourceTree = "<group>"; }; 210 E99E13AF1F33720600C78787 /* LabelCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LabelCollectionViewCell.m; sourceTree = "<group>"; };
198 E9682E2C1F39675A00FE05A2 /* RankingTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RankingTableViewCell.m; sourceTree = "<group>"; }; 211 E99E13B01F33720600C78787 /* LabelCollectionViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LabelCollectionViewCell.xib; sourceTree = "<group>"; };
199 E9682E2D1F39675A00FE05A2 /* RankingTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RankingTableViewCell.xib; sourceTree = "<group>"; }; 212 E9D9091F1F3D559D004CF99F /* TweetObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TweetObject.h; sourceTree = "<group>"; };
200 E96855081F3C444900317CEF /* AutoTransButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutoTransButton.h; sourceTree = "<group>"; }; 213 E9D909201F3D559D004CF99F /* TweetObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TweetObject.m; sourceTree = "<group>"; };
201 E96855091F3C444900317CEF /* AutoTransButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AutoTransButton.m; sourceTree = "<group>"; }; 214 E9D909221F3D6E8C004CF99F /* BaseTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseTableViewController.h; sourceTree = "<group>"; };
202 E968550E1F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SNSRecentTopicTableViewCell.h; sourceTree = "<group>"; }; 215 E9D909231F3D6E8C004CF99F /* BaseTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BaseTableViewController.m; sourceTree = "<group>"; };
203 E968550F1F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SNSRecentTopicTableViewCell.m; sourceTree = "<group>"; }; 216 E9F73DC91F338A0F004A3A6F /* HistoryListTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistoryListTableViewCell.h; sourceTree = "<group>"; };
204 E96855101F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SNSRecentTopicTableViewCell.xib; sourceTree = "<group>"; }; 217 E9F73DCA1F338A0F004A3A6F /* HistoryListTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HistoryListTableViewCell.m; sourceTree = "<group>"; };
205 E997E0251F3AB66500709FB1 /* Social.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Social.framework; path = System/Library/Frameworks/Social.framework; sourceTree = SDKROOT; }; 218 E9F73DCB1F338A0F004A3A6F /* HistoryListTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HistoryListTableViewCell.xib; sourceTree = "<group>"; };
206 E99E13A91F336F3600C78787 /* CollectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectionView.h; sourceTree = "<group>"; }; 219 /* End PBXFileReference section */
207 E99E13AA1F336F3600C78787 /* CollectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CollectionView.m; sourceTree = "<group>"; }; 220
208 E99E13AC1F336F4500C78787 /* CollectionView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CollectionView.xib; sourceTree = "<group>"; }; 221 /* Begin PBXFrameworksBuildPhase section */
209 E99E13AE1F33720600C78787 /* LabelCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LabelCollectionViewCell.h; sourceTree = "<group>"; }; 222 6E84E36E1F27A700001EB88E /* Frameworks */ = {
210 E99E13AF1F33720600C78787 /* LabelCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LabelCollectionViewCell.m; sourceTree = "<group>"; }; 223 isa = PBXFrameworksBuildPhase;
211 E99E13B01F33720600C78787 /* LabelCollectionViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LabelCollectionViewCell.xib; sourceTree = "<group>"; }; 224 buildActionMask = 2147483647;
212 E9D9091F1F3D559D004CF99F /* TweetObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TweetObject.h; sourceTree = "<group>"; }; 225 files = (
213 E9D909201F3D559D004CF99F /* TweetObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TweetObject.m; sourceTree = "<group>"; }; 226 E997E0261F3AB66500709FB1 /* Social.framework in Frameworks */,
214 E9D909221F3D6E8C004CF99F /* BaseTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseTableViewController.h; sourceTree = "<group>"; }; 227 011799F0F2B47D80472673CE /* Pods_LifeLog.framework in Frameworks */,
215 E9D909231F3D6E8C004CF99F /* BaseTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BaseTableViewController.m; sourceTree = "<group>"; }; 228 );
216 E9F73DC91F338A0F004A3A6F /* HistoryListTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistoryListTableViewCell.h; sourceTree = "<group>"; }; 229 runOnlyForDeploymentPostprocessing = 0;
217 E9F73DCA1F338A0F004A3A6F /* HistoryListTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HistoryListTableViewCell.m; sourceTree = "<group>"; }; 230 };
218 E9F73DCB1F338A0F004A3A6F /* HistoryListTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HistoryListTableViewCell.xib; sourceTree = "<group>"; }; 231 6E84E3871F27A703001EB88E /* Frameworks */ = {
219 /* End PBXFileReference section */ 232 isa = PBXFrameworksBuildPhase;
220 233 buildActionMask = 2147483647;
221 /* Begin PBXFrameworksBuildPhase section */ 234 files = (
222 6E84E36E1F27A700001EB88E /* Frameworks */ = { 235 );
223 isa = PBXFrameworksBuildPhase; 236 runOnlyForDeploymentPostprocessing = 0;
224 buildActionMask = 2147483647; 237 };
225 files = ( 238 6E84E3921F27A703001EB88E /* Frameworks */ = {
226 E997E0261F3AB66500709FB1 /* Social.framework in Frameworks */, 239 isa = PBXFrameworksBuildPhase;
227 011799F0F2B47D80472673CE /* Pods_LifeLog.framework in Frameworks */, 240 buildActionMask = 2147483647;
228 ); 241 files = (
229 runOnlyForDeploymentPostprocessing = 0; 242 );
230 }; 243 runOnlyForDeploymentPostprocessing = 0;
231 6E84E3871F27A703001EB88E /* Frameworks */ = { 244 };
232 isa = PBXFrameworksBuildPhase; 245 /* End PBXFrameworksBuildPhase section */
233 buildActionMask = 2147483647; 246
234 files = ( 247 /* Begin PBXGroup section */
235 ); 248 020C1721B642EF36F31E1BB4 /* Frameworks */ = {
236 runOnlyForDeploymentPostprocessing = 0; 249 isa = PBXGroup;
237 }; 250 children = (
238 6E84E3921F27A703001EB88E /* Frameworks */ = { 251 E997E0251F3AB66500709FB1 /* Social.framework */,
239 isa = PBXFrameworksBuildPhase; 252 2D9F4ED6F06C8F252B9EAF48 /* Pods_LifeLog.framework */,
240 buildActionMask = 2147483647; 253 );
241 files = ( 254 name = Frameworks;
242 ); 255 sourceTree = "<group>";
243 runOnlyForDeploymentPostprocessing = 0; 256 };
244 }; 257 6E18CECF1F2E398C0029891F /* Login */ = {
245 /* End PBXFrameworksBuildPhase section */ 258 isa = PBXGroup;
246 259 children = (
247 /* Begin PBXGroup section */ 260 9CA8AEE61F31BB1200C5FC74 /* ConfirmForgetPass */,
248 020C1721B642EF36F31E1BB4 /* Frameworks */ = { 261 6E18CED01F2E39DB0029891F /* LoginViewController.h */,
249 isa = PBXGroup; 262 6E18CED11F2E39DB0029891F /* LoginViewController.m */,
250 children = ( 263 6E18CED21F2E39DB0029891F /* LoginViewController.xib */,
251 E997E0251F3AB66500709FB1 /* Social.framework */, 264 );
252 2D9F4ED6F06C8F252B9EAF48 /* Pods_LifeLog.framework */, 265 name = Login;
253 ); 266 sourceTree = "<group>";
254 name = Frameworks; 267 };
255 sourceTree = "<group>"; 268 6E18CED51F2E3C0E0029891F /* ServerAPI */ = {
256 }; 269 isa = PBXGroup;
257 6E18CECF1F2E398C0029891F /* Login */ = { 270 children = (
258 isa = PBXGroup; 271 6E18CED61F2E3C840029891F /* ServerAPI.h */,
259 children = ( 272 6E18CED71F2E3C840029891F /* ServerAPI.m */,
260 9CA8AEE61F31BB1200C5FC74 /* ConfirmForgetPass */, 273 );
261 6E18CED01F2E39DB0029891F /* LoginViewController.h */, 274 name = ServerAPI;
262 6E18CED11F2E39DB0029891F /* LoginViewController.m */, 275 sourceTree = "<group>";
263 6E18CED21F2E39DB0029891F /* LoginViewController.xib */, 276 };
264 ); 277 6E18CED91F2E40AE0029891F /* Model */ = {
265 name = Login; 278 isa = PBXGroup;
266 sourceTree = "<group>"; 279 children = (
267 }; 280 6E18CEDD1F2E46570029891F /* Entities.h */,
268 6E18CED51F2E3C0E0029891F /* ServerAPI */ = { 281 6EA4AF2B1F40BB7A00F52CFE /* StepObject.h */,
269 isa = PBXGroup; 282 6EA4AF2C1F40BB7A00F52CFE /* StepObject.m */,
270 children = ( 283 6EA4AF2D1F40BB7A00F52CFE /* TargetInfor.h */,
271 6E18CED61F2E3C840029891F /* ServerAPI.h */, 284 6EA4AF2E1F40BB7A00F52CFE /* TargetInfor.m */,
272 6E18CED71F2E3C840029891F /* ServerAPI.m */, 285 6EA4AF2F1F40BB7A00F52CFE /* TopObject.h */,
273 ); 286 6EA4AF301F40BB7A00F52CFE /* TopObject.m */,
274 name = ServerAPI; 287 6E18CEDA1F2E40F50029891F /* User.h */,
275 sourceTree = "<group>"; 288 6E18CEDB1F2E40F50029891F /* User.m */,
276 }; 289 E9373E481F35AA180059355A /* HistoryObject.h */,
277 6E18CED91F2E40AE0029891F /* Model */ = { 290 E9373E491F35AA180059355A /* HistoryObject.m */,
278 isa = PBXGroup; 291 E9373E4B1F361A230059355A /* HistoryGraphObject.h */,
279 children = ( 292 E9373E4C1F361A230059355A /* HistoryGraphObject.m */,
280 6E18CEDD1F2E46570029891F /* Entities.h */, 293 E9D9091F1F3D559D004CF99F /* TweetObject.h */,
281 6EA4AF2B1F40BB7A00F52CFE /* StepObject.h */, 294 E9D909201F3D559D004CF99F /* TweetObject.m */,
282 6EA4AF2C1F40BB7A00F52CFE /* StepObject.m */, 295 E933E6721F3E0E4E002926F5 /* GroupObject.h */,
283 6EA4AF2D1F40BB7A00F52CFE /* TargetInfor.h */, 296 E933E6731F3E0E4E002926F5 /* GroupObject.m */,
297 E9497FD31F46EC1100E6AF8D /* MemberObject.h */,
298 E9497FD41F46EC1100E6AF8D /* MemberObject.m */,
284 6EA4AF2E1F40BB7A00F52CFE /* TargetInfor.m */, 299 );
285 6EA4AF2F1F40BB7A00F52CFE /* TopObject.h */, 300 name = Model;
286 6EA4AF301F40BB7A00F52CFE /* TopObject.m */, 301 sourceTree = "<group>";
287 6E18CEDA1F2E40F50029891F /* User.h */, 302 };
288 6E18CEDB1F2E40F50029891F /* User.m */, 303 6E7F93391F35870F00EFBC71 /* TPKeyboardAvoiding */ = {
289 E9373E481F35AA180059355A /* HistoryObject.h */, 304 isa = PBXGroup;
290 E9373E491F35AA180059355A /* HistoryObject.m */, 305 children = (
291 E9373E4B1F361A230059355A /* HistoryGraphObject.h */, 306 6E7F933A1F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.h */,
292 E9373E4C1F361A230059355A /* HistoryGraphObject.m */, 307 6E7F933B1F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.m */,
293 E9D9091F1F3D559D004CF99F /* TweetObject.h */, 308 6E7F933C1F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.h */,
294 E9D909201F3D559D004CF99F /* TweetObject.m */, 309 6E7F933D1F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.m */,
295 E933E6721F3E0E4E002926F5 /* GroupObject.h */, 310 6E7F933E1F35872B00EFBC71 /* TPKeyboardAvoidingTableView.h */,
296 E933E6731F3E0E4E002926F5 /* GroupObject.m */, 311 6E7F933F1F35872B00EFBC71 /* TPKeyboardAvoidingTableView.m */,
297 E9497FD31F46EC1100E6AF8D /* MemberObject.h */, 312 6E7F93401F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.h */,
298 E9497FD41F46EC1100E6AF8D /* MemberObject.m */, 313 6E7F93411F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.m */,
299 ); 314 );
300 name = Model; 315 name = TPKeyboardAvoiding;
301 sourceTree = "<group>"; 316 sourceTree = "<group>";
302 }; 317 };
303 6E7F93391F35870F00EFBC71 /* TPKeyboardAvoiding */ = { 318 6E84E3681F27A700001EB88E = {
304 isa = PBXGroup; 319 isa = PBXGroup;
305 children = ( 320 children = (
306 6E7F933A1F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.h */, 321 6E84E3731F27A700001EB88E /* LifeLog */,
307 6E7F933B1F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.m */, 322 6E84E38D1F27A703001EB88E /* LifeLogTests */,
308 6E7F933C1F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.h */, 323 6E84E3981F27A703001EB88E /* LifeLogUITests */,
309 6E7F933D1F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.m */, 324 DE8269E957EA47CD771BAB33 /* Pods */,
310 6E7F933E1F35872B00EFBC71 /* TPKeyboardAvoidingTableView.h */, 325 020C1721B642EF36F31E1BB4 /* Frameworks */,
326 783929CF869F5081762B3DCA /* Products */,
311 6E7F933F1F35872B00EFBC71 /* TPKeyboardAvoidingTableView.m */, 327 );
312 6E7F93401F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.h */, 328 sourceTree = "<group>";
313 6E7F93411F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.m */, 329 };
314 ); 330 6E84E3721F27A700001EB88E /* Products */ = {
315 name = TPKeyboardAvoiding; 331 isa = PBXGroup;
316 sourceTree = "<group>"; 332 children = (
317 }; 333 6E84E3711F27A700001EB88E /* LifeLog.app */,
318 6E84E3681F27A700001EB88E = { 334 6E84E38A1F27A703001EB88E /* LifeLogTests.xctest */,
319 isa = PBXGroup; 335 6E84E3951F27A703001EB88E /* LifeLogUITests.xctest */,
320 children = ( 336 );
321 6E84E3731F27A700001EB88E /* LifeLog */, 337 name = Products;
322 6E84E38D1F27A703001EB88E /* LifeLogTests */, 338 sourceTree = "<group>";
323 6E84E3981F27A703001EB88E /* LifeLogUITests */, 339 };
324 DE8269E957EA47CD771BAB33 /* Pods */, 340 6E84E3731F27A700001EB88E /* LifeLog */ = {
325 020C1721B642EF36F31E1BB4 /* Frameworks */, 341 isa = PBXGroup;
326 783929CF869F5081762B3DCA /* Products */, 342 children = (
327 ); 343 6E18CED91F2E40AE0029891F /* Model */,
328 sourceTree = "<group>"; 344 6E18CED51F2E3C0E0029891F /* ServerAPI */,
329 }; 345 6EDC8BEB1F2C2F3300765ACC /* Common */,
330 6E84E3721F27A700001EB88E /* Products */ = { 346 6ECC406D1F2A5FA500AAEB97 /* Library */,
331 isa = PBXGroup; 347 E99E13A71F336F0C00C78787 /* CustomView */,
332 children = ( 348 6E84E3A81F27A8A9001EB88E /* ViewControllers */,
333 6E84E3711F27A700001EB88E /* LifeLog.app */, 349 6E84E3A71F27A887001EB88E /* AppDelegate */,
334 6E84E38A1F27A703001EB88E /* LifeLogTests.xctest */, 350 6E84E3801F27A701001EB88E /* Assets.xcassets */,
335 6E84E3951F27A703001EB88E /* LifeLogUITests.xctest */, 351 6E84E3821F27A701001EB88E /* LaunchScreen.storyboard */,
336 ); 352 6E84E3851F27A701001EB88E /* Info.plist */,
337 name = Products; 353 6E84E3741F27A701001EB88E /* Supporting Files */,
338 sourceTree = "<group>"; 354 );
339 }; 355 path = LifeLog;
340 6E84E3731F27A700001EB88E /* LifeLog */ = { 356 sourceTree = "<group>";
341 isa = PBXGroup; 357 };
342 children = ( 358 6E84E3741F27A701001EB88E /* Supporting Files */ = {
343 6E18CED91F2E40AE0029891F /* Model */, 359 isa = PBXGroup;
344 6E18CED51F2E3C0E0029891F /* ServerAPI */, 360 children = (
345 6EDC8BEB1F2C2F3300765ACC /* Common */, 361 6E84E3751F27A701001EB88E /* main.m */,
346 6ECC406D1F2A5FA500AAEB97 /* Library */, 362 6EF163091F29069300DA306C /* Localizable.strings */,
347 E99E13A71F336F0C00C78787 /* CustomView */, 363 );
348 6E84E3A81F27A8A9001EB88E /* ViewControllers */, 364 name = "Supporting Files";
349 6E84E3A71F27A887001EB88E /* AppDelegate */, 365 sourceTree = "<group>";
350 6E84E3801F27A701001EB88E /* Assets.xcassets */, 366 };
351 6E84E3821F27A701001EB88E /* LaunchScreen.storyboard */, 367 6E84E38D1F27A703001EB88E /* LifeLogTests */ = {
352 6E84E3851F27A701001EB88E /* Info.plist */, 368 isa = PBXGroup;
353 6E84E3741F27A701001EB88E /* Supporting Files */, 369 children = (
354 ); 370 6E84E38E1F27A703001EB88E /* LifeLogTests.m */,
355 path = LifeLog; 371 6E84E3901F27A703001EB88E /* Info.plist */,
356 sourceTree = "<group>"; 372 );
357 }; 373 path = LifeLogTests;
358 6E84E3741F27A701001EB88E /* Supporting Files */ = { 374 sourceTree = "<group>";
359 isa = PBXGroup; 375 };
360 children = ( 376 6E84E3981F27A703001EB88E /* LifeLogUITests */ = {
361 6E84E3751F27A701001EB88E /* main.m */, 377 isa = PBXGroup;
362 6EF163091F29069300DA306C /* Localizable.strings */, 378 children = (
363 ); 379 6E84E3991F27A703001EB88E /* LifeLogUITests.m */,
364 name = "Supporting Files"; 380 6E84E39B1F27A703001EB88E /* Info.plist */,
365 sourceTree = "<group>"; 381 );
366 }; 382 path = LifeLogUITests;
367 6E84E38D1F27A703001EB88E /* LifeLogTests */ = { 383 sourceTree = "<group>";
368 isa = PBXGroup; 384 };
369 children = ( 385 6E84E3A71F27A887001EB88E /* AppDelegate */ = {
370 6E84E38E1F27A703001EB88E /* LifeLogTests.m */, 386 isa = PBXGroup;
371 6E84E3901F27A703001EB88E /* Info.plist */, 387 children = (
372 ); 388 6E84E3771F27A701001EB88E /* AppDelegate.h */,
373 path = LifeLogTests; 389 6E84E3781F27A701001EB88E /* AppDelegate.m */,
374 sourceTree = "<group>"; 390 );
375 }; 391 name = AppDelegate;
376 6E84E3981F27A703001EB88E /* LifeLogUITests */ = { 392 sourceTree = "<group>";
377 isa = PBXGroup; 393 };
378 children = ( 394 6E84E3A81F27A8A9001EB88E /* ViewControllers */ = {
379 6E84E3991F27A703001EB88E /* LifeLogUITests.m */, 395 isa = PBXGroup;
380 6E84E39B1F27A703001EB88E /* Info.plist */, 396 children = (
381 ); 397 9CBDA0F71F2ECDFD0055DED1 /* BaseViewController */,
382 path = LifeLogUITests; 398 9CBDA0FB1F2F03490055DED1 /* Register */,
383 sourceTree = "<group>"; 399 6E18CECF1F2E398C0029891F /* Login */,
384 }; 400 6E84E3AC1F27A954001EB88E /* SNS */,
385 6E84E3A71F27A887001EB88E /* AppDelegate */ = { 401 6E84E3C11F27AC89001EB88E /* Map */,
386 isa = PBXGroup; 402 6E84E3AB1F27A946001EB88E /* Ranking */,
387 children = ( 403 6E84E3AA1F27A924001EB88E /* History */,
388 6E84E3771F27A701001EB88E /* AppDelegate.h */, 404 6E84E3A91F27A915001EB88E /* Home */,
389 6E84E3781F27A701001EB88E /* AppDelegate.m */, 405 );
390 ); 406 name = ViewControllers;
391 name = AppDelegate; 407 sourceTree = "<group>";
392 sourceTree = "<group>"; 408 };
393 }; 409 6E84E3A91F27A915001EB88E /* Home */ = {
394 6E84E3A81F27A8A9001EB88E /* ViewControllers */ = { 410 isa = PBXGroup;
395 isa = PBXGroup; 411 children = (
396 children = ( 412 6E8DA0F31F2BAC0800CCE941 /* Today */,
397 9CBDA0F71F2ECDFD0055DED1 /* BaseViewController */, 413 6E84E3AD1F27A975001EB88E /* HomeViewController.h */,
398 9CBDA0FB1F2F03490055DED1 /* Register */, 414 6E84E3AE1F27A975001EB88E /* HomeViewController.m */,
399 6E18CECF1F2E398C0029891F /* Login */, 415 6E84E3AF1F27A975001EB88E /* HomeViewController.xib */,
400 6E84E3AC1F27A954001EB88E /* SNS */, 416 );
401 6E84E3C11F27AC89001EB88E /* Map */, 417 name = Home;
402 6E84E3AB1F27A946001EB88E /* Ranking */, 418 sourceTree = "<group>";
403 6E84E3AA1F27A924001EB88E /* History */, 419 };
404 6E84E3A91F27A915001EB88E /* Home */, 420 6E84E3AA1F27A924001EB88E /* History */ = {
405 ); 421 isa = PBXGroup;
406 name = ViewControllers; 422 children = (
407 sourceTree = "<group>"; 423 6E84E3B21F27A98B001EB88E /* HistoryViewController.h */,
408 }; 424 6E84E3B31F27A98B001EB88E /* HistoryViewController.m */,
409 6E84E3A91F27A915001EB88E /* Home */ = { 425 6E84E3B41F27A98B001EB88E /* HistoryViewController.xib */,
410 isa = PBXGroup; 426 E9F73DC91F338A0F004A3A6F /* HistoryListTableViewCell.h */,
411 children = ( 427 E9F73DCA1F338A0F004A3A6F /* HistoryListTableViewCell.m */,
412 6E8DA0F31F2BAC0800CCE941 /* Today */, 428 E9F73DCB1F338A0F004A3A6F /* HistoryListTableViewCell.xib */,
413 6E84E3AD1F27A975001EB88E /* HomeViewController.h */, 429 );
414 6E84E3AE1F27A975001EB88E /* HomeViewController.m */, 430 name = History;
415 6E84E3AF1F27A975001EB88E /* HomeViewController.xib */, 431 sourceTree = "<group>";
416 ); 432 };
417 name = Home; 433 6E84E3AB1F27A946001EB88E /* Ranking */ = {
418 sourceTree = "<group>"; 434 isa = PBXGroup;
419 }; 435 children = (
420 6E84E3AA1F27A924001EB88E /* History */ = { 436 6E84E3B71F27A9A0001EB88E /* RankingViewController.h */,
421 isa = PBXGroup; 437 6E84E3B81F27A9A0001EB88E /* RankingViewController.m */,
422 children = ( 438 6E84E3B91F27A9A0001EB88E /* RankingViewController.xib */,
423 6E84E3B21F27A98B001EB88E /* HistoryViewController.h */, 439 E9682E2B1F39675A00FE05A2 /* RankingTableViewCell.h */,
424 6E84E3B31F27A98B001EB88E /* HistoryViewController.m */, 440 E9682E2C1F39675A00FE05A2 /* RankingTableViewCell.m */,
425 6E84E3B41F27A98B001EB88E /* HistoryViewController.xib */, 441 E9682E2D1F39675A00FE05A2 /* RankingTableViewCell.xib */,
426 E9F73DC91F338A0F004A3A6F /* HistoryListTableViewCell.h */, 442 );
427 E9F73DCA1F338A0F004A3A6F /* HistoryListTableViewCell.m */, 443 name = Ranking;
428 E9F73DCB1F338A0F004A3A6F /* HistoryListTableViewCell.xib */, 444 sourceTree = "<group>";
429 ); 445 };
430 name = History; 446 6E84E3AC1F27A954001EB88E /* SNS */ = {
431 sourceTree = "<group>"; 447 isa = PBXGroup;
432 }; 448 children = (
433 6E84E3AB1F27A946001EB88E /* Ranking */ = { 449 E95F4CEF1F48B37100D27E80 /* MyGroup */,
450 E95F4CE91F475C4B00D27E80 /* CreateGroup */,
451 E933E6751F4050E6002926F5 /* GroupDetail */,
434 isa = PBXGroup; 452 E933E6671F3E0479002926F5 /* SeachGroup */,
435 children = ( 453 6E84E3BC1F27A9B1001EB88E /* SNSViewController.h */,
436 6E84E3B71F27A9A0001EB88E /* RankingViewController.h */, 454 6E84E3BD1F27A9B1001EB88E /* SNSViewController.m */,
437 6E84E3B81F27A9A0001EB88E /* RankingViewController.m */, 455 6E84E3BE1F27A9B1001EB88E /* SNSViewController.xib */,
438 6E84E3B91F27A9A0001EB88E /* RankingViewController.xib */, 456 E968550E1F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.h */,
439 E9682E2B1F39675A00FE05A2 /* RankingTableViewCell.h */, 457 E968550F1F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.m */,
440 E9682E2C1F39675A00FE05A2 /* RankingTableViewCell.m */, 458 E96855101F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.xib */,
441 E9682E2D1F39675A00FE05A2 /* RankingTableViewCell.xib */, 459 );
442 ); 460 name = SNS;
443 name = Ranking; 461 sourceTree = "<group>";
444 sourceTree = "<group>"; 462 };
445 }; 463 6E84E3C11F27AC89001EB88E /* Map */ = {
446 6E84E3AC1F27A954001EB88E /* SNS */ = { 464 isa = PBXGroup;
447 isa = PBXGroup; 465 children = (
448 children = ( 466 6E84E3C21F27ACAE001EB88E /* MapViewController.h */,
449 E95F4CEF1F48B37100D27E80 /* MyGroup */, 467 6E84E3C31F27ACAE001EB88E /* MapViewController.m */,
450 E95F4CE91F475C4B00D27E80 /* CreateGroup */, 468 6E84E3C41F27ACAE001EB88E /* MapViewController.xib */,
451 E933E6751F4050E6002926F5 /* GroupDetail */, 469 );
452 E933E6671F3E0479002926F5 /* SeachGroup */, 470 name = Map;
453 6E84E3BC1F27A9B1001EB88E /* SNSViewController.h */, 471 sourceTree = "<group>";
454 6E84E3BD1F27A9B1001EB88E /* SNSViewController.m */, 472 };
455 6E84E3BE1F27A9B1001EB88E /* SNSViewController.xib */, 473 6E8DA0F31F2BAC0800CCE941 /* Today */ = {
456 E968550E1F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.h */, 474 isa = PBXGroup;
457 E968550F1F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.m */, 475 children = (
458 E96855101F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.xib */, 476 6E8DA0F41F2BAC3400CCE941 /* TodayViewController.h */,
459 ); 477 6E8DA0F51F2BAC3400CCE941 /* TodayViewController.m */,
460 name = SNS; 478 6E8DA0F61F2BAC3400CCE941 /* TodayViewController.xib */,
461 sourceTree = "<group>"; 479 );
462 }; 480 name = Today;
463 6E84E3C11F27AC89001EB88E /* Map */ = { 481 sourceTree = "<group>";
464 isa = PBXGroup; 482 };
465 children = ( 483 6ECC406D1F2A5FA500AAEB97 /* Library */ = {
466 6E84E3C21F27ACAE001EB88E /* MapViewController.h */, 484 isa = PBXGroup;
467 6E84E3C31F27ACAE001EB88E /* MapViewController.m */, 485 children = (
468 6E84E3C41F27ACAE001EB88E /* MapViewController.xib */, 486 6E7F93391F35870F00EFBC71 /* TPKeyboardAvoiding */,
469 ); 487 6ECC406E1F2A5FB200AAEB97 /* Category */,
470 name = Map; 488 );
471 sourceTree = "<group>"; 489 name = Library;
472 }; 490 sourceTree = "<group>";
473 6E8DA0F31F2BAC0800CCE941 /* Today */ = { 491 };
474 isa = PBXGroup; 492 6ECC406E1F2A5FB200AAEB97 /* Category */ = {
475 children = ( 493 isa = PBXGroup;
476 6E8DA0F41F2BAC3400CCE941 /* TodayViewController.h */, 494 children = (
477 6E8DA0F51F2BAC3400CCE941 /* TodayViewController.m */, 495 6ECC406F1F2A5FEB00AAEB97 /* NSDate+helper.h */,
478 6E8DA0F61F2BAC3400CCE941 /* TodayViewController.xib */, 496 6ECC40701F2A5FEB00AAEB97 /* NSDate+helper.m */,
479 ); 497 );
480 name = Today; 498 name = Category;
481 sourceTree = "<group>"; 499 sourceTree = "<group>";
482 }; 500 };
483 6ECC406D1F2A5FA500AAEB97 /* Library */ = { 501 6EDC8BEB1F2C2F3300765ACC /* Common */ = {
484 isa = PBXGroup; 502 isa = PBXGroup;
485 children = ( 503 children = (
486 6E7F93391F35870F00EFBC71 /* TPKeyboardAvoiding */, 504 6EDC8BEC1F2C2FB800765ACC /* Utilities.h */,
487 6ECC406E1F2A5FB200AAEB97 /* Category */, 505 6EDC8BED1F2C2FB800765ACC /* Utilities.m */,
488 ); 506 6EDC8BF21F2C68D700765ACC /* CMMotionActivityExtra.h */,
489 name = Library; 507 6EDC8BF31F2C68D700765ACC /* CMMotionActivityExtra.m */,
490 sourceTree = "<group>"; 508 );
491 }; 509 name = Common;
492 6ECC406E1F2A5FB200AAEB97 /* Category */ = { 510 sourceTree = "<group>";
493 isa = PBXGroup; 511 };
512 783929CF869F5081762B3DCA /* Products */ = {
513 isa = PBXGroup;
514 children = (
515 );
516 name = Products;
517 sourceTree = "<group>";
518 };
494 children = ( 519 9CA8AEE61F31BB1200C5FC74 /* ConfirmForgetPass */ = {
495 6ECC406F1F2A5FEB00AAEB97 /* NSDate+helper.h */, 520 isa = PBXGroup;
496 6ECC40701F2A5FEB00AAEB97 /* NSDate+helper.m */, 521 children = (
497 ); 522 9CA8AEE71F31BB4600C5FC74 /* ConfirmForgetPassViewController.h */,
498 name = Category; 523 9CA8AEE81F31BB4600C5FC74 /* ConfirmForgetPassViewController.m */,
499 sourceTree = "<group>"; 524 9CA8AEE91F31BB4600C5FC74 /* ConfirmForgetPassViewController.xib */,
500 }; 525 );
501 6EDC8BEB1F2C2F3300765ACC /* Common */ = { 526 name = ConfirmForgetPass;
502 isa = PBXGroup; 527 sourceTree = "<group>";
503 children = ( 528 };
504 6EDC8BEC1F2C2FB800765ACC /* Utilities.h */, 529 9CBDA0F71F2ECDFD0055DED1 /* BaseViewController */ = {
505 6EDC8BED1F2C2FB800765ACC /* Utilities.m */, 530 isa = PBXGroup;
506 6EDC8BF21F2C68D700765ACC /* CMMotionActivityExtra.h */, 531 children = (
507 6EDC8BF31F2C68D700765ACC /* CMMotionActivityExtra.m */, 532 9CBDA0F81F2ECE2C0055DED1 /* BaseViewController.h */,
508 ); 533 9CBDA0F91F2ECE2C0055DED1 /* BaseViewController.m */,
509 name = Common; 534 6E48AF0B1F2F9D3200C1D184 /* CustomTextField.h */,
510 sourceTree = "<group>"; 535 6E48AF0C1F2F9D3200C1D184 /* CustomTextField.m */,
511 }; 536 E9D909221F3D6E8C004CF99F /* BaseTableViewController.h */,
512 783929CF869F5081762B3DCA /* Products */ = { 537 E9D909231F3D6E8C004CF99F /* BaseTableViewController.m */,
513 isa = PBXGroup; 538 );
514 children = ( 539 name = BaseViewController;
515 ); 540 sourceTree = "<group>";
516 name = Products; 541 };
517 sourceTree = "<group>"; 542 9CBDA0FB1F2F03490055DED1 /* Register */ = {
518 }; 543 isa = PBXGroup;
519 9CA8AEE61F31BB1200C5FC74 /* ConfirmForgetPass */ = { 544 children = (
520 isa = PBXGroup; 545 9CBDA0FC1F2F03810055DED1 /* RegisterViewController.h */,
521 children = ( 546 9CBDA0FD1F2F03810055DED1 /* RegisterViewController.m */,
522 9CA8AEE71F31BB4600C5FC74 /* ConfirmForgetPassViewController.h */, 547 9CBDA0FE1F2F03810055DED1 /* RegisterViewController.xib */,
523 9CA8AEE81F31BB4600C5FC74 /* ConfirmForgetPassViewController.m */, 548 );
524 9CA8AEE91F31BB4600C5FC74 /* ConfirmForgetPassViewController.xib */, 549 name = Register;
525 ); 550 sourceTree = "<group>";
526 name = ConfirmForgetPass; 551 };
527 sourceTree = "<group>"; 552 DE8269E957EA47CD771BAB33 /* Pods */ = {
528 }; 553 isa = PBXGroup;
529 9CBDA0F71F2ECDFD0055DED1 /* BaseViewController */ = { 554 children = (
530 isa = PBXGroup; 555 6E84E3721F27A700001EB88E /* Products */,
531 children = ( 556 0FC2D57087AF4571C57FAE08 /* Pods-LifeLog.debug.xcconfig */,
532 9CBDA0F81F2ECE2C0055DED1 /* BaseViewController.h */, 557 4CFDA5714AF852358A1EB515 /* Pods-LifeLog.release.xcconfig */,
533 9CBDA0F91F2ECE2C0055DED1 /* BaseViewController.m */, 558 );
534 6E48AF0B1F2F9D3200C1D184 /* CustomTextField.h */, 559 name = Pods;
535 6E48AF0C1F2F9D3200C1D184 /* CustomTextField.m */, 560 sourceTree = "<group>";
536 E9D909221F3D6E8C004CF99F /* BaseTableViewController.h */, 561 };
537 E9D909231F3D6E8C004CF99F /* BaseTableViewController.m */, 562 E933E6671F3E0479002926F5 /* SeachGroup */ = {
538 ); 563 isa = PBXGroup;
539 name = BaseViewController; 564 children = (
540 sourceTree = "<group>"; 565 E933E6681F3E04A6002926F5 /* SearchGroupViewController.h */,
541 }; 566 E933E6691F3E04A6002926F5 /* SearchGroupViewController.m */,
542 9CBDA0FB1F2F03490055DED1 /* Register */ = { 567 E933E66A1F3E04A6002926F5 /* SearchGroupViewController.xib */,
543 isa = PBXGroup; 568 E933E66D1F3E09B6002926F5 /* SearchGroupTableViewCell.h */,
544 children = ( 569 E933E66E1F3E09B6002926F5 /* SearchGroupTableViewCell.m */,
545 9CBDA0FC1F2F03810055DED1 /* RegisterViewController.h */, 570 E933E66F1F3E09B6002926F5 /* SearchGroupTableViewCell.xib */,
546 9CBDA0FD1F2F03810055DED1 /* RegisterViewController.m */, 571 );
547 9CBDA0FE1F2F03810055DED1 /* RegisterViewController.xib */, 572 name = SeachGroup;
548 ); 573 sourceTree = "<group>";
549 name = Register; 574 };
550 sourceTree = "<group>"; 575 E933E6751F4050E6002926F5 /* GroupDetail */ = {
551 }; 576 isa = PBXGroup;
552 DE8269E957EA47CD771BAB33 /* Pods */ = { 577 children = (
553 isa = PBXGroup; 578 E933E6761F40513C002926F5 /* GroupDetailViewController.h */,
554 children = ( 579 E933E6771F40513C002926F5 /* GroupDetailViewController.m */,
555 6E84E3721F27A700001EB88E /* Products */, 580 E933E6781F40513C002926F5 /* GroupDetailViewController.xib */,
556 0FC2D57087AF4571C57FAE08 /* Pods-LifeLog.debug.xcconfig */, 581 );
557 4CFDA5714AF852358A1EB515 /* Pods-LifeLog.release.xcconfig */, 582 name = GroupDetail;
558 ); 583 sourceTree = "<group>";
559 name = Pods; 584 };
560 sourceTree = "<group>"; 585 E9373E441F35966D0059355A /* AutoTranslateView */ = {
561 }; 586 isa = PBXGroup;
562 E933E6671F3E0479002926F5 /* SeachGroup */ = { 587 children = (
563 isa = PBXGroup; 588 E9373E451F3596940059355A /* AutoTransLabel.h */,
564 children = ( 589 E9373E461F3596940059355A /* AutoTransLabel.m */,
565 E933E6681F3E04A6002926F5 /* SearchGroupViewController.h */, 590 E96855081F3C444900317CEF /* AutoTransButton.h */,
566 E933E6691F3E04A6002926F5 /* SearchGroupViewController.m */, 591 E96855091F3C444900317CEF /* AutoTransButton.m */,
567 E933E66A1F3E04A6002926F5 /* SearchGroupViewController.xib */, 592 );
568 E933E66D1F3E09B6002926F5 /* SearchGroupTableViewCell.h */, 593 name = AutoTranslateView;
569 E933E66E1F3E09B6002926F5 /* SearchGroupTableViewCell.m */, 594 sourceTree = "<group>";
570 E933E66F1F3E09B6002926F5 /* SearchGroupTableViewCell.xib */, 595 };
596 E95F4CE91F475C4B00D27E80 /* CreateGroup */ = {
597 isa = PBXGroup;
598 children = (
599 E95F4CEA1F475C6A00D27E80 /* CreateGroupViewController.h */,
600 E95F4CEB1F475C6A00D27E80 /* CreateGroupViewController.m */,
601 E95F4CEC1F475C6A00D27E80 /* CreateGroupViewController.xib */,
602 );
603 name = CreateGroup;
604 sourceTree = "<group>";
605 };
606 E95F4CEF1F48B37100D27E80 /* MyGroup */ = {
607 isa = PBXGroup;
608 children = (
609 E95F4CF01F48B39200D27E80 /* MyGroupViewController.h */,
610 E95F4CF11F48B39200D27E80 /* MyGroupViewController.m */,
611 E95F4CF21F48B39200D27E80 /* MyGroupViewController.xib */,
612 );
613 name = MyGroup;
614 sourceTree = "<group>";
615 };
571 ); 616 E99E13A71F336F0C00C78787 /* CustomView */ = {
572 name = SeachGroup; 617 isa = PBXGroup;
573 sourceTree = "<group>"; 618 children = (
574 }; 619 E9373E441F35966D0059355A /* AutoTranslateView */,
575 E933E6751F4050E6002926F5 /* GroupDetail */ = { 620 E99E13A81F336F1700C78787 /* CollectionView */,
576 isa = PBXGroup; 621 );
577 children = ( 622 name = CustomView;
578 E933E6761F40513C002926F5 /* GroupDetailViewController.h */, 623 sourceTree = "<group>";
579 E933E6771F40513C002926F5 /* GroupDetailViewController.m */, 624 };
580 E933E6781F40513C002926F5 /* GroupDetailViewController.xib */, 625 E99E13A81F336F1700C78787 /* CollectionView */ = {
581 ); 626 isa = PBXGroup;
582 name = GroupDetail; 627 children = (
583 sourceTree = "<group>"; 628 E99E13AE1F33720600C78787 /* LabelCollectionViewCell.h */,
584 }; 629 E99E13AF1F33720600C78787 /* LabelCollectionViewCell.m */,
585 E9373E441F35966D0059355A /* AutoTranslateView */ = { 630 E99E13B01F33720600C78787 /* LabelCollectionViewCell.xib */,
586 isa = PBXGroup; 631 E99E13A91F336F3600C78787 /* CollectionView.h */,
587 children = ( 632 E99E13AA1F336F3600C78787 /* CollectionView.m */,
588 E9373E451F3596940059355A /* AutoTransLabel.h */, 633 E99E13AC1F336F4500C78787 /* CollectionView.xib */,
589 E9373E461F3596940059355A /* AutoTransLabel.m */, 634 );
590 E96855081F3C444900317CEF /* AutoTransButton.h */, 635 name = CollectionView;
591 E96855091F3C444900317CEF /* AutoTransButton.m */, 636 sourceTree = "<group>";
592 ); 637 };
593 name = AutoTranslateView; 638 /* End PBXGroup section */
594 sourceTree = "<group>"; 639
595 }; 640 /* Begin PBXNativeTarget section */
596 E95F4CE91F475C4B00D27E80 /* CreateGroup */ = { 641 6E84E3701F27A700001EB88E /* LifeLog */ = {
597 isa = PBXGroup; 642 isa = PBXNativeTarget;
598 children = ( 643 buildConfigurationList = 6E84E39E1F27A703001EB88E /* Build configuration list for PBXNativeTarget "LifeLog" */;
599 E95F4CEA1F475C6A00D27E80 /* CreateGroupViewController.h */, 644 buildPhases = (
600 E95F4CEB1F475C6A00D27E80 /* CreateGroupViewController.m */, 645 2BB22CAEC0728AA1E086BCE3 /* [CP] Check Pods Manifest.lock */,
601 E95F4CEC1F475C6A00D27E80 /* CreateGroupViewController.xib */, 646 6E84E36D1F27A700001EB88E /* Sources */,
602 ); 647 6E84E36E1F27A700001EB88E /* Frameworks */,
603 name = CreateGroup; 648 6E84E36F1F27A700001EB88E /* Resources */,
604 sourceTree = "<group>"; 649 22F89B11794CEB4E265996AC /* [CP] Embed Pods Frameworks */,
605 }; 650 96653BDB2C24A87C2866C897 /* [CP] Copy Pods Resources */,
606 E95F4CEF1F48B37100D27E80 /* MyGroup */ = { 651 );
607 isa = PBXGroup; 652 buildRules = (
608 children = ( 653 );
609 E95F4CF01F48B39200D27E80 /* MyGroupViewController.h */, 654 dependencies = (
610 E95F4CF11F48B39200D27E80 /* MyGroupViewController.m */, 655 );
611 E95F4CF21F48B39200D27E80 /* MyGroupViewController.xib */, 656 name = LifeLog;
612 ); 657 productName = LifeLog;
613 name = MyGroup; 658 productReference = 6E84E3711F27A700001EB88E /* LifeLog.app */;
614 sourceTree = "<group>"; 659 productType = "com.apple.product-type.application";
615 }; 660 };
616 E99E13A71F336F0C00C78787 /* CustomView */ = { 661 6E84E3891F27A703001EB88E /* LifeLogTests */ = {
617 isa = PBXGroup; 662 isa = PBXNativeTarget;
618 children = ( 663 buildConfigurationList = 6E84E3A11F27A703001EB88E /* Build configuration list for PBXNativeTarget "LifeLogTests" */;
619 E9373E441F35966D0059355A /* AutoTranslateView */, 664 buildPhases = (
620 E99E13A81F336F1700C78787 /* CollectionView */, 665 6E84E3861F27A703001EB88E /* Sources */,
621 ); 666 6E84E3871F27A703001EB88E /* Frameworks */,
622 name = CustomView; 667 6E84E3881F27A703001EB88E /* Resources */,
623 sourceTree = "<group>"; 668 );
624 }; 669 buildRules = (
625 E99E13A81F336F1700C78787 /* CollectionView */ = { 670 );
626 isa = PBXGroup; 671 dependencies = (
627 children = ( 672 6E84E38C1F27A703001EB88E /* PBXTargetDependency */,
628 E99E13AE1F33720600C78787 /* LabelCollectionViewCell.h */, 673 );
629 E99E13AF1F33720600C78787 /* LabelCollectionViewCell.m */, 674 name = LifeLogTests;
630 E99E13B01F33720600C78787 /* LabelCollectionViewCell.xib */, 675 productName = LifeLogTests;
631 E99E13A91F336F3600C78787 /* CollectionView.h */, 676 productReference = 6E84E38A1F27A703001EB88E /* LifeLogTests.xctest */;
632 E99E13AA1F336F3600C78787 /* CollectionView.m */, 677 productType = "com.apple.product-type.bundle.unit-test";
633 E99E13AC1F336F4500C78787 /* CollectionView.xib */, 678 };
634 ); 679 6E84E3941F27A703001EB88E /* LifeLogUITests */ = {
635 name = CollectionView; 680 isa = PBXNativeTarget;
636 sourceTree = "<group>"; 681 buildConfigurationList = 6E84E3A41F27A703001EB88E /* Build configuration list for PBXNativeTarget "LifeLogUITests" */;
637 }; 682 buildPhases = (
638 /* End PBXGroup section */ 683 6E84E3911F27A703001EB88E /* Sources */,
639 684 6E84E3921F27A703001EB88E /* Frameworks */,
640 /* Begin PBXNativeTarget section */ 685 6E84E3931F27A703001EB88E /* Resources */,
641 6E84E3701F27A700001EB88E /* LifeLog */ = { 686 );
642 isa = PBXNativeTarget; 687 buildRules = (
643 buildConfigurationList = 6E84E39E1F27A703001EB88E /* Build configuration list for PBXNativeTarget "LifeLog" */; 688 );
644 buildPhases = ( 689 dependencies = (
645 2BB22CAEC0728AA1E086BCE3 /* [CP] Check Pods Manifest.lock */, 690 6E84E3971F27A703001EB88E /* PBXTargetDependency */,
646 6E84E36D1F27A700001EB88E /* Sources */, 691 );
647 6E84E36E1F27A700001EB88E /* Frameworks */, 692 name = LifeLogUITests;
648 6E84E36F1F27A700001EB88E /* Resources */, 693 productName = LifeLogUITests;
649 22F89B11794CEB4E265996AC /* [CP] Embed Pods Frameworks */, 694 productReference = 6E84E3951F27A703001EB88E /* LifeLogUITests.xctest */;
650 96653BDB2C24A87C2866C897 /* [CP] Copy Pods Resources */, 695 productType = "com.apple.product-type.bundle.ui-testing";
651 ); 696 };
652 buildRules = ( 697 /* End PBXNativeTarget section */
653 ); 698
654 dependencies = ( 699 /* Begin PBXProject section */
655 ); 700 6E84E3691F27A700001EB88E /* Project object */ = {
656 name = LifeLog; 701 isa = PBXProject;
657 productName = LifeLog; 702 attributes = {
658 productReference = 6E84E3711F27A700001EB88E /* LifeLog.app */; 703 LastUpgradeCheck = 0830;
659 productType = "com.apple.product-type.application"; 704 ORGANIZATIONNAME = PhongNV;
660 }; 705 TargetAttributes = {
661 6E84E3891F27A703001EB88E /* LifeLogTests */ = { 706 6E84E3701F27A700001EB88E = {
662 isa = PBXNativeTarget; 707 CreatedOnToolsVersion = 8.3.3;
663 buildConfigurationList = 6E84E3A11F27A703001EB88E /* Build configuration list for PBXNativeTarget "LifeLogTests" */; 708 DevelopmentTeam = UXU4V3VUN4;
664 buildPhases = ( 709 ProvisioningStyle = Automatic;
665 6E84E3861F27A703001EB88E /* Sources */, 710 };
666 6E84E3871F27A703001EB88E /* Frameworks */, 711 6E84E3891F27A703001EB88E = {
667 6E84E3881F27A703001EB88E /* Resources */, 712 CreatedOnToolsVersion = 8.3.3;
668 ); 713 ProvisioningStyle = Automatic;
669 buildRules = ( 714 TestTargetID = 6E84E3701F27A700001EB88E;
670 ); 715 };
671 dependencies = ( 716 6E84E3941F27A703001EB88E = {
672 6E84E38C1F27A703001EB88E /* PBXTargetDependency */, 717 CreatedOnToolsVersion = 8.3.3;
673 ); 718 ProvisioningStyle = Automatic;
674 name = LifeLogTests; 719 TestTargetID = 6E84E3701F27A700001EB88E;
675 productName = LifeLogTests; 720 };
676 productReference = 6E84E38A1F27A703001EB88E /* LifeLogTests.xctest */; 721 };
677 productType = "com.apple.product-type.bundle.unit-test"; 722 };
678 }; 723 buildConfigurationList = 6E84E36C1F27A700001EB88E /* Build configuration list for PBXProject "LifeLog" */;
679 6E84E3941F27A703001EB88E /* LifeLogUITests */ = { 724 compatibilityVersion = "Xcode 3.2";
680 isa = PBXNativeTarget; 725 developmentRegion = English;
681 buildConfigurationList = 6E84E3A41F27A703001EB88E /* Build configuration list for PBXNativeTarget "LifeLogUITests" */; 726 hasScannedForEncodings = 0;
682 buildPhases = ( 727 knownRegions = (
683 6E84E3911F27A703001EB88E /* Sources */, 728 en,
684 6E84E3921F27A703001EB88E /* Frameworks */, 729 Base,
685 6E84E3931F27A703001EB88E /* Resources */, 730 );
686 ); 731 mainGroup = 6E84E3681F27A700001EB88E;
687 buildRules = ( 732 productRefGroup = 783929CF869F5081762B3DCA /* Products */;
688 ); 733 projectDirPath = "";
689 dependencies = ( 734 projectRoot = "";
690 6E84E3971F27A703001EB88E /* PBXTargetDependency */, 735 targets = (
691 ); 736 6E84E3701F27A700001EB88E /* LifeLog */,
692 name = LifeLogUITests; 737 6E84E3891F27A703001EB88E /* LifeLogTests */,
693 productName = LifeLogUITests; 738 6E84E3941F27A703001EB88E /* LifeLogUITests */,
694 productReference = 6E84E3951F27A703001EB88E /* LifeLogUITests.xctest */; 739 );
695 productType = "com.apple.product-type.bundle.ui-testing"; 740 };
696 }; 741 /* End PBXProject section */
697 /* End PBXNativeTarget section */ 742
698 743 /* Begin PBXResourcesBuildPhase section */
699 /* Begin PBXProject section */ 744 6E84E36F1F27A700001EB88E /* Resources */ = {
700 6E84E3691F27A700001EB88E /* Project object */ = { 745 isa = PBXResourcesBuildPhase;
701 isa = PBXProject; 746 buildActionMask = 2147483647;
702 attributes = { 747 files = (
703 LastUpgradeCheck = 0830; 748 9CBDA1001F2F03810055DED1 /* RegisterViewController.xib in Resources */,
749 E95F4CEE1F475C6A00D27E80 /* CreateGroupViewController.xib in Resources */,
704 ORGANIZATIONNAME = PhongNV; 750 6E18CED41F2E39DB0029891F /* LoginViewController.xib in Resources */,
705 TargetAttributes = { 751 E99E13AD1F336F4500C78787 /* CollectionView.xib in Resources */,
706 6E84E3701F27A700001EB88E = { 752 6E84E3BB1F27A9A0001EB88E /* RankingViewController.xib in Resources */,
707 CreatedOnToolsVersion = 8.3.3; 753 9CA8AEEB1F31BB4600C5FC74 /* ConfirmForgetPassViewController.xib in Resources */,
708 DevelopmentTeam = UXU4V3VUN4; 754 6E84E3C01F27A9B1001EB88E /* SNSViewController.xib in Resources */,
709 ProvisioningStyle = Automatic; 755 E9682E2F1F39675A00FE05A2 /* RankingTableViewCell.xib in Resources */,
710 }; 756 E933E6711F3E09B6002926F5 /* SearchGroupTableViewCell.xib in Resources */,
711 6E84E3891F27A703001EB88E = { 757 6E8DA0F81F2BAC3500CCE941 /* TodayViewController.xib in Resources */,
712 CreatedOnToolsVersion = 8.3.3; 758 6E84E3841F27A701001EB88E /* LaunchScreen.storyboard in Resources */,
713 ProvisioningStyle = Automatic; 759 6E84E3811F27A701001EB88E /* Assets.xcassets in Resources */,
714 TestTargetID = 6E84E3701F27A700001EB88E; 760 6E84E3C61F27ACAE001EB88E /* MapViewController.xib in Resources */,
715 }; 761 6EF1630A1F29069300DA306C /* Localizable.strings in Resources */,
716 6E84E3941F27A703001EB88E = { 762 6E84E3B11F27A975001EB88E /* HomeViewController.xib in Resources */,
717 CreatedOnToolsVersion = 8.3.3; 763 6E84E3B61F27A98B001EB88E /* HistoryViewController.xib in Resources */,
764 E95F4CF41F48B39200D27E80 /* MyGroupViewController.xib in Resources */,
718 ProvisioningStyle = Automatic; 765 E933E66C1F3E04A6002926F5 /* SearchGroupViewController.xib in Resources */,
719 TestTargetID = 6E84E3701F27A700001EB88E; 766 E96855121F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.xib in Resources */,
720 }; 767 E933E67A1F40513C002926F5 /* GroupDetailViewController.xib in Resources */,
721 }; 768 E99E13B21F33720600C78787 /* LabelCollectionViewCell.xib in Resources */,
722 }; 769 E9F73DCD1F338A0F004A3A6F /* HistoryListTableViewCell.xib in Resources */,
723 buildConfigurationList = 6E84E36C1F27A700001EB88E /* Build configuration list for PBXProject "LifeLog" */; 770 );
724 compatibilityVersion = "Xcode 3.2"; 771 runOnlyForDeploymentPostprocessing = 0;
725 developmentRegion = English; 772 };
726 hasScannedForEncodings = 0; 773 6E84E3881F27A703001EB88E /* Resources */ = {
727 knownRegions = ( 774 isa = PBXResourcesBuildPhase;
728 en, 775 buildActionMask = 2147483647;
729 Base, 776 files = (
730 ); 777 );
731 mainGroup = 6E84E3681F27A700001EB88E; 778 runOnlyForDeploymentPostprocessing = 0;
732 productRefGroup = 783929CF869F5081762B3DCA /* Products */; 779 };
733 projectDirPath = ""; 780 6E84E3931F27A703001EB88E /* Resources */ = {
734 projectRoot = ""; 781 isa = PBXResourcesBuildPhase;
735 targets = ( 782 buildActionMask = 2147483647;
736 6E84E3701F27A700001EB88E /* LifeLog */, 783 files = (
737 6E84E3891F27A703001EB88E /* LifeLogTests */, 784 );
738 6E84E3941F27A703001EB88E /* LifeLogUITests */, 785 runOnlyForDeploymentPostprocessing = 0;
739 ); 786 };
740 }; 787 /* End PBXResourcesBuildPhase section */
741 /* End PBXProject section */ 788
742 789 /* Begin PBXShellScriptBuildPhase section */
743 /* Begin PBXResourcesBuildPhase section */ 790 22F89B11794CEB4E265996AC /* [CP] Embed Pods Frameworks */ = {
744 6E84E36F1F27A700001EB88E /* Resources */ = { 791 isa = PBXShellScriptBuildPhase;
745 isa = PBXResourcesBuildPhase; 792 buildActionMask = 2147483647;
746 buildActionMask = 2147483647; 793 files = (
747 files = ( 794 );
748 9CBDA1001F2F03810055DED1 /* RegisterViewController.xib in Resources */, 795 inputPaths = (
749 E95F4CEE1F475C6A00D27E80 /* CreateGroupViewController.xib in Resources */, 796 );
750 6E18CED41F2E39DB0029891F /* LoginViewController.xib in Resources */, 797 name = "[CP] Embed Pods Frameworks";
751 E99E13AD1F336F4500C78787 /* CollectionView.xib in Resources */, 798 outputPaths = (
752 6E84E3BB1F27A9A0001EB88E /* RankingViewController.xib in Resources */, 799 );
753 9CA8AEEB1F31BB4600C5FC74 /* ConfirmForgetPassViewController.xib in Resources */, 800 runOnlyForDeploymentPostprocessing = 0;
754 6E84E3C01F27A9B1001EB88E /* SNSViewController.xib in Resources */, 801 shellPath = /bin/sh;
755 E9682E2F1F39675A00FE05A2 /* RankingTableViewCell.xib in Resources */, 802 shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LifeLog/Pods-LifeLog-frameworks.sh\"\n";
756 E933E6711F3E09B6002926F5 /* SearchGroupTableViewCell.xib in Resources */, 803 showEnvVarsInLog = 0;
757 6E8DA0F81F2BAC3500CCE941 /* TodayViewController.xib in Resources */, 804 };
758 6E84E3841F27A701001EB88E /* LaunchScreen.storyboard in Resources */, 805 2BB22CAEC0728AA1E086BCE3 /* [CP] Check Pods Manifest.lock */ = {
759 6E84E3811F27A701001EB88E /* Assets.xcassets in Resources */, 806 isa = PBXShellScriptBuildPhase;
760 6E84E3C61F27ACAE001EB88E /* MapViewController.xib in Resources */, 807 buildActionMask = 2147483647;
761 6EF1630A1F29069300DA306C /* Localizable.strings in Resources */, 808 files = (
762 6E84E3B11F27A975001EB88E /* HomeViewController.xib in Resources */, 809 );
763 6E84E3B61F27A98B001EB88E /* HistoryViewController.xib in Resources */, 810 inputPaths = (
764 E95F4CF41F48B39200D27E80 /* MyGroupViewController.xib in Resources */, 811 );
765 E933E66C1F3E04A6002926F5 /* SearchGroupViewController.xib in Resources */, 812 name = "[CP] Check Pods Manifest.lock";
766 E96855121F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.xib in Resources */, 813 outputPaths = (
767 E933E67A1F40513C002926F5 /* GroupDetailViewController.xib in Resources */, 814 );
768 E99E13B21F33720600C78787 /* LabelCollectionViewCell.xib in Resources */, 815 runOnlyForDeploymentPostprocessing = 0;
769 E9F73DCD1F338A0F004A3A6F /* HistoryListTableViewCell.xib in Resources */, 816 shellPath = /bin/sh;
770 ); 817 shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
771 runOnlyForDeploymentPostprocessing = 0; 818 showEnvVarsInLog = 0;
772 }; 819 };
773 6E84E3881F27A703001EB88E /* Resources */ = { 820 96653BDB2C24A87C2866C897 /* [CP] Copy Pods Resources */ = {
774 isa = PBXResourcesBuildPhase; 821 isa = PBXShellScriptBuildPhase;
775 buildActionMask = 2147483647; 822 buildActionMask = 2147483647;
776 files = ( 823 files = (
777 ); 824 );
778 runOnlyForDeploymentPostprocessing = 0; 825 inputPaths = (
779 }; 826 );
780 6E84E3931F27A703001EB88E /* Resources */ = { 827 name = "[CP] Copy Pods Resources";
781 isa = PBXResourcesBuildPhase; 828 outputPaths = (
782 buildActionMask = 2147483647; 829 );
783 files = ( 830 runOnlyForDeploymentPostprocessing = 0;
784 ); 831 shellPath = /bin/sh;
785 runOnlyForDeploymentPostprocessing = 0; 832 shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LifeLog/Pods-LifeLog-resources.sh\"\n";
786 }; 833 showEnvVarsInLog = 0;
787 /* End PBXResourcesBuildPhase section */ 834 };
788 835 /* End PBXShellScriptBuildPhase section */
789 /* Begin PBXShellScriptBuildPhase section */ 836
790 22F89B11794CEB4E265996AC /* [CP] Embed Pods Frameworks */ = { 837 /* Begin PBXSourcesBuildPhase section */
791 isa = PBXShellScriptBuildPhase; 838 6E84E36D1F27A700001EB88E /* Sources */ = {
792 buildActionMask = 2147483647; 839 isa = PBXSourcesBuildPhase;
793 files = ( 840 buildActionMask = 2147483647;
794 ); 841 files = (
795 inputPaths = ( 842 6E18CED81F2E3C840029891F /* ServerAPI.m in Sources */,
796 ); 843 6E7F93431F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.m in Sources */,
797 name = "[CP] Embed Pods Frameworks"; 844 6E7F93421F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.m in Sources */,
798 outputPaths = ( 845 E968550A1F3C444900317CEF /* AutoTransButton.m in Sources */,
799 ); 846 6EA4AF321F40BB7A00F52CFE /* TargetInfor.m in Sources */,
800 runOnlyForDeploymentPostprocessing = 0; 847 E933E6741F3E0E4E002926F5 /* GroupObject.m in Sources */,
801 shellPath = /bin/sh; 848 9CBDA0FA1F2ECE2C0055DED1 /* BaseViewController.m in Sources */,
802 shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LifeLog/Pods-LifeLog-frameworks.sh\"\n"; 849 6E8DA0F71F2BAC3400CCE941 /* TodayViewController.m in Sources */,
803 showEnvVarsInLog = 0; 850 6E7F93451F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.m in Sources */,
804 }; 851 E9682E2E1F39675A00FE05A2 /* RankingTableViewCell.m in Sources */,
805 2BB22CAEC0728AA1E086BCE3 /* [CP] Check Pods Manifest.lock */ = { 852 E9D909211F3D559D004CF99F /* TweetObject.m in Sources */,
806 isa = PBXShellScriptBuildPhase; 853 6E48AF0D1F2F9D3300C1D184 /* CustomTextField.m in Sources */,
807 buildActionMask = 2147483647; 854 E99E13AB1F336F3600C78787 /* CollectionView.m in Sources */,
808 files = ( 855 6E84E3B01F27A975001EB88E /* HomeViewController.m in Sources */,
809 ); 856 E9373E471F3596940059355A /* AutoTransLabel.m in Sources */,
810 inputPaths = ( 857 6E84E3791F27A701001EB88E /* AppDelegate.m in Sources */,
811 ); 858 6E84E3BA1F27A9A0001EB88E /* RankingViewController.m in Sources */,
812 name = "[CP] Check Pods Manifest.lock"; 859 6E7F93441F35872B00EFBC71 /* TPKeyboardAvoidingTableView.m in Sources */,
813 outputPaths = ( 860 E9F73DCC1F338A0F004A3A6F /* HistoryListTableViewCell.m in Sources */,
814 ); 861 6EDC8BF41F2C68D700765ACC /* CMMotionActivityExtra.m in Sources */,
815 runOnlyForDeploymentPostprocessing = 0; 862 E933E6791F40513C002926F5 /* GroupDetailViewController.m in Sources */,
816 shellPath = /bin/sh; 863 6EA4AF311F40BB7A00F52CFE /* StepObject.m in Sources */,
864 E95F4CED1F475C6A00D27E80 /* CreateGroupViewController.m in Sources */,
817 shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 865 9CBDA0FF1F2F03810055DED1 /* RegisterViewController.m in Sources */,
818 showEnvVarsInLog = 0; 866 E9373E4A1F35AA180059355A /* HistoryObject.m in Sources */,
819 }; 867 9CA8AEEA1F31BB4600C5FC74 /* ConfirmForgetPassViewController.m in Sources */,
820 96653BDB2C24A87C2866C897 /* [CP] Copy Pods Resources */ = { 868 E99E13B11F33720600C78787 /* LabelCollectionViewCell.m in Sources */,
821 isa = PBXShellScriptBuildPhase; 869 6EDC8BEE1F2C2FB800765ACC /* Utilities.m in Sources */,
822 buildActionMask = 2147483647; 870 E96855111F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.m in Sources */,
823 files = ( 871 6E84E3C51F27ACAE001EB88E /* MapViewController.m in Sources */,
824 ); 872 6E18CEDC1F2E40F50029891F /* User.m in Sources */,
825 inputPaths = ( 873 6ECC40711F2A5FEB00AAEB97 /* NSDate+helper.m in Sources */,
874 E9497FD51F46EC1100E6AF8D /* MemberObject.m in Sources */,
826 ); 875 6E18CED31F2E39DB0029891F /* LoginViewController.m in Sources */,
827 name = "[CP] Copy Pods Resources"; 876 6EA4AF331F40BB7A00F52CFE /* TopObject.m in Sources */,
828 outputPaths = ( 877 E9D909241F3D6E8C004CF99F /* BaseTableViewController.m in Sources */,
829 ); 878 6E84E3761F27A701001EB88E /* main.m in Sources */,
830 runOnlyForDeploymentPostprocessing = 0; 879 E933E6701F3E09B6002926F5 /* SearchGroupTableViewCell.m in Sources */,
831 shellPath = /bin/sh; 880 6E84E3B51F27A98B001EB88E /* HistoryViewController.m in Sources */,
881 E95F4CF31F48B39200D27E80 /* MyGroupViewController.m in Sources */,
832 shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LifeLog/Pods-LifeLog-resources.sh\"\n"; 882 E9373E4D1F361A230059355A /* HistoryGraphObject.m in Sources */,
833 showEnvVarsInLog = 0; 883 E933E66B1F3E04A6002926F5 /* SearchGroupViewController.m in Sources */,
834 }; 884 6E84E3BF1F27A9B1001EB88E /* SNSViewController.m in Sources */,
835 /* End PBXShellScriptBuildPhase section */ 885 );
836 886 runOnlyForDeploymentPostprocessing = 0;
837 /* Begin PBXSourcesBuildPhase section */ 887 };
838 6E84E36D1F27A700001EB88E /* Sources */ = { 888 6E84E3861F27A703001EB88E /* Sources */ = {
839 isa = PBXSourcesBuildPhase; 889 isa = PBXSourcesBuildPhase;
840 buildActionMask = 2147483647; 890 buildActionMask = 2147483647;
841 files = ( 891 files = (
842 6E18CED81F2E3C840029891F /* ServerAPI.m in Sources */, 892 6E84E38F1F27A703001EB88E /* LifeLogTests.m in Sources */,
843 6E7F93431F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.m in Sources */, 893 );
844 6E7F93421F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.m in Sources */, 894 runOnlyForDeploymentPostprocessing = 0;
845 E968550A1F3C444900317CEF /* AutoTransButton.m in Sources */, 895 };
846 6EA4AF321F40BB7A00F52CFE /* TargetInfor.m in Sources */, 896 6E84E3911F27A703001EB88E /* Sources */ = {
847 E933E6741F3E0E4E002926F5 /* GroupObject.m in Sources */, 897 isa = PBXSourcesBuildPhase;
848 9CBDA0FA1F2ECE2C0055DED1 /* BaseViewController.m in Sources */, 898 buildActionMask = 2147483647;
849 6E8DA0F71F2BAC3400CCE941 /* TodayViewController.m in Sources */, 899 files = (
850 6E7F93451F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.m in Sources */, 900 6E84E39A1F27A703001EB88E /* LifeLogUITests.m in Sources */,
851 E9682E2E1F39675A00FE05A2 /* RankingTableViewCell.m in Sources */, 901 );
852 E9D909211F3D559D004CF99F /* TweetObject.m in Sources */, 902 runOnlyForDeploymentPostprocessing = 0;
853 6E48AF0D1F2F9D3300C1D184 /* CustomTextField.m in Sources */, 903 };
854 E99E13AB1F336F3600C78787 /* CollectionView.m in Sources */, 904 /* End PBXSourcesBuildPhase section */
855 6E84E3B01F27A975001EB88E /* HomeViewController.m in Sources */, 905
856 E9373E471F3596940059355A /* AutoTransLabel.m in Sources */, 906 /* Begin PBXTargetDependency section */
857 6E84E3791F27A701001EB88E /* AppDelegate.m in Sources */, 907 6E84E38C1F27A703001EB88E /* PBXTargetDependency */ = {
858 6E84E3BA1F27A9A0001EB88E /* RankingViewController.m in Sources */, 908 isa = PBXTargetDependency;
859 6E7F93441F35872B00EFBC71 /* TPKeyboardAvoidingTableView.m in Sources */, 909 target = 6E84E3701F27A700001EB88E /* LifeLog */;
860 E9F73DCC1F338A0F004A3A6F /* HistoryListTableViewCell.m in Sources */, 910 targetProxy = 6E84E38B1F27A703001EB88E /* PBXContainerItemProxy */;
861 6EDC8BF41F2C68D700765ACC /* CMMotionActivityExtra.m in Sources */, 911 };
862 E933E6791F40513C002926F5 /* GroupDetailViewController.m in Sources */, 912 6E84E3971F27A703001EB88E /* PBXTargetDependency */ = {
863 6EA4AF311F40BB7A00F52CFE /* StepObject.m in Sources */, 913 isa = PBXTargetDependency;
864 E95F4CED1F475C6A00D27E80 /* CreateGroupViewController.m in Sources */, 914 target = 6E84E3701F27A700001EB88E /* LifeLog */;
865 9CBDA0FF1F2F03810055DED1 /* RegisterViewController.m in Sources */, 915 targetProxy = 6E84E3961F27A703001EB88E /* PBXContainerItemProxy */;
866 E9373E4A1F35AA180059355A /* HistoryObject.m in Sources */, 916 };
867 9CA8AEEA1F31BB4600C5FC74 /* ConfirmForgetPassViewController.m in Sources */, 917 /* End PBXTargetDependency section */
868 E99E13B11F33720600C78787 /* LabelCollectionViewCell.m in Sources */, 918
869 6EDC8BEE1F2C2FB800765ACC /* Utilities.m in Sources */, 919 /* Begin PBXVariantGroup section */
870 E96855111F3C5D9A00317CEF /* SNSRecentTopicTableViewCell.m in Sources */, 920 6E84E3821F27A701001EB88E /* LaunchScreen.storyboard */ = {
871 6E84E3C51F27ACAE001EB88E /* MapViewController.m in Sources */, 921 isa = PBXVariantGroup;
872 6E18CEDC1F2E40F50029891F /* User.m in Sources */, 922 children = (
873 6ECC40711F2A5FEB00AAEB97 /* NSDate+helper.m in Sources */, 923 6E84E3831F27A701001EB88E /* Base */,
874 E9497FD51F46EC1100E6AF8D /* MemberObject.m in Sources */, 924 );
875 6E18CED31F2E39DB0029891F /* LoginViewController.m in Sources */, 925 name = LaunchScreen.storyboard;
876 6EA4AF331F40BB7A00F52CFE /* TopObject.m in Sources */, 926 sourceTree = "<group>";
877 E9D909241F3D6E8C004CF99F /* BaseTableViewController.m in Sources */, 927 };
878 6E84E3761F27A701001EB88E /* main.m in Sources */, 928 /* End PBXVariantGroup section */
879 E933E6701F3E09B6002926F5 /* SearchGroupTableViewCell.m in Sources */, 929
880 6E84E3B51F27A98B001EB88E /* HistoryViewController.m in Sources */, 930 /* Begin XCBuildConfiguration section */
881 E95F4CF31F48B39200D27E80 /* MyGroupViewController.m in Sources */, 931 6E84E39C1F27A703001EB88E /* Debug */ = {
882 E9373E4D1F361A230059355A /* HistoryGraphObject.m in Sources */, 932 isa = XCBuildConfiguration;
883 E933E66B1F3E04A6002926F5 /* SearchGroupViewController.m in Sources */, 933 buildSettings = {
884 6E84E3BF1F27A9B1001EB88E /* SNSViewController.m in Sources */, 934 ALWAYS_SEARCH_USER_PATHS = NO;
885 ); 935 CLANG_ANALYZER_NONNULL = YES;
886 runOnlyForDeploymentPostprocessing = 0; 936 CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
887 }; 937 CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
888 6E84E3861F27A703001EB88E /* Sources */ = { 938 CLANG_CXX_LIBRARY = "libc++";
889 isa = PBXSourcesBuildPhase; 939 CLANG_ENABLE_MODULES = YES;
890 buildActionMask = 2147483647; 940 CLANG_ENABLE_OBJC_ARC = YES;
891 files = ( 941 CLANG_WARN_BOOL_CONVERSION = YES;
892 6E84E38F1F27A703001EB88E /* LifeLogTests.m in Sources */, 942 CLANG_WARN_CONSTANT_CONVERSION = YES;
893 ); 943 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
894 runOnlyForDeploymentPostprocessing = 0; 944 CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
895 }; 945 CLANG_WARN_EMPTY_BODY = YES;
896 6E84E3911F27A703001EB88E /* Sources */ = { 946 CLANG_WARN_ENUM_CONVERSION = YES;
897 isa = PBXSourcesBuildPhase; 947 CLANG_WARN_INFINITE_RECURSION = YES;
898 buildActionMask = 2147483647; 948 CLANG_WARN_INT_CONVERSION = YES;
899 files = ( 949 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
900 6E84E39A1F27A703001EB88E /* LifeLogUITests.m in Sources */, 950 CLANG_WARN_SUSPICIOUS_MOVE = YES;
901 ); 951 CLANG_WARN_UNREACHABLE_CODE = YES;
902 runOnlyForDeploymentPostprocessing = 0; 952 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
903 }; 953 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
904 /* End PBXSourcesBuildPhase section */ 954 COPY_PHASE_STRIP = NO;
905 955 DEBUG_INFORMATION_FORMAT = dwarf;
906 /* Begin PBXTargetDependency section */ 956 ENABLE_STRICT_OBJC_MSGSEND = YES;
907 6E84E38C1F27A703001EB88E /* PBXTargetDependency */ = { 957 ENABLE_TESTABILITY = YES;
908 isa = PBXTargetDependency; 958 GCC_C_LANGUAGE_STANDARD = gnu99;
909 target = 6E84E3701F27A700001EB88E /* LifeLog */; 959 GCC_DYNAMIC_NO_PIC = NO;
910 targetProxy = 6E84E38B1F27A703001EB88E /* PBXContainerItemProxy */; 960 GCC_NO_COMMON_BLOCKS = YES;
911 }; 961 GCC_OPTIMIZATION_LEVEL = 0;
912 6E84E3971F27A703001EB88E /* PBXTargetDependency */ = { 962 GCC_PREPROCESSOR_DEFINITIONS = (
913 isa = PBXTargetDependency; 963 "DEBUG=1",
914 target = 6E84E3701F27A700001EB88E /* LifeLog */; 964 "$(inherited)",
915 targetProxy = 6E84E3961F27A703001EB88E /* PBXContainerItemProxy */; 965 );
916 }; 966 GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
917 /* End PBXTargetDependency section */ 967 GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
918 968 GCC_WARN_UNDECLARED_SELECTOR = YES;
919 /* Begin PBXVariantGroup section */ 969 GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
920 6E84E3821F27A701001EB88E /* LaunchScreen.storyboard */ = { 970 GCC_WARN_UNUSED_FUNCTION = YES;
921 isa = PBXVariantGroup; 971 GCC_WARN_UNUSED_VARIABLE = YES;
922 children = ( 972 IPHONEOS_DEPLOYMENT_TARGET = 10.3;
923 6E84E3831F27A701001EB88E /* Base */, 973 MTL_ENABLE_DEBUG_INFO = YES;
924 ); 974 ONLY_ACTIVE_ARCH = YES;
925 name = LaunchScreen.storyboard; 975 SDKROOT = iphoneos;
926 sourceTree = "<group>"; 976 TARGETED_DEVICE_FAMILY = "1,2";
927 }; 977 };
928 /* End PBXVariantGroup section */ 978 name = Debug;
929 979 };
930 /* Begin XCBuildConfiguration section */ 980 6E84E39D1F27A703001EB88E /* Release */ = {
931 6E84E39C1F27A703001EB88E /* Debug */ = { 981 isa = XCBuildConfiguration;
932 isa = XCBuildConfiguration; 982 buildSettings = {
933 buildSettings = { 983 ALWAYS_SEARCH_USER_PATHS = NO;
934 ALWAYS_SEARCH_USER_PATHS = NO; 984 CLANG_ANALYZER_NONNULL = YES;
935 CLANG_ANALYZER_NONNULL = YES; 985 CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
936 CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 986 CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
937 CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 987 CLANG_CXX_LIBRARY = "libc++";
938 CLANG_CXX_LIBRARY = "libc++"; 988 CLANG_ENABLE_MODULES = YES;
939 CLANG_ENABLE_MODULES = YES; 989 CLANG_ENABLE_OBJC_ARC = YES;
940 CLANG_ENABLE_OBJC_ARC = YES; 990 CLANG_WARN_BOOL_CONVERSION = YES;
941 CLANG_WARN_BOOL_CONVERSION = YES; 991 CLANG_WARN_CONSTANT_CONVERSION = YES;
942 CLANG_WARN_CONSTANT_CONVERSION = YES; 992 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
943 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 993 CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
944 CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 994 CLANG_WARN_EMPTY_BODY = YES;
945 CLANG_WARN_EMPTY_BODY = YES; 995 CLANG_WARN_ENUM_CONVERSION = YES;
946 CLANG_WARN_ENUM_CONVERSION = YES; 996 CLANG_WARN_INFINITE_RECURSION = YES;
947 CLANG_WARN_INFINITE_RECURSION = YES; 997 CLANG_WARN_INT_CONVERSION = YES;
948 CLANG_WARN_INT_CONVERSION = YES; 998 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
949 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 999 CLANG_WARN_SUSPICIOUS_MOVE = YES;
950 CLANG_WARN_SUSPICIOUS_MOVE = YES; 1000 CLANG_WARN_UNREACHABLE_CODE = YES;
951 CLANG_WARN_UNREACHABLE_CODE = YES; 1001 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
952 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1002 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
953 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1003 COPY_PHASE_STRIP = NO;
954 COPY_PHASE_STRIP = NO; 1004 DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
955 DEBUG_INFORMATION_FORMAT = dwarf; 1005 ENABLE_NS_ASSERTIONS = NO;
956 ENABLE_STRICT_OBJC_MSGSEND = YES; 1006 ENABLE_STRICT_OBJC_MSGSEND = YES;
957 ENABLE_TESTABILITY = YES; 1007 GCC_C_LANGUAGE_STANDARD = gnu99;
958 GCC_C_LANGUAGE_STANDARD = gnu99; 1008 GCC_NO_COMMON_BLOCKS = YES;
959 GCC_DYNAMIC_NO_PIC = NO; 1009 GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
960 GCC_NO_COMMON_BLOCKS = YES; 1010 GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
961 GCC_OPTIMIZATION_LEVEL = 0; 1011 GCC_WARN_UNDECLARED_SELECTOR = YES;
962 GCC_PREPROCESSOR_DEFINITIONS = ( 1012 GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
963 "DEBUG=1", 1013 GCC_WARN_UNUSED_FUNCTION = YES;
964 "$(inherited)", 1014 GCC_WARN_UNUSED_VARIABLE = YES;
965 ); 1015 IPHONEOS_DEPLOYMENT_TARGET = 10.3;
966 GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1016 MTL_ENABLE_DEBUG_INFO = NO;
967 GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1017 SDKROOT = iphoneos;
968 GCC_WARN_UNDECLARED_SELECTOR = YES; 1018 TARGETED_DEVICE_FAMILY = "1,2";
969 GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1019 VALIDATE_PRODUCT = YES;
970 GCC_WARN_UNUSED_FUNCTION = YES; 1020 };
971 GCC_WARN_UNUSED_VARIABLE = YES; 1021 name = Release;
972 IPHONEOS_DEPLOYMENT_TARGET = 10.3; 1022 };
973 MTL_ENABLE_DEBUG_INFO = YES; 1023 6E84E39F1F27A703001EB88E /* Debug */ = {
974 ONLY_ACTIVE_ARCH = YES; 1024 isa = XCBuildConfiguration;
975 SDKROOT = iphoneos; 1025 baseConfigurationReference = 0FC2D57087AF4571C57FAE08 /* Pods-LifeLog.debug.xcconfig */;
976 TARGETED_DEVICE_FAMILY = "1,2"; 1026 buildSettings = {
977 }; 1027 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
978 name = Debug; 1028 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
979 }; 1029 DEVELOPMENT_TEAM = "";
980 6E84E39D1F27A703001EB88E /* Release */ = { 1030 INFOPLIST_FILE = LifeLog/Info.plist;
981 isa = XCBuildConfiguration; 1031 IPHONEOS_DEPLOYMENT_TARGET = 9.0;
982 buildSettings = { 1032 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
983 ALWAYS_SEARCH_USER_PATHS = NO; 1033 OTHER_LDFLAGS = (
984 CLANG_ANALYZER_NONNULL = YES; 1034 "$(inherited)",
985 CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 1035 "-framework",
986 CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 1036 "\"CircleProgressBar\"",
987 CLANG_CXX_LIBRARY = "libc++"; 1037 "-all_load",
988 CLANG_ENABLE_MODULES = YES; 1038 "-ObjC",
989 CLANG_ENABLE_OBJC_ARC = YES; 1039 );
990 CLANG_WARN_BOOL_CONVERSION = YES; 1040 PRODUCT_BUNDLE_IDENTIFIER = mobileworld.jp.lifelog;
991 CLANG_WARN_CONSTANT_CONVERSION = YES; 1041 PRODUCT_NAME = "$(TARGET_NAME)";
992 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 1042 PROVISIONING_PROFILE = "";
993 CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1043 PROVISIONING_PROFILE_SPECIFIER = "";
994 CLANG_WARN_EMPTY_BODY = YES; 1044 };
995 CLANG_WARN_ENUM_CONVERSION = YES; 1045 name = Debug;
996 CLANG_WARN_INFINITE_RECURSION = YES; 1046 };
997 CLANG_WARN_INT_CONVERSION = YES; 1047 6E84E3A01F27A703001EB88E /* Release */ = {
998 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 1048 isa = XCBuildConfiguration;
999 CLANG_WARN_SUSPICIOUS_MOVE = YES; 1049 baseConfigurationReference = 4CFDA5714AF852358A1EB515 /* Pods-LifeLog.release.xcconfig */;
1000 CLANG_WARN_UNREACHABLE_CODE = YES; 1050 buildSettings = {
1001 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1051 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1002 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1052 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1003 COPY_PHASE_STRIP = NO; 1053 DEVELOPMENT_TEAM = "";
1004 DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 1054 INFOPLIST_FILE = LifeLog/Info.plist;
1005 ENABLE_NS_ASSERTIONS = NO; 1055 IPHONEOS_DEPLOYMENT_TARGET = 9.0;
1006 ENABLE_STRICT_OBJC_MSGSEND = YES; 1056 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1007 GCC_C_LANGUAGE_STANDARD = gnu99; 1057 OTHER_LDFLAGS = (
1008 GCC_NO_COMMON_BLOCKS = YES; 1058 "$(inherited)",
1009 GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1059 "-framework",
1010 GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1060 "\"CircleProgressBar\"",
1011 GCC_WARN_UNDECLARED_SELECTOR = YES; 1061 "-all_load",
1012 GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1062 "-ObjC",
1013 GCC_WARN_UNUSED_FUNCTION = YES; 1063 );
1014 GCC_WARN_UNUSED_VARIABLE = YES; 1064 PRODUCT_BUNDLE_IDENTIFIER = mobileworld.jp.lifelog;
1015 IPHONEOS_DEPLOYMENT_TARGET = 10.3; 1065 PRODUCT_NAME = "$(TARGET_NAME)";
1016 MTL_ENABLE_DEBUG_INFO = NO; 1066 PROVISIONING_PROFILE = "";
1017 SDKROOT = iphoneos; 1067 PROVISIONING_PROFILE_SPECIFIER = "";
1018 TARGETED_DEVICE_FAMILY = "1,2"; 1068 };
1019 VALIDATE_PRODUCT = YES; 1069 name = Release;
1020 }; 1070 };
1021 name = Release; 1071 6E84E3A21F27A703001EB88E /* Debug */ = {
1022 }; 1072 isa = XCBuildConfiguration;
1023 6E84E39F1F27A703001EB88E /* Debug */ = { 1073 buildSettings = {
1024 isa = XCBuildConfiguration; 1074 BUNDLE_LOADER = "$(TEST_HOST)";
1025 baseConfigurationReference = 0FC2D57087AF4571C57FAE08 /* Pods-LifeLog.debug.xcconfig */; 1075 INFOPLIST_FILE = LifeLogTests/Info.plist;
1026 buildSettings = { 1076 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1027 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1077 PRODUCT_BUNDLE_IDENTIFIER = com.mav.LifeLogTests;
1028 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1078 PRODUCT_NAME = "$(TARGET_NAME)";
1029 DEVELOPMENT_TEAM = ""; 1079 TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LifeLog.app/LifeLog";
1030 INFOPLIST_FILE = LifeLog/Info.plist; 1080 };
1031 IPHONEOS_DEPLOYMENT_TARGET = 9.0; 1081 name = Debug;
1032 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1082 };
1033 OTHER_LDFLAGS = ( 1083 6E84E3A31F27A703001EB88E /* Release */ = {
1034 "$(inherited)", 1084 isa = XCBuildConfiguration;
1035 "-framework", 1085 buildSettings = {
1036 "\"CircleProgressBar\"", 1086 BUNDLE_LOADER = "$(TEST_HOST)";
1037 "-all_load", 1087 INFOPLIST_FILE = LifeLogTests/Info.plist;
1038 "-ObjC", 1088 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1039 ); 1089 PRODUCT_BUNDLE_IDENTIFIER = com.mav.LifeLogTests;
1040 PRODUCT_BUNDLE_IDENTIFIER = mobileworld.jp.lifelog; 1090 PRODUCT_NAME = "$(TARGET_NAME)";
1041 PRODUCT_NAME = "$(TARGET_NAME)"; 1091 TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LifeLog.app/LifeLog";
1042 PROVISIONING_PROFILE = ""; 1092 };
1043 PROVISIONING_PROFILE_SPECIFIER = ""; 1093 name = Release;
1044 }; 1094 };
1045 name = Debug; 1095 6E84E3A51F27A703001EB88E /* Debug */ = {
1046 }; 1096 isa = XCBuildConfiguration;
1047 6E84E3A01F27A703001EB88E /* Release */ = { 1097 buildSettings = {
1048 isa = XCBuildConfiguration; 1098 INFOPLIST_FILE = LifeLogUITests/Info.plist;
1049 baseConfigurationReference = 4CFDA5714AF852358A1EB515 /* Pods-LifeLog.release.xcconfig */; 1099 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1050 buildSettings = { 1100 PRODUCT_BUNDLE_IDENTIFIER = com.mav.LifeLogUITests;
1051 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1101 PRODUCT_NAME = "$(TARGET_NAME)";
1052 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1102 TEST_TARGET_NAME = LifeLog;
1053 DEVELOPMENT_TEAM = ""; 1103 };
1054 INFOPLIST_FILE = LifeLog/Info.plist; 1104 name = Debug;
1055 IPHONEOS_DEPLOYMENT_TARGET = 9.0; 1105 };
1056 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1106 6E84E3A61F27A703001EB88E /* Release */ = {
1057 OTHER_LDFLAGS = ( 1107 isa = XCBuildConfiguration;
1058 "$(inherited)", 1108 buildSettings = {
1059 "-framework", 1109 INFOPLIST_FILE = LifeLogUITests/Info.plist;
1060 "\"CircleProgressBar\"", 1110 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1061 "-all_load", 1111 PRODUCT_BUNDLE_IDENTIFIER = com.mav.LifeLogUITests;
1062 "-ObjC", 1112 PRODUCT_NAME = "$(TARGET_NAME)";
1063 ); 1113 TEST_TARGET_NAME = LifeLog;
1064 PRODUCT_BUNDLE_IDENTIFIER = mobileworld.jp.lifelog; 1114 };
1065 PRODUCT_NAME = "$(TARGET_NAME)"; 1115 name = Release;
1066 PROVISIONING_PROFILE = ""; 1116 };
1067 PROVISIONING_PROFILE_SPECIFIER = ""; 1117 /* End XCBuildConfiguration section */
1068 }; 1118
1069 name = Release; 1119 /* Begin XCConfigurationList section */
1070 }; 1120 6E84E36C1F27A700001EB88E /* Build configuration list for PBXProject "LifeLog" */ = {
1071 6E84E3A21F27A703001EB88E /* Debug */ = { 1121 isa = XCConfigurationList;
1072 isa = XCBuildConfiguration; 1122 buildConfigurations = (
1073 buildSettings = { 1123 6E84E39C1F27A703001EB88E /* Debug */,
1074 BUNDLE_LOADER = "$(TEST_HOST)"; 1124 6E84E39D1F27A703001EB88E /* Release */,
1075 INFOPLIST_FILE = LifeLogTests/Info.plist; 1125 );
1076 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1126 defaultConfigurationIsVisible = 0;
1077 PRODUCT_BUNDLE_IDENTIFIER = com.mav.LifeLogTests; 1127 defaultConfigurationName = Release;
1078 PRODUCT_NAME = "$(TARGET_NAME)"; 1128 };
1079 TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LifeLog.app/LifeLog"; 1129 6E84E39E1F27A703001EB88E /* Build configuration list for PBXNativeTarget "LifeLog" */ = {
1080 }; 1130 isa = XCConfigurationList;
1081 name = Debug; 1131 buildConfigurations = (
1082 }; 1132 6E84E39F1F27A703001EB88E /* Debug */,
1083 6E84E3A31F27A703001EB88E /* Release */ = { 1133 6E84E3A01F27A703001EB88E /* Release */,
1084 isa = XCBuildConfiguration; 1134 );
1085 buildSettings = { 1135 defaultConfigurationIsVisible = 0;
1086 BUNDLE_LOADER = "$(TEST_HOST)"; 1136 defaultConfigurationName = Release;
1087 INFOPLIST_FILE = LifeLogTests/Info.plist; 1137 };
1088 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1138 6E84E3A11F27A703001EB88E /* Build configuration list for PBXNativeTarget "LifeLogTests" */ = {
1089 PRODUCT_BUNDLE_IDENTIFIER = com.mav.LifeLogTests; 1139 isa = XCConfigurationList;
1090 PRODUCT_NAME = "$(TARGET_NAME)"; 1140 buildConfigurations = (
1091 TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LifeLog.app/LifeLog"; 1141 6E84E3A21F27A703001EB88E /* Debug */,
1092 }; 1142 6E84E3A31F27A703001EB88E /* Release */,
1093 name = Release; 1143 );
1094 }; 1144 defaultConfigurationIsVisible = 0;
1095 6E84E3A51F27A703001EB88E /* Debug */ = { 1145 defaultConfigurationName = Release;
1096 isa = XCBuildConfiguration; 1146 };
1097 buildSettings = { 1147 6E84E3A41F27A703001EB88E /* Build configuration list for PBXNativeTarget "LifeLogUITests" */ = {
1098 INFOPLIST_FILE = LifeLogUITests/Info.plist; 1148 isa = XCConfigurationList;
1099 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1149 buildConfigurations = (
1100 PRODUCT_BUNDLE_IDENTIFIER = com.mav.LifeLogUITests; 1150 6E84E3A51F27A703001EB88E /* Debug */,
1101 PRODUCT_NAME = "$(TARGET_NAME)"; 1151 6E84E3A61F27A703001EB88E /* Release */,
1102 TEST_TARGET_NAME = LifeLog; 1152 );
1103 }; 1153 defaultConfigurationIsVisible = 0;
1104 name = Debug; 1154 defaultConfigurationName = Release;
1105 }; 1155 };
1106 6E84E3A61F27A703001EB88E /* Release */ = { 1156 /* End XCConfigurationList section */
1107 isa = XCBuildConfiguration; 1157 };
1108 buildSettings = { 1158 rootObject = 6E84E3691F27A700001EB88E /* Project object */;
1109 INFOPLIST_FILE = LifeLogUITests/Info.plist; 1159 }
1110 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1160
LifeLog/LifeLog/Assets.xcassets/History/arrow_down.imageset/Contents.json
File was created 1 {
2 "images" : [
3 {
4 "idiom" : "universal",
5 "scale" : "1x"
6 },
7 {
8 "idiom" : "universal",
9 "filename" : "arrow_down.png",
10 "scale" : "2x"
11 },
12 {
13 "idiom" : "universal",
14 "scale" : "3x"
15 }
16 ],
17 "info" : {
18 "version" : 1,
19 "author" : "xcode"
20 }
21 }
LifeLog/LifeLog/Assets.xcassets/History/arrow_down.imageset/arrow_down.png

527 Bytes

LifeLog/LifeLog/BaseTableViewController.m
1 // 1 //
2 // BaseTableViewController.m 2 // BaseTableViewController.m
3 // LifeLog 3 // LifeLog
4 // 4 //
5 // Created by nvtu on 8/11/17. 5 // Created by nvtu on 8/11/17.
6 // Copyright © 2017 PhongNV. All rights reserved. 6 // Copyright © 2017 PhongNV. All rights reserved.
7 // 7 //
8 8
9 #import "BaseTableViewController.h" 9 #import "BaseTableViewController.h"
10 #import "Utilities.h" 10 #import "Utilities.h"
11 11
12 @interface BaseTableViewController () 12 @interface BaseTableViewController ()
13 13
14 @end 14 @end
15 15
16 @implementation BaseTableViewController 16 @implementation BaseTableViewController
17 17
18 - (void)viewDidLoad { 18 - (void)viewDidLoad {
19 [super viewDidLoad]; 19 [super viewDidLoad];
20 _firstTime = false; 20 _firstTime = false;
21 _curPage = 1; 21 _curPage = 1;
22 _isEndOfResult = false; 22 _isEndOfResult = false;
23 _curDataList = [[NSMutableArray alloc] init]; 23 _curDataList = [[NSMutableArray alloc] init];
24 self.refreshControl = [[UIRefreshControl alloc] init]; 24 self.refreshControl = [[UIRefreshControl alloc] init];
25 [self.refreshControl addTarget:self action:@selector(refreshTable) forControlEvents:UIControlEventValueChanged]; 25 [self.refreshControl addTarget:self action:@selector(refreshTable) forControlEvents:UIControlEventValueChanged];
26 [self.tableBase addSubview:self.refreshControl]; 26 [self.tableBase addSubview:self.refreshControl];
27 // Do any additional setup after loading the view. 27 // Do any additional setup after loading the view.
28 } 28 }
29 29
30 - (void)didReceiveMemoryWarning { 30 - (void)didReceiveMemoryWarning {
31 [super didReceiveMemoryWarning]; 31 [super didReceiveMemoryWarning];
32 // Dispose of any resources that can be recreated. 32 // Dispose of any resources that can be recreated.
33 } 33 }
34 34
35 -(void) callRequestToUpdateData { 35 -(void) callRequestToUpdateData {
36 _isLoading = true; 36 _isLoading = true;
37 } 37 }
38 38
39 -(void) resetData { 39 -(void) resetData {
40 _isLoading = false; 40 _isLoading = false;
41 _isEndOfResult = false; 41 _isEndOfResult = false;
42 _firstTime = false; 42 _firstTime = false;
43 _curPage = 1; 43 _curPage = 1;
44 [_curDataList removeAllObjects]; 44 [_curDataList removeAllObjects];
45 [self.tableBase reloadData]; 45 [self.tableBase reloadData];
46 [self callRequestToUpdateData]; 46 [self callRequestToUpdateData];
47 } 47 }
48 48
49 -(void) refreshTable { 49 -(void) refreshTable {
50 [self resetData]; 50 [self resetData];
51 } 51 }
52 52
53 -(void) updateTableData : (NSArray *) array error: (NSError *) error { 53 -(void) updateTableData : (NSArray *) array error: (NSError *) error {
54 BaseTableViewController __weak *weakSelf = self; 54 BaseTableViewController __weak *weakSelf = self;
55 _isLoading = false; 55 _isLoading = false;
56 _firstTime = true; 56 _firstTime = true;
57 if(self.refreshControl != nil) { 57 if(self.refreshControl != nil) {
58 dispatch_async(dispatch_get_main_queue(), ^{ 58 dispatch_async(dispatch_get_main_queue(), ^{
59 [self.refreshControl endRefreshing]; 59 [self.refreshControl endRefreshing];
60 }); 60 });
61 } 61 }
62 if(error == nil) { 62 if(error == nil) {
63 if(array.count != 0) { 63 if(array.count != 0) {
64 if(_curPage == 1) {
65 [_curDataList removeAllObjects];
66 }
64 if(_curPage == 1) { 67 [_curDataList addObjectsFromArray:array];
65 [_curDataList removeAllObjects]; 68 dispatch_async(dispatch_get_main_queue(), ^{
66 } 69 [weakSelf.tableBase reloadData];
67 [_curDataList addObjectsFromArray:array]; 70 });
68 dispatch_async(dispatch_get_main_queue(), ^{ 71 }
69 [weakSelf.tableBase reloadData]; 72 else {
70 }); 73 if(_curPage != 1) {
71 } 74 _isEndOfResult = true;
72 else { 75 _curPage -= 1;
73 if(_curPage != 1) { 76 }
74 _isEndOfResult = true; 77 else {
75 _curPage -= 1; 78 dispatch_async(dispatch_get_main_queue(), ^{
76 } 79 [weakSelf.tableBase reloadData];
77 else { 80 });
78 dispatch_async(dispatch_get_main_queue(), ^{ 81 }
79 [weakSelf.tableBase reloadData]; 82 }
80 }); 83 }
81 } 84 else {
82 } 85 _curPage = MAX(1, _curPage - 1);
83 } 86 dispatch_async(dispatch_get_main_queue(), ^{
84 else { 87 NSString *message = [error.userInfo objectForKey:@"message"];
85 _curPage = MAX(1, _curPage - 1); 88 [Utilities showErrorMessage:message withViewController:weakSelf];
86 dispatch_async(dispatch_get_main_queue(), ^{ 89 });
87 NSString *message = [error.userInfo objectForKey:@"message"]; 90 }
88 [Utilities showErrorMessage:message withViewController:weakSelf]; 91 }
89 }); 92
90 } 93 #pragma mark UITableView Delegate
91 } 94 - (NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
92 95 if((_curDataList == nil || _curDataList.count == 0) && _firstTime) {
93 #pragma mark UITableView Delegate 96 UILabel * noDataLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, tableView.frame.size.width, tableView.frame.size.height)];
94 - (NSInteger) numberOfSectionsInTableView:(UITableView *)tableView { 97 noDataLabel.text = @"No data available";
95 if((_curDataList == nil || _curDataList.count == 0) && _firstTime) { 98 noDataLabel.backgroundColor = [UIColor clearColor];
96 UILabel * noDataLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, tableView.frame.size.width, tableView.frame.size.height)]; 99 noDataLabel.textColor = [UIColor whiteColor];
97 noDataLabel.text = @"No data available"; 100 noDataLabel.textAlignment = NSTextAlignmentCenter;
98 noDataLabel.backgroundColor = [UIColor clearColor]; 101 tableView.backgroundView = noDataLabel;
99 noDataLabel.textColor = [UIColor whiteColor]; 102 tableView.backgroundView.layer.zPosition -= 1;
100 noDataLabel.textAlignment = NSTextAlignmentCenter; 103 return 0;
101 tableView.backgroundView = noDataLabel; 104 }
102 tableView.backgroundView.layer.zPosition -= 1; 105 tableView.backgroundView = nil;
103 return 0; 106 return 1;
104 } 107 }
105 tableView.backgroundView = nil; 108
106 return 1; 109 - (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
107 } 110 return _curDataList.count;
108 111 }
109 - (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 112
110 return _curDataList.count; 113 - (void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
111 } 114 NSInteger lastRowIndex = [tableView numberOfRowsInSection:0] - 1;
112 115 if (indexPath.row == lastRowIndex) {
113 - (void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { 116 // This is the last cell
114 NSInteger lastRowIndex = [tableView numberOfRowsInSection:0] - 1; 117 if(!_isLoading) {
115 if (indexPath.row == lastRowIndex) { 118 _curPage += 1;
116 // This is the last cell 119 [self callRequestToUpdateData];
117 if(!_isLoading) { 120 }
118 _curPage += 1; 121 }
119 [self callRequestToUpdateData]; 122 }
120 } 123 @end
121 } 124
LifeLog/LifeLog/CreateGroupViewController.h
File was created 1 //
2 // CreateGroupViewController.h
3 // LifeLog
4 //
5 // Created by nvtu on 8/19/17.
6 // Copyright © 2017 PhongNV. All rights reserved.
7 //
8
9 #import <UIKit/UIKit.h>
10 #import "BaseViewController.h"
11 #import "AutoTransButton.h"
12 #import "Utilities.h"
13 #import "Entities.h"
14
15 @interface CreateGroupViewController : BaseViewController<UITextFieldDelegate, UITextViewDelegate>
16
17 @property (weak, nonatomic) IBOutlet UITextField *textName;
18 @property (weak, nonatomic) IBOutlet UITextField *textGoalWalk;
19 @property (weak, nonatomic) IBOutlet UITextField *textGoalRun;
20 @property (weak, nonatomic) IBOutlet UITextField *textGoalBike;
21
22 @property (weak, nonatomic) IBOutlet UITextView *textGoal;
23
24 @property (weak, nonatomic) IBOutlet UISwitch *switchWalk;
25 @property (weak, nonatomic) IBOutlet UISwitch *switchBike;
26 @property (weak, nonatomic) IBOutlet UISwitch *switchRun;
27 @property (weak, nonatomic) IBOutlet UISwitch *switchStep;
28 @property (weak, nonatomic) IBOutlet UISwitch *switchGym;
29 @property (weak, nonatomic) IBOutlet UISwitch *switchBegin;
30
31 @property (copy) void (^createGroupSuccess)(GroupObject * group);
32
33 - (IBAction)clickBack:(UIButton *)sender;
34 - (IBAction)clickCreateGroup:(AutoTransButton *)sender;
35
36 @end
1 // 37
LifeLog/LifeLog/CreateGroupViewController.m
File was created 1 //
2 // CreateGroupViewController.m
3 // LifeLog
4 //
5 // Created by nvtu on 8/19/17.
6 // Copyright © 2017 PhongNV. All rights reserved.
7 //
8
9 #import "CreateGroupViewController.h"
10 #import "ServerAPI.h"
11
12 @interface CreateGroupViewController ()
13
14 @end
15
16 @implementation CreateGroupViewController
17
18 - (void)viewDidLoad {
19 [super viewDidLoad];
20 // Do any additional setup after loading the view from its nib.
21 }
22
23 - (void)didReceiveMemoryWarning {
24 [super didReceiveMemoryWarning];
25 // Dispose of any resources that can be recreated.
26 }
27
28 #pragma mark IBAction
29
30 - (IBAction)clickBack:(UIButton *)sender {
31 [self.navigationController popViewControllerAnimated:true];
32 }
33
34 - (IBAction)clickCreateGroup:(AutoTransButton *)sender {
35 NSString *name = self.textName.text;
36 NSString *goal = self.textGoal.text;
37 if(name.length == 0) {
38 [Utilities showErrorMessage:@"Fill name of group!" withViewController:self];
39 return;
40 }
41 else if(name.length >= 255) {
42 [Utilities showErrorMessage:@"Name of group is too long!" withViewController:self];
43 return;
44 }
45 else if(goal.length == 0) {
46 [Utilities showErrorMessage:@"Fill information for goal of group" withViewController:self];
47 return;
48 }
49 if(self.switchWalk.on && [self.textGoalWalk.text intValue] == 0) {
50 [Utilities showErrorMessage:@"Add goal for walk mode" withViewController:self];
51 return;
52 }
53 if(self.switchBike.on && [self.textGoalBike.text intValue] == 0) {
54 [Utilities showErrorMessage:@"Add goal for bike mode" withViewController:self];
55 return;
56 }
57 if(self.switchRun.on && [self.textGoalRun.text intValue] == 0) {
58 [Utilities showErrorMessage:@"Add goal for run mode" withViewController:self];
59 return;
60 }
61 GroupObject *object = [[GroupObject alloc] init];
62 object.name = name;
63 object.goal = goal;
64 object.walkMode = self.switchWalk.on;
65 object.runMode = self.switchRun.on;
66 object.bikeMode = self.switchBike.on;
67 object.stepMode = self.switchStep.on;
68 object.gymMode = self.switchGym.on;
69 object.beginMode = self.switchBegin.on;
70 object.walkGoal = [self.textGoalWalk.text intValue];
71 object.bikeGoal = [self.textGoalBike.text intValue];
72 object.runGoal = [self.textGoalRun.text intValue];
73
74 NSLog(@"%@", object.name);
75 NSLog(@"%@", object.goal);
76 NSLog(@"%d", object.walkGoal);
77 NSLog(@"%d", object.bikeGoal);
78 NSLog(@"%d", object.runGoal);
79 NSLog(@"%d", object.walkMode);
80 NSLog(@"%d", object.runMode);
81 NSLog(@"%d", object.bikeMode);
82 NSLog(@"%d", object.stepMode);
83 NSLog(@"%d", object.gymMode);
84 NSLog(@"%d", object.beginMode);
85
86 NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken];
87 MBProgressHUD *hudView = [MBProgressHUD showHUDAddedTo:self.view animated:true];
88 [[ServerAPI server] requestCreateGroup:token withGroup:object CompletionHandler:^(GroupObject * group, NSError * error) {
89 CreateGroupViewController __weak *weakSelf = self;
90 if(error == nil) {
91 dispatch_async(dispatch_get_main_queue(), ^{
92 if(weakSelf.createGroupSuccess != nil) {
93 [hudView hideAnimated:true];
94 [weakSelf clickBack:nil];
95 weakSelf.createGroupSuccess(object);
96 }
97 });
98 }
99 else {
100 dispatch_async(dispatch_get_main_queue(), ^{
101 [hudView hideAnimated:true];
102 NSString *message = [error.userInfo objectForKey:@"message"];
103 [Utilities showErrorMessage:message withViewController:weakSelf];
104 });
105 }
106 }];
107 }
108
109 #pragma mark UITextView Delegate
110
111 -(BOOL) textFieldShouldReturn:(UITextField *)textField {
112 [self.view endEditing:true];
113 return true;
114 }
115
116 @end
1 // 117
LifeLog/LifeLog/CreateGroupViewController.xib
File was created 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">
3 <device id="retina4_7" orientation="portrait">
4 <adaptation id="fullscreen"/>
5 </device>
6 <dependencies>
7 <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
8 <capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
9 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
10 </dependencies>
11 <objects>
12 <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CreateGroupViewController">
13 <connections>
14 <outlet property="switchBegin" destination="e63-8i-6aa" id="bbT-m6-3CV"/>
15 <outlet property="switchBike" destination="fGW-Vw-PwQ" id="ncx-kP-qdd"/>
16 <outlet property="switchGym" destination="Yga-UQ-xoU" id="rIN-kO-wmO"/>
17 <outlet property="switchRun" destination="2gX-B2-tkR" id="yak-gV-Cas"/>
18 <outlet property="switchStep" destination="RoR-w7-dNT" id="19b-K3-qAu"/>
19 <outlet property="switchWalk" destination="3xD-aH-JHl" id="OZ9-l7-Rww"/>
20 <outlet property="textGoal" destination="hWb-vU-yVd" id="dp0-yK-P60"/>
21 <outlet property="textGoalBike" destination="eOi-eo-GYn" id="qfW-ns-tsM"/>
22 <outlet property="textGoalRun" destination="3aE-uP-KLS" id="WAE-tl-O94"/>
23 <outlet property="textGoalWalk" destination="4JZ-J2-3D9" id="yHV-mB-rcn"/>
24 <outlet property="textName" destination="pXO-K0-vne" id="ePQ-35-RLr"/>
25 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
26 </connections>
27 </placeholder>
28 <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
29 <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
30 <rect key="frame" x="0.0" y="0.0" width="320" height="626"/>
31 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
32 <subviews>
33 <scrollView multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aKu-bd-xMP" customClass="TPKeyboardAvoidingScrollView">
34 <rect key="frame" x="0.0" y="46" width="320" height="580"/>
35 <subviews>
36 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9w1-87-U1W">
37 <rect key="frame" x="0.0" y="0.0" width="320" height="580"/>
38 <subviews>
39 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="名称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZtU-mt-3Ov" customClass="AutoTransLabel">
40 <rect key="frame" x="8" y="10" width="70" height="30"/>
41 <constraints>
42 <constraint firstAttribute="width" constant="70" id="Zvx-V3-7AW"/>
43 <constraint firstAttribute="height" constant="30" id="nok-hA-mW9"/>
44 </constraints>
45 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
46 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
47 <nil key="highlightedColor"/>
48 <userDefinedRuntimeAttributes>
49 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.name"/>
50 </userDefinedRuntimeAttributes>
51 </label>
52 <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="pXO-K0-vne">
53 <rect key="frame" x="88" y="10" width="222" height="30"/>
54 <constraints>
55 <constraint firstAttribute="height" constant="30" id="YJe-TW-hvA"/>
56 </constraints>
57 <nil key="textColor"/>
58 <fontDescription key="fontDescription" type="system" pointSize="14"/>
59 <textInputTraits key="textInputTraits"/>
60 <connections>
61 <outlet property="delegate" destination="-1" id="3NL-Ya-JuM"/>
62 </connections>
63 </textField>
64 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ONn-27-HqB">
65 <rect key="frame" x="10" y="50" width="140" height="120"/>
66 <subviews>
67 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="S2z-DI-pIE">
68 <rect key="frame" x="0.0" y="0.0" width="140" height="40"/>
69 <subviews>
70 <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3xD-aH-JHl">
71 <rect key="frame" x="85" y="4" width="51" height="31"/>
72 <constraints>
73 <constraint firstAttribute="width" secondItem="3xD-aH-JHl" secondAttribute="height" multiplier="49:31" id="7LJ-H5-oQR"/>
74 </constraints>
75 <color key="onTintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
76 </switch>
77 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="WALK" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yFv-kp-ag8" customClass="AutoTransLabel">
78 <rect key="frame" x="6" y="10.5" width="47.5" height="20.5"/>
79 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
80 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
81 <nil key="highlightedColor"/>
82 <userDefinedRuntimeAttributes>
83 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.walk"/>
84 </userDefinedRuntimeAttributes>
85 </label>
86 </subviews>
87 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
88 <constraints>
89 <constraint firstAttribute="trailing" secondItem="3xD-aH-JHl" secondAttribute="trailing" constant="6" id="KNe-Rx-lun"/>
90 <constraint firstAttribute="height" constant="40" id="akz-T7-d2v"/>
91 <constraint firstItem="3xD-aH-JHl" firstAttribute="centerY" secondItem="S2z-DI-pIE" secondAttribute="centerY" id="oRy-OM-Om1"/>
92 <constraint firstItem="yFv-kp-ag8" firstAttribute="leading" secondItem="S2z-DI-pIE" secondAttribute="leading" constant="6" id="prt-UF-Ori"/>
93 <constraint firstItem="yFv-kp-ag8" firstAttribute="centerY" secondItem="S2z-DI-pIE" secondAttribute="centerY" id="xEl-Rl-8C1"/>
94 </constraints>
95 </view>
96 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dVh-y2-XTr">
97 <rect key="frame" x="0.0" y="40" width="140" height="40"/>
98 <subviews>
99 <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2gX-B2-tkR">
100 <rect key="frame" x="85" y="4" width="51" height="31"/>
101 <constraints>
102 <constraint firstAttribute="width" secondItem="2gX-B2-tkR" secondAttribute="height" multiplier="49:31" id="pBG-Mw-aNK"/>
103 </constraints>
104 <color key="onTintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
105 </switch>
106 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="RUN" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="r9v-yX-mx8" customClass="AutoTransLabel">
107 <rect key="frame" x="6" y="10.5" width="36" height="20.5"/>
108 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
109 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
110 <nil key="highlightedColor"/>
111 <userDefinedRuntimeAttributes>
112 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.run"/>
113 </userDefinedRuntimeAttributes>
114 </label>
115 </subviews>
116 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
117 <constraints>
118 <constraint firstItem="2gX-B2-tkR" firstAttribute="centerY" secondItem="dVh-y2-XTr" secondAttribute="centerY" id="bNR-wC-PQG"/>
119 <constraint firstItem="r9v-yX-mx8" firstAttribute="leading" secondItem="dVh-y2-XTr" secondAttribute="leading" constant="6" id="iHM-Q7-Z1Z"/>
120 <constraint firstAttribute="height" constant="40" id="s8W-Ak-VrH"/>
121 <constraint firstAttribute="trailing" secondItem="2gX-B2-tkR" secondAttribute="trailing" constant="6" id="usV-BG-oqp"/>
122 <constraint firstItem="r9v-yX-mx8" firstAttribute="centerY" secondItem="dVh-y2-XTr" secondAttribute="centerY" id="yZW-Wk-raQ"/>
123 </constraints>
124 </view>
125 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7PQ-zz-N0X">
126 <rect key="frame" x="0.0" y="80" width="140" height="40"/>
127 <subviews>
128 <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Yga-UQ-xoU">
129 <rect key="frame" x="85" y="4" width="51" height="31"/>
130 <constraints>
131 <constraint firstAttribute="width" secondItem="Yga-UQ-xoU" secondAttribute="height" multiplier="49:31" id="laB-Zs-gOj"/>
132 </constraints>
133 <color key="onTintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
134 </switch>
135 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ジム" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EFD-Ys-PqS" customClass="AutoTransLabel">
136 <rect key="frame" x="6" y="10.5" width="35" height="20.5"/>
137 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
138 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
139 <nil key="highlightedColor"/>
140 <userDefinedRuntimeAttributes>
141 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.gym"/>
142 </userDefinedRuntimeAttributes>
143 </label>
144 </subviews>
145 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
146 <constraints>
147 <constraint firstItem="EFD-Ys-PqS" firstAttribute="centerY" secondItem="7PQ-zz-N0X" secondAttribute="centerY" id="Ein-vC-mpy"/>
148 <constraint firstAttribute="height" constant="40" id="aKm-hG-Hyh"/>
149 <constraint firstAttribute="trailing" secondItem="Yga-UQ-xoU" secondAttribute="trailing" constant="6" id="cfd-4G-1NF"/>
150 <constraint firstItem="EFD-Ys-PqS" firstAttribute="leading" secondItem="7PQ-zz-N0X" secondAttribute="leading" constant="6" id="ojT-rz-8oC"/>
151 <constraint firstItem="Yga-UQ-xoU" firstAttribute="centerY" secondItem="7PQ-zz-N0X" secondAttribute="centerY" id="xYy-kb-5Sk"/>
152 </constraints>
153 </view>
154 </subviews>
155 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
156 <constraints>
157 <constraint firstItem="dVh-y2-XTr" firstAttribute="top" secondItem="S2z-DI-pIE" secondAttribute="bottom" id="2LH-28-ssn"/>
158 <constraint firstItem="7PQ-zz-N0X" firstAttribute="leading" secondItem="ONn-27-HqB" secondAttribute="leading" id="6md-Y8-lIk"/>
159 <constraint firstAttribute="height" constant="120" id="7Tb-oJ-5eC"/>
160 <constraint firstItem="7PQ-zz-N0X" firstAttribute="top" secondItem="dVh-y2-XTr" secondAttribute="bottom" id="Fsa-Ai-cKQ"/>
161 <constraint firstAttribute="trailing" secondItem="S2z-DI-pIE" secondAttribute="trailing" id="OV6-wK-IJj"/>
162 <constraint firstItem="dVh-y2-XTr" firstAttribute="leading" secondItem="ONn-27-HqB" secondAttribute="leading" id="TFE-bH-HwH"/>
163 <constraint firstAttribute="trailing" secondItem="dVh-y2-XTr" secondAttribute="trailing" id="Vul-EM-V8H"/>
164 <constraint firstItem="S2z-DI-pIE" firstAttribute="top" secondItem="ONn-27-HqB" secondAttribute="top" id="Yf4-Rz-E4g"/>
165 <constraint firstAttribute="trailing" secondItem="7PQ-zz-N0X" secondAttribute="trailing" id="hLr-NV-hyv"/>
166 <constraint firstItem="S2z-DI-pIE" firstAttribute="leading" secondItem="ONn-27-HqB" secondAttribute="leading" id="zMY-Vd-Ge9"/>
167 </constraints>
168 </view>
169 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Kpa-HJ-7cE">
170 <rect key="frame" x="170" y="50" width="140" height="120"/>
171 <subviews>
172 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ALk-sL-SXG">
173 <rect key="frame" x="0.0" y="0.0" width="140" height="40"/>
174 <subviews>
175 <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fGW-Vw-PwQ">
176 <rect key="frame" x="85" y="4" width="51" height="31"/>
177 <constraints>
178 <constraint firstAttribute="width" secondItem="fGW-Vw-PwQ" secondAttribute="height" multiplier="49:31" id="qd5-Cg-6pG"/>
179 </constraints>
180 <color key="onTintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
181 </switch>
182 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="BIKE" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WfE-YM-vVU" customClass="AutoTransLabel">
183 <rect key="frame" x="6" y="10.5" width="36.5" height="20.5"/>
184 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
185 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
186 <nil key="highlightedColor"/>
187 <userDefinedRuntimeAttributes>
188 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.bike"/>
189 </userDefinedRuntimeAttributes>
190 </label>
191 </subviews>
192 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
193 <constraints>
194 <constraint firstItem="WfE-YM-vVU" firstAttribute="leading" secondItem="ALk-sL-SXG" secondAttribute="leading" constant="6" id="7xm-U8-L7U"/>
195 <constraint firstAttribute="height" constant="40" id="L4u-uj-rHa"/>
196 <constraint firstItem="fGW-Vw-PwQ" firstAttribute="centerY" secondItem="ALk-sL-SXG" secondAttribute="centerY" id="PBA-tv-gec"/>
197 <constraint firstAttribute="trailing" secondItem="fGW-Vw-PwQ" secondAttribute="trailing" constant="6" id="bHc-Ih-6ar"/>
198 <constraint firstItem="WfE-YM-vVU" firstAttribute="centerY" secondItem="ALk-sL-SXG" secondAttribute="centerY" id="te7-Im-Oqh"/>
199 </constraints>
200 </view>
201 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4Az-6N-8u4">
202 <rect key="frame" x="0.0" y="40" width="140" height="40"/>
203 <subviews>
204 <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="RoR-w7-dNT">
205 <rect key="frame" x="85" y="4" width="51" height="31"/>
206 <constraints>
207 <constraint firstAttribute="width" secondItem="RoR-w7-dNT" secondAttribute="height" multiplier="49:31" id="YUz-Eh-EmZ"/>
208 </constraints>
209 <color key="onTintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
210 </switch>
211 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="STEP" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZyO-6K-2gA" customClass="AutoTransLabel">
212 <rect key="frame" x="6" y="10.5" width="42" height="20.5"/>
213 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
214 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
215 <nil key="highlightedColor"/>
216 <userDefinedRuntimeAttributes>
217 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.step"/>
218 </userDefinedRuntimeAttributes>
219 </label>
220 </subviews>
221 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
222 <constraints>
223 <constraint firstAttribute="trailing" secondItem="RoR-w7-dNT" secondAttribute="trailing" constant="6" id="Cc4-W7-Qc8"/>
224 <constraint firstItem="ZyO-6K-2gA" firstAttribute="leading" secondItem="4Az-6N-8u4" secondAttribute="leading" constant="6" id="ER7-Bx-w9j"/>
225 <constraint firstAttribute="height" constant="40" id="Kcy-ij-IsH"/>
226 <constraint firstItem="RoR-w7-dNT" firstAttribute="centerY" secondItem="4Az-6N-8u4" secondAttribute="centerY" id="O1R-k3-iBZ"/>
227 <constraint firstItem="ZyO-6K-2gA" firstAttribute="centerY" secondItem="4Az-6N-8u4" secondAttribute="centerY" id="fWH-tG-gSV"/>
228 </constraints>
229 </view>
230 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ORZ-El-owx">
231 <rect key="frame" x="0.0" y="80" width="140" height="40"/>
232 <subviews>
233 <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="e63-8i-6aa">
234 <rect key="frame" x="85" y="4" width="51" height="31"/>
235 <constraints>
236 <constraint firstAttribute="width" secondItem="e63-8i-6aa" secondAttribute="height" multiplier="49:31" id="TTd-tM-PrG"/>
237 </constraints>
238 <color key="onTintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
239 </switch>
240 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="初心者" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RfO-1U-s4W" customClass="AutoTransLabel">
241 <rect key="frame" x="6" y="10.5" width="52" height="20.5"/>
242 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
243 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
244 <nil key="highlightedColor"/>
245 <userDefinedRuntimeAttributes>
246 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.begin"/>
247 </userDefinedRuntimeAttributes>
248 </label>
249 </subviews>
250 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
251 <constraints>
252 <constraint firstItem="RfO-1U-s4W" firstAttribute="leading" secondItem="ORZ-El-owx" secondAttribute="leading" constant="6" id="5Vq-B2-215"/>
253 <constraint firstAttribute="trailing" secondItem="e63-8i-6aa" secondAttribute="trailing" constant="6" id="NUX-0H-z8v"/>
254 <constraint firstAttribute="height" constant="40" id="PdI-3J-BTC"/>
255 <constraint firstItem="e63-8i-6aa" firstAttribute="centerY" secondItem="ORZ-El-owx" secondAttribute="centerY" id="Vxw-Vk-POY"/>
256 <constraint firstItem="RfO-1U-s4W" firstAttribute="centerY" secondItem="ORZ-El-owx" secondAttribute="centerY" id="tX1-Qb-pKG"/>
257 </constraints>
258 </view>
259 </subviews>
260 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
261 <constraints>
262 <constraint firstAttribute="height" constant="120" id="1Z3-Ap-Qv1"/>
263 <constraint firstAttribute="trailing" secondItem="ALk-sL-SXG" secondAttribute="trailing" id="2DO-V0-pH1"/>
264 <constraint firstItem="ORZ-El-owx" firstAttribute="top" secondItem="4Az-6N-8u4" secondAttribute="bottom" id="9ap-NH-2HO"/>
265 <constraint firstItem="ALk-sL-SXG" firstAttribute="top" secondItem="Kpa-HJ-7cE" secondAttribute="top" id="Lc0-Xq-rka"/>
266 <constraint firstItem="4Az-6N-8u4" firstAttribute="leading" secondItem="Kpa-HJ-7cE" secondAttribute="leading" id="PVG-jU-N5c"/>
267 <constraint firstAttribute="trailing" secondItem="ORZ-El-owx" secondAttribute="trailing" id="WYz-Kv-H08"/>
268 <constraint firstItem="ORZ-El-owx" firstAttribute="leading" secondItem="Kpa-HJ-7cE" secondAttribute="leading" id="a7E-Je-SkO"/>
269 <constraint firstAttribute="bottom" secondItem="ORZ-El-owx" secondAttribute="bottom" id="dr5-Tk-AAg"/>
270 <constraint firstAttribute="trailing" secondItem="4Az-6N-8u4" secondAttribute="trailing" id="wOX-wa-25X"/>
271 <constraint firstItem="4Az-6N-8u4" firstAttribute="top" secondItem="ALk-sL-SXG" secondAttribute="bottom" id="xgc-3W-TS2"/>
272 <constraint firstItem="ALk-sL-SXG" firstAttribute="leading" secondItem="Kpa-HJ-7cE" secondAttribute="leading" id="yrE-eZ-Vg4"/>
273 </constraints>
274 </view>
275 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="目標" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KTY-Ed-NJL" customClass="AutoTransLabel">
276 <rect key="frame" x="10" y="178" width="70" height="30"/>
277 <constraints>
278 <constraint firstAttribute="width" constant="70" id="Zlu-jK-x6p"/>
279 <constraint firstAttribute="height" constant="30" id="tVk-5e-QAY"/>
280 </constraints>
281 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
282 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
283 <nil key="highlightedColor"/>
284 <userDefinedRuntimeAttributes>
285 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.goal"/>
286 </userDefinedRuntimeAttributes>
287 </label>
288 <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="hWb-vU-yVd">
289 <rect key="frame" x="88" y="178" width="222" height="120"/>
290 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
291 <constraints>
292 <constraint firstAttribute="height" constant="120" id="iYo-mA-ZGR"/>
293 </constraints>
294 <fontDescription key="fontDescription" type="system" pointSize="14"/>
295 <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
296 <userDefinedRuntimeAttributes>
297 <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
298 <integer key="value" value="10"/>
299 </userDefinedRuntimeAttribute>
300 </userDefinedRuntimeAttributes>
301 <connections>
302 <outlet property="delegate" destination="-1" id="fVh-oh-7St"/>
303 </connections>
304 </textView>
305 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="マップ" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qdi-Na-zsj" customClass="AutoTransLabel">
306 <rect key="frame" x="10" y="313" width="70" height="30"/>
307 <constraints>
308 <constraint firstAttribute="height" constant="30" id="Ptf-0N-ewh"/>
309 <constraint firstAttribute="width" constant="70" id="mT3-FA-eev"/>
310 </constraints>
311 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
312 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
313 <nil key="highlightedColor"/>
314 <userDefinedRuntimeAttributes>
315 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.map"/>
316 </userDefinedRuntimeAttributes>
317 </label>
318 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1日目標" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qfU-7x-uss" customClass="AutoTransLabel">
319 <rect key="frame" x="10" y="353" width="300" height="30"/>
320 <constraints>
321 <constraint firstAttribute="height" constant="30" id="9dB-8p-Wdv"/>
322 </constraints>
323 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
324 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
325 <nil key="highlightedColor"/>
326 <userDefinedRuntimeAttributes>
327 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.goal1day"/>
328 </userDefinedRuntimeAttributes>
329 </label>
330 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KEy-T1-mdK" customClass="AutoTransButton">
331 <rect key="frame" x="88" y="313" width="110" height="30"/>
332 <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
333 <constraints>
334 <constraint firstAttribute="height" constant="30" id="MWc-Aj-2JZ"/>
335 <constraint firstAttribute="width" constant="110" id="V16-pC-FRv"/>
336 </constraints>
337 <state key="normal" title="マップ作成">
338 <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
339 </state>
340 <userDefinedRuntimeAttributes>
341 <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
342 <integer key="value" value="5"/>
343 </userDefinedRuntimeAttribute>
344 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.bt.map"/>
345 </userDefinedRuntimeAttributes>
346 </button>
347 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="WALK" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3QV-Ov-PmX" customClass="AutoTransLabel">
348 <rect key="frame" x="10" y="391" width="70" height="30"/>
349 <constraints>
350 <constraint firstAttribute="height" constant="30" id="GSj-Tq-AsU"/>
351 <constraint firstAttribute="width" constant="70" id="uIv-Ty-eR2"/>
352 </constraints>
353 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
354 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
355 <nil key="highlightedColor"/>
356 <userDefinedRuntimeAttributes>
357 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.walk"/>
358 </userDefinedRuntimeAttributes>
359 </label>
360 <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="4JZ-J2-3D9">
361 <rect key="frame" x="95" y="391" width="130" height="30"/>
362 <constraints>
363 <constraint firstAttribute="height" constant="30" id="JaF-D4-zT2"/>
364 <constraint firstAttribute="width" constant="130" id="qCj-P5-l4y"/>
365 </constraints>
366 <nil key="textColor"/>
367 <fontDescription key="fontDescription" type="system" pointSize="14"/>
368 <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
369 </textField>
370 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="m" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="o9b-Am-GTl">
371 <rect key="frame" x="240" y="391" width="70" height="30"/>
372 <constraints>
373 <constraint firstAttribute="width" constant="70" id="MN1-fg-mf1"/>
374 <constraint firstAttribute="height" constant="30" id="l7E-J3-Syw"/>
375 </constraints>
376 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
377 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
378 <nil key="highlightedColor"/>
379 <userDefinedRuntimeAttributes>
380 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.name"/>
381 </userDefinedRuntimeAttributes>
382 </label>
383 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="RUN" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bq4-nh-Cxk" customClass="AutoTransLabel">
384 <rect key="frame" x="10" y="429" width="70" height="30"/>
385 <constraints>
386 <constraint firstAttribute="height" constant="30" id="MmK-Nk-eFt"/>
387 <constraint firstAttribute="width" constant="70" id="nuP-fj-jk2"/>
388 </constraints>
389 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
390 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
391 <nil key="highlightedColor"/>
392 <userDefinedRuntimeAttributes>
393 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.run"/>
394 </userDefinedRuntimeAttributes>
395 </label>
396 <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="3aE-uP-KLS">
397 <rect key="frame" x="95" y="429" width="130" height="30"/>
398 <constraints>
399 <constraint firstAttribute="height" constant="30" id="37e-2c-qka"/>
400 <constraint firstAttribute="width" constant="130" id="owG-Ob-QnB"/>
401 </constraints>
402 <nil key="textColor"/>
403 <fontDescription key="fontDescription" type="system" pointSize="14"/>
404 <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
405 </textField>
406 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="m" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CGA-Xm-2ll">
407 <rect key="frame" x="240" y="429" width="70" height="30"/>
408 <constraints>
409 <constraint firstAttribute="width" constant="70" id="6cf-Y6-Dwq"/>
410 <constraint firstAttribute="height" constant="30" id="dHv-kM-AX2"/>
411 </constraints>
412 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
413 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
414 <nil key="highlightedColor"/>
415 <userDefinedRuntimeAttributes>
416 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.name"/>
417 </userDefinedRuntimeAttributes>
418 </label>
419 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="BIKE" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mvZ-9L-7a8" customClass="AutoTransLabel">
420 <rect key="frame" x="10" y="467" width="70" height="30"/>
421 <constraints>
422 <constraint firstAttribute="height" constant="30" id="hX2-SJ-SMG"/>
423 <constraint firstAttribute="width" constant="70" id="roN-jL-tXp"/>
424 </constraints>
425 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
426 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
427 <nil key="highlightedColor"/>
428 <userDefinedRuntimeAttributes>
429 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.bike"/>
430 </userDefinedRuntimeAttributes>
431 </label>
432 <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="eOi-eo-GYn">
433 <rect key="frame" x="95" y="467" width="130" height="30"/>
434 <constraints>
435 <constraint firstAttribute="width" constant="130" id="SBb-jw-NHP"/>
436 <constraint firstAttribute="height" constant="30" id="ida-Ih-wRM"/>
437 </constraints>
438 <nil key="textColor"/>
439 <fontDescription key="fontDescription" type="system" pointSize="14"/>
440 <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
441 </textField>
442 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="m" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="t6i-sV-ycx">
443 <rect key="frame" x="240" y="467" width="70" height="30"/>
444 <constraints>
445 <constraint firstAttribute="width" constant="70" id="DoG-hb-QbI"/>
446 <constraint firstAttribute="height" constant="30" id="pAs-GK-YE3"/>
447 </constraints>
448 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
449 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
450 <nil key="highlightedColor"/>
451 <userDefinedRuntimeAttributes>
452 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.name"/>
453 </userDefinedRuntimeAttributes>
454 </label>
455 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sef-8T-0hQ" customClass="AutoTransButton">
456 <rect key="frame" x="10" y="509" width="300" height="30"/>
457 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
458 <constraints>
459 <constraint firstAttribute="height" constant="30" id="8XP-Y1-hlJ"/>
460 </constraints>
461 <state key="normal" title="グループを作成する">
462 <color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
463 </state>
464 <userDefinedRuntimeAttributes>
465 <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
466 <integer key="value" value="5"/>
467 </userDefinedRuntimeAttribute>
468 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.bt.createGr"/>
469 </userDefinedRuntimeAttributes>
470 <connections>
471 <action selector="clickCreateGroup:" destination="-1" eventType="touchUpInside" id="n8x-KR-til"/>
472 </connections>
473 </button>
474 </subviews>
475 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
476 <constraints>
477 <constraint firstItem="KTY-Ed-NJL" firstAttribute="leading" secondItem="9w1-87-U1W" secondAttribute="leading" constant="10" id="08M-tc-J6o"/>
478 <constraint firstItem="3QV-Ov-PmX" firstAttribute="leading" secondItem="qfU-7x-uss" secondAttribute="leading" id="1CN-mt-xv7"/>
479 <constraint firstItem="3aE-uP-KLS" firstAttribute="top" secondItem="bq4-nh-Cxk" secondAttribute="top" id="1YH-oa-gPy"/>
480 <constraint firstAttribute="trailing" secondItem="qfU-7x-uss" secondAttribute="trailing" constant="10" id="1fh-fC-Tvd"/>
481 <constraint firstItem="t6i-sV-ycx" firstAttribute="leading" secondItem="eOi-eo-GYn" secondAttribute="trailing" constant="15" id="2d5-8C-v4q"/>
482 <constraint firstItem="4JZ-J2-3D9" firstAttribute="top" secondItem="3QV-Ov-PmX" secondAttribute="top" id="2rO-Pd-t8O"/>
483 <constraint firstItem="t6i-sV-ycx" firstAttribute="top" secondItem="mvZ-9L-7a8" secondAttribute="top" id="4rc-co-XRr"/>
484 <constraint firstAttribute="trailing" secondItem="sef-8T-0hQ" secondAttribute="trailing" constant="10" id="89W-o8-uLa"/>
485 <constraint firstItem="qdi-Na-zsj" firstAttribute="leading" secondItem="9w1-87-U1W" secondAttribute="leading" constant="10" id="8Cr-Gt-ts7"/>
486 <constraint firstItem="ZtU-mt-3Ov" firstAttribute="leading" secondItem="9w1-87-U1W" secondAttribute="leading" constant="8" id="8QA-ZH-zig"/>
487 <constraint firstItem="KTY-Ed-NJL" firstAttribute="top" secondItem="ONn-27-HqB" secondAttribute="bottom" constant="8" id="8cI-hb-3IU"/>
488 <constraint firstItem="CGA-Xm-2ll" firstAttribute="leading" secondItem="3aE-uP-KLS" secondAttribute="trailing" constant="15" id="AJD-KP-oLm"/>
489 <constraint firstItem="qfU-7x-uss" firstAttribute="leading" secondItem="9w1-87-U1W" secondAttribute="leading" constant="10" id="Akh-2h-Y5Z"/>
490 <constraint firstItem="mvZ-9L-7a8" firstAttribute="leading" secondItem="qfU-7x-uss" secondAttribute="leading" id="CyJ-DC-cmk"/>
491 <constraint firstAttribute="trailing" secondItem="hWb-vU-yVd" secondAttribute="trailing" constant="10" id="Gpv-Cf-wmA"/>
492 <constraint firstItem="ONn-27-HqB" firstAttribute="leading" secondItem="9w1-87-U1W" secondAttribute="leading" constant="10" id="GqQ-jG-2Ss"/>
493 <constraint firstItem="Kpa-HJ-7cE" firstAttribute="top" secondItem="ONn-27-HqB" secondAttribute="top" id="I8B-QJ-8Kw"/>
494 <constraint firstItem="ONn-27-HqB" firstAttribute="top" secondItem="pXO-K0-vne" secondAttribute="bottom" constant="10" id="IUV-iX-zqx"/>
495 <constraint firstItem="pXO-K0-vne" firstAttribute="leading" secondItem="ZtU-mt-3Ov" secondAttribute="trailing" constant="10" id="JQi-T2-HRB"/>
496 <constraint firstItem="o9b-Am-GTl" firstAttribute="top" secondItem="3QV-Ov-PmX" secondAttribute="top" id="Osm-tS-nSE"/>
497 <constraint firstItem="sef-8T-0hQ" firstAttribute="top" secondItem="t6i-sV-ycx" secondAttribute="bottom" constant="12" id="PNY-xc-4go"/>
498 <constraint firstItem="3aE-uP-KLS" firstAttribute="leading" secondItem="bq4-nh-Cxk" secondAttribute="trailing" constant="15" id="QhW-Vx-RNc"/>
499 <constraint firstItem="mvZ-9L-7a8" firstAttribute="top" secondItem="bq4-nh-Cxk" secondAttribute="bottom" constant="8" id="Qu7-jT-zZM"/>
500 <constraint firstItem="qdi-Na-zsj" firstAttribute="top" secondItem="KTY-Ed-NJL" secondAttribute="bottom" constant="105" id="Rbx-GC-D0X"/>
501 <constraint firstItem="eOi-eo-GYn" firstAttribute="leading" secondItem="mvZ-9L-7a8" secondAttribute="trailing" constant="15" id="Rcg-h2-Qfa"/>
502 <constraint firstItem="pXO-K0-vne" firstAttribute="top" secondItem="ZtU-mt-3Ov" secondAttribute="top" id="T8M-OQ-0Wk"/>
503 <constraint firstItem="o9b-Am-GTl" firstAttribute="leading" secondItem="4JZ-J2-3D9" secondAttribute="trailing" constant="15" id="UyE-qx-Mtp"/>
504 <constraint firstItem="4JZ-J2-3D9" firstAttribute="top" secondItem="3QV-Ov-PmX" secondAttribute="top" id="aRK-i9-XKN"/>
505 <constraint firstItem="hWb-vU-yVd" firstAttribute="top" secondItem="Kpa-HJ-7cE" secondAttribute="bottom" constant="8" id="chw-2w-QOv"/>
506 <constraint firstItem="sef-8T-0hQ" firstAttribute="leading" secondItem="9w1-87-U1W" secondAttribute="leading" constant="10" id="dfN-4U-9Oc"/>
507 <constraint firstItem="eOi-eo-GYn" firstAttribute="top" secondItem="mvZ-9L-7a8" secondAttribute="top" id="e8C-p7-obk"/>
508 <constraint firstItem="bq4-nh-Cxk" firstAttribute="top" secondItem="3QV-Ov-PmX" secondAttribute="bottom" constant="8" id="gjA-dw-4j6"/>
509 <constraint firstItem="4JZ-J2-3D9" firstAttribute="leading" secondItem="3QV-Ov-PmX" secondAttribute="trailing" constant="15" id="hCs-KK-0oG"/>
510 <constraint firstItem="Kpa-HJ-7cE" firstAttribute="width" secondItem="ONn-27-HqB" secondAttribute="width" id="i0I-s6-95a"/>
511 <constraint firstAttribute="trailing" secondItem="pXO-K0-vne" secondAttribute="trailing" constant="10" id="j2H-Na-egE"/>
512 <constraint firstItem="bq4-nh-Cxk" firstAttribute="leading" secondItem="qfU-7x-uss" secondAttribute="leading" id="kTU-cF-wdS"/>
513 <constraint firstItem="hWb-vU-yVd" firstAttribute="leading" secondItem="KTY-Ed-NJL" secondAttribute="trailing" constant="8" id="ka5-tK-yxs"/>
514 <constraint firstItem="eOi-eo-GYn" firstAttribute="top" secondItem="mvZ-9L-7a8" secondAttribute="top" id="klA-2z-2Kx"/>
515 <constraint firstItem="3aE-uP-KLS" firstAttribute="top" secondItem="bq4-nh-Cxk" secondAttribute="top" id="pdY-Ef-eHr"/>
516 <constraint firstItem="3QV-Ov-PmX" firstAttribute="top" secondItem="qfU-7x-uss" secondAttribute="bottom" constant="8" id="qLb-a1-eOB"/>
517 <constraint firstItem="Kpa-HJ-7cE" firstAttribute="leading" secondItem="ONn-27-HqB" secondAttribute="trailing" constant="20" id="rMt-rx-zDY"/>
518 <constraint firstItem="KEy-T1-mdK" firstAttribute="top" secondItem="hWb-vU-yVd" secondAttribute="bottom" constant="15" id="sIJ-Rk-gj3"/>
519 <constraint firstItem="ZtU-mt-3Ov" firstAttribute="top" secondItem="9w1-87-U1W" secondAttribute="top" constant="10" id="tBp-C6-fjS"/>
520 <constraint firstItem="CGA-Xm-2ll" firstAttribute="top" secondItem="bq4-nh-Cxk" secondAttribute="top" id="uaB-yp-z16"/>
521 <constraint firstItem="qfU-7x-uss" firstAttribute="top" secondItem="KEy-T1-mdK" secondAttribute="bottom" constant="10" id="w4X-lJ-yL1"/>
522 <constraint firstAttribute="trailing" secondItem="Kpa-HJ-7cE" secondAttribute="trailing" constant="10" id="wvh-Lk-tt9"/>
523 <constraint firstItem="KEy-T1-mdK" firstAttribute="leading" secondItem="qdi-Na-zsj" secondAttribute="trailing" constant="8" id="xGa-CF-V9a"/>
524 </constraints>
525 </view>
526 </subviews>
527 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
528 <constraints>
529 <constraint firstItem="9w1-87-U1W" firstAttribute="leading" secondItem="aKu-bd-xMP" secondAttribute="leading" id="BLm-dD-oN3"/>
530 <constraint firstItem="9w1-87-U1W" firstAttribute="centerY" secondItem="aKu-bd-xMP" secondAttribute="centerY" id="DT9-CK-3ZL"/>
531 <constraint firstItem="9w1-87-U1W" firstAttribute="top" secondItem="aKu-bd-xMP" secondAttribute="top" id="PZC-BJ-DLV"/>
532 <constraint firstAttribute="trailing" secondItem="9w1-87-U1W" secondAttribute="trailing" id="RDM-mt-Fjr"/>
533 <constraint firstAttribute="bottom" secondItem="9w1-87-U1W" secondAttribute="bottom" constant="50" id="w42-vd-D7e"/>
534 <constraint firstItem="9w1-87-U1W" firstAttribute="centerX" secondItem="aKu-bd-xMP" secondAttribute="centerX" id="wJD-gn-ctq"/>
535 </constraints>
536 </scrollView>
537 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QYv-QM-Bkk" userLabel="ViewHeader">
538 <rect key="frame" x="0.0" y="0.0" width="320" height="46"/>
539 <subviews>
540 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="コミュニティー グループ作成" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9hM-Gv-AxQ" customClass="AutoTransLabel">
541 <rect key="frame" x="0.0" y="0.0" width="320" height="46"/>
542 <fontDescription key="fontDescription" type="system" pointSize="16"/>
543 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
544 <nil key="highlightedColor"/>
545 <userDefinedRuntimeAttributes>
546 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.title"/>
547 </userDefinedRuntimeAttributes>
548 </label>
549 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="O23-Hy-4Ld">
550 <rect key="frame" x="0.0" y="5" width="70" height="36"/>
551 <constraints>
552 <constraint firstAttribute="width" constant="70" id="8vZ-Ta-Rzv"/>
553 </constraints>
554 <state key="normal" image="today_back_button"/>
555 <connections>
556 <action selector="clickBack:" destination="-1" eventType="touchUpInside" id="BO6-jx-vuO"/>
557 </connections>
558 </button>
559 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fPg-VP-VkU">
560 <rect key="frame" x="275" y="0.0" width="45" height="46"/>
561 <constraints>
562 <constraint firstAttribute="width" constant="45" id="k1W-Oc-mRq"/>
563 </constraints>
564 <state key="normal" image="icon_menu"/>
565 </button>
566 </subviews>
567 <color key="backgroundColor" red="0.098039215690000001" green="0.098039215690000001" blue="0.098039215690000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
568 <constraints>
569 <constraint firstAttribute="trailing" secondItem="9hM-Gv-AxQ" secondAttribute="trailing" id="5f8-Xt-vKd"/>
570 <constraint firstAttribute="bottom" secondItem="9hM-Gv-AxQ" secondAttribute="bottom" id="Q3z-hF-VbV"/>
571 <constraint firstItem="9hM-Gv-AxQ" firstAttribute="top" secondItem="QYv-QM-Bkk" secondAttribute="top" id="XNi-3d-xFW"/>
572 <constraint firstItem="O23-Hy-4Ld" firstAttribute="leading" secondItem="QYv-QM-Bkk" secondAttribute="leading" id="aMc-uz-vGA"/>
573 <constraint firstItem="fPg-VP-VkU" firstAttribute="top" secondItem="QYv-QM-Bkk" secondAttribute="top" id="bLC-DU-cJf"/>
574 <constraint firstItem="9hM-Gv-AxQ" firstAttribute="leading" secondItem="QYv-QM-Bkk" secondAttribute="leading" id="cUY-dT-Rh0"/>
575 <constraint firstAttribute="trailing" secondItem="fPg-VP-VkU" secondAttribute="trailing" id="fn0-SY-e1Z"/>
576 <constraint firstAttribute="height" constant="46" id="lBP-32-aFw"/>
577 <constraint firstItem="O23-Hy-4Ld" firstAttribute="top" secondItem="QYv-QM-Bkk" secondAttribute="top" constant="5" id="ogR-c4-QQ3"/>
578 <constraint firstAttribute="bottom" secondItem="fPg-VP-VkU" secondAttribute="bottom" id="wdr-SH-Wm2"/>
579 <constraint firstAttribute="bottom" secondItem="O23-Hy-4Ld" secondAttribute="bottom" constant="5" id="yJ4-81-rJx"/>
580 </constraints>
581 </view>
582 </subviews>
583 <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
584 <constraints>
585 <constraint firstItem="aKu-bd-xMP" firstAttribute="top" secondItem="QYv-QM-Bkk" secondAttribute="bottom" id="Q7l-Ra-0wb"/>
586 <constraint firstAttribute="trailing" secondItem="aKu-bd-xMP" secondAttribute="trailing" id="WAl-wE-FB4"/>
587 <constraint firstAttribute="trailing" secondItem="QYv-QM-Bkk" secondAttribute="trailing" id="XdX-OA-ALX"/>
588 <constraint firstItem="aKu-bd-xMP" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="cE7-y5-LL4"/>
589 <constraint firstItem="QYv-QM-Bkk" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="dAn-YE-2s3"/>
590 <constraint firstItem="QYv-QM-Bkk" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="fFF-bj-0uk"/>
591 <constraint firstAttribute="bottom" secondItem="aKu-bd-xMP" secondAttribute="bottom" id="oPE-ST-BIo"/>
592 </constraints>
593 <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
594 <point key="canvasLocation" x="26" y="125"/>
595 </view>
596 </objects>
597 <resources>
598 <image name="icon_menu" width="30" height="30"/>
599 <image name="today_back_button" width="73" height="37"/>
600 </resources>
601 </document>
1 <?xml version="1.0" encoding="UTF-8"?> 602
LifeLog/LifeLog/Entities.h
1 // 1 //
2 // Entities.h 2 // Entities.h
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 #ifndef Entities_h 9 #ifndef Entities_h
10 #define Entities_h 10 #define Entities_h
11 11
12 #import <MBProgressHUD/MBProgressHUD.h> 12 #import <MBProgressHUD/MBProgressHUD.h>
13 13
14 #import "MemberObject.h"
14 #import "MemberObject.h" 15 #import "GroupObject.h"
15 #import "GroupObject.h" 16 #import "TweetObject.h"
16 #import "TweetObject.h" 17 #import "HistoryGraphObject.h"
17 #import "HistoryGraphObject.h" 18 #import "HistoryObject.h"
18 #import "HistoryObject.h" 19 #import "User.h"
19 #import "User.h" 20 #import "TopObject.h"
20 #import "TopObject.h" 21
21 22 #endif /* Entities_h */
22 #endif /* Entities_h */ 23
LifeLog/LifeLog/GroupDetailViewController.h
1 // 1 //
2 // GroupDetailViewController.h 2 // GroupDetailViewController.h
3 // LifeLog 3 // LifeLog
4 // 4 //
5 // Created by nvtu on 8/13/17. 5 // Created by nvtu on 8/13/17.
6 // Copyright © 2017 PhongNV. All rights reserved. 6 // Copyright © 2017 PhongNV. All rights reserved.
7 // 7 //
8 8
9 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
10 #import "BaseTableViewController.h" 10 #import "BaseTableViewController.h"
11 #import "Entities.h" 11 #import "Entities.h"
12 #import "AutoTransButton.h"
12 #import "AutoTransButton.h" 13
13 14 @interface GroupDetailViewController : BaseTableViewController {
14 @interface GroupDetailViewController : BaseTableViewController { 15 GroupObject * _curGroup;
16 BOOL isMemberList;
15 GroupObject * _curGroup; 17 }
16 BOOL isMemberList; 18 @property (weak, nonatomic) IBOutlet UIImageView *imgAva;
17 } 19
18 @property (weak, nonatomic) IBOutlet UIImageView *imgAva; 20 @property (weak, nonatomic) IBOutlet UILabel *lblGrpName;
19 21 @property (weak, nonatomic) IBOutlet UILabel *lbbGrpActiveMode;
20 @property (weak, nonatomic) IBOutlet UILabel *lblGrpName; 22 @property (weak, nonatomic) IBOutlet UILabel *lblGrpGoal;
21 @property (weak, nonatomic) IBOutlet UILabel *lbbGrpActiveMode; 23 @property (weak, nonatomic) IBOutlet AutoTransButton *btJoinGrp;
22 @property (weak, nonatomic) IBOutlet UILabel *lblGrpGoal; 24 @property (weak, nonatomic) IBOutlet AutoTransButton *btSwitch;
23 @property (weak, nonatomic) IBOutlet AutoTransButton *btJoinGrp; 25
24 @property (weak, nonatomic) IBOutlet AutoTransButton *btSwitch; 26 - (void) setGroup : (GroupObject *) object;
27 - (void) requestGroupDetail;
28
29 - (IBAction)clickBack:(id)sender;
30 - (IBAction)clickSwitch:(AutoTransButton *)sender;
31 - (IBAction)clickJoin:(AutoTransButton *)sender;
25 32 @end
26 - (void) setGroup : (GroupObject *) object; 33
LifeLog/LifeLog/GroupDetailViewController.m
1 // 1 //
2 // GroupDetailViewController.m 2 // GroupDetailViewController.m
3 // LifeLog 3 // LifeLog
4 // 4 //
5 // Created by nvtu on 8/13/17. 5 // Created by nvtu on 8/13/17.
6 // Copyright © 2017 PhongNV. All rights reserved. 6 // Copyright © 2017 PhongNV. All rights reserved.
7 // 7 //
8 8
9 #import "GroupDetailViewController.h" 9 #import "GroupDetailViewController.h"
10 #import <SDWebImage/UIImageView+WebCache.h> 10 #import <SDWebImage/UIImageView+WebCache.h>
11 11
12 #import "Utilities.h" 12 #import "Utilities.h"
13 #import "ServerAPI.h" 13 #import "ServerAPI.h"
14 #import "SNSRecentTopicTableViewCell.h" 14 #import "SNSRecentTopicTableViewCell.h"
15 15
16 @interface GroupDetailViewController () 16 @interface GroupDetailViewController ()
17 17
18 @end 18 @end
19 19
20 @implementation GroupDetailViewController 20 @implementation GroupDetailViewController
21 21
22 - (void)viewDidLoad { 22 - (void)viewDidLoad {
23 [super viewDidLoad]; 23 [super viewDidLoad];
24 isMemberList = false; 24 isMemberList = false;
25 //register nib for table view
26 [self.tableBase registerNib:[UINib nibWithNibName:@"SNSRecentTopicTableViewCell" bundle:nil] forCellReuseIdentifier:@"RecentTopicCell"]; 25 //register nib for table view
27 if(_curGroup != nil) { 26 [self.tableBase registerNib:[UINib nibWithNibName:@"SNSRecentTopicTableViewCell" bundle:nil] forCellReuseIdentifier:@"RecentTopicCell"];
28 [self requestGroupDetail]; 27 if(_curGroup != nil) {
28 [self requestGroupDetail];
29 }
29 } 30 // Do any additional setup after loading the view from its nib.
30 // Do any additional setup after loading the view from its nib. 31 }
31 } 32
32 33 - (void)didReceiveMemoryWarning {
33 - (void)didReceiveMemoryWarning { 34 [super didReceiveMemoryWarning];
34 [super didReceiveMemoryWarning]; 35 // Dispose of any resources that can be recreated.
35 // Dispose of any resources that can be recreated. 36 }
36 } 37
37 38 - (void) setGroup : (GroupObject *) object {
38 - (void) setGroup : (GroupObject *) object { 39 _curGroup = object;
39 _curGroup = object; 40 }
40 } 41
41 42 - (void)setupView {
42 - (void)setupView { 43 if(_curGroup != nil) {
43 if(_curGroup != nil) { 44 if(self.imgAva != nil && _curGroup.avatar && ![_curGroup.avatar isKindOfClass:[NSNull class]]) {
44 if(self.imgAva != nil && _curGroup.avatar && ![_curGroup.avatar isKindOfClass:[NSNull class]]) {
45 [self.imgAva sd_setImageWithURL:[NSURL URLWithString:[Utilities getImageLink:_curGroup.avatar]]]; 45 [self.imgAva sd_setImageWithURL:[NSURL URLWithString:[Utilities getImageLink:_curGroup.avatar]]];
46 } 46 }
47 if(self.lblGrpName != nil) { 47 if(self.lblGrpName != nil) {
48 [self.lblGrpName setText:_curGroup.name];
49 }
50 if(self.btJoinGrp != nil) {
51 [self.btJoinGrp setHidden:false];
52 }
53 NSString *mode = @"";
54 NSString *goalText = [NSString stringWithFormat:@"%@\n", _curGroup.goal];
55 if(_curGroup.runMode || _curGroup.walkMode || _curGroup.bikeMode) {
56 goalText = [goalText stringByAppendingString:@"1日 目標 "];
57 }
58 if(_curGroup.runMode) {
59 mode = [mode stringByAppendingString:NSLocalizedString(@"lifelog.grDetail.mode.running", nil)];
60 mode = [mode stringByAppendingString:@"\n"];
61 goalText = [goalText stringByAppendingFormat:@"RUN %dm, ", _curGroup.runGoal];
62 }
63 if(_curGroup.walkMode) {
64 mode = [mode stringByAppendingString:NSLocalizedString(@"lifelog.grDetail.mode.walking", nil)];
65 mode = [mode stringByAppendingString:@"\n"];
66 goalText = [goalText stringByAppendingFormat:@"WALK %dm, ", _curGroup.walkGoal];
67 }
68 if(_curGroup.bikeMode) {
69 mode = [mode stringByAppendingString:NSLocalizedString(@"lifelog.grDetail.mode.bike", nil)];
70 mode = [mode stringByAppendingString:@"\n"];
71 goalText = [goalText stringByAppendingFormat:@"BIKE %dm, ", _curGroup.bikeGoal];
72 }
73 if(_curGroup.stepMode) {
74 mode = [mode stringByAppendingString:NSLocalizedString(@"lifelog.grDetail.mode.step", nil)];
75 mode = [mode stringByAppendingString:@"\n"];
76 }
77 if(_curGroup.beginMode) {
78 mode = [mode stringByAppendingString:NSLocalizedString(@"lifelog.grDetail.mode.begin", nil)];
79 mode = [mode stringByAppendingString:@"\n"];
80 }
81 if(_curGroup.gymMode) {
82 mode = [mode stringByAppendingString:NSLocalizedString(@"lifelog.grDetail.mode.gym", nil)];
83 mode = [mode stringByAppendingString:@"\n"];
84 }
85 NSRange range = [mode rangeOfString:@"\n" options:NSBackwardsSearch];
86 if(range.length > 0) {
87 mode = [mode stringByReplacingOccurrencesOfString:@"\n" withString:@"" options:NSBackwardsSearch range:range];
88 }
89 range = [goalText rangeOfString:@", " options:NSBackwardsSearch];
90 if(range.length > 0) {
91 goalText = [goalText stringByReplacingOccurrencesOfString:@", " withString:@"" options:NSBackwardsSearch range:range];
92 }
93 [self.lbbGrpActiveMode setText:mode];
94 [self.lblGrpGoal setText:goalText];
48 [self.lblGrpName setText:_curGroup.name]; 95 }
49 } 96 }
50 if(self.btJoinGrp != nil) { 97
98 - (void) requestGroupDetail {
99 NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken];
100 MBProgressHUD *hudView = [MBProgressHUD showHUDAddedTo:self.view animated:true];
101 [[ServerAPI server] getGroupDetail:token withGroupID:_curGroup.groupID CompletionHandler:^(GroupObject *object, NSError *error) {
102 GroupDetailViewController __weak *weakSelf = self;
103 [_curGroup updateDate:object];
104 dispatch_async(dispatch_get_main_queue(), ^{
105 [hudView hideAnimated:true];
106 [weakSelf setupView];
107 [weakSelf callRequestToUpdateData];
108 });
109 }];
110 }
111
51 [self.btJoinGrp setHidden:false]; 112 #pragma mark IBAction
52 } 113
53 NSString *mode = @""; 114 - (IBAction)clickBack:(id)sender {
54 NSString *goalText = [NSString stringWithFormat:@"%@\n", _curGroup.goal]; 115 [self.navigationController popViewControllerAnimated:true];
55 if(_curGroup.runMode || _curGroup.walkMode || _curGroup.bikeMode) { 116 }
56 goalText = [goalText stringByAppendingString:@"1日 目標 "]; 117
118 - (IBAction)clickSwitch:(AutoTransButton *)sender {
119 isMemberList = !isMemberList;
120 if(isMemberList) {
121 [sender setTitle:NSLocalizedString(@"lifelog.grDetail.bt.viewTweet", nil) forState:UIControlStateNormal];
122 }
123 else {
124 [sender setTitle:NSLocalizedString(@"lifelog.grDetail.bt.viewMem", nil) forState:UIControlStateNormal];
125 }
126 [sender setUserInteractionEnabled:false];
127 [self resetData];
128 }
129
130 - (IBAction)clickJoin:(AutoTransButton *)sender {
131 NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken];
132 MBProgressHUD *hudView = [MBProgressHUD showHUDAddedTo:self.view animated:true];
133 [[ServerAPI server] requestJoinGroup:token groupID:_curGroup.groupID CompletionHandler:^(NSError *error){
134 GroupDetailViewController __weak *weakSelf = self;
135 dispatch_async(dispatch_get_main_queue(), ^{
136 [hudView hideAnimated:true];
137 if(error == nil) {
138 _curGroup.isJoin = true;
139 [weakSelf.btJoinGrp setHidden:_curGroup.isJoin];
140 [Utilities showMessage:@"Join successfully" withViewController:weakSelf];
141 }
142 });
143 }];
144
145 }
146
147
148
57 } 149 #pragma mark UITableView Delegate
58 if(_curGroup.runMode) { 150 - (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
59 mode = [mode stringByAppendingString:NSLocalizedString(@"lifelog.grDetail.mode.running", nil)]; 151 SNSRecentTopicTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"RecentTopicCell"];
60 mode = [mode stringByAppendingString:@"\n"]; 152 if(isMemberList) {
61 goalText = [goalText stringByAppendingFormat:@"RUN %dm, ", _curGroup.runGoal]; 153 MemberObject *object = [_curDataList objectAtIndex:indexPath.row];
62 } 154 if(object.avatar && ![object.avatar isKindOfClass:[NSNull class]]) {
155 [cell.imgAvatar sd_setImageWithURL:[NSURL URLWithString:[Utilities getImageLink:object.avatar]]];
156 }
157 else {
158 [cell.imgAvatar setImage:[UIImage imageNamed:@"avatar_default"]];
159 }
160 cell.lblUsername.text = @"";
161 cell.lblDateTime.text = @"";
162 cell.lblDes.text = object.userName;
163 cell.lblMode.text = @"";
164 cell.lblDistance.text = @"";
165 cell.lblDuration.text = @"";
166 }
167 else {
168 TweetObject *object = [_curDataList objectAtIndex:indexPath.row];
169 if(object.avatar && ![object.avatar isKindOfClass:[NSNull class]]) {
170 [cell.imgAvatar sd_setImageWithURL:[NSURL URLWithString:[Utilities getImageLink:object.avatar]]];
171 }
172 else {
173 [cell.imgAvatar setImage:[UIImage imageNamed:@"avatar_default"]];
174 }
175 cell.lblDateTime.text = [Utilities stringFromDate:object.createDate withFormat:@"YYYY/MM/dd hh:mm" locale:@""];
176 cell.lblUsername.text = object.userName;
177 cell.lblDes.text = object.content;
178 cell.lblMode.text = object.mode;
179 cell.lblDistance.text = [NSString stringWithFormat:@"%.0f m", object.distance];
180 cell.lblDuration.text = object.time;
63 if(_curGroup.walkMode) { 181 }
64 mode = [mode stringByAppendingString:NSLocalizedString(@"lifelog.grDetail.mode.walking", nil)]; 182
65 mode = [mode stringByAppendingString:@"\n"];
66 goalText = [goalText stringByAppendingFormat:@"WALK %dm, ", _curGroup.walkGoal];
67 }
68 if(_curGroup.bikeMode) {
69 mode = [mode stringByAppendingString:NSLocalizedString(@"lifelog.grDetail.mode.bike", nil)];
70 mode = [mode stringByAppendingString:@"\n"]; 183 return cell;
71 goalText = [goalText stringByAppendingFormat:@"BIKE %dm, ", _curGroup.bikeGoal]; 184 }
72 } 185
73 if(_curGroup.stepMode) { 186 #pragma mark Private Function
74 mode = [mode stringByAppendingString:NSLocalizedString(@"lifelog.grDetail.mode.step", nil)]; 187
75 mode = [mode stringByAppendingString:@"\n"]; 188 -(void) callRequestToUpdateData {
76 } 189 [super callRequestToUpdateData];
77 if(_curGroup.beginMode) { 190
78 mode = [mode stringByAppendingString:NSLocalizedString(@"lifelog.grDetail.mode.begin", nil)]; 191 NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken];
79 mode = [mode stringByAppendingString:@"\n"]; 192 MBProgressHUD *hudView = nil;
80 } 193 if(_curPage == 1 && !self.refreshControl.isRefreshing) {
81 if(_curGroup.gymMode) { 194 hudView = [MBProgressHUD showHUDAddedTo:self.view animated:true];
82 mode = [mode stringByAppendingString:NSLocalizedString(@"lifelog.grDetail.mode.gym", nil)]; 195 }
83 mode = [mode stringByAppendingString:@"\n"]; 196 if(isMemberList) {
84 } 197 [[ServerAPI server] requestMemberList:token groupID:_curGroup.groupID withPage:_curPage CompletionHandler:^(NSArray *array, NSError *error){
85 NSRange range = [mode rangeOfString:@"\n" options:NSBackwardsSearch]; 198 dispatch_async(dispatch_get_main_queue(), ^{
86 if(range.length > 0) { 199 if(hudView != nil) {
87 mode = [mode stringByReplacingOccurrencesOfString:@"\n" withString:@"" options:NSBackwardsSearch range:range]; 200 [hudView hideAnimated:true];
88 } 201 }
89 range = [goalText rangeOfString:@", " options:NSBackwardsSearch]; 202 });
90 if(range.length > 0) { 203 GroupDetailViewController __weak *weakSelf = self;
91 goalText = [goalText stringByReplacingOccurrencesOfString:@", " withString:@"" options:NSBackwardsSearch range:range]; 204 [weakSelf updateTableData:array error:error];
205 [weakSelf.btSwitch setUserInteractionEnabled:true];
206 }];
207 }
208 else {
209 [[ServerAPI server] requestTweetsList:token groupID:_curGroup.groupID withPage:_curPage CompletionHandler:^(NSArray *array, NSError *error){
210 dispatch_async(dispatch_get_main_queue(), ^{
211 if(hudView != nil) {
212 [hudView hideAnimated:true];
213 }
214 });
215 GroupDetailViewController __weak *weakSelf = self;
216 [weakSelf updateTableData:array error:error];
LifeLog/LifeLog/GroupDetailViewController.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="12118" systemVersion="16D32" 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="12086"/>
8 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> 8 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9 </dependencies> 9 </dependencies>
10 <objects> 10 <objects>
11 <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="GroupDetailViewController"> 11 <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="GroupDetailViewController">
12 <connections> 12 <connections>
13 <outlet property="btJoinGrp" destination="caN-x7-hJz" id="B17-YC-Rmk"/>
14 <outlet property="btSwitch" destination="gBg-k9-tgw" id="3ZZ-Qb-d3a"/>
13 <outlet property="btJoinGrp" destination="caN-x7-hJz" id="B17-YC-Rmk"/> 15 <outlet property="imgAva" destination="qYg-Gw-R2b" id="f9w-A2-u4G"/>
14 <outlet property="btSwitch" destination="gBg-k9-tgw" id="3ZZ-Qb-d3a"/> 16 <outlet property="lbbGrpActiveMode" destination="O8z-6V-YFd" id="s8J-3i-pW3"/>
15 <outlet property="imgAva" destination="qYg-Gw-R2b" id="f9w-A2-u4G"/> 17 <outlet property="lblGrpGoal" destination="Bdy-dI-j47" id="AKx-8y-Ifm"/>
16 <outlet property="lbbGrpActiveMode" destination="O8z-6V-YFd" id="s8J-3i-pW3"/> 18 <outlet property="lblGrpName" destination="YWV-pS-TCo" id="VeU-Ov-uSD"/>
17 <outlet property="lblGrpGoal" destination="Bdy-dI-j47" id="AKx-8y-Ifm"/> 19 <outlet property="tableBase" destination="4VU-Ye-7Au" id="m1e-cS-Sxf"/>
18 <outlet property="lblGrpName" destination="YWV-pS-TCo" id="VeU-Ov-uSD"/> 20 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
19 <outlet property="tableBase" destination="4VU-Ye-7Au" id="m1e-cS-Sxf"/> 21 </connections>
20 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> 22 </placeholder>
21 </connections> 23 <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
22 </placeholder> 24 <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
23 <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> 25 <rect key="frame" x="0.0" y="0.0" width="320" height="567"/>
24 <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> 26 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
25 <rect key="frame" x="0.0" y="0.0" width="320" height="567"/> 27 <subviews>
26 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> 28 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="25d-3H-0fr" userLabel="ViewHeader">
27 <subviews> 29 <rect key="frame" x="0.0" y="0.0" width="320" height="46"/>
28 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="25d-3H-0fr" userLabel="ViewHeader"> 30 <subviews>
29 <rect key="frame" x="0.0" y="0.0" width="320" height="46"/> 31 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SNS" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DxD-Cy-0wi" customClass="AutoTransLabel">
30 <subviews> 32 <rect key="frame" x="0.0" y="0.0" width="320" height="46"/>
31 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SNS" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DxD-Cy-0wi" customClass="AutoTransLabel"> 33 <fontDescription key="fontDescription" type="system" pointSize="17"/>
32 <rect key="frame" x="0.0" y="0.0" width="320" height="46"/> 34 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
33 <fontDescription key="fontDescription" type="system" pointSize="17"/> 35 <nil key="highlightedColor"/>
34 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 36 <userDefinedRuntimeAttributes>
35 <nil key="highlightedColor"/> 37 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.grDetail.title"/>
36 <userDefinedRuntimeAttributes> 38 </userDefinedRuntimeAttributes>
37 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.grDetail.title"/> 39 </label>
38 </userDefinedRuntimeAttributes> 40 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="O3M-Ba-zHF">
39 </label> 41 <rect key="frame" x="0.0" y="5" width="70" height="36"/>
40 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="O3M-Ba-zHF"> 42 <constraints>
41 <rect key="frame" x="0.0" y="5" width="70" height="36"/> 43 <constraint firstAttribute="width" constant="70" id="2Mk-ly-c0t"/>
42 <constraints> 44 </constraints>
43 <constraint firstAttribute="width" constant="70" id="2Mk-ly-c0t"/> 45 <state key="normal" image="today_back_button"/>
44 </constraints> 46 <connections>
45 <state key="normal" image="today_back_button"/> 47 <action selector="clickBack:" destination="-1" eventType="touchUpInside" id="gS4-F3-fzi"/>
46 <connections> 48 </connections>
47 <action selector="clickBack:" destination="-1" eventType="touchUpInside" id="gS4-F3-fzi"/> 49 </button>
48 </connections> 50 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="y09-DG-Krp">
49 </button> 51 <rect key="frame" x="275" y="0.0" width="45" height="46"/>
50 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="y09-DG-Krp"> 52 <constraints>
51 <rect key="frame" x="275" y="0.0" width="45" height="46"/> 53 <constraint firstAttribute="width" constant="45" id="hHa-aE-1zd"/>
52 <constraints> 54 </constraints>
53 <constraint firstAttribute="width" constant="45" id="hHa-aE-1zd"/> 55 <state key="normal" image="icon_menu"/>
54 </constraints> 56 </button>
55 <state key="normal" image="icon_menu"/> 57 </subviews>
56 </button> 58 <color key="backgroundColor" red="0.098039215690000001" green="0.098039215690000001" blue="0.098039215690000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
57 </subviews> 59 <constraints>
58 <color key="backgroundColor" red="0.098039215690000001" green="0.098039215690000001" blue="0.098039215690000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> 60 <constraint firstItem="y09-DG-Krp" firstAttribute="top" secondItem="25d-3H-0fr" secondAttribute="top" id="65z-ZM-a3D"/>
59 <constraints> 61 <constraint firstItem="O3M-Ba-zHF" firstAttribute="leading" secondItem="25d-3H-0fr" secondAttribute="leading" id="CQk-IB-W9y"/>
60 <constraint firstItem="y09-DG-Krp" firstAttribute="top" secondItem="25d-3H-0fr" secondAttribute="top" id="65z-ZM-a3D"/> 62 <constraint firstAttribute="bottom" secondItem="y09-DG-Krp" secondAttribute="bottom" id="IWC-4b-gp6"/>
61 <constraint firstItem="O3M-Ba-zHF" firstAttribute="leading" secondItem="25d-3H-0fr" secondAttribute="leading" id="CQk-IB-W9y"/> 63 <constraint firstItem="O3M-Ba-zHF" firstAttribute="top" secondItem="25d-3H-0fr" secondAttribute="top" constant="5" id="JWL-bD-I2Z"/>
62 <constraint firstAttribute="bottom" secondItem="y09-DG-Krp" secondAttribute="bottom" id="IWC-4b-gp6"/> 64 <constraint firstItem="DxD-Cy-0wi" firstAttribute="top" secondItem="25d-3H-0fr" secondAttribute="top" id="WYM-oV-6xn"/>
63 <constraint firstItem="O3M-Ba-zHF" firstAttribute="top" secondItem="25d-3H-0fr" secondAttribute="top" constant="5" id="JWL-bD-I2Z"/> 65 <constraint firstAttribute="bottom" secondItem="O3M-Ba-zHF" secondAttribute="bottom" constant="5" id="ZA0-Bo-IQF"/>
64 <constraint firstItem="DxD-Cy-0wi" firstAttribute="top" secondItem="25d-3H-0fr" secondAttribute="top" id="WYM-oV-6xn"/> 66 <constraint firstItem="DxD-Cy-0wi" firstAttribute="leading" secondItem="25d-3H-0fr" secondAttribute="leading" id="cbx-fE-OaR"/>
65 <constraint firstAttribute="bottom" secondItem="O3M-Ba-zHF" secondAttribute="bottom" constant="5" id="ZA0-Bo-IQF"/> 67 <constraint firstAttribute="trailing" secondItem="DxD-Cy-0wi" secondAttribute="trailing" id="i0L-w8-Oxm"/>
66 <constraint firstItem="DxD-Cy-0wi" firstAttribute="leading" secondItem="25d-3H-0fr" secondAttribute="leading" id="cbx-fE-OaR"/> 68 <constraint firstAttribute="trailing" secondItem="y09-DG-Krp" secondAttribute="trailing" id="nNZ-jP-k6U"/>
67 <constraint firstAttribute="trailing" secondItem="DxD-Cy-0wi" secondAttribute="trailing" id="i0L-w8-Oxm"/> 69 <constraint firstAttribute="bottom" secondItem="DxD-Cy-0wi" secondAttribute="bottom" id="oxP-oa-3FJ"/>
68 <constraint firstAttribute="trailing" secondItem="y09-DG-Krp" secondAttribute="trailing" id="nNZ-jP-k6U"/> 70 <constraint firstAttribute="height" constant="46" id="u2G-4s-RB5"/>
69 <constraint firstAttribute="bottom" secondItem="DxD-Cy-0wi" secondAttribute="bottom" id="oxP-oa-3FJ"/> 71 </constraints>
70 <constraint firstAttribute="height" constant="46" id="u2G-4s-RB5"/> 72 </view>
71 </constraints> 73 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YWV-pS-TCo">
72 </view> 74 <rect key="frame" x="15" y="54" width="290" height="21"/>
73 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YWV-pS-TCo"> 75 <constraints>
74 <rect key="frame" x="15" y="54" width="290" height="21"/> 76 <constraint firstAttribute="height" constant="21" id="fQO-ja-W9R"/>
75 <constraints> 77 </constraints>
76 <constraint firstAttribute="height" constant="21" id="fQO-ja-W9R"/> 78 <fontDescription key="fontDescription" type="system" pointSize="15"/>
77 </constraints> 79 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
78 <fontDescription key="fontDescription" type="system" pointSize="15"/> 80 <nil key="highlightedColor"/>
79 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 81 </label>
80 <nil key="highlightedColor"/> 82 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="O8z-6V-YFd">
81 </label> 83 <rect key="frame" x="15" y="85" width="188" height="60"/>
84 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
82 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="O8z-6V-YFd"> 85 <constraints>
83 <rect key="frame" x="15" y="85" width="188" height="60"/> 86 <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="60" id="Bid-NM-Ree"/>
84 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 87 </constraints>
85 <constraints> 88 <fontDescription key="fontDescription" type="system" pointSize="14"/>
86 <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="60" id="Bid-NM-Ree"/> 89 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
87 </constraints> 90 <nil key="highlightedColor"/>
88 <fontDescription key="fontDescription" type="system" pointSize="14"/> 91 </label>
89 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 92 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bdy-dI-j47">
90 <nil key="highlightedColor"/> 93 <rect key="frame" x="15" y="160" width="290" height="0.0"/>
91 </label> 94 <constraints>
92 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bdy-dI-j47"> 95 <constraint firstAttribute="height" relation="greaterThanOrEqual" id="jgH-57-Bae"/>
93 <rect key="frame" x="15" y="160" width="290" height="0.0"/> 96 </constraints>
94 <constraints> 97 <fontDescription key="fontDescription" type="system" pointSize="14"/>
95 <constraint firstAttribute="height" relation="greaterThanOrEqual" id="jgH-57-Bae"/> 98 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
96 </constraints> 99 <nil key="highlightedColor"/>
97 <fontDescription key="fontDescription" type="system" pointSize="14"/> 100 </label>
98 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 101 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="qYg-Gw-R2b">
99 <nil key="highlightedColor"/> 102 <rect key="frame" x="225" y="85" width="80" height="60"/>
100 </label> 103 <constraints>
101 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="qYg-Gw-R2b"> 104 <constraint firstAttribute="width" constant="80" id="NEk-vg-zus"/>
102 <rect key="frame" x="225" y="85" width="80" height="60"/> 105 <constraint firstAttribute="height" constant="60" id="qlv-ht-SUw"/>
103 <constraints> 106 </constraints>
104 <constraint firstAttribute="width" constant="80" id="NEk-vg-zus"/> 107 </imageView>
105 <constraint firstAttribute="height" constant="60" id="qlv-ht-SUw"/> 108 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gBg-k9-tgw" customClass="AutoTransButton">
106 </constraints> 109 <rect key="frame" x="15" y="190" width="134.5" height="30"/>
107 </imageView> 110 <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
108 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gBg-k9-tgw" customClass="AutoTransButton"> 111 <constraints>
109 <rect key="frame" x="15" y="190" width="134.5" height="30"/> 112 <constraint firstAttribute="height" constant="30" id="6Ir-ZZ-NOb"/>
110 <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> 113 </constraints>
114 <fontDescription key="fontDescription" type="system" pointSize="14"/>
111 <constraints> 115 <state key="normal" title="メンバーを見る">
112 <constraint firstAttribute="height" constant="30" id="6Ir-ZZ-NOb"/> 116 <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
113 </constraints> 117 </state>
114 <fontDescription key="fontDescription" type="system" pointSize="14"/> 118 <userDefinedRuntimeAttributes>
115 <state key="normal" title="メンバーを見る"> 119 <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
116 <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 120 <integer key="value" value="5"/>
117 </state> 121 </userDefinedRuntimeAttribute>
118 <userDefinedRuntimeAttributes> 122 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.grDetail.bt.viewMem"/>
119 <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> 123 </userDefinedRuntimeAttributes>
124 <connections>
125 <action selector="clickSwitch:" destination="-1" eventType="touchUpInside" id="z4V-ym-fqS"/>
126 </connections>
120 <integer key="value" value="5"/> 127 </button>
121 </userDefinedRuntimeAttribute> 128 <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="caN-x7-hJz" customClass="AutoTransButton">
122 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.grDetail.bt.viewMem"/> 129 <rect key="frame" x="169.5" y="190" width="134.5" height="30"/>
123 </userDefinedRuntimeAttributes> 130 <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
124 <connections> 131 <constraints>
125 <action selector="clickSwitch:" destination="-1" eventType="touchUpInside" id="z4V-ym-fqS"/> 132 <constraint firstAttribute="height" constant="30" id="gIs-Km-dbx"/>
126 </connections> 133 </constraints>
134 <fontDescription key="fontDescription" type="system" pointSize="14"/>
127 </button> 135 <state key="normal" title="グループに参加する">
128 <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="caN-x7-hJz" customClass="AutoTransButton"> 136 <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
129 <rect key="frame" x="169.5" y="190" width="134.5" height="30"/> 137 </state>
130 <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> 138 <userDefinedRuntimeAttributes>
131 <constraints> 139 <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
132 <constraint firstAttribute="height" constant="30" id="gIs-Km-dbx"/> 140 <integer key="value" value="5"/>
133 </constraints> 141 </userDefinedRuntimeAttribute>
134 <fontDescription key="fontDescription" type="system" pointSize="14"/> 142 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.grDetail.bt.joinGr"/>
135 <state key="normal" title="グループに参加する"> 143 </userDefinedRuntimeAttributes>
144 <connections>
145 <action selector="clickJoin:" destination="-1" eventType="touchUpInside" id="Ukt-bi-Sw2"/>
146 </connections>
136 <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 147 </button>
137 </state> 148 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="100" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="4VU-Ye-7Au">
138 <userDefinedRuntimeAttributes> 149 <rect key="frame" x="0.0" y="230" width="320" height="287"/>
139 <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> 150 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
140 <integer key="value" value="5"/> 151 <connections>
141 </userDefinedRuntimeAttribute> 152 <outlet property="dataSource" destination="-1" id="TLB-6X-bRI"/>
142 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.grDetail.bt.joinGr"/> 153 <outlet property="delegate" destination="-1" id="QcJ-Yh-deE"/>
143 </userDefinedRuntimeAttributes> 154 </connections>
144 <connections> 155 </tableView>
145 <action selector="clickJoin:" destination="-1" eventType="touchUpInside" id="Ukt-bi-Sw2"/> 156 </subviews>
146 </connections> 157 <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
147 </button> 158 <constraints>
148 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="100" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="4VU-Ye-7Au"> 159 <constraint firstItem="25d-3H-0fr" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="5o2-0w-AL5"/>
149 <rect key="frame" x="0.0" y="230" width="320" height="287"/> 160 <constraint firstAttribute="trailing" secondItem="25d-3H-0fr" secondAttribute="trailing" id="7IX-2R-C0n"/>
150 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 161 <constraint firstItem="O8z-6V-YFd" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="15" id="81K-BQ-6tU"/>
151 <connections> 162 <constraint firstAttribute="bottom" secondItem="4VU-Ye-7Au" secondAttribute="bottom" constant="50" id="GKY-NB-YYF"/>
152 <outlet property="dataSource" destination="-1" id="TLB-6X-bRI"/> 163 <constraint firstItem="O8z-6V-YFd" firstAttribute="top" secondItem="YWV-pS-TCo" secondAttribute="bottom" constant="10" id="HOo-rH-ysj"/>
153 <outlet property="delegate" destination="-1" id="QcJ-Yh-deE"/> 164 <constraint firstItem="Bdy-dI-j47" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="15" id="I1a-bY-ME9"/>
154 </connections> 165 <constraint firstItem="YWV-pS-TCo" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="15" id="IS9-SU-75m"/>
155 </tableView> 166 <constraint firstAttribute="trailing" secondItem="Bdy-dI-j47" secondAttribute="trailing" constant="15" id="Ka2-Ki-Pu6"/>
156 </subviews> 167 <constraint firstItem="qYg-Gw-R2b" firstAttribute="top" secondItem="YWV-pS-TCo" secondAttribute="bottom" constant="10" id="One-fp-LTK"/>
157 <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> 168 <constraint firstAttribute="trailing" secondItem="qYg-Gw-R2b" secondAttribute="trailing" constant="15" id="PMd-CT-MVj"/>
158 <constraints> 169 <constraint firstItem="gBg-k9-tgw" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="15" id="bTf-qW-d1y"/>
159 <constraint firstItem="25d-3H-0fr" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="5o2-0w-AL5"/> 170 <constraint firstItem="YWV-pS-TCo" firstAttribute="top" secondItem="25d-3H-0fr" secondAttribute="bottom" constant="8" id="cKj-l3-dgv"/>
160 <constraint firstAttribute="trailing" secondItem="25d-3H-0fr" secondAttribute="trailing" id="7IX-2R-C0n"/> 171 <constraint firstItem="4VU-Ye-7Au" firstAttribute="top" secondItem="caN-x7-hJz" secondAttribute="bottom" constant="10" id="eQe-Kl-cMp"/>
161 <constraint firstItem="O8z-6V-YFd" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="15" id="81K-BQ-6tU"/> 172 <constraint firstItem="4VU-Ye-7Au" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="fru-BN-M5T"/>
162 <constraint firstAttribute="bottom" secondItem="4VU-Ye-7Au" secondAttribute="bottom" constant="50" id="GKY-NB-YYF"/> 173 <constraint firstItem="caN-x7-hJz" firstAttribute="top" secondItem="gBg-k9-tgw" secondAttribute="top" id="gUS-Ty-4Hk"/>
163 <constraint firstItem="O8z-6V-YFd" firstAttribute="top" secondItem="YWV-pS-TCo" secondAttribute="bottom" constant="10" id="HOo-rH-ysj"/> 174 <constraint firstItem="qYg-Gw-R2b" firstAttribute="leading" secondItem="O8z-6V-YFd" secondAttribute="trailing" constant="22" id="gzU-2Q-G96"/>
164 <constraint firstItem="Bdy-dI-j47" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="15" id="I1a-bY-ME9"/> 175 <constraint firstItem="caN-x7-hJz" firstAttribute="leading" secondItem="gBg-k9-tgw" secondAttribute="trailing" constant="20" id="hWK-jf-zee"/>
165 <constraint firstItem="YWV-pS-TCo" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="15" id="IS9-SU-75m"/> 176 <constraint firstItem="25d-3H-0fr" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="jhT-CE-fr7"/>
166 <constraint firstAttribute="trailing" secondItem="Bdy-dI-j47" secondAttribute="trailing" constant="15" id="Ka2-Ki-Pu6"/> 177 <constraint firstItem="caN-x7-hJz" firstAttribute="width" secondItem="gBg-k9-tgw" secondAttribute="width" id="mD6-eL-KB7"/>
167 <constraint firstItem="qYg-Gw-R2b" firstAttribute="top" secondItem="YWV-pS-TCo" secondAttribute="bottom" constant="10" id="One-fp-LTK"/> 178 <constraint firstItem="gBg-k9-tgw" firstAttribute="top" secondItem="Bdy-dI-j47" secondAttribute="bottom" constant="30" id="mgw-uX-VOK"/>
168 <constraint firstAttribute="trailing" secondItem="qYg-Gw-R2b" secondAttribute="trailing" constant="15" id="PMd-CT-MVj"/> 179 <constraint firstAttribute="trailing" secondItem="YWV-pS-TCo" secondAttribute="trailing" constant="15" id="rEO-bb-Pqr"/>
169 <constraint firstItem="gBg-k9-tgw" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="15" id="bTf-qW-d1y"/> 180 <constraint firstAttribute="trailing" secondItem="caN-x7-hJz" secondAttribute="trailing" constant="16" id="rRn-Vw-t5g"/>
170 <constraint firstItem="YWV-pS-TCo" firstAttribute="top" secondItem="25d-3H-0fr" secondAttribute="bottom" constant="8" id="cKj-l3-dgv"/> 181 <constraint firstItem="Bdy-dI-j47" firstAttribute="top" secondItem="O8z-6V-YFd" secondAttribute="bottom" constant="15" id="xEO-fP-Riz"/>
171 <constraint firstItem="4VU-Ye-7Au" firstAttribute="top" secondItem="caN-x7-hJz" secondAttribute="bottom" constant="10" id="eQe-Kl-cMp"/> 182 <constraint firstAttribute="trailing" secondItem="4VU-Ye-7Au" secondAttribute="trailing" id="ylN-vm-QF2"/>
172 <constraint firstItem="4VU-Ye-7Au" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="fru-BN-M5T"/> 183 </constraints>
184 <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
173 <constraint firstItem="caN-x7-hJz" firstAttribute="top" secondItem="gBg-k9-tgw" secondAttribute="top" id="gUS-Ty-4Hk"/> 185 <point key="canvasLocation" x="24.5" y="52.5"/>
174 <constraint firstItem="qYg-Gw-R2b" firstAttribute="leading" secondItem="O8z-6V-YFd" secondAttribute="trailing" constant="22" id="gzU-2Q-G96"/> 186 </view>
175 <constraint firstItem="caN-x7-hJz" firstAttribute="leading" secondItem="gBg-k9-tgw" secondAttribute="trailing" constant="20" id="hWK-jf-zee"/> 187 </objects>
176 <constraint firstItem="25d-3H-0fr" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="jhT-CE-fr7"/> 188 <resources>
177 <constraint firstItem="caN-x7-hJz" firstAttribute="width" secondItem="gBg-k9-tgw" secondAttribute="width" id="mD6-eL-KB7"/> 189 <image name="icon_menu" width="30" height="30"/>
178 <constraint firstItem="gBg-k9-tgw" firstAttribute="top" secondItem="Bdy-dI-j47" secondAttribute="bottom" constant="30" id="mgw-uX-VOK"/> 190 <image name="today_back_button" width="73" height="37"/>
179 <constraint firstAttribute="trailing" secondItem="YWV-pS-TCo" secondAttribute="trailing" constant="15" id="rEO-bb-Pqr"/> 191 </resources>
180 <constraint firstAttribute="trailing" secondItem="caN-x7-hJz" secondAttribute="trailing" constant="16" id="rRn-Vw-t5g"/> 192 </document>
181 <constraint firstItem="Bdy-dI-j47" firstAttribute="top" secondItem="O8z-6V-YFd" secondAttribute="bottom" constant="15" id="xEO-fP-Riz"/> 193
LifeLog/LifeLog/GroupObject.h
1 // 1 //
2 // GroupObject.h 2 // GroupObject.h
3 // LifeLog 3 // LifeLog
4 // 4 //
5 // Created by nvtu on 8/11/17. 5 // Created by nvtu on 8/11/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 GroupObject : NSObject 11 @interface GroupObject : NSObject
12 12
13 @property (nonatomic) int groupID; 13 @property (nonatomic) int groupID;
14 @property (nonatomic) int numSearch; 14 @property (nonatomic) int numSearch;
15 15
16 @property (nonatomic) int walkGoal;
17 @property (nonatomic) int runGoal;
18 @property (nonatomic) int bikeGoal;
19 @property (nonatomic) int stepGoal;
20 @property (nonatomic) int gymGoal;
21 @property (nonatomic) int beginGoal;
22
23 @property (nonatomic) BOOL isJoin;
16 @property (nonatomic) int walkGoal; 24 @property (nonatomic) BOOL walkMode;
17 @property (nonatomic) int runGoal; 25 @property (nonatomic) BOOL runMode;
18 @property (nonatomic) int bikeGoal; 26 @property (nonatomic) BOOL bikeMode;
19 @property (nonatomic) int stepGoal; 27 @property (nonatomic) BOOL stepMode;
20 @property (nonatomic) int gymGoal; 28 @property (nonatomic) BOOL gymMode;
21 @property (nonatomic) int beginGoal; 29 @property (nonatomic) BOOL beginMode;
22 30
23 @property (nonatomic) BOOL isJoin; 31 @property (nonatomic, strong) NSString * name;
24 @property (nonatomic) BOOL walkMode; 32 @property (nonatomic, strong) NSString * avatar;
33 @property (nonatomic, strong) NSString * goal;
34
25 @property (nonatomic) BOOL runMode; 35 @property (nonatomic, strong) NSDate * createDate;
26 @property (nonatomic) BOOL bikeMode; 36
37 -(id) initWithShortData : (NSDictionary *) dict;
27 @property (nonatomic) BOOL stepMode; 38 -(id) initWithData : (NSDictionary *) dict;
28 @property (nonatomic) BOOL gymMode; 39 -(id) initWithData : (NSDictionary *) dict andGroupID : (int) groupID;
40 -(void) updateDate : (GroupObject *) obj;
29 @property (nonatomic) BOOL beginMode; 41 @end
30 42
LifeLog/LifeLog/GroupObject.m
1 // 1 //
2 // GroupObject.m 2 // GroupObject.m
3 // LifeLog 3 // LifeLog
4 // 4 //
5 // Created by nvtu on 8/11/17. 5 // Created by nvtu on 8/11/17.
6 // Copyright © 2017 PhongNV. All rights reserved. 6 // Copyright © 2017 PhongNV. All rights reserved.
7 // 7 //
8 8
9 #import "GroupObject.h" 9 #import "GroupObject.h"
10 #import "Utilities.h" 10 #import "Utilities.h"
11 11
12 @implementation GroupObject 12 @implementation GroupObject
13 13
14 -(id) initWithShortData : (NSDictionary *) dict { 14 -(id) initWithShortData : (NSDictionary *) dict {
15 if([dict objectForKey:@"id"] != nil) { 15 if([dict objectForKey:@"id"] != nil) {
16 self.groupID = [dict[@"id"] intValue]; 16 self.groupID = [dict[@"id"] intValue];
17 } 17 }
18 if([dict objectForKey:@"group_name"] != nil) { 18 if([dict objectForKey:@"group_name"] != nil) {
19 self.name = dict[@"group_name"]; 19 self.name = dict[@"group_name"];
20 } 20 }
21 return self;
22 }
23
24 -(id) initWithData : (NSDictionary *) dict {
25 if([dict objectForKey:@"group_id"] != nil) {
26 self.groupID = [dict[@"group_id"] intValue];
27 }
21 return self; 28 if([dict objectForKey:@"group_avatar"] != nil) {
22 } 29 self.avatar = dict[@"group_avatar"];
23 30 }
31 if([dict objectForKey:@"created_at"] != nil && ![[dict objectForKey:@"created_at"] isKindOfClass:[NSNull class]]) {
32 NSString *dateString = dict[@"created_at"];
33 self.createDate = [Utilities dateFromString:dateString withFormat:@"yyyy-MM-dd hh:mm:ss"];
34 }
35 else {
36 self.createDate = [NSDate date];
37 }
38 if([dict objectForKey:@"num_search"] != nil) {
39 self.numSearch = [dict[@"num_search"] intValue];
40 }
41 [self parseData:dict];
42 return self;
43 }
44
45 -(id) initWithData : (NSDictionary *) dict andGroupID : (int) groupID {
46 self.groupID = groupID;
47 if([dict objectForKey:@"join_group"] != nil && ![[dict objectForKey:@"join_group"] isKindOfClass:[NSNull class]]) {
48 self.isJoin = [dict[@"join_group"] boolValue];
49 }
50 if([dict objectForKey:@"goal"] != nil && ![[dict objectForKey:@"goal"] isKindOfClass:[NSNull class]]) {
51 self.goal = dict[@"goal"];
52 }
53 else {
54 self.goal = @"";
55 }
56 if([dict objectForKey:@"walk_mode_goal"] != nil && ![[dict objectForKey:@"walk_mode_goal"] isKindOfClass:[NSNull class]]) {
57 self.walkGoal = [dict[@"walk_mode_goal"] intValue];
58 }
59 if([dict objectForKey:@"run_mode_goal"] != nil && ![[dict objectForKey:@"run_mode_goal"] isKindOfClass:[NSNull class]]) {
60 self.runGoal = [dict[@"run_mode_goal"] intValue];
61 }
62 if([dict objectForKey:@"bike_mode_goal"] != nil && ![[dict objectForKey:@"bike_mode_goal"] isKindOfClass:[NSNull class]]) {
63 self.bikeGoal = [dict[@"bike_mode_goal"] intValue];
64 }
65 if([dict objectForKey:@"step_mode_goal"] != nil && ![[dict objectForKey:@"step_mode_goal"] isKindOfClass:[NSNull class]]) {
66 self.stepGoal = [dict[@"step_mode_goal"] intValue];
67 }
68 if([dict objectForKey:@"gym_mode_goal"] != nil && ![[dict objectForKey:@"gym_mode_goal"] isKindOfClass:[NSNull class]]) {
69 self.gymGoal = [dict[@"gym_mode_goal"] intValue];
70 }
71 if([dict objectForKey:@"beginer_mode_goal"] != nil && ![[dict objectForKey:@"beginer_mode_goal"] isKindOfClass:[NSNull class]]) {
72 self.beginGoal = [dict[@"beginer_mode_goal"] intValue];
73 }
74 [self parseData:dict];
75 return self;
76 }
77
78 -(void) parseData : (NSDictionary *) dict {
79 if([dict objectForKey:@"group_name"] != nil) {
80 self.name = dict[@"group_name"];
81 }
24 -(id) initWithData : (NSDictionary *) dict { 82 if([dict objectForKey:@"walk_mode_active"] != nil && ![[dict objectForKey:@"walk_mode_active"] isKindOfClass:[NSNull class]]) {
25 if([dict objectForKey:@"group_id"] != nil) { 83 self.walkMode = [dict[@"walk_mode_active"] boolValue];
26 self.groupID = [dict[@"group_id"] intValue]; 84 }
27 } 85 if([dict objectForKey:@"run_mode_active"] != nil && ![[dict objectForKey:@"run_mode_active"] isKindOfClass:[NSNull class]]) {
28 if([dict objectForKey:@"group_avatar"] != nil) { 86 self.runMode = [dict[@"run_mode_active"] boolValue];
29 self.avatar = dict[@"group_avatar"]; 87 }
30 } 88 if([dict objectForKey:@"bike_mode_active"] != nil && ![[dict objectForKey:@"bike_mode_active"] isKindOfClass:[NSNull class]]) {
31 if([dict objectForKey:@"created_at"] != nil && ![[dict objectForKey:@"created_at"] isKindOfClass:[NSNull class]]) { 89 self.bikeMode = [dict[@"bike_mode_active"] boolValue];
32 NSString *dateString = dict[@"created_at"]; 90 }
33 self.createDate = [Utilities dateFromString:dateString withFormat:@"yyyy-MM-dd hh:mm:ss"]; 91 if([dict objectForKey:@"step_mode_active"] != nil && ![[dict objectForKey:@"step_mode_active"] isKindOfClass:[NSNull class]]) {
34 } 92 self.stepMode = [dict[@"step_mode_active"] boolValue];
35 else { 93 }
36 self.createDate = [NSDate date]; 94 if([dict objectForKey:@"gym_mode_active"] != nil && ![[dict objectForKey:@"gym_mode_active"] isKindOfClass:[NSNull class]]) {
37 } 95 self.gymMode = [dict[@"gym_mode_active"] boolValue];
38 if([dict objectForKey:@"num_search"] != nil) { 96 }
39 self.numSearch = [dict[@"num_search"] intValue]; 97 if([dict objectForKey:@"beginer_mode_active"] != nil && ![[dict objectForKey:@"beginer_mode_active"] isKindOfClass:[NSNull class]]) {
40 } 98 self.beginMode = [dict[@"beginer_mode_active"] boolValue];
41 [self parseData:dict]; 99 }
42 return self; 100 }
43 } 101
44 102 -(void) updateDate : (GroupObject *) obj {
45 -(id) initWithData : (NSDictionary *) dict andGroupID : (int) groupID { 103 self.name = obj.name;
46 self.groupID = groupID; 104 self.walkMode = obj.walkMode;
47 if([dict objectForKey:@"join_group"] != nil && ![[dict objectForKey:@"join_group"] isKindOfClass:[NSNull class]]) { 105 self.runMode = obj.runMode;
48 self.isJoin = [dict[@"join_group"] boolValue]; 106 self.bikeMode = obj.bikeMode;
49 } 107 self.stepMode = obj.stepMode;
50 if([dict objectForKey:@"goal"] != nil && ![[dict objectForKey:@"goal"] isKindOfClass:[NSNull class]]) { 108 self.gymMode = obj.gymMode;
51 self.goal = dict[@"goal"]; 109 self.beginMode = obj.beginMode;
52 } 110 self.isJoin = obj.isJoin;
111 self.goal = obj.goal;
112 self.walkGoal = obj.walkGoal;
113 self.runGoal = obj.runGoal;
114 self.bikeGoal = obj.bikeGoal;
115 self.stepGoal = obj.stepGoal;
116 self.gymGoal = obj.gymGoal;
117 self.beginGoal = obj.beginGoal;
53 else { 118 }
54 self.goal = @""; 119
55 } 120 @end
56 if([dict objectForKey:@"walk_mode_goal"] != nil && ![[dict objectForKey:@"walk_mode_goal"] isKindOfClass:[NSNull class]]) { 121
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) float percent; 16 @property (nonatomic) float percent;
17 @property (nonatomic) float distance; 17 @property (nonatomic) float distance;
18 @property (nonatomic) float calories; 18 @property (nonatomic) float calories;
19 @property (nonatomic, strong) NSString * time; 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 22
22 -(id) initWithData : (NSDictionary *) dict; 23 -(id) initWithData : (NSDictionary *) dict;
23 24
24 @end 25 @end
25 26
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:@"step"] != nil) { 14 if([dict objectForKey:@"steps"] != nil) {
15 self.step = [dict[@"step"] intValue]; 15 self.step = [dict[@"step"] 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:@"missing"] != nil) { 20 if([dict objectForKey:@"step_remain"] != nil) {
21 self.missing = [dict[@"missing"] intValue]; 21 self.missing = [dict[@"step_remain"] intValue];
22 } 22 }
23 if([dict objectForKey:@"percent"] != nil) { 23 if([dict objectForKey:@"complete_percent"] != nil) {
24 self.percent = [dict[@"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 if([dict[@"time"] isKindOfClass:[NSString class]]) {
40 self.time = dict[@"time"]; 40 self.time = dict[@"time"];
41 } 41 }
42 else { 42 else {
43 self.time = @"0:0"; 43 self.time = @"0:0";
44 } 44 }
45 } 45 }
46 if([dict objectForKey:@"date"] != nil) { 46 if([dict objectForKey:@"date"] != nil) {
47 NSString *dateString = dict[@"date"]; 47 NSString *dateString = dict[@"date"];
48 NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; 48 NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
49 [dateFormat setDateFormat:@"yyyy-MM-dd"]; 49 [dateFormat setDateFormat:@"yyyy-MM-dd"];
50 self.date = [dateFormat dateFromString:dateString]; 50 self.date = [dateFormat dateFromString:dateString];
51 } 51 }
52 else { 52 else {
53 self.date = [NSDate date]; 53 self.date = [NSDate date];
54 } 54 }
55 if([dict objectForKey:@"data_chart"] != nil) {
56 self.dataGraph = [[NSMutableArray alloc] init];
57 NSDictionary * graph = [dict objectForKey:@"data_chart"];
58 if([graph count] == 24) {
59 for(int i = 0; i < 24; i++) {
60 [self.dataGraph addObject:[graph objectForKey:[NSString stringWithFormat:@"%d", i]]];
61 }
62 }
63 }
55 return self; 64 return self;
56 } 65 }
57 @end 66 @end
58 67
LifeLog/LifeLog/HistoryViewController.h
1 // 1 //
2 // HistoryViewController.h 2 // HistoryViewController.h
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 <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
10 #import <Charts/Charts-Swift.h> 10 #import <Charts/Charts-Swift.h>
11 11
12 #import "BaseTableViewController.h" 12 #import "BaseTableViewController.h"
13 #import "CollectionView.h" 13 #import "CollectionView.h"
14 14
15 #import "Entities.h" 15 #import "Entities.h"
16 16
17 @interface HistoryViewController : BaseTableViewController <UIScrollViewDelegate> { 17 @interface HistoryViewController : BaseTableViewController <UIScrollViewDelegate> {
18 NSDate * _curDate; 18 NSDate * _startDate;
19 HistoryObject * _curHisObj; 19 NSDate * _endDate;
20 HistoryGraphObject * _curHisGraphObj; 20 NSArray * _curHisArray;
21 } 21 }
22 @property (weak, nonatomic) IBOutlet UILabel *lblDatetime;
22 23
23 @property (weak, nonatomic) IBOutlet UILabel *lblCircleStep; 24 @property (weak, nonatomic) IBOutlet UILabel *lblCircleStep;
24 @property (weak, nonatomic) IBOutlet UILabel *lblCircleRemain; 25 @property (weak, nonatomic) IBOutlet UILabel *lblCircleRemain;
25 26
26 @property (weak, nonatomic) IBOutlet UILabel *lblStep; 27 @property (weak, nonatomic) IBOutlet UILabel *lblStep;
27 @property (weak, nonatomic) IBOutlet UILabel *lblRemaining; 28 @property (weak, nonatomic) IBOutlet UILabel *lblRemaining;
28 @property (weak, nonatomic) IBOutlet UILabel *lblPercent; 29 @property (weak, nonatomic) IBOutlet UILabel *lblPercent;
29 @property (weak, nonatomic) IBOutlet UILabel *lblCalories; 30 @property (weak, nonatomic) IBOutlet UILabel *lblCalories;
30 @property (weak, nonatomic) IBOutlet UILabel *lblDistance; 31 @property (weak, nonatomic) IBOutlet UILabel *lblDistance;
31 @property (weak, nonatomic) IBOutlet UILabel *lblTime; 32 @property (weak, nonatomic) IBOutlet UILabel *lblTime;
32 33
33 @property (weak, nonatomic) IBOutlet CollectionView *viewCollectionType; 34 @property (weak, nonatomic) IBOutlet CollectionView *viewCollectionType;
34 @property (weak, nonatomic) IBOutlet CollectionView *viewCollectionMode; 35 @property (weak, nonatomic) IBOutlet CollectionView *viewCollectionMode;
35 @property (weak, nonatomic) IBOutlet CollectionView *viewCollectionShare; 36 @property (weak, nonatomic) IBOutlet CollectionView *viewCollectionShare;
36 37
37 @property (weak, nonatomic) IBOutlet BarChartView *viewBarChart; 38 @property (weak, nonatomic) IBOutlet BarChartView *viewBarChart;
38 39
39 @property (weak, nonatomic) IBOutlet UIScrollView *scrollView; 40 @property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
40 41
41 - (IBAction)swipeAction:(UISwipeGestureRecognizer *)sender; 42 - (IBAction)swipeAction:(UISwipeGestureRecognizer *)sender;
43 - (IBAction)clickBackward:(UIButton *)sender;
44 - (IBAction)clickForward:(UIButton *)sender;
42 45
43 @end 46 @end
44 47
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 _curDate = [NSDate date]; 29 _startDate = [NSDate date];
30 _endDate = _startDate;
31
32 self.lblDatetime.text = [Utilities stringFromDate:_endDate withFormat:@"YYYY年MM月dd日 EEEE" locale:@"ja_JP"];
30 33
31 [self checkRequestData]; 34 [self checkRequestData];
32 35
33 //register nib for table view 36 //register nib for table view
34 [self.tableBase registerNib:[UINib nibWithNibName:@"HistoryListTableViewCell" bundle:nil] forCellReuseIdentifier:@"HistoryListCell"]; 37 [self.tableBase registerNib:[UINib nibWithNibName:@"HistoryListTableViewCell" bundle:nil] forCellReuseIdentifier:@"HistoryListCell"];
35 } 38 }
36 39
37 - (void)viewDidAppear:(BOOL) animated 40 - (void)viewDidAppear:(BOOL) animated
38 { 41 {
39 [super viewDidAppear:animated]; 42 [super viewDidAppear:animated];
40 self.scrollView.contentSize = CGSizeMake(self.view.frame.size.width, 400); 43 self.scrollView.contentSize = CGSizeMake(self.view.frame.size.width, 400);
41 [self.scrollView setNeedsLayout]; 44 [self.scrollView setNeedsLayout];
42 [self.scrollView setNeedsUpdateConstraints]; 45 [self.scrollView setNeedsUpdateConstraints];
43 46
44 } 47 }
45 48
46 - (void)didReceiveMemoryWarning { 49 - (void)didReceiveMemoryWarning {
47 [super didReceiveMemoryWarning]; 50 [super didReceiveMemoryWarning];
48 // Dispose of any resources that can be recreated. 51 // Dispose of any resources that can be recreated.
49 } 52 }
50 53
51 - (void)setupView { 54 - (void)setupView {
52 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];
53 [self.viewCollectionType setButtonNumber:typeTitle.count]; 56 [self.viewCollectionType setButtonNumber:typeTitle.count];
54 [self.viewCollectionType setSpacing:2]; 57 [self.viewCollectionType setSpacing:2];
55 [self.viewCollectionType setArrayTitle:typeTitle]; 58 [self.viewCollectionType setArrayTitle:typeTitle];
56 self.viewCollectionType.changeCurrentIndex = ^(int index){ 59 self.viewCollectionType.changeCurrentIndex = ^(int index){
57 [self checkRequestData]; 60 [self changeDate];
58 }; 61 };
59 62
60 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];
61 [self.viewCollectionMode setButtonNumber:modeTitle.count]; 64 [self.viewCollectionMode setButtonNumber:modeTitle.count];
62 [self.viewCollectionMode setSpacing:0]; 65 [self.viewCollectionMode setSpacing:0];
63 [self.viewCollectionMode setCornerRadius:0]; 66 [self.viewCollectionMode setCornerRadius:0];
64 [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]];
65 [self.viewCollectionMode setArrayTitle:modeTitle]; 68 [self.viewCollectionMode setArrayTitle:modeTitle];
66 self.viewCollectionMode.changeCurrentIndex = ^(int index){ 69 self.viewCollectionMode.changeCurrentIndex = ^(int index){
67 [self checkRequestData]; 70 [self updateView];
68 }; 71 };
69 72
70 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];
71 [self.viewCollectionShare setButtonNumber:typeTitle.count]; 74 [self.viewCollectionShare setButtonNumber:typeTitle.count];
72 [self.viewCollectionShare setSpacing:3]; 75 [self.viewCollectionShare setSpacing:3];
73 [self.viewCollectionShare setArrayTitle:shareTitle]; 76 [self.viewCollectionShare setArrayTitle:shareTitle];
74 [self.viewCollectionShare disableSelection]; 77 [self.viewCollectionShare disableSelection];
75 78
76 //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
77 UITapGestureRecognizer *recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gestureAction:)]; 80 UITapGestureRecognizer *recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gestureAction:)];
78 [recognizer setNumberOfTapsRequired:1]; 81 [recognizer setNumberOfTapsRequired:1];
79 self.scrollView.userInteractionEnabled = YES; 82 self.scrollView.userInteractionEnabled = YES;
80 [self.scrollView addGestureRecognizer:recognizer]; 83 [self.scrollView addGestureRecognizer:recognizer];
81 } 84 }
82 85
83 - (void)setupChartView { 86 - (void)setupChartView {
84 self.viewBarChart.chartDescription.enabled = NO; 87 self.viewBarChart.chartDescription.enabled = NO;
85 self.viewBarChart.leftAxis.drawGridLinesEnabled = NO; 88 self.viewBarChart.leftAxis.drawGridLinesEnabled = NO;
86 self.viewBarChart.rightAxis.drawGridLinesEnabled = NO; 89 self.viewBarChart.rightAxis.drawGridLinesEnabled = NO;
87 self.viewBarChart.legend.enabled = NO; 90 self.viewBarChart.legend.enabled = NO;
88 91
89 ChartXAxis *xAxis = self.viewBarChart.xAxis; 92 ChartXAxis *xAxis = self.viewBarChart.xAxis;
90 xAxis.labelPosition = XAxisLabelPositionBottom; 93 xAxis.labelPosition = XAxisLabelPositionBottom;
91 xAxis.drawGridLinesEnabled = NO; 94 xAxis.drawGridLinesEnabled = NO;
92 xAxis.drawAxisLineEnabled = NO; 95 xAxis.drawAxisLineEnabled = NO;
93 xAxis.drawLabelsEnabled = YES; 96 xAxis.drawLabelsEnabled = YES;
94 xAxis.labelPosition = XAxisLabelPositionBottom; 97 xAxis.labelPosition = XAxisLabelPositionBottom;
95 xAxis.labelFont = [UIFont systemFontOfSize:10.f]; 98 xAxis.labelFont = [UIFont systemFontOfSize:10.f];
96 xAxis.labelTextColor = [UIColor whiteColor]; 99 xAxis.labelTextColor = [UIColor whiteColor];
97 xAxis.granularity = 1.0; // only intervals of 1 day 100 xAxis.granularity = 1.0; // only intervals of 1 day
98 xAxis.labelCount = 8; 101 xAxis.labelCount = 8;
99 102
100 self.viewBarChart.leftAxis.drawAxisLineEnabled = NO; 103 self.viewBarChart.leftAxis.drawAxisLineEnabled = NO;
101 self.viewBarChart.rightAxis.drawAxisLineEnabled = NO; 104 self.viewBarChart.rightAxis.drawAxisLineEnabled = NO;
102 } 105 }
103 106
104 -(void) updateView { 107 -(void) updateView {
105 self.lblStep.text = [NSString stringWithFormat:@"%d", _curHisObj.step]; 108 HistoryObject * obj = [_curHisArray objectAtIndex:self.viewCollectionMode.getCurrentIndex];
106 self.lblRemaining.text = [NSString stringWithFormat:@"%d", _curHisObj.missing]; 109 self.lblStep.text = [NSString stringWithFormat:@"%d", obj.step];
107 self.lblPercent.text = [NSString stringWithFormat:@"%0.2f", _curHisObj.percent * 100]; 110 self.lblRemaining.text = [NSString stringWithFormat:@"%d", obj.missing];
108 self.lblCalories.text = [NSString stringWithFormat:@"%0.2f", _curHisObj.calories]; 111 self.lblPercent.text = [NSString stringWithFormat:@"%0.2f", obj.percent * 100];
109 self.lblDistance.text = [NSString stringWithFormat:@"%0.1f", _curHisObj.distance]; 112 self.lblCalories.text = [NSString stringWithFormat:@"%0.2f", obj.calories];
110 self.lblTime.text = _curHisObj.time; 113 self.lblDistance.text = [NSString stringWithFormat:@"%0.1f", obj.distance];
114 self.lblTime.text = obj.time;
115 [self updateGraphView];
111 } 116 }
112 117
113 -(void) updateGraphView { 118 -(void) updateGraphView {
119 HistoryObject * obj = [_curHisArray objectAtIndex:self.viewCollectionMode.getCurrentIndex];
120
114 NSMutableArray *yVals = [[NSMutableArray alloc] init]; 121 NSMutableArray *yVals = [[NSMutableArray alloc] init];
115 for (int i = 0; i < _curHisGraphObj.arrayStep.count; i++) 122 for (int i = 0; i < obj.dataGraph.count; i++)
116 { 123 {
117 [yVals addObject:[[BarChartDataEntry alloc] initWithX:i y:[[_curHisGraphObj.arrayStep objectAtIndex:i] doubleValue]]]; 124 [yVals addObject:[[BarChartDataEntry alloc] initWithX:i y:[[obj.dataGraph objectAtIndex:i] doubleValue]]];
118 } 125 }
119 126
120 BarChartDataSet *set1 = nil; 127 BarChartDataSet *set1 = nil;
121 if (self.viewBarChart.data.dataSetCount > 0) 128 if (self.viewBarChart.data.dataSetCount > 0)
122 { 129 {
123 set1 = (BarChartDataSet *)self.viewBarChart.data.dataSets[0]; 130 set1 = (BarChartDataSet *)self.viewBarChart.data.dataSets[0];
124 set1.values = yVals; 131 set1.values = yVals;
125 [self.viewBarChart.data notifyDataChanged]; 132 [self.viewBarChart.data notifyDataChanged];
126 [self.viewBarChart notifyDataSetChanged]; 133 [self.viewBarChart notifyDataSetChanged];
127 } 134 }
128 else 135 else
129 { 136 {
130 set1 = [[BarChartDataSet alloc] initWithValues:yVals label:@""]; 137 set1 = [[BarChartDataSet alloc] initWithValues:yVals label:@""];
131 [set1 setColor:[UIColor whiteColor]]; 138 [set1 setColor:[UIColor whiteColor]];
132 139
133 NSMutableArray *dataSets = [[NSMutableArray alloc] init]; 140 NSMutableArray *dataSets = [[NSMutableArray alloc] init];
134 [dataSets addObject:set1]; 141 [dataSets addObject:set1];
135 142
136 BarChartData *data = [[BarChartData alloc] initWithDataSets:dataSets]; 143 BarChartData *data = [[BarChartData alloc] initWithDataSets:dataSets];
137 data.barWidth = 0.5f; 144 data.barWidth = 0.5f;
138 145
139 self.viewBarChart.data = data; 146 self.viewBarChart.data = data;
140 } 147 }
141 } 148 }
142 149
143 -(void) checkRequestData { 150 -(void) checkRequestData {
144 if(self.tableBase.alpha == 0.0) { 151 if(self.tableBase.alpha == 0.0) {
145 NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken]; 152 NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken];
146 int type = self.viewCollectionType.getCurrentIndex;
147 int mode = self.viewCollectionMode.getCurrentIndex + 1;
148 MBProgressHUD *hudView = [MBProgressHUD showHUDAddedTo:self.view animated:true]; 153 MBProgressHUD *hudView = [MBProgressHUD showHUDAddedTo:self.view animated:true];
149 [[ServerAPI server] requestHistory:token atDate:_curDate withType:type andMode:mode CompletionHandler:^(HistoryObject *object, NSError *error) { 154 [[ServerAPI server] requestHistory:token startDate:_startDate endDate:_endDate CompletionHandler:^(NSArray *array, NSError *error) {
150 HistoryViewController __weak *weakSelf = self; 155 HistoryViewController __weak *weakSelf = self;
151 dispatch_async(dispatch_get_main_queue(), ^{ 156 dispatch_async(dispatch_get_main_queue(), ^{
152 if(hudView != nil) { 157 if(hudView != nil) {
153 [hudView hideAnimated:true]; 158 [hudView hideAnimated:true];
154 } 159 }
155 }); 160 });
156 if(error == nil) { 161 if(error == nil) {
157 _curHisObj = object; 162 _curHisArray = array;
158 dispatch_async(dispatch_get_main_queue(), ^{ 163 dispatch_async(dispatch_get_main_queue(), ^{
159 [weakSelf updateView]; 164 [weakSelf updateView];
160 }); 165 });
161 } 166 }
162 else { 167 else {
163 dispatch_async(dispatch_get_main_queue(), ^{ 168 dispatch_async(dispatch_get_main_queue(), ^{
164 NSString *message = [error.userInfo objectForKey:@"message"]; 169 NSString *message = [error.userInfo objectForKey:@"message"];
165 [Utilities showErrorMessage:message withViewController:weakSelf]; 170 [Utilities showErrorMessage:message withViewController:weakSelf];
166 }); 171 });
167 } 172 }
168 }]; 173 }];
169
170 [[ServerAPI server] requestHistoryGraph:token withType:type andMode:mode CompletionHandler:^(HistoryGraphObject *object, NSError *error) {
171 HistoryViewController __weak *weakSelf = self;
172 if(error == nil) {
173 _curHisGraphObj = object;
174 dispatch_async(dispatch_get_main_queue(), ^{
175 [self updateGraphView];
176 });
177 }
178 else {
179 dispatch_async(dispatch_get_main_queue(), ^{
180 NSString *message = [error.userInfo objectForKey:@"message"];
181 [Utilities showErrorMessage:message withViewController:weakSelf];
182 });
183 }
184 }];
185 } 174 }
186 else { 175 else {
187 [self resetData]; 176 [self resetData];
188 } 177 }
189 } 178 }
190 179
191 -(void) callRequestToUpdateData { 180 -(void) callRequestToUpdateData {
192 [super callRequestToUpdateData]; 181 [super callRequestToUpdateData];
193 NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken]; 182 NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken];
194 int type = self.viewCollectionType.getCurrentIndex; 183 int type = self.viewCollectionType.getCurrentIndex;
195 int mode = self.viewCollectionMode.getCurrentIndex + 1; 184 int mode = self.viewCollectionMode.getCurrentIndex + 1;
196 185
197 MBProgressHUD *hudView = nil; 186 MBProgressHUD *hudView = nil;
198 if(_curPage == 1 && !self.refreshControl.isRefreshing) { 187 if(_curPage == 1 && !self.refreshControl.isRefreshing) {
199 hudView = [MBProgressHUD showHUDAddedTo:self.view animated:true]; 188 hudView = [MBProgressHUD showHUDAddedTo:self.view animated:true];
200 } 189 }
201 [[ServerAPI server] requestHistoryList:token withType:type andMode:mode AtPage:_curPage CompletionHandler:^(NSArray *array, NSError *error) { 190 [[ServerAPI server] requestHistoryList:token withType:type andMode:mode AtPage:_curPage CompletionHandler:^(NSArray *array, NSError *error) {
202 dispatch_async(dispatch_get_main_queue(), ^{ 191 dispatch_async(dispatch_get_main_queue(), ^{
203 if(hudView != nil) { 192 if(hudView != nil) {
204 [hudView hideAnimated:true]; 193 [hudView hideAnimated:true];
205 } 194 }
206 }); 195 });
207 HistoryViewController __weak *weakSelf = self; 196 HistoryViewController __weak *weakSelf = self;
208 [weakSelf updateTableData:array error:error]; 197 [weakSelf updateTableData:array error:error];
209 }]; 198 }];
210 } 199 }
211 200
201 - (void) changeDate {
202 switch (self.viewCollectionType.getCurrentIndex) {
203 case 1:
204 _startDate = [_endDate dateByAddingTimeInterval:-86400 * 7];
205 break;
206 case 2:
207 _startDate = [_endDate dateByAddingTimeInterval:-86400 * 30];
208 break;
209 case 3:
210 _startDate = [_endDate dateByAddingTimeInterval:-86400 * 30 * 3];
211 break;
212 case 4:
213 _startDate = [_endDate dateByAddingTimeInterval:-86400 * 30 * 6];
214 break;
215 default:
216 _startDate = _endDate;
217 break;
218 }
219 [self checkRequestData];
220 }
221
212 #pragma mark IBAction 222 #pragma mark IBAction
213 -(void) swipeAction:(UISwipeGestureRecognizer *)sender { 223 -(void) swipeAction:(UISwipeGestureRecognizer *)sender {
214 bool alphaValue = self.scrollView.alpha == 1.0 ? 1.0 : 0.0; 224 bool alphaValue = self.scrollView.alpha == 1.0 ? 1.0 : 0.0;
215 [UIView animateWithDuration:0.5 animations:^{ 225 [UIView animateWithDuration:0.5 animations:^{
216 self.tableBase.alpha = alphaValue; 226 self.tableBase.alpha = alphaValue;
217 self.scrollView.alpha = 1.0 - alphaValue; 227 self.scrollView.alpha = 1.0 - alphaValue;
218 } completion:^(BOOL completed) { 228 } completion:^(BOOL completed) {
219 [self checkRequestData]; 229 [self checkRequestData];
220 }]; 230 }];
221 } 231 }
222 232
233 - (IBAction)clickBackward:(UIButton *)sender {
234 _endDate = [_endDate dateByAddingTimeInterval:-86400];
235 self.lblDatetime.text = [Utilities stringFromDate:_endDate withFormat:@"YYYY年MM月dd日 EEEE" locale:@"ja_JP"];
236 [self changeDate];
237 }
238
239 - (IBAction)clickForward:(UIButton *)sender {
240 _endDate = [_endDate dateByAddingTimeInterval:86400];
241 self.lblDatetime.text = [Utilities stringFromDate:_endDate withFormat:@"YYYY年MM月dd日 EEEE" locale:@"ja_JP"];
242 [self changeDate];
243 }
244
223 -(void)gestureAction:(UITapGestureRecognizer *) sender 245 -(void)gestureAction:(UITapGestureRecognizer *) sender
224 { 246 {
225 CGPoint touchLocation = [sender locationOfTouch:0 inView:self.viewCollectionShare]; 247 CGPoint touchLocation = [sender locationOfTouch:0 inView:self.viewCollectionShare];
226 NSIndexPath *indexPath = [self.viewCollectionShare.collectionView indexPathForItemAtPoint:touchLocation]; 248 NSIndexPath *indexPath = [self.viewCollectionShare.collectionView indexPathForItemAtPoint:touchLocation];
227 NSString * content = @"Finish 500 steps"; 249 NSString * content = @"Finish 500 steps";
228 HistoryViewController __weak *weakSelf = self; 250 HistoryViewController __weak *weakSelf = self;
229 if(indexPath != NULL) { 251 if(indexPath != NULL) {
230 switch (indexPath.row) { 252 switch (indexPath.row) {
231 case 0: //share facebook 253 case 0: //share facebook
232 [Utilities shareFacebook:content withViewController:weakSelf]; 254 [Utilities shareFacebook:content withViewController:weakSelf];
233 break; 255 break;
234 case 1: //share twitter 256 case 1: //share twitter
235 [Utilities shareTwitter:content withViewController:weakSelf]; 257 [Utilities shareTwitter:content withViewController:weakSelf];
236 break; 258 break;
237 case 2 : //share line 259 case 2 : //share line
238 [Utilities shareLine:content withViewController:weakSelf]; 260 [Utilities shareLine:content withViewController:weakSelf];
239 break; 261 break;
240 case 3: // share email 262 case 3: // share email
241 [Utilities shareEmail:content withViewController:weakSelf]; 263 [Utilities shareEmail:content withViewController:weakSelf];
242 break; 264 break;
243 default: 265 default:
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="12121" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> 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">
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="12089"/> 7 <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
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="lblDistance" destination="1tR-JC-pyw" id="q4s-Ru-vLO"/> 18 <outlet property="lblDistance" destination="1tR-JC-pyw" id="q4s-Ru-vLO"/>
18 <outlet property="lblPercent" destination="8Ru-Jc-Ouv" id="ZHn-Kt-0Qk"/> 19 <outlet property="lblPercent" destination="8Ru-Jc-Ouv" id="ZHn-Kt-0Qk"/>
19 <outlet property="lblRemaining" destination="1NH-b3-ST8" id="hFc-q9-b0h"/> 20 <outlet property="lblRemaining" destination="1NH-b3-ST8" id="hFc-q9-b0h"/>
20 <outlet property="lblStep" destination="0pf-fX-QXT" id="jK4-9Y-89Q"/> 21 <outlet property="lblStep" destination="0pf-fX-QXT" id="jK4-9Y-89Q"/>
21 <outlet property="lblTime" destination="PfZ-7x-LAR" id="NQv-fs-rl7"/> 22 <outlet property="lblTime" destination="PfZ-7x-LAR" id="NQv-fs-rl7"/>
22 <outlet property="scrollView" destination="rey-N3-l8b" id="s3w-fi-n5l"/> 23 <outlet property="scrollView" destination="rey-N3-l8b" id="s3w-fi-n5l"/>
23 <outlet property="tableBase" destination="FXQ-4O-sRc" id="UHy-Nk-f7u"/> 24 <outlet property="tableBase" destination="FXQ-4O-sRc" id="UHy-Nk-f7u"/>
24 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> 25 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
25 <outlet property="viewBarChart" destination="VqD-Y3-cYQ" id="RdJ-G5-pPy"/> 26 <outlet property="viewBarChart" destination="VqD-Y3-cYQ" id="RdJ-G5-pPy"/>
26 <outlet property="viewCollectionMode" destination="BVv-qD-EHM" id="A6n-32-oxg"/> 27 <outlet property="viewCollectionMode" destination="BVv-qD-EHM" id="A6n-32-oxg"/>
27 <outlet property="viewCollectionShare" destination="Iw2-nW-e7g" id="LW3-j0-yEY"/> 28 <outlet property="viewCollectionShare" destination="Iw2-nW-e7g" id="LW3-j0-yEY"/>
28 <outlet property="viewCollectionType" destination="yxY-4d-tB6" id="K1D-Gc-kWV"/> 29 <outlet property="viewCollectionType" destination="yxY-4d-tB6" id="K1D-Gc-kWV"/>
29 </connections> 30 </connections>
30 </placeholder> 31 </placeholder>
31 <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> 32 <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
32 <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> 33 <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
33 <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"/>
34 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> 35 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
35 <subviews> 36 <subviews>
36 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="clL-JG-rbd" userLabel="ViewHeader"> 37 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="clL-JG-rbd" userLabel="ViewHeader">
37 <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"/>
38 <subviews> 39 <subviews>
39 <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">
40 <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"/>
41 <fontDescription key="fontDescription" type="system" pointSize="17"/> 42 <fontDescription key="fontDescription" type="system" pointSize="17"/>
42 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 43 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
43 <nil key="highlightedColor"/> 44 <nil key="highlightedColor"/>
44 <userDefinedRuntimeAttributes> 45 <userDefinedRuntimeAttributes>
45 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title"/> 46 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title"/>
46 </userDefinedRuntimeAttributes> 47 </userDefinedRuntimeAttributes>
47 </label> 48 </label>
48 <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">
49 <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"/>
50 <constraints> 51 <constraints>
51 <constraint firstAttribute="width" constant="70" id="xAE-oP-WEf"/> 52 <constraint firstAttribute="width" constant="70" id="xAE-oP-WEf"/>
52 </constraints> 53 </constraints>
53 <state key="normal" image="today_back_button"/> 54 <state key="normal" image="today_back_button"/>
54 </button> 55 </button>
55 <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">
56 <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"/>
57 <constraints> 58 <constraints>
58 <constraint firstAttribute="width" constant="45" id="V0g-Ii-pNQ"/> 59 <constraint firstAttribute="width" constant="45" id="V0g-Ii-pNQ"/>
59 </constraints> 60 </constraints>
60 <state key="normal" image="icon_menu"/> 61 <state key="normal" image="icon_menu"/>
61 </button> 62 </button>
62 </subviews> 63 </subviews>
63 <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"/>
64 <constraints> 65 <constraints>
65 <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"/>
66 <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"/>
67 <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"/>
68 <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"/>
69 <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"/>
70 <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"/>
71 <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"/>
72 <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"/>
73 <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"/>
74 <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"/>
75 <constraint firstAttribute="height" constant="46" id="xGd-BD-bgs"/> 76 <constraint firstAttribute="height" constant="46" id="xGd-BD-bgs"/>
76 </constraints> 77 </constraints>
77 </view> 78 </view>
78 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Cf1-lP-zbB" userLabel="ViewTime"> 79 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Cf1-lP-zbB" userLabel="ViewTime">
79 <rect key="frame" x="10" y="46" width="355" height="35"/> 80 <rect key="frame" x="10" y="46" width="355" height="35"/>
80 <subviews> 81 <subviews>
81 <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">
82 <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"/>
83 <constraints> 84 <constraints>
84 <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"/>
85 </constraints> 86 </constraints>
86 <state key="normal" backgroundImage="arrow_back"/> 87 <state key="normal" backgroundImage="arrow_back"/>
88 <connections>
89 <action selector="clickBackward:" destination="-1" eventType="touchUpInside" id="pwN-yT-qyp"/>
90 </connections>
87 </button> 91 </button>
88 <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">
89 <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"/>
90 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 94 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
91 <state key="normal" backgroundImage="arrow_next"/> 95 <state key="normal" backgroundImage="arrow_next"/>
96 <connections>
97 <action selector="clickForward:" destination="-1" eventType="touchUpInside" id="1NC-km-Lfe"/>
98 </connections>
92 </button> 99 </button>
93 <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">
94 <rect key="frame" x="40" y="2" width="275" height="31"/> 101 <rect key="frame" x="40" y="2" width="275" height="31"/>
95 <fontDescription key="fontDescription" type="system" pointSize="17"/> 102 <fontDescription key="fontDescription" type="system" pointSize="17"/>
96 <nil key="textColor"/> 103 <nil key="textColor"/>
97 <nil key="highlightedColor"/> 104 <nil key="highlightedColor"/>
98 </label> 105 </label>
99 </subviews> 106 </subviews>
100 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 107 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
101 <constraints> 108 <constraints>
102 <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"/>
103 <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"/>
104 <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"/>
105 <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"/>
106 <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"/>
107 <constraint firstAttribute="height" constant="35" id="Pdg-IR-g8y"/> 114 <constraint firstAttribute="height" constant="35" id="Pdg-IR-g8y"/>
108 <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"/>
109 <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"/>
110 <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"/>
111 <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"/>
112 <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"/>
113 <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"/>
114 </constraints> 121 </constraints>
115 </view> 122 </view>
116 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yxY-4d-tB6" customClass="CollectionView"> 123 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yxY-4d-tB6" customClass="CollectionView">
117 <rect key="frame" x="2" y="96" width="371" height="40"/> 124 <rect key="frame" x="2" y="96" width="371" height="40"/>
118 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 125 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
119 <constraints> 126 <constraints>
120 <constraint firstAttribute="height" constant="40" id="U7Q-wa-CDi"/> 127 <constraint firstAttribute="height" constant="40" id="U7Q-wa-CDi"/>
121 </constraints> 128 </constraints>
122 </view> 129 </view>
123 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BVv-qD-EHM" customClass="CollectionView"> 130 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BVv-qD-EHM" customClass="CollectionView">
124 <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"/>
125 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 132 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
126 <constraints> 133 <constraints>
127 <constraint firstAttribute="height" constant="40" id="6wc-NQ-UAH"/> 134 <constraint firstAttribute="height" constant="40" id="6wc-NQ-UAH"/>
128 </constraints> 135 </constraints>
129 </view> 136 </view>
130 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FLa-rV-Aas" userLabel="ViewContent"> 137 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FLa-rV-Aas" userLabel="ViewContent">
131 <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"/>
132 <subviews> 139 <subviews>
133 <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">
134 <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"/>
135 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 142 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
136 <connections> 143 <connections>
137 <outlet property="dataSource" destination="-1" id="GQy-lg-1Af"/> 144 <outlet property="dataSource" destination="-1" id="GQy-lg-1Af"/>
138 <outlet property="delegate" destination="-1" id="Jka-Ij-zNq"/> 145 <outlet property="delegate" destination="-1" id="Jka-Ij-zNq"/>
139 </connections> 146 </connections>
140 </tableView> 147 </tableView>
141 <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">
142 <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"/>
143 <subviews> 150 <subviews>
144 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Cam-ML-IEO"> 151 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Cam-ML-IEO">
145 <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"/>
146 <subviews> 153 <subviews>
147 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Kzk-mN-AOf"> 154 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Kzk-mN-AOf">
148 <rect key="frame" x="20" y="30" width="120" height="120"/> 155 <rect key="frame" x="20" y="30" width="120" height="120"/>
149 <subviews> 156 <subviews>
150 <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="500 step" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oWg-A8-aCr">
151 <rect key="frame" x="18" y="35" width="82" height="21"/> 158 <rect key="frame" x="18" y="35" width="82" height="21"/>
152 <constraints> 159 <constraints>
153 <constraint firstAttribute="height" constant="21" id="zOX-0d-IVv"/> 160 <constraint firstAttribute="height" constant="21" id="zOX-0d-IVv"/>
154 </constraints> 161 </constraints>
155 <fontDescription key="fontDescription" type="system" pointSize="17"/> 162 <fontDescription key="fontDescription" type="system" pointSize="17"/>
156 <nil key="textColor"/> 163 <nil key="textColor"/>
157 <nil key="highlightedColor"/> 164 <nil key="highlightedColor"/>
158 </label> 165 </label>
159 <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">
160 <rect key="frame" x="20" y="61" width="80" height="42"/> 167 <rect key="frame" x="20" y="61" width="80" height="42"/>
161 <constraints> 168 <constraints>
162 <constraint firstAttribute="width" constant="80" id="IOc-sB-dA2"/> 169 <constraint firstAttribute="width" constant="80" id="IOc-sB-dA2"/>
163 <constraint firstAttribute="height" constant="42" id="zRP-Fu-qZ9"/> 170 <constraint firstAttribute="height" constant="42" id="zRP-Fu-qZ9"/>
164 </constraints> 171 </constraints>
165 <string key="text">目標まであと 172 <string key="text">目標まであと
166 500 stepです</string> 173 500 stepです</string>
167 <fontDescription key="fontDescription" type="system" pointSize="11"/> 174 <fontDescription key="fontDescription" type="system" pointSize="11"/>
168 <nil key="textColor"/> 175 <nil key="textColor"/>
169 <nil key="highlightedColor"/> 176 <nil key="highlightedColor"/>
170 </label> 177 </label>
171 </subviews> 178 </subviews>
172 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 179 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
173 <constraints> 180 <constraints>
174 <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"/>
175 <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"/>
176 <constraint firstAttribute="width" constant="120" id="E48-cC-dsc"/> 183 <constraint firstAttribute="width" constant="120" id="E48-cC-dsc"/>
177 <constraint firstAttribute="height" constant="120" id="SlY-sr-tR9"/> 184 <constraint firstAttribute="height" constant="120" id="SlY-sr-tR9"/>
178 <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"/>
179 <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"/>
180 <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"/>
181 </constraints> 188 </constraints>
182 <userDefinedRuntimeAttributes> 189 <userDefinedRuntimeAttributes>
183 <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> 190 <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
184 <integer key="value" value="60"/> 191 <integer key="value" value="60"/>
185 </userDefinedRuntimeAttribute> 192 </userDefinedRuntimeAttribute>
186 </userDefinedRuntimeAttributes> 193 </userDefinedRuntimeAttributes>
187 </view> 194 </view>
188 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4ix-HE-d9T"> 195 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4ix-HE-d9T">
189 <rect key="frame" x="148" y="30" width="219" height="120"/> 196 <rect key="frame" x="148" y="30" width="219" height="120"/>
190 <subviews> 197 <subviews>
191 <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">
192 <rect key="frame" x="10" y="38" width="45" height="15"/> 199 <rect key="frame" x="10" y="38" width="45" height="15"/>
193 <constraints> 200 <constraints>
194 <constraint firstAttribute="width" constant="45" id="6Ce-YE-wbx"/> 201 <constraint firstAttribute="width" constant="45" id="6Ce-YE-wbx"/>
195 <constraint firstAttribute="height" constant="15" id="eFR-Ao-75U"/> 202 <constraint firstAttribute="height" constant="15" id="eFR-Ao-75U"/>
196 </constraints> 203 </constraints>
197 <fontDescription key="fontDescription" type="system" pointSize="12"/> 204 <fontDescription key="fontDescription" type="system" pointSize="12"/>
198 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 205 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
199 <nil key="highlightedColor"/> 206 <nil key="highlightedColor"/>
200 <userDefinedRuntimeAttributes> 207 <userDefinedRuntimeAttributes>
201 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.total"/> 208 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.total"/>
202 </userDefinedRuntimeAttributes> 209 </userDefinedRuntimeAttributes>
203 </label> 210 </label>
204 <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">
205 <rect key="frame" x="10" y="53" width="45" height="15"/> 212 <rect key="frame" x="10" y="53" width="45" height="15"/>
206 <fontDescription key="fontDescription" type="system" pointSize="12"/> 213 <fontDescription key="fontDescription" type="system" pointSize="12"/>
207 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 214 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
208 <nil key="highlightedColor"/> 215 <nil key="highlightedColor"/>
209 <userDefinedRuntimeAttributes> 216 <userDefinedRuntimeAttributes>
210 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.remaining"/> 217 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.remaining"/>
211 </userDefinedRuntimeAttributes> 218 </userDefinedRuntimeAttributes>
212 </label> 219 </label>
213 <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">
214 <rect key="frame" x="10" y="68" width="45" height="15"/> 221 <rect key="frame" x="10" y="68" width="45" height="15"/>
215 <fontDescription key="fontDescription" type="system" pointSize="12"/> 222 <fontDescription key="fontDescription" type="system" pointSize="12"/>
216 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 223 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
217 <nil key="highlightedColor"/> 224 <nil key="highlightedColor"/>
218 <userDefinedRuntimeAttributes> 225 <userDefinedRuntimeAttributes>
219 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.percent"/> 226 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.percent"/>
220 </userDefinedRuntimeAttributes> 227 </userDefinedRuntimeAttributes>
221 </label> 228 </label>
222 <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="1000 step" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0pf-fX-QXT">
223 <rect key="frame" x="63" y="38" width="118" height="15"/> 230 <rect key="frame" x="63" y="38" width="118" height="15"/>
224 <constraints> 231 <constraints>
225 <constraint firstAttribute="height" constant="15" id="Z6o-LI-Eu9"/> 232 <constraint firstAttribute="height" constant="15" id="Z6o-LI-Eu9"/>
226 </constraints> 233 </constraints>
227 <fontDescription key="fontDescription" type="system" pointSize="12"/> 234 <fontDescription key="fontDescription" type="system" pointSize="12"/>
228 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 235 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
229 <nil key="highlightedColor"/> 236 <nil key="highlightedColor"/>
230 </label> 237 </label>
231 <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="500 step" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1NH-b3-ST8">
232 <rect key="frame" x="63" y="53" width="118" height="15"/> 239 <rect key="frame" x="63" y="53" width="118" height="15"/>
233 <fontDescription key="fontDescription" type="system" pointSize="12"/> 240 <fontDescription key="fontDescription" type="system" pointSize="12"/>
234 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 241 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
235 <nil key="highlightedColor"/> 242 <nil key="highlightedColor"/>
236 </label> 243 </label>
237 <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="50 %" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Ru-Jc-Ouv">
238 <rect key="frame" x="63" y="68" width="118" height="15"/> 245 <rect key="frame" x="63" y="68" width="118" height="15"/>
239 <fontDescription key="fontDescription" type="system" pointSize="12"/> 246 <fontDescription key="fontDescription" type="system" pointSize="12"/>
240 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 247 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
241 <nil key="highlightedColor"/> 248 <nil key="highlightedColor"/>
242 </label> 249 </label>
243 </subviews> 250 </subviews>
244 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 251 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
245 <constraints> 252 <constraints>
246 <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"/>
247 <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"/>
248 <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"/>
249 <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"/>
250 <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"/>
251 <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"/>
252 <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"/>
253 <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"/>
254 <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"/>
255 <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"/>
256 <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"/>
257 <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"/>
258 <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"/>
259 <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"/>
260 <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"/>
261 <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"/>
262 <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"/>
263 <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"/>
264 <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"/>
265 <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"/>
266 <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"/>
267 <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"/>
268 <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"/>
269 </constraints> 276 </constraints>
270 </view> 277 </view>
271 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iEh-Ze-suq"> 278 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iEh-Ze-suq">
272 <rect key="frame" x="20" y="158" width="335" height="35"/> 279 <rect key="frame" x="20" y="158" width="335" height="35"/>
273 <subviews> 280 <subviews>
274 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UwA-5Q-gdv"> 281 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UwA-5Q-gdv">
275 <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"/>
276 <subviews> 283 <subviews>
277 <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">
278 <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"/>
279 <constraints> 286 <constraints>
280 <constraint firstAttribute="height" constant="18" id="Ywp-RA-6am"/> 287 <constraint firstAttribute="height" constant="18" id="Ywp-RA-6am"/>
281 </constraints> 288 </constraints>
282 <fontDescription key="fontDescription" type="system" pointSize="12"/> 289 <fontDescription key="fontDescription" type="system" pointSize="12"/>
283 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 290 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
284 <nil key="highlightedColor"/> 291 <nil key="highlightedColor"/>
285 <userDefinedRuntimeAttributes> 292 <userDefinedRuntimeAttributes>
286 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.calories"/> 293 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.calories"/>
287 </userDefinedRuntimeAttributes> 294 </userDefinedRuntimeAttributes>
288 </label> 295 </label>
289 <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="1000 kcal" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dAE-C8-QLr">
290 <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"/>
291 <constraints> 298 <constraints>
292 <constraint firstAttribute="height" constant="18" id="r0d-xi-3u7"/> 299 <constraint firstAttribute="height" constant="18" id="r0d-xi-3u7"/>
293 </constraints> 300 </constraints>
294 <fontDescription key="fontDescription" type="system" pointSize="12"/> 301 <fontDescription key="fontDescription" type="system" pointSize="12"/>
295 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 302 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
296 <nil key="highlightedColor"/> 303 <nil key="highlightedColor"/>
297 </label> 304 </label>
298 </subviews> 305 </subviews>
299 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 306 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
300 <constraints> 307 <constraints>
301 <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"/>
302 <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"/>
303 <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"/>
304 <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"/>
305 <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"/>
306 <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"/>
307 </constraints> 314 </constraints>
308 </view> 315 </view>
309 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BVs-KG-fDF"> 316 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BVs-KG-fDF">
310 <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"/>
311 <subviews> 318 <subviews>
312 <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">
313 <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"/>
314 <constraints> 321 <constraints>
315 <constraint firstAttribute="height" constant="18" id="tct-pY-7wo"/> 322 <constraint firstAttribute="height" constant="18" id="tct-pY-7wo"/>
316 </constraints> 323 </constraints>
317 <fontDescription key="fontDescription" type="system" pointSize="12"/> 324 <fontDescription key="fontDescription" type="system" pointSize="12"/>
318 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 325 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
319 <nil key="highlightedColor"/> 326 <nil key="highlightedColor"/>
320 <userDefinedRuntimeAttributes> 327 <userDefinedRuntimeAttributes>
321 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.distance"/> 328 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.distance"/>
322 </userDefinedRuntimeAttributes> 329 </userDefinedRuntimeAttributes>
323 </label> 330 </label>
324 <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="4.0 KM" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1tR-JC-pyw">
325 <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"/>
326 <constraints> 333 <constraints>
327 <constraint firstAttribute="height" constant="18" id="sNT-xl-BKH"/> 334 <constraint firstAttribute="height" constant="18" id="sNT-xl-BKH"/>
328 </constraints> 335 </constraints>
329 <fontDescription key="fontDescription" type="system" pointSize="12"/> 336 <fontDescription key="fontDescription" type="system" pointSize="12"/>
330 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 337 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
331 <nil key="highlightedColor"/> 338 <nil key="highlightedColor"/>
332 </label> 339 </label>
333 </subviews> 340 </subviews>
334 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 341 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
335 <constraints> 342 <constraints>
336 <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"/>
337 <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"/>
338 <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"/>
339 <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"/>
340 <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"/>
341 <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"/>
342 </constraints> 349 </constraints>
343 </view> 350 </view>
344 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="j5h-QD-Igf"> 351 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="j5h-QD-Igf">
345 <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"/>
346 <subviews> 353 <subviews>
347 <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">
348 <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"/>
349 <constraints> 356 <constraints>
350 <constraint firstAttribute="height" constant="18" id="EVe-qW-qqp"/> 357 <constraint firstAttribute="height" constant="18" id="EVe-qW-qqp"/>
351 </constraints> 358 </constraints>
352 <fontDescription key="fontDescription" type="system" pointSize="12"/> 359 <fontDescription key="fontDescription" type="system" pointSize="12"/>
353 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 360 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
354 <nil key="highlightedColor"/> 361 <nil key="highlightedColor"/>
355 <userDefinedRuntimeAttributes> 362 <userDefinedRuntimeAttributes>
356 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.time"/> 363 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.history.title.time"/>
357 </userDefinedRuntimeAttributes> 364 </userDefinedRuntimeAttributes>
358 </label> 365 </label>
359 <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="1:00 時間" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PfZ-7x-LAR">
360 <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"/>
361 <constraints> 368 <constraints>
362 <constraint firstAttribute="height" constant="18" id="lno-Dx-ZNm"/> 369 <constraint firstAttribute="height" constant="18" id="lno-Dx-ZNm"/>
363 </constraints> 370 </constraints>
364 <fontDescription key="fontDescription" type="system" pointSize="12"/> 371 <fontDescription key="fontDescription" type="system" pointSize="12"/>
365 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 372 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
366 <nil key="highlightedColor"/> 373 <nil key="highlightedColor"/>
367 </label> 374 </label>
368 </subviews> 375 </subviews>
369 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 376 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
370 <constraints> 377 <constraints>
371 <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"/>
372 <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"/>
373 <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"/>
374 <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"/>
375 <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"/>
376 <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"/>
377 </constraints> 384 </constraints>
378 </view> 385 </view>
379 </subviews> 386 </subviews>
380 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 387 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
381 <constraints> 388 <constraints>
382 <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"/>
383 <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"/>
384 <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"/>
385 <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"/>
386 <constraint firstAttribute="height" constant="35" id="WDe-uC-4Qb"/> 393 <constraint firstAttribute="height" constant="35" id="WDe-uC-4Qb"/>
387 <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"/>
388 <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"/>
389 <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"/>
390 <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"/>
391 <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"/>
392 <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"/>
393 <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"/>
394 <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"/>
395 </constraints> 402 </constraints>
396 </view> 403 </view>
397 <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">
398 <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"/>
399 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 406 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
400 <constraints> 407 <constraints>
401 <constraint firstAttribute="height" constant="100" id="aQR-hf-MhR"/> 408 <constraint firstAttribute="height" constant="100" id="aQR-hf-MhR"/>
402 </constraints> 409 </constraints>
403 </view> 410 </view>
404 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Iw2-nW-e7g" customClass="CollectionView"> 411 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Iw2-nW-e7g" customClass="CollectionView">
405 <rect key="frame" x="20" y="316" width="335" height="50"/> 412 <rect key="frame" x="20" y="316" width="335" height="50"/>
406 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 413 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
407 <constraints> 414 <constraints>
408 <constraint firstAttribute="height" constant="50" id="Yzh-hD-r0n"/> 415 <constraint firstAttribute="height" constant="50" id="Yzh-hD-r0n"/>
409 </constraints> 416 </constraints>
410 </view> 417 </view>
411 </subviews> 418 </subviews>
412 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 419 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
413 <constraints> 420 <constraints>
414 <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"/>
415 <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"/>
416 <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"/>
417 <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"/>
418 <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"/>
419 <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"/>
420 <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"/>
421 <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"/>
422 <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"/>
423 <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"/>
424 <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"/>
425 <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"/>
426 <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"/>
427 <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"/>
428 <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"/>
429 </constraints> 436 </constraints>
430 </view> 437 </view>
431 </subviews> 438 </subviews>
432 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 439 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
433 <constraints> 440 <constraints>
434 <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"/>
435 <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"/>
436 <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"/>
437 <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"/>
438 <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"/>
439 <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"/>
440 </constraints> 447 </constraints>
441 <connections> 448 <connections>
442 <outlet property="delegate" destination="-1" id="3Fl-Qy-gjm"/> 449 <outlet property="delegate" destination="-1" id="3Fl-Qy-gjm"/>
443 </connections> 450 </connections>
444 </scrollView> 451 </scrollView>
445 </subviews> 452 </subviews>
446 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 453 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
447 <constraints> 454 <constraints>
448 <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"/>
449 <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"/>
450 <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"/>
451 <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"/>
452 <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"/>
453 <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"/>
454 <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"/>
455 <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"/>
456 </constraints> 463 </constraints>
457 <connections> 464 <connections>
458 <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"/>
459 <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"/>
460 </connections> 467 </connections>
461 </view> 468 </view>
462 </subviews> 469 </subviews>
463 <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> 470 <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
464 <gestureRecognizers/> 471 <gestureRecognizers/>
465 <constraints> 472 <constraints>
466 <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"/>
467 <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"/>
468 <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"/>
469 <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"/>
470 <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"/>
471 <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"/>
472 <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"/>
473 <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"/>
474 <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"/>
475 <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"/>
476 <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"/>
477 <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"/>
478 <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"/>
479 <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"/>
480 <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"/>
481 <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"/>
482 </constraints> 489 </constraints>
483 <point key="canvasLocation" x="26.5" y="52.5"/> 490 <point key="canvasLocation" x="26.5" y="52.5"/>
484 </view> 491 </view>
485 <swipeGestureRecognizer cancelsTouchesInView="NO" direction="left" id="Qjg-St-rCc"> 492 <swipeGestureRecognizer cancelsTouchesInView="NO" direction="left" id="Qjg-St-rCc">
486 <connections> 493 <connections>
487 <action selector="swipeAction:" destination="-1" id="2Vl-bM-Ta7"/> 494 <action selector="swipeAction:" destination="-1" id="2Vl-bM-Ta7"/>
488 </connections> 495 </connections>
489 </swipeGestureRecognizer> 496 </swipeGestureRecognizer>
490 <swipeGestureRecognizer cancelsTouchesInView="NO" direction="right" id="VSZ-i0-Jhb"> 497 <swipeGestureRecognizer cancelsTouchesInView="NO" direction="right" id="VSZ-i0-Jhb">
491 <connections> 498 <connections>
492 <action selector="swipeAction:" destination="-1" id="hoY-6M-DoS"/> 499 <action selector="swipeAction:" destination="-1" id="hoY-6M-DoS"/>
493 </connections> 500 </connections>
494 </swipeGestureRecognizer> 501 </swipeGestureRecognizer>
495 </objects> 502 </objects>
496 <resources> 503 <resources>
497 <image name="arrow_back" width="22" height="22"/> 504 <image name="arrow_back" width="22" height="22"/>
498 <image name="arrow_next" width="22" height="22"/> 505 <image name="arrow_next" width="22" height="22"/>
499 <image name="icon_menu" width="30" height="30"/> 506 <image name="icon_menu" width="30" height="30"/>
500 <image name="today_back_button" width="73" height="37"/> 507 <image name="today_back_button" width="73" height="37"/>
501 </resources> 508 </resources>
502 </document> 509 </document>
503 510
LifeLog/LifeLog/Localizable.strings
No preview for this file type
LifeLog/LifeLog/MemberObject.h
File was created 1 //
2 // MemberObject.h
3 // LifeLog
4 //
5 // Created by nvtu on 8/18/17.
6 // Copyright © 2017 PhongNV. All rights reserved.
7 //
8
9 #import <Foundation/Foundation.h>
10
11 @interface MemberObject : NSObject
12
13 @property (nonatomic) int userID;
14 @property (nonatomic) int gender;
15
16 @property (nonatomic, strong) NSString * userName;
17 @property (nonatomic, strong) NSString * nickName;
18 @property (nonatomic, strong) NSString * avatar;
19
20 @property (nonatomic, strong) NSDate * joinDate;
21 @property (nonatomic, strong) NSDate * birthDay;
22
23 -(id) initWithData : (NSDictionary *) dict;
24
25 @end
1 // 26
LifeLog/LifeLog/MemberObject.m
File was created 1 //
2 // MemberObject.m
3 // LifeLog
4 //
5 // Created by nvtu on 8/18/17.
6 // Copyright © 2017 PhongNV. All rights reserved.
7 //
8
9 #import "MemberObject.h"
10 #import "Utilities.h"
11
12 @implementation MemberObject
13
14 -(id) initWithData : (NSDictionary *) dict {
15 if([dict objectForKey:@"user_id"] != nil) {
16 self.userID = [dict[@"user_id"] intValue];
17 }
18 if([dict objectForKey:@"gender"] != nil) {
19 self.gender = [dict[@"gender"] intValue];
20 }
21 if([dict objectForKey:@"username"] != nil) {
22 self.userName = dict[@"username"];
23 }
24 if([dict objectForKey:@"nickname"] != nil) {
25 self.nickName = dict[@"nickname"];
26 }
27 if([dict objectForKey:@"profile_image"] != nil) {
28 self.avatar = dict[@"profile_image"];
29 }
30 if([dict objectForKey:@"birthday"] != nil) {
31 NSString *dateString = dict[@"birthday"];
32 self.birthDay = [Utilities dateFromString:dateString withFormat:@"yyyy-MM-dd"];
33 }
34 else {
35 self.birthDay = [NSDate date];
36 }
37 if([dict objectForKey:@"join_date"] != nil) {
38 NSString *dateString = dict[@"join_date"];
39 self.joinDate = [Utilities dateFromString:dateString withFormat:@"yyyy-MM-dd HH:mm:ss"];
40 }
41 else {
42 self.joinDate = [NSDate date];
43 }
44 return self;
45 }
46
47 @end
1 // 48
LifeLog/LifeLog/MyGroupViewController.h
File was created 1 //
2 // MyGroupViewController.h
3 // LifeLog
4 //
5 // Created by nvtu on 8/20/17.
6 // Copyright © 2017 PhongNV. All rights reserved.
7 //
8
9 #import <UIKit/UIKit.h>
10 #import "GroupDetailViewController.h"
11 #import "AutoTransButton.h"
12 #import "Entities.h"
13
14 @interface MyGroupViewController : GroupDetailViewController {
15 NSMutableArray *_curListGrp;
16 }
17
18 @property (weak, nonatomic) IBOutlet UITableView *tableGrp;
19 @property (weak, nonatomic) IBOutlet UIButton *btShowGrp;
20
21 - (IBAction)clickShowGrp:(id)sender;
22
23 @end
1 // 24
LifeLog/LifeLog/MyGroupViewController.m
File was created 1 //
2 // MyGroupViewController.m
3 // LifeLog
4 //
5 // Created by nvtu on 8/20/17.
6 // Copyright © 2017 PhongNV. All rights reserved.
7 //
8
9 #import "MyGroupViewController.h"
10 #import <SDWebImage/UIImageView+WebCache.h>
11
12 #import "Utilities.h"
13 #import "ServerAPI.h"
14 #import "SNSRecentTopicTableViewCell.h"
15
16 @interface MyGroupViewController ()
17
18 @end
19
20 @implementation MyGroupViewController
21
22 - (void)viewDidLoad {
23 [super viewDidLoad];
24 isMemberList = false;
25 _curListGrp = [[NSMutableArray alloc] init];
26 [self.tableBase registerNib:[UINib nibWithNibName:@"SNSRecentTopicTableViewCell" bundle:nil] forCellReuseIdentifier:@"RecentTopicCell"];
27
28 [self requestGroupList];
29 // Do any additional setup after loading the view from its nib.
30 }
31
32 - (void)didReceiveMemoryWarning {
33 [super didReceiveMemoryWarning];
34 // Dispose of any resources that can be recreated.
35 }
36
37 #pragma mark IBAction
38
39 - (IBAction)clickBack:(id)sender {
40 [self.navigationController popViewControllerAnimated:true];
41 }
42
43 - (IBAction)clickShowGrp:(id)sender {
44 self.tableGrp.hidden = !self.tableGrp.isHidden;
45 }
46
47 - (IBAction)clickSwitch:(id)sender {
48 isMemberList = !isMemberList;
49 if(isMemberList) {
50 [sender setTitle:NSLocalizedString(@"lifelog.grDetail.bt.viewTweet", nil) forState:UIControlStateNormal];
51 }
52 else {
53 [sender setTitle:NSLocalizedString(@"lifelog.grDetail.bt.viewMem", nil) forState:UIControlStateNormal];
54 }
55 [sender setUserInteractionEnabled:false];
56 [self resetData];
57 }
58
59 #pragma mark UITableView Delegate
60 -(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
61 if(tableView == self.tableGrp)
62 return 1;
63 else
64 return [super numberOfSectionsInTableView:tableView];
65 }
66
67 - (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
68 if(tableView == self.tableGrp)
69 return _curListGrp.count;
70 else
71 return [super tableView:tableView numberOfRowsInSection:section];
72 }
73
74 - (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
75 if(tableView == self.tableGrp) {
76 UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"GroupCell"];
77 if(cell == nil) {
78 cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"GroupCell"];
79 }
80 GroupObject *object = [_curListGrp objectAtIndex:indexPath.row];
81 cell.textLabel.text = object.name;
82 return cell;
83 }
84 else {
85 SNSRecentTopicTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"RecentTopicCell"];
86 if(isMemberList) {
87 MemberObject *object = [_curDataList objectAtIndex:indexPath.row];
88 if(object.avatar && ![object.avatar isKindOfClass:[NSNull class]]) {
89 [cell.imgAvatar sd_setImageWithURL:[NSURL URLWithString:[Utilities getImageLink:object.avatar]]];
90 }
91 else {
92 [cell.imgAvatar setImage:[UIImage imageNamed:@"avatar_default"]];
93 }
94 cell.lblUsername.text = @"";
95 cell.lblDateTime.text = @"";
96 cell.lblDes.text = object.userName;
97 cell.lblMode.text = @"";
98 cell.lblDistance.text = @"";
99 cell.lblDuration.text = @"";
100 }
101 else {
102 TweetObject *object = [_curDataList objectAtIndex:indexPath.row];
103 if(object.avatar && ![object.avatar isKindOfClass:[NSNull class]]) {
104 [cell.imgAvatar sd_setImageWithURL:[NSURL URLWithString:[Utilities getImageLink:object.avatar]]];
105 }
106 else {
107 [cell.imgAvatar setImage:[UIImage imageNamed:@"avatar_default"]];
108 }
109 cell.lblDateTime.text = [Utilities stringFromDate:object.createDate withFormat:@"YYYY/MM/dd hh:mm" locale:@""];
110 cell.lblUsername.text = object.userName;
111 cell.lblDes.text = object.content;
112 cell.lblMode.text = object.mode;
113 cell.lblDistance.text = [NSString stringWithFormat:@"%.0f m", object.distance];
114 cell.lblDuration.text = object.time;
115 }
116 return cell;
117 }
118 }
119
120 - (void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
121 if(tableView == self.tableGrp) {
122 return;
123 }
124 [super tableView:tableView willDisplayCell:cell forRowAtIndexPath:indexPath];
125 }
126
127 -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
128 if(tableView == self.tableGrp) {
129 [tableView setHidden:true];
130 [self resetGroupData:indexPath.row];
131 }
132 }
133
134 #pragma mark Private Function
135
136 - (void) resetGroupData : (int) index {
137 _curGroup = [_curListGrp objectAtIndex:index];
138 self.lblGrpName.text = _curGroup.name;
139 [_curDataList removeAllObjects];
140 [self.tableBase reloadData];
141 [self requestGroupDetail];
142 }
143
144 - (void) requestGroupList {
145 NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken];
146 MBProgressHUD *hudView = [MBProgressHUD showHUDAddedTo:self.view animated:true];
147 [[ServerAPI server] requestGroupList:token CompletionHandler:^(NSArray *array, NSError *error) {
148 dispatch_async(dispatch_get_main_queue(), ^{
149 [hudView hideAnimated:true];
150 });
151 if(error == nil) {
152 [_curListGrp removeAllObjects];
153 [_curListGrp addObjectsFromArray:array];
154 MyGroupViewController __weak *weakSelf = self;
155 dispatch_async(dispatch_get_main_queue(), ^{
156 [hudView hideAnimated:true];
157 [self.tableGrp reloadData];
158 if(_curListGrp.count > 0) {
159 [weakSelf resetGroupData:0];
160 }
161 else {
162 weakSelf.lblGrpName.text = @"No Group";
163 }
164 [weakSelf.btShowGrp setEnabled:(_curListGrp.count > 0)];
165 });
166 }
167 }];
168 }
169
170 @end
1 // 171
LifeLog/LifeLog/MyGroupViewController.xib
File was created 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">
3 <device id="retina4_7" orientation="portrait">
4 <adaptation id="fullscreen"/>
5 </device>
6 <dependencies>
7 <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
8 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9 </dependencies>
10 <objects>
11 <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MyGroupViewController">
12 <connections>
13 <outlet property="btShowGrp" destination="MvK-5R-njL" id="bcb-N7-jbu"/>
14 <outlet property="btSwitch" destination="eBu-7L-nsx" id="od6-v0-6eh"/>
15 <outlet property="lbbGrpActiveMode" destination="P1r-ft-imP" id="gw7-xu-kL1"/>
16 <outlet property="lblGrpGoal" destination="ftA-wa-19F" id="YFk-py-xd2"/>
17 <outlet property="lblGrpName" destination="xXv-SO-m4h" id="qik-wo-Usx"/>
18 <outlet property="tableBase" destination="ubS-v9-zCa" id="gea-9H-gpI"/>
19 <outlet property="tableGrp" destination="dtD-J5-dze" id="ahq-Cd-85X"/>
20 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
21 </connections>
22 </placeholder>
23 <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
24 <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
25 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
26 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
27 <subviews>
28 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vxT-xe-7mV" userLabel="ViewHeader">
29 <rect key="frame" x="0.0" y="0.0" width="375" height="46"/>
30 <subviews>
31 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SNS" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Txe-1I-61m" customClass="AutoTransLabel">
32 <rect key="frame" x="0.0" y="0.0" width="375" height="46"/>
33 <fontDescription key="fontDescription" type="system" pointSize="17"/>
34 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
35 <nil key="highlightedColor"/>
36 <userDefinedRuntimeAttributes>
37 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.grDetail.title"/>
38 </userDefinedRuntimeAttributes>
39 </label>
40 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DjI-qB-WTG">
41 <rect key="frame" x="0.0" y="5" width="70" height="36"/>
42 <constraints>
43 <constraint firstAttribute="width" constant="70" id="Q1G-tI-sgx"/>
44 </constraints>
45 <state key="normal" image="today_back_button"/>
46 <connections>
47 <action selector="clickBack:" destination="-1" eventType="touchUpInside" id="93y-uZ-J2W"/>
48 </connections>
49 </button>
50 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7gh-nf-sKZ">
51 <rect key="frame" x="330" y="0.0" width="45" height="46"/>
52 <constraints>
53 <constraint firstAttribute="width" constant="45" id="Vw3-60-kvV"/>
54 </constraints>
55 <state key="normal" image="icon_menu"/>
56 </button>
57 </subviews>
58 <color key="backgroundColor" red="0.098039215690000001" green="0.098039215690000001" blue="0.098039215690000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
59 <constraints>
60 <constraint firstAttribute="trailing" secondItem="7gh-nf-sKZ" secondAttribute="trailing" id="2JD-YU-WS2"/>
61 <constraint firstItem="Txe-1I-61m" firstAttribute="leading" secondItem="vxT-xe-7mV" secondAttribute="leading" id="30c-J3-6ba"/>
62 <constraint firstAttribute="bottom" secondItem="7gh-nf-sKZ" secondAttribute="bottom" id="61g-Gv-ka0"/>
63 <constraint firstAttribute="bottom" secondItem="Txe-1I-61m" secondAttribute="bottom" id="BZZ-wj-MGj"/>
64 <constraint firstItem="7gh-nf-sKZ" firstAttribute="top" secondItem="vxT-xe-7mV" secondAttribute="top" id="DKT-Ea-U3k"/>
65 <constraint firstAttribute="trailing" secondItem="Txe-1I-61m" secondAttribute="trailing" id="WA1-1W-49C"/>
66 <constraint firstItem="DjI-qB-WTG" firstAttribute="leading" secondItem="vxT-xe-7mV" secondAttribute="leading" id="tA3-JF-Kjj"/>
67 <constraint firstAttribute="bottom" secondItem="DjI-qB-WTG" secondAttribute="bottom" constant="5" id="uFc-I1-M2c"/>
68 <constraint firstItem="Txe-1I-61m" firstAttribute="top" secondItem="vxT-xe-7mV" secondAttribute="top" id="ucO-rK-wAV"/>
69 <constraint firstItem="DjI-qB-WTG" firstAttribute="top" secondItem="vxT-xe-7mV" secondAttribute="top" constant="5" id="vR3-xv-3hD"/>
70 <constraint firstAttribute="height" constant="46" id="yIJ-Mu-bPA"/>
71 </constraints>
72 </view>
73 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hhh-nO-yn5">
74 <rect key="frame" x="15" y="54" width="345" height="36"/>
75 <subviews>
76 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MvK-5R-njL">
77 <rect key="frame" x="289" y="0.0" width="56" height="36"/>
78 <constraints>
79 <constraint firstAttribute="width" constant="56" id="l8Q-On-RNy"/>
80 </constraints>
81 <state key="normal" backgroundImage="arrow_down"/>
82 <connections>
83 <action selector="clickShowGrp:" destination="-1" eventType="touchUpInside" id="yfd-Yu-fTF"/>
84 </connections>
85 </button>
86 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No group" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xXv-SO-m4h">
87 <rect key="frame" x="5" y="0.0" width="284" height="36"/>
88 <fontDescription key="fontDescription" type="system" pointSize="15"/>
89 <nil key="textColor"/>
90 <nil key="highlightedColor"/>
91 </label>
92 </subviews>
93 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
94 <constraints>
95 <constraint firstAttribute="trailing" secondItem="MvK-5R-njL" secondAttribute="trailing" id="IS8-5J-ypb"/>
96 <constraint firstAttribute="bottom" secondItem="MvK-5R-njL" secondAttribute="bottom" id="IVS-f9-RjH"/>
97 <constraint firstAttribute="bottom" secondItem="xXv-SO-m4h" secondAttribute="bottom" id="Ino-7v-CKz"/>
98 <constraint firstItem="MvK-5R-njL" firstAttribute="top" secondItem="hhh-nO-yn5" secondAttribute="top" id="NlH-tz-ByC"/>
99 <constraint firstAttribute="height" constant="36" id="O8T-vH-tg6"/>
100 <constraint firstItem="MvK-5R-njL" firstAttribute="leading" secondItem="xXv-SO-m4h" secondAttribute="trailing" id="V51-fg-KCf"/>
101 <constraint firstItem="xXv-SO-m4h" firstAttribute="leading" secondItem="hhh-nO-yn5" secondAttribute="leading" constant="5" id="eY6-uq-qWx"/>
102 <constraint firstItem="xXv-SO-m4h" firstAttribute="top" secondItem="hhh-nO-yn5" secondAttribute="top" id="l3a-Th-4Kb"/>
103 </constraints>
104 <userDefinedRuntimeAttributes>
105 <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
106 <integer key="value" value="5"/>
107 </userDefinedRuntimeAttribute>
108 </userDefinedRuntimeAttributes>
109 </view>
110 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SNe-1B-nwV">
111 <rect key="frame" x="15" y="105" width="345" height="105"/>
112 <subviews>
113 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="グループ VMAP アメリカルート61完走" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hyY-rU-WJx">
114 <rect key="frame" x="8" y="8" width="329" height="20"/>
115 <constraints>
116 <constraint firstAttribute="height" constant="20" id="dx4-Lw-gRP"/>
117 </constraints>
118 <fontDescription key="fontDescription" type="system" pointSize="14"/>
119 <nil key="textColor"/>
120 <nil key="highlightedColor"/>
121 </label>
122 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="P1r-ft-imP">
123 <rect key="frame" x="8" y="36" width="155" height="61"/>
124 <constraints>
125 <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="61" id="6m3-4u-yjQ"/>
126 <constraint firstAttribute="width" constant="155" id="bJa-4P-B84"/>
127 </constraints>
128 <fontDescription key="fontDescription" type="system" pointSize="14"/>
129 <nil key="textColor"/>
130 <nil key="highlightedColor"/>
131 </label>
132 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fXA-Zh-ABB" customClass="AutoTransButton">
133 <rect key="frame" x="171" y="67" width="166" height="30"/>
134 <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
135 <constraints>
136 <constraint firstAttribute="height" constant="30" id="4bu-TU-hhR"/>
137 <constraint firstAttribute="width" constant="166" id="hcm-Nd-TE4"/>
138 </constraints>
139 <state key="normal" title="VMAP">
140 <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
141 </state>
142 <userDefinedRuntimeAttributes>
143 <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
144 <integer key="value" value="10"/>
145 </userDefinedRuntimeAttribute>
146 </userDefinedRuntimeAttributes>
147 </button>
148 </subviews>
149 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
150 <constraints>
151 <constraint firstItem="P1r-ft-imP" firstAttribute="leading" secondItem="SNe-1B-nwV" secondAttribute="leading" constant="8" id="PCO-gJ-aUC"/>
152 <constraint firstItem="P1r-ft-imP" firstAttribute="top" secondItem="hyY-rU-WJx" secondAttribute="bottom" constant="8" id="TFE-rm-YuC"/>
153 <constraint firstItem="hyY-rU-WJx" firstAttribute="leading" secondItem="SNe-1B-nwV" secondAttribute="leading" constant="8" id="Urc-sV-0AF"/>
154 <constraint firstAttribute="bottom" secondItem="P1r-ft-imP" secondAttribute="bottom" constant="8" id="YYl-bN-XH2"/>
155 <constraint firstItem="hyY-rU-WJx" firstAttribute="top" secondItem="SNe-1B-nwV" secondAttribute="top" constant="8" id="a68-ja-X4x"/>
156 <constraint firstAttribute="trailing" secondItem="fXA-Zh-ABB" secondAttribute="trailing" constant="8" id="hNz-cE-JQc"/>
157 <constraint firstAttribute="trailing" secondItem="hyY-rU-WJx" secondAttribute="trailing" constant="8" id="tHp-Xw-Emj"/>
158 <constraint firstAttribute="bottom" secondItem="fXA-Zh-ABB" secondAttribute="bottom" constant="8" id="vRs-Al-kct"/>
159 </constraints>
160 </view>
161 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ftA-wa-19F">
162 <rect key="frame" x="15" y="218" width="345" height="40"/>
163 <constraints>
164 <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="40" id="sns-tn-c0d"/>
165 </constraints>
166 <fontDescription key="fontDescription" type="system" pointSize="14"/>
167 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
168 <nil key="highlightedColor"/>
169 </label>
170 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eBu-7L-nsx" customClass="AutoTransButton">
171 <rect key="frame" x="194" y="268" width="166" height="30"/>
172 <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
173 <constraints>
174 <constraint firstAttribute="width" constant="166" id="Rrn-lf-raV"/>
175 <constraint firstAttribute="height" constant="30" id="y2E-RH-aan"/>
176 </constraints>
177 <state key="normal" title="メンバー">
178 <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
179 </state>
180 <userDefinedRuntimeAttributes>
181 <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
182 <integer key="value" value="10"/>
183 </userDefinedRuntimeAttribute>
184 </userDefinedRuntimeAttributes>
185 <connections>
186 <action selector="clickSwitch:" destination="-1" eventType="touchUpInside" id="B7a-Hl-IlY"/>
187 </connections>
188 </button>
189 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="100" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="ubS-v9-zCa">
190 <rect key="frame" x="0.0" y="313" width="375" height="304"/>
191 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
192 <connections>
193 <outlet property="dataSource" destination="-1" id="HIG-w5-mXN"/>
194 <outlet property="delegate" destination="-1" id="GIa-bX-Av9"/>
195 </connections>
196 </tableView>
197 <tableView hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="35" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="dtD-J5-dze">
198 <rect key="frame" x="15" y="91" width="345" height="140"/>
199 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
200 <constraints>
201 <constraint firstAttribute="height" constant="140" id="CrG-Ni-f6b"/>
202 </constraints>
203 <connections>
204 <outlet property="dataSource" destination="-1" id="2bH-mm-vKH"/>
205 <outlet property="delegate" destination="-1" id="9tr-mh-5Ir"/>
206 </connections>
207 </tableView>
208 </subviews>
209 <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
210 <constraints>
211 <constraint firstItem="ftA-wa-19F" firstAttribute="top" secondItem="SNe-1B-nwV" secondAttribute="bottom" constant="8" id="4iN-BW-Eaa"/>
212 <constraint firstItem="vxT-xe-7mV" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="5np-jI-7iK"/>
213 <constraint firstAttribute="trailing" secondItem="eBu-7L-nsx" secondAttribute="trailing" constant="15" id="AkN-Cv-ULu"/>
214 <constraint firstItem="SNe-1B-nwV" firstAttribute="top" secondItem="hhh-nO-yn5" secondAttribute="bottom" constant="15" id="BL0-Cv-jlz"/>
215 <constraint firstItem="ubS-v9-zCa" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="Dt8-xl-lI8"/>
216 <constraint firstAttribute="trailing" secondItem="SNe-1B-nwV" secondAttribute="trailing" constant="15" id="QiL-ts-ryc"/>
217 <constraint firstItem="dtD-J5-dze" firstAttribute="top" secondItem="hhh-nO-yn5" secondAttribute="bottom" constant="1" id="QzJ-aS-NQ0"/>
218 <constraint firstItem="SNe-1B-nwV" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="15" id="T4b-fq-Gc8"/>
219 <constraint firstAttribute="trailing" secondItem="hhh-nO-yn5" secondAttribute="trailing" constant="15" id="YB3-2b-4yx"/>
220 <constraint firstAttribute="bottom" secondItem="ubS-v9-zCa" secondAttribute="bottom" constant="50" id="ZNH-0B-rWz"/>
221 <constraint firstItem="ftA-wa-19F" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="15" id="bnx-K2-jVS"/>
222 <constraint firstAttribute="trailing" secondItem="ubS-v9-zCa" secondAttribute="trailing" id="bsK-wi-RYU"/>
223 <constraint firstAttribute="trailing" secondItem="vxT-xe-7mV" secondAttribute="trailing" id="eld-fc-V95"/>
224 <constraint firstItem="hhh-nO-yn5" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="15" id="gDN-Hr-2vm"/>
225 <constraint firstItem="vxT-xe-7mV" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="iBy-99-6Ky"/>
226 <constraint firstItem="dtD-J5-dze" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="15" id="ie5-ll-WkY"/>
227 <constraint firstAttribute="trailing" secondItem="ftA-wa-19F" secondAttribute="trailing" constant="15" id="jaz-L9-glj"/>
228 <constraint firstItem="eBu-7L-nsx" firstAttribute="top" secondItem="ftA-wa-19F" secondAttribute="bottom" constant="10" id="lF2-iL-Xa6"/>
229 <constraint firstItem="ubS-v9-zCa" firstAttribute="top" secondItem="eBu-7L-nsx" secondAttribute="bottom" constant="15" id="ofF-9P-pq9"/>
230 <constraint firstItem="hhh-nO-yn5" firstAttribute="top" secondItem="vxT-xe-7mV" secondAttribute="bottom" constant="8" id="qIL-RX-3zl"/>
231 <constraint firstAttribute="trailing" secondItem="dtD-J5-dze" secondAttribute="trailing" constant="15" id="uHa-ot-bT0"/>
232 </constraints>
233 <point key="canvasLocation" x="24.5" y="52.5"/>
234 </view>
235 </objects>
236 <resources>
237 <image name="arrow_down" width="28" height="18"/>
238 <image name="icon_menu" width="30" height="30"/>
239 <image name="today_back_button" width="73" height="37"/>
240 </resources>
241 </document>
1 <?xml version="1.0" encoding="UTF-8"?> 242
LifeLog/LifeLog/RankingViewController.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="12121" systemVersion="16A323" 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="12089"/> 7 <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
8 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> 8 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9 </dependencies> 9 </dependencies>
10 <objects> 10 <objects>
11 <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="RankingViewController"> 11 <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="RankingViewController">
12 <connections> 12 <connections>
13 <outlet property="tableRank" destination="R3A-K9-MFe" id="uEX-sL-6D2"/> 13 <outlet property="tableRank" destination="R3A-K9-MFe" id="uEX-sL-6D2"/>
14 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> 14 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
15 <outlet property="viewCollectionMode" destination="B33-xX-Jro" id="HP4-Xb-LJm"/> 15 <outlet property="viewCollectionMode" destination="B33-xX-Jro" id="HP4-Xb-LJm"/>
16 <outlet property="viewCollectionTime" destination="syA-uK-pbr" id="WdA-Cq-Flj"/> 16 <outlet property="viewCollectionTime" destination="syA-uK-pbr" id="WdA-Cq-Flj"/>
17 <outlet property="viewCollectionType" destination="oUo-Eo-tz5" id="bjw-El-34G"/> 17 <outlet property="viewCollectionType" destination="oUo-Eo-tz5" id="bjw-El-34G"/>
18 </connections> 18 </connections>
19 </placeholder> 19 </placeholder>
20 <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> 20 <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
21 <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> 21 <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
22 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> 22 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
23 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> 23 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
24 <subviews> 24 <subviews>
25 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GBx-lY-9YI" userLabel="ViewHeader"> 25 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GBx-lY-9YI" userLabel="ViewHeader">
26 <rect key="frame" x="0.0" y="0.0" width="375" height="46"/> 26 <rect key="frame" x="0.0" y="0.0" width="375" height="46"/>
27 <subviews> 27 <subviews>
28 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ランキング" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p97-40-8m9" customClass="AutoTransLabel"> 28 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ランキング" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p97-40-8m9" customClass="AutoTransLabel">
29 <rect key="frame" x="0.0" y="0.0" width="375" height="46"/> 29 <rect key="frame" x="0.0" y="0.0" width="375" height="46"/>
30 <fontDescription key="fontDescription" type="system" pointSize="17"/> 30 <fontDescription key="fontDescription" type="system" pointSize="17"/>
31 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 31 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
32 <nil key="highlightedColor"/> 32 <nil key="highlightedColor"/>
33 <userDefinedRuntimeAttributes> 33 <userDefinedRuntimeAttributes>
34 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.rank.title"/> 34 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.rank.title"/>
35 </userDefinedRuntimeAttributes> 35 </userDefinedRuntimeAttributes>
36 </label> 36 </label>
37 <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qPe-ff-jRp"> 37 <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qPe-ff-jRp">
38 <rect key="frame" x="0.0" y="5" width="70" height="36"/> 38 <rect key="frame" x="0.0" y="5" width="70" height="36"/>
39 <constraints> 39 <constraints>
40 <constraint firstAttribute="width" constant="70" id="bEy-jt-69Q"/> 40 <constraint firstAttribute="width" constant="70" id="bEy-jt-69Q"/>
41 </constraints> 41 </constraints>
42 <state key="normal" image="today_back_button"/> 42 <state key="normal" image="today_back_button"/>
43 </button> 43 </button>
44 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WGc-2i-Swk"> 44 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WGc-2i-Swk">
45 <rect key="frame" x="330" y="0.0" width="45" height="46"/> 45 <rect key="frame" x="330" y="0.0" width="45" height="46"/>
46 <constraints> 46 <constraints>
47 <constraint firstAttribute="width" constant="45" id="nJ2-jH-Z45"/> 47 <constraint firstAttribute="width" constant="45" id="nJ2-jH-Z45"/>
48 </constraints> 48 </constraints>
49 <state key="normal" image="icon_menu"/> 49 <state key="normal" image="icon_menu"/>
50 </button> 50 </button>
51 </subviews> 51 </subviews>
52 <color key="backgroundColor" red="0.098039215690000001" green="0.098039215690000001" blue="0.098039215690000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> 52 <color key="backgroundColor" red="0.098039215690000001" green="0.098039215690000001" blue="0.098039215690000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
53 <constraints> 53 <constraints>
54 <constraint firstAttribute="bottom" secondItem="WGc-2i-Swk" secondAttribute="bottom" id="0hd-fk-kJG"/> 54 <constraint firstAttribute="bottom" secondItem="WGc-2i-Swk" secondAttribute="bottom" id="0hd-fk-kJG"/>
55 <constraint firstAttribute="bottom" secondItem="p97-40-8m9" secondAttribute="bottom" id="78G-b2-wAu"/> 55 <constraint firstAttribute="bottom" secondItem="p97-40-8m9" secondAttribute="bottom" id="78G-b2-wAu"/>
56 <constraint firstItem="qPe-ff-jRp" firstAttribute="leading" secondItem="GBx-lY-9YI" secondAttribute="leading" id="9ND-Te-qX9"/> 56 <constraint firstItem="qPe-ff-jRp" firstAttribute="leading" secondItem="GBx-lY-9YI" secondAttribute="leading" id="9ND-Te-qX9"/>
57 <constraint firstItem="qPe-ff-jRp" firstAttribute="top" secondItem="GBx-lY-9YI" secondAttribute="top" constant="5" id="9ZX-A3-Bnp"/> 57 <constraint firstItem="qPe-ff-jRp" firstAttribute="top" secondItem="GBx-lY-9YI" secondAttribute="top" constant="5" id="9ZX-A3-Bnp"/>
58 <constraint firstItem="p97-40-8m9" firstAttribute="top" secondItem="GBx-lY-9YI" secondAttribute="top" id="CVN-ke-5KK"/> 58 <constraint firstItem="p97-40-8m9" firstAttribute="top" secondItem="GBx-lY-9YI" secondAttribute="top" id="CVN-ke-5KK"/>
59 <constraint firstAttribute="height" constant="46" id="SDI-ij-KbH"/> 59 <constraint firstAttribute="height" constant="46" id="SDI-ij-KbH"/>
60 <constraint firstItem="p97-40-8m9" firstAttribute="leading" secondItem="GBx-lY-9YI" secondAttribute="leading" id="U19-fM-q7G"/> 60 <constraint firstItem="p97-40-8m9" firstAttribute="leading" secondItem="GBx-lY-9YI" secondAttribute="leading" id="U19-fM-q7G"/>
61 <constraint firstAttribute="bottom" secondItem="qPe-ff-jRp" secondAttribute="bottom" constant="5" id="jU7-xM-YKX"/> 61 <constraint firstAttribute="bottom" secondItem="qPe-ff-jRp" secondAttribute="bottom" constant="5" id="jU7-xM-YKX"/>
62 <constraint firstItem="WGc-2i-Swk" firstAttribute="top" secondItem="GBx-lY-9YI" secondAttribute="top" id="knL-Yf-VTN"/> 62 <constraint firstItem="WGc-2i-Swk" firstAttribute="top" secondItem="GBx-lY-9YI" secondAttribute="top" id="knL-Yf-VTN"/>
63 <constraint firstAttribute="trailing" secondItem="p97-40-8m9" secondAttribute="trailing" id="sLL-ca-92S"/> 63 <constraint firstAttribute="trailing" secondItem="p97-40-8m9" secondAttribute="trailing" id="sLL-ca-92S"/>
64 <constraint firstAttribute="trailing" secondItem="WGc-2i-Swk" secondAttribute="trailing" id="v0h-pb-83W"/> 64 <constraint firstAttribute="trailing" secondItem="WGc-2i-Swk" secondAttribute="trailing" id="v0h-pb-83W"/>
65 </constraints> 65 </constraints>
66 </view> 66 </view>
67 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="syA-uK-pbr" customClass="CollectionView"> 67 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="syA-uK-pbr" customClass="CollectionView">
68 <rect key="frame" x="0.0" y="46" width="375" height="30"/> 68 <rect key="frame" x="0.0" y="46" width="375" height="30"/>
69 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 69 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
70 <constraints> 70 <constraints>
71 <constraint firstAttribute="height" constant="30" id="ezW-Qs-M7K"/> 71 <constraint firstAttribute="height" constant="30" id="ezW-Qs-M7K"/>
72 </constraints> 72 </constraints>
73 </view> 73 </view>
74 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="B33-xX-Jro" customClass="CollectionView"> 74 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="B33-xX-Jro" customClass="CollectionView">
75 <rect key="frame" x="0.0" y="116" width="375" height="30"/> 75 <rect key="frame" x="0.0" y="116" width="375" height="30"/>
76 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 76 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
77 <constraints> 77 <constraints>
78 <constraint firstAttribute="height" constant="30" id="snn-FM-11r"/> 78 <constraint firstAttribute="height" constant="30" id="snn-FM-11r"/>
79 </constraints> 79 </constraints>
80 </view> 80 </view>
81 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="u5D-xz-8dK"> 81 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="u5D-xz-8dK">
82 <rect key="frame" x="0.0" y="76" width="375" height="40"/> 82 <rect key="frame" x="0.0" y="76" width="375" height="40"/>
83 <subviews> 83 <subviews>
84 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5Ro-k6-fvT"> 84 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5Ro-k6-fvT">
85 <rect key="frame" x="0.0" y="0.0" width="375" height="40"/> 85 <rect key="frame" x="0.0" y="0.0" width="375" height="40"/>
86 <string key="text" base64-UTF8="YES"> 86 <string key="text" base64-UTF8="YES">
87 MjAxNuW5tCAx5pyIMjLml6XjgIDvvI3jgIAyMDE35bm0IDHmnIgyMeaXpQ0KAA 87 MjAxNuW5tCAx5pyIMjLml6XjgIDvvI3jgIAyMDE35bm0IDHmnIgyMeaXpQ0KAA
88 </string> 88 </string>
89 <fontDescription key="fontDescription" type="system" pointSize="13"/> 89 <fontDescription key="fontDescription" type="system" pointSize="13"/>
90 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 90 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
91 <nil key="highlightedColor"/> 91 <nil key="highlightedColor"/>
92 </label> 92 </label>
93 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eiH-Sk-3VV"> 93 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eiH-Sk-3VV">
94 <rect key="frame" x="15" y="5" width="30" height="30"/> 94 <rect key="frame" x="15" y="5" width="30" height="30"/>
95 <constraints> 95 <constraints>
96 <constraint firstAttribute="height" constant="30" id="kEd-sQ-0ub"/> 96 <constraint firstAttribute="height" constant="30" id="kEd-sQ-0ub"/>
97 <constraint firstAttribute="width" constant="30" id="sFT-sr-7pL"/> 97 <constraint firstAttribute="width" constant="30" id="sFT-sr-7pL"/>
98 </constraints> 98 </constraints>
99 <state key="normal" image="icon_left"/> 99 <state key="normal" image="icon_left"/>
100 <connections> 100 <connections>
101 <action selector="clickButton:" destination="-1" eventType="touchUpInside" id="f1Y-rj-F7d"/> 101 <action selector="clickButton:" destination="-1" eventType="touchUpInside" id="f1Y-rj-F7d"/>
102 </connections> 102 </connections>
103 </button> 103 </button>
104 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Usl-Cl-d9d"> 104 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Usl-Cl-d9d">
105 <rect key="frame" x="330" y="5" width="30" height="30"/> 105 <rect key="frame" x="330" y="5" width="30" height="30"/>
106 <constraints> 106 <constraints>
107 <constraint firstAttribute="width" constant="30" id="uFf-AY-LsL"/> 107 <constraint firstAttribute="width" constant="30" id="uFf-AY-LsL"/>
108 <constraint firstAttribute="height" constant="30" id="v8w-hV-CY1"/> 108 <constraint firstAttribute="height" constant="30" id="v8w-hV-CY1"/>
109 </constraints> 109 </constraints>
110 <state key="normal" image="icon_right"/> 110 <state key="normal" image="icon_right"/>
111 <connections> 111 <connections>
112 <action selector="clickButton:" destination="-1" eventType="touchUpInside" id="OB1-mE-CGE"/> 112 <action selector="clickButton:" destination="-1" eventType="touchUpInside" id="OB1-mE-CGE"/>
113 </connections> 113 </connections>
114 </button> 114 </button>
115 </subviews> 115 </subviews>
116 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 116 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
117 <constraints> 117 <constraints>
118 <constraint firstAttribute="height" constant="40" id="C5o-Zd-KjG"/> 118 <constraint firstAttribute="height" constant="40" id="C5o-Zd-KjG"/>
119 <constraint firstAttribute="bottom" secondItem="5Ro-k6-fvT" secondAttribute="bottom" id="DQQ-wh-s1Q"/> 119 <constraint firstAttribute="bottom" secondItem="5Ro-k6-fvT" secondAttribute="bottom" id="DQQ-wh-s1Q"/>
120 <constraint firstAttribute="trailing" secondItem="5Ro-k6-fvT" secondAttribute="trailing" id="E0c-bJ-AIi"/> 120 <constraint firstAttribute="trailing" secondItem="5Ro-k6-fvT" secondAttribute="trailing" id="E0c-bJ-AIi"/>
121 <constraint firstItem="5Ro-k6-fvT" firstAttribute="top" secondItem="u5D-xz-8dK" secondAttribute="top" id="Mrk-FC-rqh"/> 121 <constraint firstItem="5Ro-k6-fvT" firstAttribute="top" secondItem="u5D-xz-8dK" secondAttribute="top" id="Mrk-FC-rqh"/>
122 <constraint firstItem="eiH-Sk-3VV" firstAttribute="centerY" secondItem="u5D-xz-8dK" secondAttribute="centerY" id="k2J-Lc-ZDI"/> 122 <constraint firstItem="eiH-Sk-3VV" firstAttribute="centerY" secondItem="u5D-xz-8dK" secondAttribute="centerY" id="k2J-Lc-ZDI"/>
123 <constraint firstItem="5Ro-k6-fvT" firstAttribute="leading" secondItem="u5D-xz-8dK" secondAttribute="leading" id="rj5-0J-xs3"/> 123 <constraint firstItem="5Ro-k6-fvT" firstAttribute="leading" secondItem="u5D-xz-8dK" secondAttribute="leading" id="rj5-0J-xs3"/>
124 <constraint firstItem="Usl-Cl-d9d" firstAttribute="centerY" secondItem="u5D-xz-8dK" secondAttribute="centerY" id="sJX-n3-1pz"/> 124 <constraint firstItem="Usl-Cl-d9d" firstAttribute="centerY" secondItem="u5D-xz-8dK" secondAttribute="centerY" id="sJX-n3-1pz"/>
125 <constraint firstItem="eiH-Sk-3VV" firstAttribute="leading" secondItem="u5D-xz-8dK" secondAttribute="leading" constant="15" id="to7-WU-7xo"/> 125 <constraint firstItem="eiH-Sk-3VV" firstAttribute="leading" secondItem="u5D-xz-8dK" secondAttribute="leading" constant="15" id="to7-WU-7xo"/>
126 <constraint firstAttribute="trailing" secondItem="Usl-Cl-d9d" secondAttribute="trailing" constant="15" id="yDF-9k-XlW"/> 126 <constraint firstAttribute="trailing" secondItem="Usl-Cl-d9d" secondAttribute="trailing" constant="15" id="yDF-9k-XlW"/>
127 </constraints> 127 </constraints>
128 </view> 128 </view>
129 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oUo-Eo-tz5" customClass="CollectionView"> 129 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oUo-Eo-tz5" customClass="CollectionView">
130 <rect key="frame" x="0.0" y="577" width="375" height="40"/> 130 <rect key="frame" x="0.0" y="577" width="375" height="40"/>
131 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 131 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
132 <constraints> 132 <constraints>
133 <constraint firstAttribute="height" constant="40" id="Trr-Ku-Ssy"/> 133 <constraint firstAttribute="height" constant="40" id="Trr-Ku-Ssy"/>
134 </constraints> 134 </constraints>
135 </view> 135 </view>
136 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" rowHeight="80" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="R3A-K9-MFe"> 136 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" rowHeight="80" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="R3A-K9-MFe">
137 <rect key="frame" x="0.0" y="147" width="375" height="429"/> 137 <rect key="frame" x="0.0" y="147" width="375" height="429"/>
138 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 138 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
139 <color key="separatorColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 139 <color key="separatorColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
140 <connections> 140 <connections>
141 <outlet property="dataSource" destination="-1" id="JJX-cg-LPL"/> 141 <outlet property="dataSource" destination="-1" id="JJX-cg-LPL"/>
142 <outlet property="delegate" destination="-1" id="u0m-93-lsi"/> 142 <outlet property="delegate" destination="-1" id="u0m-93-lsi"/>
143 </connections> 143 </connections>
144 </tableView> 144 </tableView>
145 </subviews> 145 </subviews>
146 <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> 146 <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
147 <constraints> 147 <constraints>
148 <constraint firstItem="B33-xX-Jro" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="2Mu-hy-FVU"/> 148 <constraint firstItem="B33-xX-Jro" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="2Mu-hy-FVU"/>
149 <constraint firstItem="GBx-lY-9YI" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="5CL-wT-MBg"/> 149 <constraint firstItem="GBx-lY-9YI" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="5CL-wT-MBg"/>
150 <constraint firstItem="u5D-xz-8dK" firstAttribute="top" secondItem="syA-uK-pbr" secondAttribute="bottom" id="5uu-dZ-oXI"/> 150 <constraint firstItem="u5D-xz-8dK" firstAttribute="top" secondItem="syA-uK-pbr" secondAttribute="bottom" id="5uu-dZ-oXI"/>
151 <constraint firstItem="syA-uK-pbr" firstAttribute="top" secondItem="GBx-lY-9YI" secondAttribute="bottom" id="6FQ-vy-d4N"/> 151 <constraint firstItem="syA-uK-pbr" firstAttribute="top" secondItem="GBx-lY-9YI" secondAttribute="bottom" id="6FQ-vy-d4N"/>
152 <constraint firstItem="u5D-xz-8dK" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="75z-RN-ObF"/> 152 <constraint firstItem="u5D-xz-8dK" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="75z-RN-ObF"/>
153 <constraint firstItem="R3A-K9-MFe" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="LyL-9p-qcd"/> 153 <constraint firstItem="R3A-K9-MFe" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="LyL-9p-qcd"/>
154 <constraint firstItem="oUo-Eo-tz5" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="M7I-ue-lip"/> 154 <constraint firstItem="oUo-Eo-tz5" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="M7I-ue-lip"/>
155 <constraint firstAttribute="trailing" secondItem="B33-xX-Jro" secondAttribute="trailing" id="Pjd-Ay-GaV"/> 155 <constraint firstAttribute="trailing" secondItem="B33-xX-Jro" secondAttribute="trailing" id="Pjd-Ay-GaV"/>
156 <constraint firstItem="oUo-Eo-tz5" firstAttribute="top" secondItem="R3A-K9-MFe" secondAttribute="bottom" constant="1" id="QMu-aq-2Zt"/> 156 <constraint firstItem="oUo-Eo-tz5" firstAttribute="top" secondItem="R3A-K9-MFe" secondAttribute="bottom" constant="1" id="QMu-aq-2Zt"/>
157 <constraint firstAttribute="trailing" secondItem="syA-uK-pbr" secondAttribute="trailing" id="Qnl-Pp-y2G"/> 157 <constraint firstAttribute="trailing" secondItem="syA-uK-pbr" secondAttribute="trailing" id="Qnl-Pp-y2G"/>
158 <constraint firstItem="B33-xX-Jro" firstAttribute="top" secondItem="u5D-xz-8dK" secondAttribute="bottom" id="VOl-jo-wU3"/> 158 <constraint firstItem="B33-xX-Jro" firstAttribute="top" secondItem="u5D-xz-8dK" secondAttribute="bottom" id="VOl-jo-wU3"/>
159 <constraint firstItem="GBx-lY-9YI" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="YjB-ef-xTt"/> 159 <constraint firstItem="GBx-lY-9YI" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="YjB-ef-xTt"/>
160 <constraint firstItem="syA-uK-pbr" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="aTf-mb-wlT"/> 160 <constraint firstItem="syA-uK-pbr" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="aTf-mb-wlT"/>
161 <constraint firstAttribute="bottom" secondItem="oUo-Eo-tz5" secondAttribute="bottom" constant="50" id="cux-Vm-qq7"/> 161 <constraint firstAttribute="bottom" secondItem="oUo-Eo-tz5" secondAttribute="bottom" constant="50" id="cux-Vm-qq7"/>
162 <constraint firstAttribute="trailing" secondItem="R3A-K9-MFe" secondAttribute="trailing" id="jBn-JI-SQP"/> 162 <constraint firstAttribute="trailing" secondItem="R3A-K9-MFe" secondAttribute="trailing" id="jBn-JI-SQP"/>
163 <constraint firstItem="R3A-K9-MFe" firstAttribute="top" secondItem="B33-xX-Jro" secondAttribute="bottom" constant="1" id="jTi-59-XsZ"/> 163 <constraint firstItem="R3A-K9-MFe" firstAttribute="top" secondItem="B33-xX-Jro" secondAttribute="bottom" constant="1" id="jTi-59-XsZ"/>
164 <constraint firstAttribute="trailing" secondItem="u5D-xz-8dK" secondAttribute="trailing" id="mDB-o3-gtA"/> 164 <constraint firstAttribute="trailing" secondItem="u5D-xz-8dK" secondAttribute="trailing" id="mDB-o3-gtA"/>
165 <constraint firstAttribute="trailing" secondItem="GBx-lY-9YI" secondAttribute="trailing" id="yaf-8r-ySL"/> 165 <constraint firstAttribute="trailing" secondItem="GBx-lY-9YI" secondAttribute="trailing" id="yaf-8r-ySL"/>
166 <constraint firstAttribute="trailing" secondItem="oUo-Eo-tz5" secondAttribute="trailing" id="zkl-by-qMp"/> 166 <constraint firstAttribute="trailing" secondItem="oUo-Eo-tz5" secondAttribute="trailing" id="zkl-by-qMp"/>
167 </constraints> 167 </constraints>
168 <point key="canvasLocation" x="26.5" y="52.5"/> 168 <point key="canvasLocation" x="26.5" y="52.5"/>
169 </view> 169 </view>
170 </objects> 170 </objects>
171 <resources> 171 <resources>
172 <image name="icon_left" width="30" height="30"/> 172 <image name="icon_left" width="30" height="30"/>
173 <image name="icon_menu" width="30" height="30"/> 173 <image name="icon_menu" width="30" height="30"/>
174 <image name="icon_right" width="30" height="30"/> 174 <image name="icon_right" width="30" height="30"/>
175 <image name="today_back_button" width="73" height="37"/> 175 <image name="today_back_button" width="73" height="37"/>
176 </resources> 176 </resources>
177 </document> 177 </document>
178 178
LifeLog/LifeLog/SNSViewController.m
1 // 1 //
2 // SNSViewController.m 2 // SNSViewController.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 "SNSViewController.h" 9 #import "SNSViewController.h"
10 10
11 #import <SDWebImage/UIImageView+WebCache.h> 11 #import <SDWebImage/UIImageView+WebCache.h>
12 12
13 #import "ServerAPI.h" 13 #import "ServerAPI.h"
14 #import "Utilities.h" 14 #import "Utilities.h"
15 15
16 #import "SNSRecentTopicTableViewCell.h" 16 #import "SNSRecentTopicTableViewCell.h"
17 #import "MyGroupViewController.h"
17 #import "MyGroupViewController.h" 18 #import "SearchGroupViewController.h"
18 #import "SearchGroupViewController.h" 19 #import "GroupDetailViewController.h"
19 #import "GroupDetailViewController.h" 20
20 21 @interface SNSViewController ()
21 @interface SNSViewController () 22
22 23 @end
23 @end 24
24 25 @implementation SNSViewController
25 @implementation SNSViewController 26
26 27 - (void)viewDidLoad {
27 - (void)viewDidLoad { 28 [super viewDidLoad];
28 [super viewDidLoad]; 29 // Do any additional setup after loading the view from its nib.
29 // Do any additional setup after loading the view from its nib. 30 self.title = NSLocalizedString(@"lifelog.tapbar.sns", nil);
30 self.title = NSLocalizedString(@"lifelog.tapbar.sns", nil); 31
31 32 [self callRequestToUpdateData];
32 [self callRequestToUpdateData]; 33
33 34 //register nib for table view
34 //register nib for table view 35 [self.tableBase registerNib:[UINib nibWithNibName:@"SNSRecentTopicTableViewCell" bundle:nil] forCellReuseIdentifier:@"RecentTopicCell"];
35 [self.tableBase registerNib:[UINib nibWithNibName:@"SNSRecentTopicTableViewCell" bundle:nil] forCellReuseIdentifier:@"RecentTopicCell"]; 36 }
36 } 37
37 38 - (void)didReceiveMemoryWarning {
38 - (void)didReceiveMemoryWarning { 39 [super didReceiveMemoryWarning];
39 [super didReceiveMemoryWarning]; 40 // Dispose of any resources that can be recreated.
40 // Dispose of any resources that can be recreated. 41 }
41 } 42
42 43 #pragma mark IBAction
43 #pragma mark IBAction 44 - (IBAction)clickRecommendGroup:(id)sender {
44 - (IBAction)clickRecommendGroup:(id)sender { 45 SearchGroupViewController * search = [[SearchGroupViewController alloc] init];
45 SearchGroupViewController * search = [[SearchGroupViewController alloc] init]; 46 [self.navigationController pushViewController:search animated:true];
46 [self.navigationController pushViewController:search animated:true]; 47 }
47 } 48
48 49 - (IBAction)clickMyGroup:(id)sender {
49 - (IBAction)clickMyGroup:(id)sender { 50 MyGroupViewController * myGrp = [[MyGroupViewController alloc] init];
50 MyGroupViewController * myGrp = [[MyGroupViewController alloc] init]; 51 [self.navigationController pushViewController:myGrp animated:true];
51 [self.navigationController pushViewController:myGrp animated:true]; 52 }
52 } 53
53 54 #pragma mark UITableView Delegate
54 #pragma mark UITableView Delegate 55 - (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
55 - (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 56 SNSRecentTopicTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"RecentTopicCell"];
56 SNSRecentTopicTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"RecentTopicCell"]; 57 TweetObject *object = [_curDataList objectAtIndex:indexPath.row];
57 TweetObject *object = [_curDataList objectAtIndex:indexPath.row]; 58 if(object.avatar && ![object.avatar isKindOfClass:[NSNull class]]) {
58 if(object.avatar && ![object.avatar isKindOfClass:[NSNull class]]) { 59 [cell.imgAvatar sd_setImageWithURL:[NSURL URLWithString:[Utilities getImageLink:object.avatar]]];
59 [cell.imgAvatar sd_setImageWithURL:[NSURL URLWithString:[Utilities getImageLink:object.avatar]]]; 60 }
60 } 61 else {
62 [cell.imgAvatar setImage:[UIImage imageNamed:@"avatar_default"]];
63 }
64 cell.lblDateTime.text = [Utilities stringFromDate:object.createDate withFormat:@"YYYY/MM/dd hh:mm" locale:@""];
61 else { 65 cell.lblUsername.text = object.userName;
62 [cell.imgAvatar setImage:[UIImage imageNamed:@"avatar_default"]]; 66 cell.lblDes.text = object.content;
63 } 67 cell.lblMode.text = object.mode;
64 cell.lblDateTime.text = [Utilities stringFromDate:object.createDate withFormat:@"YYYY/MM/dd hh:mm"]; 68 cell.lblDistance.text = [NSString stringWithFormat:@"%.0f m", object.distance];
65 cell.lblUsername.text = object.userName; 69 cell.lblDuration.text = object.time;
66 cell.lblDes.text = object.content; 70 return cell;
67 cell.lblMode.text = object.mode; 71 }
68 cell.lblDistance.text = [NSString stringWithFormat:@"%.0f m", object.distance]; 72
69 cell.lblDuration.text = object.time; 73 #pragma mark Private Function
70 return cell; 74
71 } 75 -(void) callRequestToUpdateData {
72 76 [super callRequestToUpdateData];
73 #pragma mark Private Function 77
74 78 NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken];
75 -(void) callRequestToUpdateData { 79 MBProgressHUD *hudView = nil;
76 [super callRequestToUpdateData]; 80 if(_curPage == 1 && !self.refreshControl.isRefreshing) {
77 81 hudView = [MBProgressHUD showHUDAddedTo:self.view animated:true];
78 NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken]; 82 }
79 MBProgressHUD *hudView = nil; 83 [[ServerAPI server] requestTweetsList:token groupID:-1 withPage:_curPage CompletionHandler:^(NSArray *array, NSError *error){
80 if(_curPage == 1 && !self.refreshControl.isRefreshing) { 84 dispatch_async(dispatch_get_main_queue(), ^{
81 hudView = [MBProgressHUD showHUDAddedTo:self.view animated:true]; 85 if(hudView != nil) {
82 } 86 [hudView hideAnimated:true];
83 [[ServerAPI server] requestTweetsList:token groupID:-1 withPage:_curPage CompletionHandler:^(NSArray *array, NSError *error){ 87 }
84 dispatch_async(dispatch_get_main_queue(), ^{ 88 });
85 if(hudView != nil) { 89 SNSViewController __weak *weakSelf = self;
86 [hudView hideAnimated:true]; 90 [weakSelf updateTableData:array error:error];
87 } 91 }];
88 }); 92 }
89 SNSViewController __weak *weakSelf = self; 93
90 [weakSelf updateTableData:array error:error]; 94 @end
91 }]; 95
LifeLog/LifeLog/SNSViewController.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="12118" systemVersion="16D32" 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="12086"/>
8 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> 8 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9 </dependencies> 9 </dependencies>
10 <objects> 10 <objects>
11 <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SNSViewController"> 11 <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SNSViewController">
12 <connections> 12 <connections>
13 <outlet property="tableBase" destination="KcG-O5-UhK" id="gDL-iU-n52"/> 13 <outlet property="tableBase" destination="KcG-O5-UhK" id="gDL-iU-n52"/>
14 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> 14 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
15 </connections> 15 </connections>
16 </placeholder> 16 </placeholder>
17 <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> 17 <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
18 <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> 18 <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
19 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> 19 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
20 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> 20 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
21 <subviews> 21 <subviews>
22 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="O4Q-H0-WBO" userLabel="ViewHeader"> 22 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="O4Q-H0-WBO" userLabel="ViewHeader">
23 <rect key="frame" x="0.0" y="0.0" width="375" height="46"/> 23 <rect key="frame" x="0.0" y="0.0" width="375" height="46"/>
24 <subviews> 24 <subviews>
25 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SNS" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="afS-51-Q5Z" customClass="AutoTransLabel"> 25 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SNS" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="afS-51-Q5Z" customClass="AutoTransLabel">
26 <rect key="frame" x="0.0" y="0.0" width="375" height="46"/> 26 <rect key="frame" x="0.0" y="0.0" width="375" height="46"/>
27 <fontDescription key="fontDescription" type="system" pointSize="17"/> 27 <fontDescription key="fontDescription" type="system" pointSize="17"/>
28 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 28 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
29 <nil key="highlightedColor"/> 29 <nil key="highlightedColor"/>
30 <userDefinedRuntimeAttributes> 30 <userDefinedRuntimeAttributes>
31 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.sns.title"/> 31 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.sns.title"/>
32 </userDefinedRuntimeAttributes> 32 </userDefinedRuntimeAttributes>
33 </label> 33 </label>
34 <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BIE-oM-ejb"> 34 <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BIE-oM-ejb">
35 <rect key="frame" x="0.0" y="5" width="70" height="36"/> 35 <rect key="frame" x="0.0" y="5" width="70" height="36"/>
36 <constraints> 36 <constraints>
37 <constraint firstAttribute="width" constant="70" id="ZpD-Ru-8wG"/> 37 <constraint firstAttribute="width" constant="70" id="ZpD-Ru-8wG"/>
38 </constraints> 38 </constraints>
39 <state key="normal" image="today_back_button"/> 39 <state key="normal" image="today_back_button"/>
40 </button> 40 </button>
41 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CJn-w1-o2o"> 41 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CJn-w1-o2o">
42 <rect key="frame" x="330" y="0.0" width="45" height="46"/> 42 <rect key="frame" x="330" y="0.0" width="45" height="46"/>
43 <constraints> 43 <constraints>
44 <constraint firstAttribute="width" constant="45" id="5jv-6w-JAE"/> 44 <constraint firstAttribute="width" constant="45" id="5jv-6w-JAE"/>
45 </constraints> 45 </constraints>
46 <state key="normal" image="icon_menu"/> 46 <state key="normal" image="icon_menu"/>
47 </button> 47 </button>
48 </subviews> 48 </subviews>
49 <color key="backgroundColor" red="0.098039215690000001" green="0.098039215690000001" blue="0.098039215690000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> 49 <color key="backgroundColor" red="0.098039215690000001" green="0.098039215690000001" blue="0.098039215690000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
50 <constraints> 50 <constraints>
51 <constraint firstItem="CJn-w1-o2o" firstAttribute="top" secondItem="O4Q-H0-WBO" secondAttribute="top" id="1zI-mI-RXX"/> 51 <constraint firstItem="CJn-w1-o2o" firstAttribute="top" secondItem="O4Q-H0-WBO" secondAttribute="top" id="1zI-mI-RXX"/>
52 <constraint firstAttribute="trailing" secondItem="afS-51-Q5Z" secondAttribute="trailing" id="7I5-1M-8AE"/> 52 <constraint firstAttribute="trailing" secondItem="afS-51-Q5Z" secondAttribute="trailing" id="7I5-1M-8AE"/>
53 <constraint firstItem="afS-51-Q5Z" firstAttribute="leading" secondItem="O4Q-H0-WBO" secondAttribute="leading" id="IEr-WN-6MO"/> 53 <constraint firstItem="afS-51-Q5Z" firstAttribute="leading" secondItem="O4Q-H0-WBO" secondAttribute="leading" id="IEr-WN-6MO"/>
54 <constraint firstAttribute="bottom" secondItem="afS-51-Q5Z" secondAttribute="bottom" id="LNL-Mo-g5c"/> 54 <constraint firstAttribute="bottom" secondItem="afS-51-Q5Z" secondAttribute="bottom" id="LNL-Mo-g5c"/>
55 <constraint firstItem="BIE-oM-ejb" firstAttribute="leading" secondItem="O4Q-H0-WBO" secondAttribute="leading" id="O9H-bB-I0V"/> 55 <constraint firstItem="BIE-oM-ejb" firstAttribute="leading" secondItem="O4Q-H0-WBO" secondAttribute="leading" id="O9H-bB-I0V"/>
56 <constraint firstAttribute="height" constant="46" id="Pmw-mV-DhU"/> 56 <constraint firstAttribute="height" constant="46" id="Pmw-mV-DhU"/>
57 <constraint firstAttribute="bottom" secondItem="CJn-w1-o2o" secondAttribute="bottom" id="Xmh-Qg-N81"/> 57 <constraint firstAttribute="bottom" secondItem="CJn-w1-o2o" secondAttribute="bottom" id="Xmh-Qg-N81"/>
58 <constraint firstAttribute="trailing" secondItem="CJn-w1-o2o" secondAttribute="trailing" id="l2g-NC-l1f"/> 58 <constraint firstAttribute="trailing" secondItem="CJn-w1-o2o" secondAttribute="trailing" id="l2g-NC-l1f"/>
59 <constraint firstAttribute="bottom" secondItem="BIE-oM-ejb" secondAttribute="bottom" constant="5" id="lwA-7z-Gi9"/> 59 <constraint firstAttribute="bottom" secondItem="BIE-oM-ejb" secondAttribute="bottom" constant="5" id="lwA-7z-Gi9"/>
60 <constraint firstItem="BIE-oM-ejb" firstAttribute="top" secondItem="O4Q-H0-WBO" secondAttribute="top" constant="5" id="r6e-SB-lb7"/> 60 <constraint firstItem="BIE-oM-ejb" firstAttribute="top" secondItem="O4Q-H0-WBO" secondAttribute="top" constant="5" id="r6e-SB-lb7"/>
61 <constraint firstItem="afS-51-Q5Z" firstAttribute="top" secondItem="O4Q-H0-WBO" secondAttribute="top" id="vAx-Bu-CLe"/> 61 <constraint firstItem="afS-51-Q5Z" firstAttribute="top" secondItem="O4Q-H0-WBO" secondAttribute="top" id="vAx-Bu-CLe"/>
62 </constraints> 62 </constraints>
63 </view> 63 </view>
64 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5ZL-zf-geZ" customClass="AutoTransButton"> 64 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5ZL-zf-geZ" customClass="AutoTransButton">
65 <rect key="frame" x="20" y="76" width="335" height="40"/> 65 <rect key="frame" x="20" y="76" width="335" height="40"/>
66 <color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> 66 <color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
67 <constraints> 67 <constraints>
68 <constraint firstAttribute="height" constant="40" id="ATx-eA-hJ1"/> 68 <constraint firstAttribute="height" constant="40" id="ATx-eA-hJ1"/>
69 </constraints> 69 </constraints>
70 <fontDescription key="fontDescription" type="system" pointSize="13"/> 70 <fontDescription key="fontDescription" type="system" pointSize="13"/>
71 <state key="normal"> 71 <state key="normal">
72 <string key="title" base64-UTF8="YES"> 72 <string key="title" base64-UTF8="YES">
73 44Kq44K544K544Oh44Kw44Or44O844OXAA 73 44Kq44K544K544Oh44Kw44Or44O844OXAA
74 </string> 74 </string>
75 <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 75 <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
76 </state> 76 </state>
77 <userDefinedRuntimeAttributes> 77 <userDefinedRuntimeAttributes>
78 <userDefinedRuntimeAttribute type="number" keyPath="layer.corderRadius"> 78 <userDefinedRuntimeAttribute type="number" keyPath="layer.corderRadius">
79 <integer key="value" value="5"/> 79 <integer key="value" value="5"/>
80 </userDefinedRuntimeAttribute> 80 </userDefinedRuntimeAttribute>
81 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.sns.bt.commendgroup"/> 81 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.sns.bt.commendgroup"/>
82 </userDefinedRuntimeAttributes> 82 </userDefinedRuntimeAttributes>
83 <connections> 83 <connections>
84 <action selector="clickRecommendGroup:" destination="-1" eventType="touchUpInside" id="DEw-ej-loH"/> 84 <action selector="clickRecommendGroup:" destination="-1" eventType="touchUpInside" id="DEw-ej-loH"/>
85 </connections> 85 </connections>
86 </button> 86 </button>
87 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uB3-Sm-i6e" customClass="AutoTransButton"> 87 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uB3-Sm-i6e" customClass="AutoTransButton">
88 <rect key="frame" x="20" y="126" width="335" height="40"/> 88 <rect key="frame" x="20" y="126" width="335" height="40"/>
89 <color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> 89 <color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
90 <constraints> 90 <constraints>
91 <constraint firstAttribute="height" constant="40" id="oph-d8-bxh"/> 91 <constraint firstAttribute="height" constant="40" id="oph-d8-bxh"/>
92 </constraints> 92 </constraints>
93 <fontDescription key="fontDescription" type="system" pointSize="13"/> 93 <fontDescription key="fontDescription" type="system" pointSize="13"/>
94 <state key="normal"> 94 <state key="normal">
95 <string key="title" base64-UTF8="YES"> 95 <string key="title" base64-UTF8="YES">
96 44Oe44Kk44Kw44Or44O844OXAA 96 44Oe44Kk44Kw44Or44O844OXAA
97 </string> 97 </string>
98 <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 98 <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
99 </state> 99 </state>
100 <userDefinedRuntimeAttributes> 100 <userDefinedRuntimeAttributes>
101 <userDefinedRuntimeAttribute type="number" keyPath="layer.corderRadius"> 101 <userDefinedRuntimeAttribute type="number" keyPath="layer.corderRadius">
102 <integer key="value" value="5"/> 102 <integer key="value" value="5"/>
103 </userDefinedRuntimeAttribute> 103 </userDefinedRuntimeAttribute>
104 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.sns.bt.mygroup"/> 104 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.sns.bt.mygroup"/>
105 </userDefinedRuntimeAttributes> 105 </userDefinedRuntimeAttributes>
106 <connections> 106 <connections>
107 <action selector="clickMyGroup:" destination="-1" eventType="touchUpInside" id="ph8-DF-WMt"/> 107 <action selector="clickMyGroup:" destination="-1" eventType="touchUpInside" id="ph8-DF-WMt"/>
108 </connections> 108 </connections>
109 </button> 109 </button>
110 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="最近の話題" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zzn-bU-X6s" customClass="AutoTransLabel"> 110 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="最近の話題" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zzn-bU-X6s" customClass="AutoTransLabel">
111 <rect key="frame" x="20" y="226" width="335" height="21"/> 111 <rect key="frame" x="20" y="226" width="335" height="21"/>
112 <constraints> 112 <constraints>
113 <constraint firstAttribute="height" constant="21" id="Gu9-7U-YXF"/> 113 <constraint firstAttribute="height" constant="21" id="Gu9-7U-YXF"/>
114 </constraints> 114 </constraints>
115 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/> 115 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/>
116 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 116 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
117 <nil key="highlightedColor"/> 117 <nil key="highlightedColor"/>
118 <userDefinedRuntimeAttributes> 118 <userDefinedRuntimeAttributes>
119 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.sns.lbl.recent"/> 119 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.sns.lbl.recent"/>
120 </userDefinedRuntimeAttributes> 120 </userDefinedRuntimeAttributes>
121 </label> 121 </label>
122 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="100" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="KcG-O5-UhK"> 122 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="100" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="KcG-O5-UhK">
123 <rect key="frame" x="0.0" y="255" width="375" height="362"/> 123 <rect key="frame" x="0.0" y="255" width="375" height="362"/>
124 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 124 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
125 <connections> 125 <connections>
126 <outlet property="dataSource" destination="-1" id="Y5Y-4y-Bzz"/> 126 <outlet property="dataSource" destination="-1" id="Y5Y-4y-Bzz"/>
127 <outlet property="delegate" destination="-1" id="VCg-Ha-vdk"/> 127 <outlet property="delegate" destination="-1" id="VCg-Ha-vdk"/>
128 </connections> 128 </connections>
129 </tableView> 129 </tableView>
130 </subviews> 130 </subviews>
131 <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> 131 <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
132 <constraints> 132 <constraints>
133 <constraint firstItem="O4Q-H0-WBO" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="0u7-Ks-LSt"/> 133 <constraint firstItem="O4Q-H0-WBO" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="0u7-Ks-LSt"/>
134 <constraint firstAttribute="trailing" secondItem="O4Q-H0-WBO" secondAttribute="trailing" id="2pA-85-kwM"/> 134 <constraint firstAttribute="trailing" secondItem="O4Q-H0-WBO" secondAttribute="trailing" id="2pA-85-kwM"/>
135 <constraint firstItem="zzn-bU-X6s" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="20" id="4Uu-Hd-lEX"/> 135 <constraint firstItem="zzn-bU-X6s" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="20" id="4Uu-Hd-lEX"/>
136 <constraint firstItem="uB3-Sm-i6e" firstAttribute="top" secondItem="5ZL-zf-geZ" secondAttribute="bottom" constant="10" id="BBu-TF-Z8P"/> 136 <constraint firstItem="uB3-Sm-i6e" firstAttribute="top" secondItem="5ZL-zf-geZ" secondAttribute="bottom" constant="10" id="BBu-TF-Z8P"/>
137 <constraint firstItem="O4Q-H0-WBO" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="Ml4-eE-LTb"/> 137 <constraint firstItem="O4Q-H0-WBO" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="Ml4-eE-LTb"/>
138 <constraint firstAttribute="bottom" secondItem="KcG-O5-UhK" secondAttribute="bottom" constant="50" id="O0M-Cr-W0f"/> 138 <constraint firstAttribute="bottom" secondItem="KcG-O5-UhK" secondAttribute="bottom" constant="50" id="O0M-Cr-W0f"/>
139 <constraint firstAttribute="trailing" secondItem="uB3-Sm-i6e" secondAttribute="trailing" constant="20" id="Qu0-ja-Iwx"/> 139 <constraint firstAttribute="trailing" secondItem="uB3-Sm-i6e" secondAttribute="trailing" constant="20" id="Qu0-ja-Iwx"/>
140 <constraint firstAttribute="trailing" secondItem="5ZL-zf-geZ" secondAttribute="trailing" constant="20" id="Sdn-yt-XFa"/> 140 <constraint firstAttribute="trailing" secondItem="5ZL-zf-geZ" secondAttribute="trailing" constant="20" id="Sdn-yt-XFa"/>
141 <constraint firstAttribute="trailing" secondItem="KcG-O5-UhK" secondAttribute="trailing" id="T6S-Bu-Yqj"/> 141 <constraint firstAttribute="trailing" secondItem="KcG-O5-UhK" secondAttribute="trailing" id="T6S-Bu-Yqj"/>
142 <constraint firstItem="5ZL-zf-geZ" firstAttribute="top" secondItem="O4Q-H0-WBO" secondAttribute="bottom" constant="30" id="byK-GM-sv0"/> 142 <constraint firstItem="5ZL-zf-geZ" firstAttribute="top" secondItem="O4Q-H0-WBO" secondAttribute="bottom" constant="30" id="byK-GM-sv0"/>
143 <constraint firstItem="KcG-O5-UhK" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="eBl-Gj-eMk"/> 143 <constraint firstItem="KcG-O5-UhK" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="eBl-Gj-eMk"/>
144 <constraint firstItem="zzn-bU-X6s" firstAttribute="top" secondItem="uB3-Sm-i6e" secondAttribute="bottom" constant="60" id="edW-Ji-61a"/> 144 <constraint firstItem="zzn-bU-X6s" firstAttribute="top" secondItem="uB3-Sm-i6e" secondAttribute="bottom" constant="60" id="edW-Ji-61a"/>
145 <constraint firstAttribute="trailing" secondItem="zzn-bU-X6s" secondAttribute="trailing" constant="20" id="ftd-7J-C4c"/> 145 <constraint firstAttribute="trailing" secondItem="zzn-bU-X6s" secondAttribute="trailing" constant="20" id="ftd-7J-C4c"/>
146 <constraint firstItem="5ZL-zf-geZ" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="20" id="jDz-q1-ufR"/> 146 <constraint firstItem="5ZL-zf-geZ" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="20" id="jDz-q1-ufR"/>
147 <constraint firstItem="KcG-O5-UhK" firstAttribute="top" secondItem="zzn-bU-X6s" secondAttribute="bottom" constant="8" id="lFR-We-lIy"/> 147 <constraint firstItem="KcG-O5-UhK" firstAttribute="top" secondItem="zzn-bU-X6s" secondAttribute="bottom" constant="8" id="lFR-We-lIy"/>
148 <constraint firstItem="uB3-Sm-i6e" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="20" id="v4n-Fr-Vhx"/> 148 <constraint firstItem="uB3-Sm-i6e" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="20" id="v4n-Fr-Vhx"/>
149 </constraints> 149 </constraints>
150 <point key="canvasLocation" x="24.5" y="52.5"/> 150 <point key="canvasLocation" x="24.5" y="52.5"/>
151 </view> 151 </view>
152 </objects> 152 </objects>
153 <resources> 153 <resources>
154 <image name="icon_menu" width="30" height="30"/> 154 <image name="icon_menu" width="30" height="30"/>
155 <image name="today_back_button" width="73" height="37"/> 155 <image name="today_back_button" width="73" height="37"/>
156 </resources> 156 </resources>
157 </document> 157 </document>
158 158
LifeLog/LifeLog/SearchGroupViewController.h
1 // 1 //
2 // SearchGroupViewController.h 2 // SearchGroupViewController.h
3 // LifeLog 3 // LifeLog
4 // 4 //
5 // Created by nvtu on 8/11/17. 5 // Created by nvtu on 8/11/17.
6 // Copyright © 2017 PhongNV. All rights reserved. 6 // Copyright © 2017 PhongNV. All rights reserved.
7 // 7 //
8 8
9 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
10 #import "BaseTableViewController.h" 10 #import "BaseTableViewController.h"
11 11
12 @interface SearchGroupViewController : BaseTableViewController<UITextFieldDelegate> { 12 @interface SearchGroupViewController : BaseTableViewController<UITextFieldDelegate> {
13 NSTimer *timerSearch;
14 }
13 NSTimer *timerSearch; 15
14 } 16 @property (weak, nonatomic) IBOutlet UITextField *textFieldSearch;
15 17
16 @property (weak, nonatomic) IBOutlet UITextField *textFieldSearch; 18 - (IBAction)clickBack:(id)sender;
17 19 - (IBAction)clickSearch:(id)sender;
18 - (IBAction)clickBack:(id)sender; 20 - (IBAction)clickCreateGroup:(id)sender;
19 - (IBAction)clickSearch:(id)sender; 21
20 - (IBAction)clickCreateGroup:(id)sender; 22 @end
21 23
LifeLog/LifeLog/SearchGroupViewController.m
1 // 1 //
2 // SearchGroupViewController.m 2 // SearchGroupViewController.m
3 // LifeLog 3 // LifeLog
4 // 4 //
5 // Created by nvtu on 8/11/17. 5 // Created by nvtu on 8/11/17.
6 // Copyright © 2017 PhongNV. All rights reserved. 6 // Copyright © 2017 PhongNV. All rights reserved.
7 // 7 //
8 8
9 #import "SearchGroupViewController.h" 9 #import "SearchGroupViewController.h"
10 10
11 #import <SDWebImage/UIImageView+WebCache.h> 11 #import <SDWebImage/UIImageView+WebCache.h>
12 12
13 #import "ServerAPI.h" 13 #import "ServerAPI.h"
14 #import "Utilities.h" 14 #import "Utilities.h"
15 15
16 #import "SearchGroupTableViewCell.h" 16 #import "SearchGroupTableViewCell.h"
17 #import "CreateGroupViewController.h"
17 #import "CreateGroupViewController.h" 18 #import "GroupDetailViewController.h"
18 #import "GroupDetailViewController.h" 19
19 20 @interface SearchGroupViewController ()
20 @interface SearchGroupViewController () 21
21 22 @end
22 @end 23
23 24 @implementation SearchGroupViewController
24 @implementation SearchGroupViewController 25
25 26 - (void)viewDidLoad {
26 - (void)viewDidLoad { 27 [super viewDidLoad];
27 [super viewDidLoad]; 28 [self callRequestToUpdateData];
28 [self callRequestToUpdateData]; 29
29 30 //register nib for table view
30 //register nib for table view 31 [self.tableBase registerNib:[UINib nibWithNibName:@"SearchGroupTableViewCell" bundle:nil] forCellReuseIdentifier:@"SearchGroupCell"];
31 [self.tableBase registerNib:[UINib nibWithNibName:@"SearchGroupTableViewCell" bundle:nil] forCellReuseIdentifier:@"SearchGroupCell"]; 32 }
32 } 33
33 34 - (void)didReceiveMemoryWarning {
34 - (void)didReceiveMemoryWarning { 35 [super didReceiveMemoryWarning];
35 [super didReceiveMemoryWarning]; 36 // Dispose of any resources that can be recreated.
36 // Dispose of any resources that can be recreated. 37 }
37 } 38
38 39 #pragma mark IBAction
39 #pragma mark IBAction 40
40 41 - (IBAction)clickBack:(id)sender {
41 - (IBAction)clickBack:(id)sender { 42 [self.navigationController popViewControllerAnimated:true];
42 [self.navigationController popViewControllerAnimated:true]; 43 }
43 } 44
44 45 - (IBAction)clickSearch:(id)sender {
46 [self.view endEditing:true];
45 - (IBAction)clickSearch:(id)sender { 47 [self resetData];
46 [self.view endEditing:true]; 48 }
47 [self resetData]; 49
48 } 50 - (IBAction)clickCreateGroup:(id)sender {
49 51 CreateGroupViewController * create = [[CreateGroupViewController alloc] init];
52 create.createGroupSuccess = ^(GroupObject *object){
53 GroupDetailViewController * detail = [[GroupDetailViewController alloc] init];
54 [detail setGroup:object];
55 [self.navigationController pushViewController:detail animated:true];
56 };
57 [self.navigationController pushViewController:create animated:true];
50 - (IBAction)clickCreateGroup:(id)sender { 58 }
51 CreateGroupViewController * create = [[CreateGroupViewController alloc] init]; 59
52 create.createGroupSuccess = ^(GroupObject *object){ 60 #pragma mark UITableView Delegate
53 GroupDetailViewController * detail = [[GroupDetailViewController alloc] init]; 61 - (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
54 [detail setGroup:object]; 62 SearchGroupTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"SearchGroupCell"];
55 [self.navigationController pushViewController:detail animated:true]; 63 GroupObject *object = [_curDataList objectAtIndex:indexPath.row];
56 }; 64 if(object.avatar && ![object.avatar isKindOfClass:[NSNull class]]) {
57 [self.navigationController pushViewController:create animated:true]; 65 [cell.imgAvatar sd_setImageWithURL:[NSURL URLWithString:[Utilities getImageLink:object.avatar]]];
58 } 66 }
67 else {
68 [cell.imgAvatar setImage:[UIImage imageNamed:@"avatar_default"]];
69 }
59 70 cell.lblName.text = object.name;
60 #pragma mark UITableView Delegate 71 return cell;
61 - (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 72 }
62 SearchGroupTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"SearchGroupCell"]; 73
63 GroupObject *object = [_curDataList objectAtIndex:indexPath.row]; 74 -(void) scrollViewDidScroll:(UIScrollView *)scrollView {
64 if(object.avatar && ![object.avatar isKindOfClass:[NSNull class]]) { 75 [self.view endEditing:true];
65 [cell.imgAvatar sd_setImageWithURL:[NSURL URLWithString:[Utilities getImageLink:object.avatar]]]; 76 }
66 } 77
67 else { 78 -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
68 [cell.imgAvatar setImage:[UIImage imageNamed:@"avatar_default"]]; 79 GroupDetailViewController * detail = [[GroupDetailViewController alloc] init];
69 } 80 [detail setGroup:[_curDataList objectAtIndex:indexPath.row]];
70 cell.lblName.text = object.name; 81 [self.navigationController pushViewController:detail animated:true];
71 return cell; 82 }
72 } 83
73 84 #pragma mark UITextField Delegate
85 -(BOOL) textFieldShouldReturn:(UITextField *)textField {
86 [self.view endEditing:true];
87 return true;
88 }
89
74 -(void) scrollViewDidScroll:(UIScrollView *)scrollView { 90 -(BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
75 [self.view endEditing:true]; 91 if(timerSearch != nil) {
92 [timerSearch invalidate];
93 }
94 timerSearch = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(resetData) userInfo:nil repeats:false];
76 } 95 return true;
77 96 }
78 -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 97
79 GroupDetailViewController * detail = [[GroupDetailViewController alloc] init]; 98 #pragma mark Private Function
80 [detail setGroup:[_curDataList objectAtIndex:indexPath.row]]; 99 -(void) callRequestToUpdateData {
81 [self.navigationController pushViewController:detail animated:true]; 100 [super callRequestToUpdateData];
82 } 101
83 102 NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken];
84 #pragma mark UITextField Delegate 103 MBProgressHUD *hudView = nil;
85 -(BOOL) textFieldShouldReturn:(UITextField *)textField { 104 if(_curPage == 1 && !self.refreshControl.isRefreshing) {
86 [self.view endEditing:true]; 105 hudView = [MBProgressHUD showHUDAddedTo:self.view animated:true];
87 return true; 106 }
88 } 107 [[ServerAPI server] searchGroup:token withKey:self.textFieldSearch.text andPage:_curPage CompletionHandler:^(NSArray *array, NSError *error) {
89 108 dispatch_async(dispatch_get_main_queue(), ^{
90 -(BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { 109 if(hudView != nil) {
91 if(timerSearch != nil) { 110 [hudView hideAnimated:true];
92 [timerSearch invalidate]; 111 }
93 } 112 });
94 timerSearch = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(resetData) userInfo:nil repeats:false]; 113 SearchGroupViewController __weak *weakSelf = self;
95 return true; 114 [weakSelf updateTableData:array error:error];
96 } 115 }];
97 116 }
98 #pragma mark Private Function 117 @end
99 -(void) callRequestToUpdateData { 118
LifeLog/LifeLog/SearchGroupViewController.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="12118" systemVersion="16D32" 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="12086"/>
8 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> 8 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9 </dependencies> 9 </dependencies>
10 <objects> 10 <objects>
11 <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SearchGroupViewController"> 11 <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SearchGroupViewController">
12 <connections> 12 <connections>
13 <outlet property="tableBase" destination="yF3-ZN-ebL" id="WYE-g2-1iW"/> 13 <outlet property="tableBase" destination="yF3-ZN-ebL" id="WYE-g2-1iW"/>
14 <outlet property="textFieldSearch" destination="ZV5-M6-gge" id="my5-ga-rV2"/> 14 <outlet property="textFieldSearch" destination="ZV5-M6-gge" id="my5-ga-rV2"/>
15 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> 15 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
16 </connections> 16 </connections>
17 </placeholder> 17 </placeholder>
18 <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> 18 <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
19 <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> 19 <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
20 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> 20 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
21 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> 21 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
22 <subviews> 22 <subviews>
23 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YHv-ES-wQ0" userLabel="ViewHeader"> 23 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YHv-ES-wQ0" userLabel="ViewHeader">
24 <rect key="frame" x="0.0" y="0.0" width="375" height="46"/> 24 <rect key="frame" x="0.0" y="0.0" width="375" height="46"/>
25 <subviews> 25 <subviews>
26 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SNS" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qQF-tf-31d" customClass="AutoTransLabel"> 26 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SNS" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qQF-tf-31d" customClass="AutoTransLabel">
27 <rect key="frame" x="0.0" y="0.0" width="375" height="46"/> 27 <rect key="frame" x="0.0" y="0.0" width="375" height="46"/>
28 <fontDescription key="fontDescription" type="system" pointSize="17"/> 28 <fontDescription key="fontDescription" type="system" pointSize="17"/>
29 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 29 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
30 <nil key="highlightedColor"/> 30 <nil key="highlightedColor"/>
31 <userDefinedRuntimeAttributes> 31 <userDefinedRuntimeAttributes>
32 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.searchGr.title"/> 32 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.searchGr.title"/>
33 </userDefinedRuntimeAttributes> 33 </userDefinedRuntimeAttributes>
34 </label> 34 </label>
35 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pK9-Nf-LNR"> 35 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pK9-Nf-LNR">
36 <rect key="frame" x="0.0" y="5" width="70" height="36"/> 36 <rect key="frame" x="0.0" y="5" width="70" height="36"/>
37 <constraints> 37 <constraints>
38 <constraint firstAttribute="width" constant="70" id="Kdt-q3-40K"/> 38 <constraint firstAttribute="width" constant="70" id="Kdt-q3-40K"/>
39 </constraints> 39 </constraints>
40 <state key="normal" image="today_back_button"/> 40 <state key="normal" image="today_back_button"/>
41 <connections> 41 <connections>
42 <action selector="clickBack:" destination="-1" eventType="touchUpInside" id="Z3f-Fd-CEc"/> 42 <action selector="clickBack:" destination="-1" eventType="touchUpInside" id="Z3f-Fd-CEc"/>
43 </connections> 43 </connections>
44 </button> 44 </button>
45 <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="PkV-G3-Fru"> 45 <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="PkV-G3-Fru">
46 <rect key="frame" x="330" y="0.0" width="45" height="46"/> 46 <rect key="frame" x="330" y="0.0" width="45" height="46"/>
47 <constraints> 47 <constraints>
48 <constraint firstAttribute="width" constant="45" id="7W6-Cl-TRS"/> 48 <constraint firstAttribute="width" constant="45" id="7W6-Cl-TRS"/>
49 </constraints> 49 </constraints>
50 <state key="normal" image="icon_menu"/> 50 <state key="normal" image="icon_menu"/>
51 </button> 51 </button>
52 </subviews> 52 </subviews>
53 <color key="backgroundColor" red="0.098039215690000001" green="0.098039215690000001" blue="0.098039215690000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> 53 <color key="backgroundColor" red="0.098039215690000001" green="0.098039215690000001" blue="0.098039215690000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
54 <constraints> 54 <constraints>
55 <constraint firstItem="pK9-Nf-LNR" firstAttribute="leading" secondItem="YHv-ES-wQ0" secondAttribute="leading" id="84D-o2-cdT"/> 55 <constraint firstItem="pK9-Nf-LNR" firstAttribute="leading" secondItem="YHv-ES-wQ0" secondAttribute="leading" id="84D-o2-cdT"/>
56 <constraint firstAttribute="trailing" secondItem="qQF-tf-31d" secondAttribute="trailing" id="BMv-VR-p7j"/> 56 <constraint firstAttribute="trailing" secondItem="qQF-tf-31d" secondAttribute="trailing" id="BMv-VR-p7j"/>
57 <constraint firstAttribute="trailing" secondItem="PkV-G3-Fru" secondAttribute="trailing" id="CiO-zw-1XR"/> 57 <constraint firstAttribute="trailing" secondItem="PkV-G3-Fru" secondAttribute="trailing" id="CiO-zw-1XR"/>
58 <constraint firstAttribute="height" constant="46" id="KDJ-I2-eMi"/> 58 <constraint firstAttribute="height" constant="46" id="KDJ-I2-eMi"/>
59 <constraint firstItem="qQF-tf-31d" firstAttribute="leading" secondItem="YHv-ES-wQ0" secondAttribute="leading" id="heq-vX-GHv"/> 59 <constraint firstItem="qQF-tf-31d" firstAttribute="leading" secondItem="YHv-ES-wQ0" secondAttribute="leading" id="heq-vX-GHv"/>
60 <constraint firstAttribute="bottom" secondItem="qQF-tf-31d" secondAttribute="bottom" id="iJg-Q2-eLi"/> 60 <constraint firstAttribute="bottom" secondItem="qQF-tf-31d" secondAttribute="bottom" id="iJg-Q2-eLi"/>
61 <constraint firstItem="qQF-tf-31d" firstAttribute="top" secondItem="YHv-ES-wQ0" secondAttribute="top" id="l3t-CY-3zr"/> 61 <constraint firstItem="qQF-tf-31d" firstAttribute="top" secondItem="YHv-ES-wQ0" secondAttribute="top" id="l3t-CY-3zr"/>
62 <constraint firstAttribute="bottom" secondItem="pK9-Nf-LNR" secondAttribute="bottom" constant="5" id="lJY-v6-1cM"/> 62 <constraint firstAttribute="bottom" secondItem="pK9-Nf-LNR" secondAttribute="bottom" constant="5" id="lJY-v6-1cM"/>
63 <constraint firstItem="pK9-Nf-LNR" firstAttribute="top" secondItem="YHv-ES-wQ0" secondAttribute="top" constant="5" id="ppE-r0-ai7"/> 63 <constraint firstItem="pK9-Nf-LNR" firstAttribute="top" secondItem="YHv-ES-wQ0" secondAttribute="top" constant="5" id="ppE-r0-ai7"/>
64 <constraint firstItem="PkV-G3-Fru" firstAttribute="top" secondItem="YHv-ES-wQ0" secondAttribute="top" id="ptk-1B-s3f"/> 64 <constraint firstItem="PkV-G3-Fru" firstAttribute="top" secondItem="YHv-ES-wQ0" secondAttribute="top" id="ptk-1B-s3f"/>
65 <constraint firstAttribute="bottom" secondItem="PkV-G3-Fru" secondAttribute="bottom" id="yNR-37-Qmd"/> 65 <constraint firstAttribute="bottom" secondItem="PkV-G3-Fru" secondAttribute="bottom" id="yNR-37-Qmd"/>
66 </constraints> 66 </constraints>
67 </view> 67 </view>
68 <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ZV5-M6-gge"> 68 <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ZV5-M6-gge">
69 <rect key="frame" x="16" y="86" width="209" height="30"/> 69 <rect key="frame" x="16" y="86" width="209" height="30"/>
70 <nil key="textColor"/> 70 <nil key="textColor"/>
71 <fontDescription key="fontDescription" type="system" pointSize="14"/> 71 <fontDescription key="fontDescription" type="system" pointSize="14"/>
72 <textInputTraits key="textInputTraits"/> 72 <textInputTraits key="textInputTraits"/>
73 <connections> 73 <connections>
74 <outlet property="delegate" destination="-1" id="Wzs-Wc-gd1"/> 74 <outlet property="delegate" destination="-1" id="Wzs-Wc-gd1"/>
75 </connections> 75 </connections>
76 </textField> 76 </textField>
77 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="V72-De-hhR" customClass="AutoTransButton"> 77 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="V72-De-hhR" customClass="AutoTransButton">
78 <rect key="frame" x="250" y="86" width="110" height="30"/> 78 <rect key="frame" x="250" y="86" width="110" height="30"/>
79 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 79 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
80 <constraints> 80 <constraints>
81 <constraint firstAttribute="height" constant="30" id="plQ-aS-bwK"/> 81 <constraint firstAttribute="height" constant="30" id="plQ-aS-bwK"/>
82 <constraint firstAttribute="width" constant="110" id="w47-Tg-vYC"/> 82 <constraint firstAttribute="width" constant="110" id="w47-Tg-vYC"/>
83 </constraints> 83 </constraints>
84 <fontDescription key="fontDescription" type="system" pointSize="13"/> 84 <fontDescription key="fontDescription" type="system" pointSize="13"/>
85 <state key="normal" title="検索"> 85 <state key="normal" title="検索">
86 <color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> 86 <color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
87 </state> 87 </state>
88 <userDefinedRuntimeAttributes> 88 <userDefinedRuntimeAttributes>
89 <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> 89 <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
90 <integer key="value" value="5"/> 90 <integer key="value" value="5"/>
91 </userDefinedRuntimeAttribute> 91 </userDefinedRuntimeAttribute>
92 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.searchGr.bt.search"/> 92 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.searchGr.bt.search"/>
93 </userDefinedRuntimeAttributes> 93 </userDefinedRuntimeAttributes>
94 <connections> 94 <connections>
95 <action selector="clickSearch:" destination="-1" eventType="touchUpInside" id="WPo-6j-0K1"/> 95 <action selector="clickSearch:" destination="-1" eventType="touchUpInside" id="WPo-6j-0K1"/>
96 </connections> 96 </connections>
97 </button> 97 </button>
98 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Rb5-To-ffT" customClass="AutoTransButton"> 98 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Rb5-To-ffT" customClass="AutoTransButton">
99 <rect key="frame" x="250" y="131" width="110" height="30"/> 99 <rect key="frame" x="250" y="131" width="110" height="30"/>
100 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 100 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
101 <constraints> 101 <constraints>
102 <constraint firstAttribute="height" constant="30" id="Cwt-yy-rcp"/> 102 <constraint firstAttribute="height" constant="30" id="Cwt-yy-rcp"/>
103 </constraints> 103 </constraints>
104 <fontDescription key="fontDescription" type="system" pointSize="13"/> 104 <fontDescription key="fontDescription" type="system" pointSize="13"/>
105 <state key="normal" title="グループ作成"> 105 <state key="normal" title="グループ作成">
106 <color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> 106 <color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
107 </state> 107 </state>
108 <userDefinedRuntimeAttributes> 108 <userDefinedRuntimeAttributes>
109 <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> 109 <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
110 <integer key="value" value="5"/> 110 <integer key="value" value="5"/>
111 </userDefinedRuntimeAttribute> 111 </userDefinedRuntimeAttribute>
112 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.searchGr.bt.createGr"/> 112 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.searchGr.bt.createGr"/>
113 </userDefinedRuntimeAttributes> 113 </userDefinedRuntimeAttributes>
114 <connections> 114 <connections>
115 <action selector="clickCreateGroup:" destination="-1" eventType="touchUpInside" id="J9P-5a-SrT"/> 115 <action selector="clickCreateGroup:" destination="-1" eventType="touchUpInside" id="J9P-5a-SrT"/>
116 </connections> 116 </connections>
117 </button> 117 </button>
118 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="70" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="yF3-ZN-ebL"> 118 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="70" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="yF3-ZN-ebL">
119 <rect key="frame" x="0.0" y="176" width="375" height="441"/> 119 <rect key="frame" x="0.0" y="176" width="375" height="441"/>
120 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> 120 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
121 <connections> 121 <connections>
122 <outlet property="dataSource" destination="-1" id="tKB-Uq-esC"/> 122 <outlet property="dataSource" destination="-1" id="tKB-Uq-esC"/>
123 <outlet property="delegate" destination="-1" id="88z-Bd-dz0"/> 123 <outlet property="delegate" destination="-1" id="88z-Bd-dz0"/>
124 </connections> 124 </connections>
125 </tableView> 125 </tableView>
126 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="オススメグループ" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YIq-l4-77c" customClass="AutoTransLabel"> 126 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="オススメグループ" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YIq-l4-77c" customClass="AutoTransLabel">
127 <rect key="frame" x="16" y="54" width="343" height="21"/> 127 <rect key="frame" x="16" y="54" width="343" height="21"/>
128 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> 128 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
129 <fontDescription key="fontDescription" type="system" pointSize="17"/> 129 <fontDescription key="fontDescription" type="system" pointSize="17"/>
130 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 130 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
131 <nil key="highlightedColor"/> 131 <nil key="highlightedColor"/>
132 <userDefinedRuntimeAttributes> 132 <userDefinedRuntimeAttributes>
133 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.searchGr.lbl.title"/> 133 <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.searchGr.lbl.title"/>
134 </userDefinedRuntimeAttributes> 134 </userDefinedRuntimeAttributes>
135 </label> 135 </label>
136 </subviews> 136 </subviews>
137 <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> 137 <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
138 <constraints> 138 <constraints>
139 <constraint firstItem="yF3-ZN-ebL" firstAttribute="top" secondItem="Rb5-To-ffT" secondAttribute="bottom" constant="15" id="2wi-jL-dso"/> 139 <constraint firstItem="yF3-ZN-ebL" firstAttribute="top" secondItem="Rb5-To-ffT" secondAttribute="bottom" constant="15" id="2wi-jL-dso"/>
140 <constraint firstAttribute="trailing" secondItem="V72-De-hhR" secondAttribute="trailing" constant="15" id="342-Ur-sPT"/> 140 <constraint firstAttribute="trailing" secondItem="V72-De-hhR" secondAttribute="trailing" constant="15" id="342-Ur-sPT"/>
141 <constraint firstItem="YHv-ES-wQ0" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="3ft-ch-v8f"/> 141 <constraint firstItem="YHv-ES-wQ0" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="3ft-ch-v8f"/>
142 <constraint firstItem="Rb5-To-ffT" firstAttribute="top" secondItem="V72-De-hhR" secondAttribute="bottom" constant="15" id="Hic-jl-Ndk"/> 142 <constraint firstItem="Rb5-To-ffT" firstAttribute="top" secondItem="V72-De-hhR" secondAttribute="bottom" constant="15" id="Hic-jl-Ndk"/>
143 <constraint firstAttribute="bottom" secondItem="yF3-ZN-ebL" secondAttribute="bottom" constant="50" id="Nad-2Y-mrb"/> 143 <constraint firstAttribute="bottom" secondItem="yF3-ZN-ebL" secondAttribute="bottom" constant="50" id="Nad-2Y-mrb"/>
144 <constraint firstItem="V72-De-hhR" firstAttribute="leading" secondItem="ZV5-M6-gge" secondAttribute="trailing" constant="25" id="Pv6-Li-O07"/> 144 <constraint firstItem="V72-De-hhR" firstAttribute="leading" secondItem="ZV5-M6-gge" secondAttribute="trailing" constant="25" id="Pv6-Li-O07"/>
145 <constraint firstAttribute="trailing" secondItem="YHv-ES-wQ0" secondAttribute="trailing" id="crv-XZ-T34"/> 145 <constraint firstAttribute="trailing" secondItem="YHv-ES-wQ0" secondAttribute="trailing" id="crv-XZ-T34"/>
146 <constraint firstItem="yF3-ZN-ebL" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="f6n-Zr-w64"/> 146 <constraint firstItem="yF3-ZN-ebL" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="f6n-Zr-w64"/>
147 <constraint firstItem="Rb5-To-ffT" firstAttribute="trailing" secondItem="V72-De-hhR" secondAttribute="trailing" id="fHS-Kk-Ew0"/> 147 <constraint firstItem="Rb5-To-ffT" firstAttribute="trailing" secondItem="V72-De-hhR" secondAttribute="trailing" id="fHS-Kk-Ew0"/>
148 <constraint firstItem="YHv-ES-wQ0" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="fdM-w1-hOo"/> 148 <constraint firstItem="YHv-ES-wQ0" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="fdM-w1-hOo"/>
149 <constraint firstItem="V72-De-hhR" firstAttribute="top" secondItem="YHv-ES-wQ0" secondAttribute="bottom" constant="40" id="hlc-vb-EVo"/> 149 <constraint firstItem="V72-De-hhR" firstAttribute="top" secondItem="YHv-ES-wQ0" secondAttribute="bottom" constant="40" id="hlc-vb-EVo"/>
150 <constraint firstItem="Rb5-To-ffT" firstAttribute="width" secondItem="V72-De-hhR" secondAttribute="width" id="jtP-uw-vkF"/> 150 <constraint firstItem="Rb5-To-ffT" firstAttribute="width" secondItem="V72-De-hhR" secondAttribute="width" id="jtP-uw-vkF"/>
151 <constraint firstItem="ZV5-M6-gge" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="16" id="kxD-e8-dYm"/> 151 <constraint firstItem="ZV5-M6-gge" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="16" id="kxD-e8-dYm"/>
152 <constraint firstAttribute="trailing" secondItem="yF3-ZN-ebL" secondAttribute="trailing" id="rZv-uL-RZ3"/> 152 <constraint firstAttribute="trailing" secondItem="yF3-ZN-ebL" secondAttribute="trailing" id="rZv-uL-RZ3"/>
153 <constraint firstItem="V72-De-hhR" firstAttribute="top" secondItem="ZV5-M6-gge" secondAttribute="top" id="voZ-Kp-Zm3"/> 153 <constraint firstItem="V72-De-hhR" firstAttribute="top" secondItem="ZV5-M6-gge" secondAttribute="top" id="voZ-Kp-Zm3"/>
154 </constraints> 154 </constraints>
155 <point key="canvasLocation" x="24.5" y="52.5"/> 155 <point key="canvasLocation" x="24.5" y="52.5"/>
156 </view> 156 </view>
157 </objects> 157 </objects>
158 <resources> 158 <resources>
159 <image name="icon_menu" width="30" height="30"/> 159 <image name="icon_menu" width="30" height="30"/>
160 <image name="today_back_button" width="73" height="37"/> 160 <image name="today_back_button" width="73" height="37"/>
161 </resources> 161 </resources>
162 </document> 162 </document>
163 163
LifeLog/LifeLog/ServerAPI.h
1 // 1 //
2 // ServerAPI.h 2 // ServerAPI.h
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 <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
10 #import "Entities.h" 10 #import "Entities.h"
11 11
12 extern NSString *const kServerAddress; 12 extern NSString *const kServerAddress;
13 extern NSString *const kUser; 13 extern NSString *const kUser;
14 extern NSString *const kToken; 14 extern NSString *const kToken;
15 extern NSString *const kNotificationToken; 15 extern NSString *const kNotificationToken;
16 16
17 @interface ServerAPI : NSObject 17 @interface ServerAPI : NSObject
18 + (instancetype) server; 18 + (instancetype) server;
19 @property (nonatomic, assign) NSTimeInterval timeOutInterval; 19 @property (nonatomic, assign) NSTimeInterval timeOutInterval;
20 20
21 #pragma mark - Login and Register 21 #pragma mark - Login and Register
22 - (void)loginWithEmail:(NSString *)email Password:(NSString *)password CompletionHandler: (void (^)(User *, NSString *, NSError *)) completion; 22 - (void)loginWithEmail:(NSString *)email Password:(NSString *)password CompletionHandler: (void (^)(User *, NSString *, NSError *)) completion;
23 - (void)registerUserWithParams:(NSDictionary *)params CompletionHandler: (void (^)(User *, NSString *, NSError *)) completion; 23 - (void)registerUserWithParams:(NSDictionary *)params CompletionHandler: (void (^)(User *, NSString *, NSError *)) completion;
24 - (void)uploadImage:(NSString *)token andImageData:(NSData *)data CompletionHandler:(void (^)(NSString *, NSError *)) completion; 24 - (void)uploadImage:(NSString *)token andImageData:(NSData *)data CompletionHandler:(void (^)(NSString *, NSError *)) completion;
25 - (void)forgetPass:(NSString *)email CompletionHandler:(void (^)(NSError *)) completion; 25 - (void)forgetPass:(NSString *)email CompletionHandler:(void (^)(NSError *)) completion;
26 - (void)confirmForgetPass:(NSString *)email withConfirm:(NSString *)confirm CompletionHandler:(void (^)(NSError *)) completion; 26 - (void)confirmForgetPass:(NSString *)email withConfirm:(NSString *)confirm CompletionHandler:(void (^)(NSError *)) completion;
27 27
28 #pragma mark - Home Screen Function 28 #pragma mark - Home Screen Function
29 - (void)requestTopWithMode:(int)mode andDate:(NSString *)date CompletionHandler:(void (^)(TopObject *, NSError *)) completion; 29 - (void)requestTopWithMode:(int)mode andDate:(NSString *)date CompletionHandler:(void (^)(TopObject *, NSError *)) completion;
30 - (void)requestCreateLog:(int)mode withStep:(int)numStep startDate:(NSString *)startDate endDate:(NSString *)endDate CompletionHandler:(void (^)(NSError *))completion; 30 - (void)requestCreateLog:(int)mode withStep:(int)numStep startDate:(NSString *)startDate endDate:(NSString *)endDate CompletionHandler:(void (^)(NSError *))completion;
31 31
32 #pragma mark - History Screen Function 32 #pragma mark - History Screen Function
33 - (void) requestHistory:(NSString *)token atDate:(NSDate *)date withType:(int)type andMode:(int) mode CompletionHandler:(void (^)(HistoryObject *, NSError *)) completion; 33 - (void) requestHistory:(NSString *)token startDate:(NSDate *)startDate endDate:(NSDate *)endDate CompletionHandler:(void (^)(NSArray *, NSError *)) completion;
34 - (void) requestHistoryGraph:(NSString *)token withType:(int)type andMode:(int) mode CompletionHandler:(void (^)(HistoryGraphObject *, NSError *)) completion; 34 - (void) requestHistoryGraph:(NSString *)token withType:(int)type andMode:(int) mode CompletionHandler:(void (^)(HistoryGraphObject *, NSError *)) completion;
35 - (void) requestHistoryList:(NSString *)token withType:(int)type andMode:(int) mode AtPage:(int) page CompletionHandler:(void (^)(NSArray *, NSError *)) completion; 35 - (void) requestHistoryList:(NSString *)token withType:(int)type andMode:(int) mode AtPage:(int) page CompletionHandler:(void (^)(NSArray *, NSError *)) completion;
36 - (void) requestJoinGroup:(NSString *)token groupID: (int) groupID CompletionHandler:(void (^)(NSError *)) completion;
37 -(void) requestCreateGroup:(NSString *)token withGroup:(GroupObject *)group CompletionHandler:(void (^)(GroupObject *, NSError *)) completion;
38 - (void) requestGroupList:(NSString *)token CompletionHandler:(void (^)(NSArray *, NSError *)) completion;
36 - (void) requestJoinGroup:(NSString *)token groupID: (int) groupID CompletionHandler:(void (^)(NSError *)) completion; 39
37 -(void) requestCreateGroup:(NSString *)token withGroup:(GroupObject *)group CompletionHandler:(void (^)(GroupObject *, NSError *)) completion; 40 #pragma mark - SNS Screen Function
38 - (void) requestGroupList:(NSString *)token CompletionHandler:(void (^)(NSArray *, NSError *)) completion; 41 /*
39 42 Get tweet of group and get recent tweet is same API
40 #pragma mark - SNS Screen Function 43 If groupID equal -1, it will request recent tweet. Otherwise will request tweet of group
41 /* 44 */
42 Get tweet of group and get recent tweet is same API 45 - (void) requestTweetsList:(NSString *)token groupID: (int) groupID withPage:(int)page CompletionHandler:(void (^)(NSArray *, NSError *)) completion;
43 If groupID equal -1, it will request recent tweet. Otherwise will request tweet of group 46 - (void) searchGroup:(NSString *)token withKey:(NSString *)key andPage:(int)page CompletionHandler:(void (^)(NSArray *, NSError *)) completion;
47
48 #pragma mark - Group Function
49 - (void) getGroupDetail:(NSString *)token withGroupID:(int)groupID CompletionHandler:(void (^)(GroupObject *, NSError *)) completion;
50 - (void) requestMemberList:(NSString *)token groupID: (int) groupID withPage:(int)page CompletionHandler:(void (^)(NSArray *, NSError *)) completion;
51
44 */ 52 #pragma mark - Common API
45 - (void) requestTweetsList:(NSString *)token groupID: (int) groupID withPage:(int)page CompletionHandler:(void (^)(NSArray *, NSError *)) completion; 53 - (void)refreshToken: (NSString *)userID CompletionHandler:(void (^)(NSString *, NSError *))completion;
46 - (void) searchGroup:(NSString *)token withKey:(NSString *)key andPage:(int)page CompletionHandler:(void (^)(NSArray *, NSError *)) completion; 54 @end
47 55
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 11
11 NSString *const kServerAddress = @"http://clover.timesfun.jp:9001/"; 12 NSString *const kServerAddress = @"http://clover.timesfun.jp:9001/";
12 NSString *const kUser = @"KEY_USER"; 13 NSString *const kUser = @"KEY_USER";
13 NSString *const kToken = @"KEY_TOKEN"; 14 NSString *const kToken = @"KEY_TOKEN";
14 NSString *const kNotificationToken = @"TOKEN_INVALID"; 15 NSString *const kNotificationToken = @"TOKEN_INVALID";
15 16
16 @implementation NSString (NSString_Extended) 17 @implementation NSString (NSString_Extended)
17 - (NSString *)urlencode { 18 - (NSString *)urlencode {
18 NSMutableString *output = [NSMutableString string]; 19 NSMutableString *output = [NSMutableString string];
19 const unsigned char *source = (const unsigned char *)[self UTF8String]; 20 const unsigned char *source = (const unsigned char *)[self UTF8String];
20 int sourceLen = (int)strlen((const char *)source); 21 int sourceLen = (int)strlen((const char *)source);
21 for (int i = 0; i < sourceLen; ++i) { 22 for (int i = 0; i < sourceLen; ++i) {
22 const unsigned char thisChar = source[i]; 23 const unsigned char thisChar = source[i];
23 if (thisChar == ' '){ 24 if (thisChar == ' '){
24 [output appendString:@"+"]; 25 [output appendString:@"+"];
25 } else if (thisChar == '.' || thisChar == '-' || thisChar == '_' || thisChar == '~' || 26 } else if (thisChar == '.' || thisChar == '-' || thisChar == '_' || thisChar == '~' ||
26 (thisChar >= 'a' && thisChar <= 'z') || 27 (thisChar >= 'a' && thisChar <= 'z') ||
27 (thisChar >= 'A' && thisChar <= 'Z') || 28 (thisChar >= 'A' && thisChar <= 'Z') ||
28 (thisChar >= '0' && thisChar <= '9')) { 29 (thisChar >= '0' && thisChar <= '9')) {
29 [output appendFormat:@"%c", thisChar]; 30 [output appendFormat:@"%c", thisChar];
30 } else { 31 } else {
31 [output appendFormat:@"%%%02X", thisChar]; 32 [output appendFormat:@"%%%02X", thisChar];
32 } 33 }
33 } 34 }
34 return output; 35 return output;
35 } 36 }
36 @end 37 @end
37 38
38 @implementation ServerAPI 39 @implementation ServerAPI
39 static ServerAPI *_server = nil; 40 static ServerAPI *_server = nil;
40 41
41 NSURLSessionDataTask * searchTask; 42 NSURLSessionDataTask * searchTask;
42 43
43 @synthesize timeOutInterval = _timeOutInterval; 44 @synthesize timeOutInterval = _timeOutInterval;
44 45
45 + (instancetype)server 46 + (instancetype)server
46 { 47 {
47 @synchronized(self) { 48 @synchronized(self) {
48 if (_server == nil) { 49 if (_server == nil) {
49 _server = [[ServerAPI alloc] init]; 50 _server = [[ServerAPI alloc] init];
50 } 51 }
51 } 52 }
52 return _server; 53 return _server;
53 } 54 }
54 55
55 - (instancetype)init 56 - (instancetype)init
56 { 57 {
57 self = [super init]; 58 self = [super init];
58 if (self != nil) { 59 if (self != nil) {
59 self.timeOutInterval = 150; 60 self.timeOutInterval = 150;
60 } 61 }
61 return self; 62 return self;
62 } 63 }
63 64
64 #pragma mark - Login and Register 65 #pragma mark - Login and Register
65 // Login 66 // Login
66 - (void)loginWithEmail:(NSString *)email Password:(NSString *)password CompletionHandler: (void (^)(User *, NSString *, NSError *)) completion 67 - (void)loginWithEmail:(NSString *)email Password:(NSString *)password CompletionHandler: (void (^)(User *, NSString *, NSError *)) completion
67 { 68 {
68 [self _request:[kServerAddress stringByAppendingFormat: @"login"] method:@"POST" token:@"" paras:@{@"email":email, @"password": password} completion:^(NSData *data, NSError *error) { 69 [self _request:[kServerAddress stringByAppendingFormat: @"login"] method:@"POST" token:@"" paras:@{@"email":email, @"password": password} completion:^(NSData *data, NSError *error) {
69 70
70 if (completion == NULL) { 71 if (completion == NULL) {
71 return ; 72 return ;
72 } 73 }
73 74
74 if (error == nil) 75 if (error == nil)
75 { 76 {
76 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error]; 77 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
77 78
78 int status = [dataResult[@"status"] intValue]; 79 int status = [dataResult[@"status"] intValue];
79 if (status == 1) { // status = 1 success 80 if (status == 1) { // status = 1 success
80 NSString *token = dataResult[@"result"][@"token"]; 81 NSString *token = dataResult[@"result"][@"token"];
81 NSDictionary *dictUser = dataResult[@"result"][@"user"]; 82 NSDictionary *dictUser = dataResult[@"result"][@"user"];
82 User *user = [[User alloc] init]; 83 User *user = [[User alloc] init];
83 user.user_id = [NSString stringWithFormat:@"%@",dictUser[@"id"]]; 84 user.user_id = [NSString stringWithFormat:@"%@",dictUser[@"id"]];
84 user.username = [NSString stringWithFormat:@"%@",dictUser[@"username"]]; 85 user.username = [NSString stringWithFormat:@"%@",dictUser[@"username"]];
85 user.full_name = [NSString stringWithFormat:@"%@",dictUser[@"full_name"]]; 86 user.full_name = [NSString stringWithFormat:@"%@",dictUser[@"full_name"]];
86 user.nickname = [NSString stringWithFormat:@"%@",dictUser[@"nickname"]]; 87 user.nickname = [NSString stringWithFormat:@"%@",dictUser[@"nickname"]];
87 user.email = [NSString stringWithFormat:@"%@",dictUser[@"email"]]; 88 user.email = [NSString stringWithFormat:@"%@",dictUser[@"email"]];
88 user.password = [NSString stringWithFormat:@"%@",dictUser[@"password"]]; 89 user.password = [NSString stringWithFormat:@"%@",dictUser[@"password"]];
89 user.birthday = [NSString stringWithFormat:@"%@",dictUser[@"birthday"]]; 90 user.birthday = [NSString stringWithFormat:@"%@",dictUser[@"birthday"]];
90 user.address = [NSString stringWithFormat:@"%@",dictUser[@"address"]]; 91 user.address = [NSString stringWithFormat:@"%@",dictUser[@"address"]];
91 user.gender = [[NSString stringWithFormat:@"%@",dictUser[@"gender"]] intValue]; 92 user.gender = [[NSString stringWithFormat:@"%@",dictUser[@"gender"]] intValue];
92 user.height = [[NSString stringWithFormat:@"%@",dictUser[@"height"]] floatValue]; 93 user.height = [[NSString stringWithFormat:@"%@",dictUser[@"height"]] floatValue];
93 user.weight = [[NSString stringWithFormat:@"%@",dictUser[@"weight"]] floatValue]; 94 user.weight = [[NSString stringWithFormat:@"%@",dictUser[@"weight"]] floatValue];
94 user.user_description = [NSString stringWithFormat:@"%@",dictUser[@"description"]]; 95 user.user_description = [NSString stringWithFormat:@"%@",dictUser[@"description"]];
95 user.created_at = [NSString stringWithFormat:@"%@",dictUser[@"created_at"]]; 96 user.created_at = [NSString stringWithFormat:@"%@",dictUser[@"created_at"]];
96 user.physical_activity = [NSString stringWithFormat:@"%@",dictUser[@"physical_activity"]]; 97 user.physical_activity = [NSString stringWithFormat:@"%@",dictUser[@"physical_activity"]];
97 user.profile_image = [NSString stringWithFormat:@"%@",dictUser[@"profile_image"]]; 98 user.profile_image = [NSString stringWithFormat:@"%@",dictUser[@"profile_image"]];
98 user.updated_at = [NSString stringWithFormat:@"%@",dictUser[@"updated_at"]]; 99 user.updated_at = [NSString stringWithFormat:@"%@",dictUser[@"updated_at"]];
99 user.delete_flag = [[NSString stringWithFormat:@"%@",dictUser[@"delete_flag"]] intValue]; 100 user.delete_flag = [[NSString stringWithFormat:@"%@",dictUser[@"delete_flag"]] intValue];
100 user.fat_rate = [[NSString stringWithFormat:@"%@",dictUser[@"fat_rate"]] intValue]; 101 user.fat_rate = [[NSString stringWithFormat:@"%@",dictUser[@"fat_rate"]] intValue];
101 user.profiles_share = [[NSString stringWithFormat:@"%@",dictUser[@"profiles_share"]] intValue]; 102 user.profiles_share = [[NSString stringWithFormat:@"%@",dictUser[@"profiles_share"]] intValue];
102 user.remember_me = [[NSString stringWithFormat:@"%@",dictUser[@"remember_me"]] intValue]; 103 user.remember_me = [[NSString stringWithFormat:@"%@",dictUser[@"remember_me"]] intValue];
103 user.sound_notifications_share = [[NSString stringWithFormat:@"%@",dictUser[@"sound_notifications_share"]] intValue]; 104 user.sound_notifications_share = [[NSString stringWithFormat:@"%@",dictUser[@"sound_notifications_share"]] intValue];
104 user.spend_calo_in_day = [[NSString stringWithFormat:@"%@",dictUser[@"spend_calo_in_day"]] intValue]; 105 user.spend_calo_in_day = [[NSString stringWithFormat:@"%@",dictUser[@"spend_calo_in_day"]] intValue];
105 user.target = [[NSString stringWithFormat:@"%@",dictUser[@"target"]] intValue]; 106 user.target = [[NSString stringWithFormat:@"%@",dictUser[@"target"]] intValue];
106 completion(user, token, nil); 107 completion(user, token, nil);
107 } 108 }
108 else { // status = 0 error 109 else { // status = 0 error
109 NSString *message = dataResult[@"message"]; 110 NSString *message = dataResult[@"message"];
110 if (message == nil) { 111 if (message == nil) {
111 message = @"Unknown error"; 112 message = @"Unknown error";
112 } 113 }
113 NSError *loginFaild = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}]; 114 NSError *loginFaild = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}];
114 completion(nil, nil, loginFaild); 115 completion(nil, nil, loginFaild);
115 } 116 }
116 } 117 }
117 else 118 else
118 { 119 {
119 completion(nil, nil, error); 120 completion(nil, nil, error);
120 } 121 }
121 }]; 122 }];
122 } 123 }
123 124
124 // Register 125 // Register
125 - (void)registerUserWithParams:(NSDictionary *)params CompletionHandler: (void (^)(User *, NSString *, NSError *)) completion { 126 - (void)registerUserWithParams:(NSDictionary *)params CompletionHandler: (void (^)(User *, NSString *, NSError *)) completion {
126 [self _request:[kServerAddress stringByAppendingFormat: @"register"] method:@"POST" token:@"" paras:params completion:^(NSData *data, NSError *error) { 127 [self _request:[kServerAddress stringByAppendingFormat: @"register"] method:@"POST" token:@"" paras:params completion:^(NSData *data, NSError *error) {
127 128
128 if (completion == NULL) { 129 if (completion == NULL) {
129 return ; 130 return ;
130 } 131 }
131 132
132 if (error == nil) 133 if (error == nil)
133 { 134 {
134 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error]; 135 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
135 136
136 int status = [dataResult[@"status"] intValue]; 137 int status = [dataResult[@"status"] intValue];
137 if (status == 1) { // status = 1 success 138 if (status == 1) { // status = 1 success
138 NSString *token = dataResult[@"result"][@"token"]; 139 NSString *token = dataResult[@"result"][@"token"];
139 NSDictionary *dictUser = dataResult[@"result"][@"user"]; 140 NSDictionary *dictUser = dataResult[@"result"][@"user"];
140 User *user = [[User alloc] init]; 141 User *user = [[User alloc] init];
141 user.user_id = [NSString stringWithFormat:@"%@",dictUser[@"id"]]; 142 user.user_id = [NSString stringWithFormat:@"%@",dictUser[@"id"]];
142 user.username = [NSString stringWithFormat:@"%@",dictUser[@"username"]]; 143 user.username = [NSString stringWithFormat:@"%@",dictUser[@"username"]];
143 user.full_name = [NSString stringWithFormat:@"%@",dictUser[@"full_name"]]; 144 user.full_name = [NSString stringWithFormat:@"%@",dictUser[@"full_name"]];
144 user.nickname = [NSString stringWithFormat:@"%@",dictUser[@"nickname"]]; 145 user.nickname = [NSString stringWithFormat:@"%@",dictUser[@"nickname"]];
145 user.email = [NSString stringWithFormat:@"%@",dictUser[@"email"]]; 146 user.email = [NSString stringWithFormat:@"%@",dictUser[@"email"]];
146 user.password = [NSString stringWithFormat:@"%@",dictUser[@"password"]]; 147 user.password = [NSString stringWithFormat:@"%@",dictUser[@"password"]];
147 user.birthday = [NSString stringWithFormat:@"%@",dictUser[@"birthday"]]; 148 user.birthday = [NSString stringWithFormat:@"%@",dictUser[@"birthday"]];
148 user.address = [NSString stringWithFormat:@"%@",dictUser[@"address"]]; 149 user.address = [NSString stringWithFormat:@"%@",dictUser[@"address"]];
149 user.gender = [[NSString stringWithFormat:@"%@",dictUser[@"gender"]] intValue]; 150 user.gender = [[NSString stringWithFormat:@"%@",dictUser[@"gender"]] intValue];
150 user.height = [[NSString stringWithFormat:@"%@",dictUser[@"height"]] floatValue]; 151 user.height = [[NSString stringWithFormat:@"%@",dictUser[@"height"]] floatValue];
151 user.weight = [[NSString stringWithFormat:@"%@",dictUser[@"weight"]] floatValue]; 152 user.weight = [[NSString stringWithFormat:@"%@",dictUser[@"weight"]] floatValue];
152 user.user_description = [NSString stringWithFormat:@"%@",dictUser[@"description"]]; 153 user.user_description = [NSString stringWithFormat:@"%@",dictUser[@"description"]];
153 user.created_at = [NSString stringWithFormat:@"%@",dictUser[@"created_at"]]; 154 user.created_at = [NSString stringWithFormat:@"%@",dictUser[@"created_at"]];
154 user.physical_activity = [NSString stringWithFormat:@"%@",dictUser[@"physical_activity"]]; 155 user.physical_activity = [NSString stringWithFormat:@"%@",dictUser[@"physical_activity"]];
155 user.profile_image = [NSString stringWithFormat:@"%@",dictUser[@"profile_image"]]; 156 user.profile_image = [NSString stringWithFormat:@"%@",dictUser[@"profile_image"]];
156 user.updated_at = [NSString stringWithFormat:@"%@",dictUser[@"updated_at"]]; 157 user.updated_at = [NSString stringWithFormat:@"%@",dictUser[@"updated_at"]];
157 user.delete_flag = [[NSString stringWithFormat:@"%@",dictUser[@"delete_flag"]] intValue]; 158 user.delete_flag = [[NSString stringWithFormat:@"%@",dictUser[@"delete_flag"]] intValue];
158 user.fat_rate = [[NSString stringWithFormat:@"%@",dictUser[@"fat_rate"]] intValue]; 159 user.fat_rate = [[NSString stringWithFormat:@"%@",dictUser[@"fat_rate"]] intValue];
159 user.profiles_share = [[NSString stringWithFormat:@"%@",dictUser[@"profiles_share"]] intValue]; 160 user.profiles_share = [[NSString stringWithFormat:@"%@",dictUser[@"profiles_share"]] intValue];
160 user.remember_me = [[NSString stringWithFormat:@"%@",dictUser[@"remember_me"]] intValue]; 161 user.remember_me = [[NSString stringWithFormat:@"%@",dictUser[@"remember_me"]] intValue];
161 user.sound_notifications_share = [[NSString stringWithFormat:@"%@",dictUser[@"sound_notifications_share"]] intValue]; 162 user.sound_notifications_share = [[NSString stringWithFormat:@"%@",dictUser[@"sound_notifications_share"]] intValue];
162 user.spend_calo_in_day = [[NSString stringWithFormat:@"%@",dictUser[@"spend_calo_in_day"]] intValue]; 163 user.spend_calo_in_day = [[NSString stringWithFormat:@"%@",dictUser[@"spend_calo_in_day"]] intValue];
163 user.target = [[NSString stringWithFormat:@"%@",dictUser[@"target"]] intValue]; 164 user.target = [[NSString stringWithFormat:@"%@",dictUser[@"target"]] intValue];
164 completion(user, token, nil); 165 completion(user, token, nil);
165 } 166 }
166 else { // status = 0 error 167 else { // status = 0 error
167 NSString *message = dataResult[@"message"]; 168 NSString *message = dataResult[@"message"];
168 if (message == nil) { 169 if (message == nil) {
169 message = @"Unknown error"; 170 message = @"Unknown error";
170 } 171 }
171 NSError *loginFaild = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}]; 172 NSError *loginFaild = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}];
172 completion(nil, nil, loginFaild); 173 completion(nil, nil, loginFaild);
173 } 174 }
174 } 175 }
175 else 176 else
176 { 177 {
177 completion(nil, nil, error); 178 completion(nil, nil, error);
178 } 179 }
179 }]; 180 }];
180 } 181 }
181 182
182 - (void)forgetPass:(NSString *)email CompletionHandler:(void (^)(NSError *)) completion { 183 - (void)forgetPass:(NSString *)email CompletionHandler:(void (^)(NSError *)) completion {
183 [self _request:[kServerAddress stringByAppendingFormat: @"forgetPass"] method:@"POST" token:@"" paras:@{@"email":email} completion:^(NSData *data, NSError *error) { 184 [self _request:[kServerAddress stringByAppendingFormat: @"forgetPass"] method:@"POST" token:@"" paras:@{@"email":email} completion:^(NSData *data, NSError *error) {
184 185
185 if (completion == NULL) { 186 if (completion == NULL) {
186 return ; 187 return ;
187 } 188 }
188 189
189 if (error == nil) 190 if (error == nil)
190 { 191 {
191 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error]; 192 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
192 193
193 int status = [dataResult[@"status"] intValue]; 194 int status = [dataResult[@"status"] intValue];
194 if (status == 1) { // status = 1 success 195 if (status == 1) { // status = 1 success
195 completion(nil); 196 completion(nil);
196 } 197 }
197 else { // status = 0 error 198 else { // status = 0 error
198 NSString *message = dataResult[@"message"]; 199 NSString *message = dataResult[@"message"];
199 if (message == nil) { 200 if (message == nil) {
200 message = @"Unknown error"; 201 message = @"Unknown error";
201 } 202 }
202 NSError *forgetPass = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}]; 203 NSError *forgetPass = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}];
203 completion(forgetPass); 204 completion(forgetPass);
204 } 205 }
205 } 206 }
206 else 207 else
207 { 208 {
208 completion(error); 209 completion(error);
209 } 210 }
210 }]; 211 }];
211 } 212 }
212 - (void)confirmForgetPass:(NSString *)email withConfirm:(NSString *)confirm CompletionHandler:(void (^)(NSError *)) completion { 213 - (void)confirmForgetPass:(NSString *)email withConfirm:(NSString *)confirm CompletionHandler:(void (^)(NSError *)) completion {
213 [self _request:[kServerAddress stringByAppendingFormat: @"forgetPass/confirm"] method:@"POST" token:@"" paras:@{@"email":email, @"code_confirm": confirm} completion:^(NSData *data, NSError *error) { 214 [self _request:[kServerAddress stringByAppendingFormat: @"forgetPass/confirm"] method:@"POST" token:@"" paras:@{@"email":email, @"code_confirm": confirm} completion:^(NSData *data, NSError *error) {
214 215
215 if (completion == NULL) { 216 if (completion == NULL) {
216 return ; 217 return ;
217 } 218 }
218 219
219 if (error == nil) 220 if (error == nil)
220 { 221 {
221 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error]; 222 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
222 223
223 int status = [dataResult[@"status"] intValue]; 224 int status = [dataResult[@"status"] intValue];
224 if (status == 1) { // status = 1 success 225 if (status == 1) { // status = 1 success
225 completion(nil); 226 completion(nil);
226 } 227 }
227 else { // status = 0 error 228 else { // status = 0 error
228 NSString *message = dataResult[@"message"]; 229 NSString *message = dataResult[@"message"];
229 NSError *confirmForgetPass = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}]; 230 NSError *confirmForgetPass = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}];
230 completion(confirmForgetPass); 231 completion(confirmForgetPass);
231 } 232 }
232 } 233 }
233 else 234 else
234 { 235 {
235 completion(error); 236 completion(error);
236 } 237 }
237 }]; 238 }];
238 } 239 }
239 240
240 - (void)uploadImage:(NSString *)token andImageData:(NSData *)data CompletionHandler:(void (^)(NSString *, NSError *)) completion { 241 - (void)uploadImage:(NSString *)token andImageData:(NSData *)data CompletionHandler:(void (^)(NSString *, NSError *)) completion {
241 NSDictionary *dict = nil; 242 NSDictionary *dict = nil;
242 NSString *base64Encoded = [data base64EncodedStringWithOptions:0]; 243 NSString *base64Encoded = [data base64EncodedStringWithOptions:0];
243 if (token != nil) { 244 if (token != nil) {
244 dict = @{@"token":token, @"img": base64Encoded}; 245 dict = @{@"token":token, @"img": base64Encoded};
245 } 246 }
246 else { 247 else {
247 dict = @{@"img": base64Encoded}; 248 dict = @{@"img": base64Encoded};
248 } 249 }
249 [self _request:[kServerAddress stringByAppendingFormat: @"upload-image"] method:@"POST" token:token paras:dict completion:^(NSData *data, NSError *error) { 250 [self _request:[kServerAddress stringByAppendingFormat: @"upload-image"] method:@"POST" token:token paras:dict completion:^(NSData *data, NSError *error) {
250 251
251 if (completion == NULL) { 252 if (completion == NULL) {
252 return ; 253 return ;
253 } 254 }
254 255
255 if (error == nil) 256 if (error == nil)
256 { 257 {
257 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error]; 258 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
258 NSString *image_profile = [NSString stringWithFormat:@"%@", dataResult[@"message"]]; 259 NSString *image_profile = [NSString stringWithFormat:@"%@", dataResult[@"message"]];
259 completion(image_profile, nil); 260 completion(image_profile, nil);
260 } 261 }
261 else 262 else
262 { 263 {
263 completion(nil, error); 264 completion(nil, error);
264 } 265 }
265 }]; 266 }];
266 } 267 }
267 268
268 -(NSString *) convertIntToString : (int) type { 269 -(NSString *) convertIntToString : (int) type {
269 switch (type) { 270 switch (type) {
270 case 1: 271 case 1:
271 return @"week"; 272 return @"week";
272 break; 273 break;
273 case 2: 274 case 2:
274 return @"oneMonth"; 275 return @"oneMonth";
275 break; 276 break;
276 case 3: 277 case 3:
277 return @"threeMonth"; 278 return @"threeMonth";
278 break; 279 break;
279 case 4: 280 case 4:
280 return @"sixMonth"; 281 return @"sixMonth";
281 break; 282 break;
282 default: 283 default:
283 return @"today"; 284 return @"today";
284 break; 285 break;
285 } 286 }
286 } 287 }
287 288
288 #pragma mark - Home Screen Function 289 #pragma mark - Home Screen Function
289 - (void)requestTopWithMode:(int)mode andDate:(NSString *)date CompletionHandler:(void (^)(TopObject *, NSError *)) completion 290 - (void)requestTopWithMode:(int)mode andDate:(NSString *)date CompletionHandler:(void (^)(TopObject *, NSError *)) completion
290 { 291 {
291 NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken]; 292 NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken];
292 NSString *url = [kServerAddress stringByAppendingFormat:@"api/top/%d/%@", mode, date]; 293 NSString *url = [kServerAddress stringByAppendingFormat:@"api/top/%d/%@", mode, date];
293 [self _request:url method:@"GET" token:token paras:nil completion:^(NSData *data, NSError *error) { 294 [self _request:url method:@"GET" token:token paras:nil completion:^(NSData *data, NSError *error) {
294 295
295 if (completion == NULL) { 296 if (completion == NULL) {
296 return ; 297 return ;
297 } 298 }
298 299
299 if (error == nil) 300 if (error == nil)
300 { 301 {
301 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error]; 302 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
302 int status = [dataResult[@"status"] intValue]; 303 int status = [dataResult[@"status"] intValue];
303 if (status == 1) { // status = 1 success 304 if (status == 1) { // status = 1 success
304 if(dataResult[@"result"] != nil) { 305 if(dataResult[@"result"] != nil) {
305 NSDictionary * dictResult = dataResult[@"result"]; 306 NSDictionary * dictResult = dataResult[@"result"];
306 TopObject *topObject = [[TopObject alloc] init]; 307 TopObject *topObject = [[TopObject alloc] init];
307 TargetInfor *targetInfor = [[TargetInfor alloc] initWithData:dictResult[@"targetInf"]]; 308 TargetInfor *targetInfor = [[TargetInfor alloc] initWithData:dictResult[@"targetInf"]];
308 topObject.targetInfor = targetInfor; 309 topObject.targetInfor = targetInfor;
309 topObject.kcal = [[NSString stringWithFormat:@"%@", dictResult[@"kcal"]] intValue]; 310 topObject.kcal = [[NSString stringWithFormat:@"%@", dictResult[@"kcal"]] intValue];
310 topObject.distance = [[NSString stringWithFormat:@"%@", dictResult[@"distance"]] floatValue]; 311 topObject.distance = [[NSString stringWithFormat:@"%@", dictResult[@"distance"]] floatValue];
311 topObject.time = [NSString stringWithFormat:@"%@", dictResult[@"time"]]; 312 topObject.time = [NSString stringWithFormat:@"%@", dictResult[@"time"]];
312 NSMutableArray *arrayStep = [[NSMutableArray alloc] init]; 313 NSMutableArray *arrayStep = [[NSMutableArray alloc] init];
313 NSArray *array = dictResult[@"dataChart"]; 314 NSArray *array = dictResult[@"dataChart"];
314 for(NSDictionary *dict in array) { 315 for(NSDictionary *dict in array) {
315 StepObject *object = [[StepObject alloc] init]; 316 StepObject *object = [[StepObject alloc] init];
316 if([dict objectForKey:@"numStep"] != nil) { 317 if([dict objectForKey:@"numStep"] != nil) {
317 object.step = [dict[@"numStep"] intValue]; 318 object.step = [dict[@"numStep"] intValue];
318 } 319 }
319 if([dict objectForKey:@"hour"] != nil) { 320 if([dict objectForKey:@"hour"] != nil) {
320 object.hour = [dict[@"hour"] intValue]; 321 object.hour = [dict[@"hour"] intValue];
321 } 322 }
322 switch (mode) { 323 switch (mode) {
323 case 1: 324 case 1:
324 object.typeStep = @"walking"; 325 object.typeStep = @"walking";
325 break; 326 break;
326 case 2: 327 case 2:
327 object.typeStep = @"running"; 328 object.typeStep = @"running";
328 break; 329 break;
329 case 3: 330 case 3:
330 object.typeStep = @"bike"; 331 object.typeStep = @"bike";
331 break; 332 break;
332 default: 333 default:
333 break; 334 break;
334 } 335 }
335 [arrayStep addObject:object]; 336 [arrayStep addObject:object];
336 } 337 }
337 topObject.dataChart = [[NSMutableArray alloc] initWithArray:arrayStep]; 338 topObject.dataChart = [[NSMutableArray alloc] initWithArray:arrayStep];
338 completion(topObject, nil); 339 completion(topObject, nil);
339 } 340 }
340 else { 341 else {
341 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":@"Unknown Error"}]; 342 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":@"Unknown Error"}];
342 completion(nil, errorObject); 343 completion(nil, errorObject);
343 } 344 }
344 } 345 }
345 else { 346 else {
346 NSString *message = dataResult[@"message"]; 347 NSString *message = dataResult[@"message"];
347 if (message == nil) { 348 if (message == nil) {
348 message = @"Unknown error"; 349 message = @"Unknown error";
349 } 350 }
350 351
351 if ([message isEqualToString:@"Token is invalid"]) { 352 if ([message isEqualToString:@"Token is invalid"]) {
352 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES]; 353 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES];
353 [self requestTopWithMode:mode andDate:date CompletionHandler:completion]; 354 [self requestTopWithMode:mode andDate:date CompletionHandler:completion];
354 } 355 }
355 else { 356 else {
356 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}]; 357 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}];
357 completion(nil, errorObject); 358 completion(nil, errorObject);
358 } 359 }
359 } 360 }
360 } 361 }
361 else 362 else
362 { 363 {
363 completion(nil, error); 364 completion(nil, error);
364 } 365 }
365 }]; 366 }];
366 } 367 }
367 368
368 - (void)requestCreateLog:(int)mode withStep:(int)numStep startDate:(NSString *)startDate endDate:(NSString *)endDate CompletionHandler:(void (^)(NSError *))completion { 369 - (void)requestCreateLog:(int)mode withStep:(int)numStep startDate:(NSString *)startDate endDate:(NSString *)endDate CompletionHandler:(void (^)(NSError *))completion {
369 NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken]; 370 NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken];
370 NSString *url = [kServerAddress stringByAppendingFormat:@"api/createLog"]; 371 NSString *url = [kServerAddress stringByAppendingFormat:@"api/createLog"];
371 NSDictionary *dict = @{@"mode": [NSNumber numberWithInt:mode], @"numStep": [NSNumber numberWithInt:numStep], @"startTime": startDate, @"endTime": endDate}; 372 NSDictionary *dict = @{@"mode": [NSNumber numberWithInt:mode], @"numStep": [NSNumber numberWithInt:numStep], @"startTime": startDate, @"endTime": endDate};
372 [self _request:url method:@"POST" token:token paras:dict completion:^(NSData *data, NSError *error) { 373 [self _request:url method:@"POST" token:token paras:dict completion:^(NSData *data, NSError *error) {
373 374
374 if (completion == NULL) { 375 if (completion == NULL) {
375 return ; 376 return ;
376 } 377 }
377 378
378 if (error == nil) 379 if (error == nil)
379 { 380 {
380 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error]; 381 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
381 int status = [dataResult[@"status"] intValue]; 382 int status = [dataResult[@"status"] intValue];
382 if (status == 1) { // status = 1 success 383 if (status == 1) { // status = 1 success
383 completion(nil); 384 completion(nil);
384 } 385 }
385 else { 386 else {
386 NSString *message = dataResult[@"message"]; 387 NSString *message = dataResult[@"message"];
387 if (message == nil) { 388 if (message == nil) {
388 message = @"Unknown error"; 389 message = @"Unknown error";
389 } 390 }
390 391
391 if ([message isEqualToString:@"Token is invalid"]) { 392 if ([message isEqualToString:@"Token is invalid"]) {
392 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES]; 393 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES];
393 [self requestCreateLog:mode withStep:numStep startDate:startDate endDate:endDate CompletionHandler:completion]; 394 [self requestCreateLog:mode withStep:numStep startDate:startDate endDate:endDate CompletionHandler:completion];
394 } 395 }
395 else { 396 else {
396 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}]; 397 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}];
397 completion(errorObject); 398 completion(errorObject);
398 } 399 }
399 } 400 }
400 } 401 }
401 else 402 else
402 { 403 {
403 completion(error); 404 completion(error);
404 } 405 }
405 }]; 406 }];
406 } 407 }
407 408
408 #pragma mark - History Screen Function 409 #pragma mark - History Screen Function
409 - (void) requestHistory:(NSString *)token atDate:(NSDate *)date withType:(int)type andMode:(int) mode CompletionHandler:(void (^)(HistoryObject *, NSError *)) completion { 410 - (void) requestHistory:(NSString *)token startDate:(NSDate *)startDate endDate:(NSDate *)endDate CompletionHandler:(void (^)(NSArray *, NSError *)) completion {
410 NSString *url = [kServerAddress stringByAppendingFormat:@"/api/history/%@/%d", [self convertIntToString:type], mode]; 411 NSString *url = [kServerAddress stringByAppendingFormat:@"/api/history/%@/%@", [Utilities stringFromDate:startDate withFormat:@"YYYYMMdd" locale:@""], [Utilities stringFromDate:endDate withFormat:@"YYYYMMdd" locale:@""]];
411 NSLog(@"requestHistory link %@", url); 412 NSLog(@"requestHistory link %@", url);
412 [self _request:url method:@"GET" token:token paras:nil completion:^(NSData *data, NSError *error) { 413 [self _request:url method:@"GET" token:token paras:nil completion:^(NSData *data, NSError *error) {
413 414
414 if (completion == NULL) { 415 if (completion == NULL) {
415 return ; 416 return ;
416 } 417 }
417 418
418 if (error == nil) 419 if (error == nil)
419 { 420 {
420 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error]; 421 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
421 NSLog(@"%@", dataResult); 422 NSLog(@"%@", dataResult);
422 int status = [dataResult[@"status"] intValue]; 423 int status = [dataResult[@"status"] intValue];
423 if (status == 1) { // status = 1 success 424 if (status == 1) { // status = 1 success
424 HistoryObject * object = [[HistoryObject alloc] initWithData:dataResult[@"result"]]; 425 NSMutableArray * arrayHistory = [[NSMutableArray alloc] init];
425 completion(object, nil); 426 NSDictionary * arrResult = dataResult[@"result"];
427 if(arrResult != nil) {
428 NSArray *arrayKey = [NSArray arrayWithObjects:@"mode_1", @"mode_2", @"mode_3", nil];
429 for(NSString * key in arrayKey) {
430 NSDictionary *mode = [arrResult objectForKey:key];
431 if(mode.count > 0) {
432 HistoryObject * objectMode = [[HistoryObject alloc] initWithData:mode];
433 [arrayHistory addObject:objectMode];
434 }
435 else {
436 [arrayHistory addObject:[[HistoryObject alloc] init]];
437 }
438 }
439 }
440 completion(arrayHistory, nil);
426 } 441 }
427 else { 442 else {
428 NSString *message = dataResult[@"message"]; 443 NSString *message = dataResult[@"message"];
429 if (message == nil) { 444 if (message == nil) {
430 message = @"Unknown error"; 445 message = @"Unknown error";
431 } 446 }
432 447
433 if ([message isEqualToString:@"Token is invalid"]) { 448 if ([message isEqualToString:@"Token is invalid"]) {
434 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES]; 449 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES];
435 NSString *tokenNew = [[NSUserDefaults standardUserDefaults] objectForKey:kToken]; 450 NSString *tokenNew = [[NSUserDefaults standardUserDefaults] objectForKey:kToken];
436 [self requestHistory:tokenNew atDate:date withType:type andMode:mode CompletionHandler:completion]; 451 [self requestHistory:tokenNew startDate:startDate endDate:endDate CompletionHandler:completion];
437 } 452 }
438 else { 453 else {
439 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}]; 454 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}];
440 completion(nil, errorObject); 455 completion(nil, errorObject);
441 } 456 }
442 } 457 }
443 } 458 }
444 else 459 else
445 { 460 {
446 completion(nil, error); 461 completion(nil, error);
447 } 462 }
448 }]; 463 }];
449 } 464 }
450 465
451 - (void) requestHistoryGraph:(NSString *)token withType:(int)type andMode:(int) mode CompletionHandler:(void (^)(HistoryGraphObject *, NSError *)) completion { 466 - (void) requestHistoryGraph:(NSString *)token withType:(int)type andMode:(int) mode CompletionHandler:(void (^)(HistoryGraphObject *, NSError *)) completion {
452 NSString *url = [kServerAddress stringByAppendingFormat:@"/api/history/graph/%@/%d", [self convertIntToString:type], mode]; 467 NSString *url = [kServerAddress stringByAppendingFormat:@"/api/history/graph/%@/%d", [self convertIntToString:type], mode];
453 NSLog(@"requestHistoryGraph link %@", url); 468 NSLog(@"requestHistoryGraph link %@", url);
454 [self _request:url method:@"GET" token:token paras:nil completion:^(NSData *data, NSError *error) { 469 [self _request:url method:@"GET" token:token paras:nil completion:^(NSData *data, NSError *error) {
455 470
456 if (completion == NULL) { 471 if (completion == NULL) {
457 return ; 472 return ;
458 } 473 }
459 474
460 if (error == nil) 475 if (error == nil)
461 { 476 {
462 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error]; 477 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
463 NSLog(@"%@", dataResult); 478 NSLog(@"%@", dataResult);
464 int status = [dataResult[@"status"] intValue]; 479 int status = [dataResult[@"status"] intValue];
465 if (status == 1) { // status = 1 success 480 if (status == 1) { // status = 1 success
466 HistoryGraphObject * object = [[HistoryGraphObject alloc] initWithData:dataResult[@"result"]]; 481 HistoryGraphObject * object = [[HistoryGraphObject alloc] initWithData:dataResult[@"result"]];
467 completion(object, nil); 482 completion(object, nil);
468 } 483 }
469 else { 484 else {
470 NSString *message = dataResult[@"message"]; 485 NSString *message = dataResult[@"message"];
471 if (message == nil) { 486 if (message == nil) {
472 message = @"Unknown error"; 487 message = @"Unknown error";
473 } 488 }
474 489
475 if ([message isEqualToString:@"Token is invalid"]) { 490 if ([message isEqualToString:@"Token is invalid"]) {
476 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES]; 491 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES];
477 NSString *tokenNew = [[NSUserDefaults standardUserDefaults] objectForKey:kToken]; 492 NSString *tokenNew = [[NSUserDefaults standardUserDefaults] objectForKey:kToken];
478 [self requestHistoryGraph:tokenNew withType:type andMode:mode CompletionHandler:completion]; 493 [self requestHistoryGraph:tokenNew withType:type andMode:mode CompletionHandler:completion];
479 } 494 }
480 else { 495 else {
481 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}]; 496 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}];
482 completion(nil, errorObject); 497 completion(nil, errorObject);
483 } 498 }
484 } 499 }
485 } 500 }
486 else 501 else
487 { 502 {
488 completion(nil, error); 503 completion(nil, error);
489 } 504 }
490 }]; 505 }];
491 } 506 }
492 507
493 - (void) requestHistoryList:(NSString *)token withType:(int)type andMode:(int) mode AtPage:(int) page CompletionHandler:(void (^)(NSArray *, NSError *)) completion { 508 - (void) requestHistoryList:(NSString *)token withType:(int)type andMode:(int) mode AtPage:(int) page CompletionHandler:(void (^)(NSArray *, NSError *)) completion {
494 NSString *url = [kServerAddress stringByAppendingFormat:@"/api/history/list/%@/%d?page=%d&record=50", [self convertIntToString:type], mode, page]; 509 NSString *url = [kServerAddress stringByAppendingFormat:@"/api/history/list/%@/%d?page=%d&record=50", [self convertIntToString:type], mode, page];
495 NSLog(@"requestHistoryList link %@", url); 510 NSLog(@"requestHistoryList link %@", url);
496 [self _request:url method:@"GET" token:token paras:nil completion:^(NSData *data, NSError *error) { 511 [self _request:url method:@"GET" token:token paras:nil completion:^(NSData *data, NSError *error) {
497 512
498 if (completion == NULL) { 513 if (completion == NULL) {
499 return ; 514 return ;
500 } 515 }
501 516
502 if (error == nil) 517 if (error == nil)
503 { 518 {
504 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error]; 519 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
505 NSLog(@"%@", dataResult); 520 NSLog(@"%@", dataResult);
506 int status = [dataResult[@"status"] intValue]; 521 int status = [dataResult[@"status"] intValue];
507 if (status == 1) { // status = 1 success 522 if (status == 1) { // status = 1 success
508 if(dataResult[@"result"] != nil) { 523 if(dataResult[@"result"] != nil) {
509 NSArray * array = dataResult[@"result"][@"data"]; 524 NSArray * array = dataResult[@"result"][@"data"];
510 NSMutableArray * arrayHistory = [[NSMutableArray alloc] init]; 525 NSMutableArray * arrayHistory = [[NSMutableArray alloc] init];
511 for(NSDictionary * dict in array) { 526 for(NSDictionary * dict in array) {
512 HistoryObject * object = [[HistoryObject alloc] initWithData:dict]; 527 HistoryObject * object = [[HistoryObject alloc] initWithData:dict];
513 [arrayHistory addObject:object]; 528 [arrayHistory addObject:object];
514 } 529 }
515 completion(arrayHistory, nil); 530 completion(arrayHistory, nil);
516 } 531 }
517 else { 532 else {
518 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":@"Unknown Error"}]; 533 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":@"Unknown Error"}];
519 completion(nil, errorObject); 534 completion(nil, errorObject);
520 } 535 }
521 } 536 }
522 else { 537 else {
523 NSString *message = dataResult[@"message"]; 538 NSString *message = dataResult[@"message"];
524 if (message == nil) { 539 if (message == nil) {
525 message = @"Unknown error"; 540 message = @"Unknown error";
526 } 541 }
527 542
528 if ([message isEqualToString:@"Token is invalid"]) { 543 if ([message isEqualToString:@"Token is invalid"]) {
529 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES]; 544 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES];
530 NSString *tokenNew = [[NSUserDefaults standardUserDefaults] objectForKey:kToken]; 545 NSString *tokenNew = [[NSUserDefaults standardUserDefaults] objectForKey:kToken];
531 [self requestHistoryList:tokenNew withType:type andMode:mode AtPage:page CompletionHandler:completion]; 546 [self requestHistoryList:tokenNew withType:type andMode:mode AtPage:page CompletionHandler:completion];
532 } 547 }
533 else { 548 else {
534 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}]; 549 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}];
535 completion(nil, errorObject); 550 completion(nil, errorObject);
536 } 551 }
537 } 552 }
538 } 553 }
539 else 554 else
540 { 555 {
541 completion(nil, error); 556 completion(nil, error);
542 } 557 }
543 }]; 558 }];
544 } 559 }
545 560
546 #pragma mark - SNS Screen Function 561 #pragma mark - SNS Screen Function
547 - (void) requestTweetsList:(NSString *)token groupID: (int) groupID withPage:(int)page CompletionHandler:(void (^)(NSArray *, NSError *)) completion { 562 - (void) requestTweetsList:(NSString *)token groupID: (int) groupID withPage:(int)page CompletionHandler:(void (^)(NSArray *, NSError *)) completion {
548 NSString *url = [kServerAddress stringByAppendingFormat:@"/api/sns/%d", page]; 563 NSString *url = [kServerAddress stringByAppendingFormat:@"/api/sns/%d", page];
549 if(groupID > -1) { 564 if(groupID > -1) {
550 url = [kServerAddress stringByAppendingFormat:@"api/tweet/list?group_id=%d&page=%d&record=10", groupID, page]; 565 url = [kServerAddress stringByAppendingFormat:@"api/tweet/list?group_id=%d&page=%d&record=10", groupID, page];
551 } 566 }
552 NSLog(@"requestTweetsList link %@", url); 567 NSLog(@"requestTweetsList link %@", url);
553 [self _request:url method:@"GET" token:token paras:nil completion:^(NSData *data, NSError *error) { 568 [self _request:url method:@"GET" token:token paras:nil completion:^(NSData *data, NSError *error) {
554 569
555 if (completion == NULL) { 570 if (completion == NULL) {
556 return ; 571 return ;
557 } 572 }
558 573
559 if (error == nil) 574 if (error == nil)
560 { 575 {
561 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error]; 576 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
562 NSLog(@"%@", dataResult); 577 NSLog(@"%@", dataResult);
563 int status = [dataResult[@"status"] intValue]; 578 int status = [dataResult[@"status"] intValue];
564 if (status == 1) { // status = 1 success 579 if (status == 1) { // status = 1 success
565 if(dataResult[@"result"] != nil) { 580 if(dataResult[@"result"] != nil) {
566 NSArray * array = dataResult[@"result"]; 581 NSArray * array = dataResult[@"result"];
567 NSMutableArray * arrayTweets = [[NSMutableArray alloc] init]; 582 NSMutableArray * arrayTweets = [[NSMutableArray alloc] init];
568 for(NSDictionary * dict in array) { 583 for(NSDictionary * dict in array) {
569 TweetObject * object = [[TweetObject alloc] initWithData:dict]; 584 TweetObject * object = [[TweetObject alloc] initWithData:dict];
570 [arrayTweets addObject:object]; 585 [arrayTweets addObject:object];
571 } 586 }
572 completion(arrayTweets, nil); 587 completion(arrayTweets, nil);
573 } 588 }
574 else { 589 else {
575 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":@"Unknown Error"}]; 590 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":@"Unknown Error"}];
576 completion(nil, errorObject); 591 completion(nil, errorObject);
577 } 592 }
578 } 593 }
579 else { 594 else {
580 NSString *message = dataResult[@"message"]; 595 NSString *message = dataResult[@"message"];
581 if (message == nil) { 596 if (message == nil) {
582 message = @"Unknown error"; 597 message = @"Unknown error";
583 } 598 }
584 599
585 if ([message isEqualToString:@"Token is invalid"]) { 600 if ([message isEqualToString:@"Token is invalid"]) {
586 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES]; 601 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES];
587 NSString *tokenNew = [[NSUserDefaults standardUserDefaults] objectForKey:kToken]; 602 NSString *tokenNew = [[NSUserDefaults standardUserDefaults] objectForKey:kToken];
588 [self requestTweetsList:tokenNew groupID:groupID withPage:page CompletionHandler:completion]; 603 [self requestTweetsList:tokenNew groupID:groupID withPage:page CompletionHandler:completion];
589 } 604 }
590 else { 605 else {
591 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}]; 606 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}];
592 completion(nil, errorObject); 607 completion(nil, errorObject);
593 } 608 }
594 } 609 }
595 } 610 }
596 else 611 else
597 { 612 {
598 completion(nil, error); 613 completion(nil, error);
599 } 614 }
600 }]; 615 }];
601 } 616 }
602 617
603 - (void) searchGroup:(NSString *)token withKey:(NSString *)key andPage:(int)page CompletionHandler:(void (^)(NSArray *, NSError *)) completion { 618 - (void) searchGroup:(NSString *)token withKey:(NSString *)key andPage:(int)page CompletionHandler:(void (^)(NSArray *, NSError *)) completion {
604 NSString *url = [kServerAddress stringByAppendingFormat:@"api/sns/group/search"]; 619 NSString *url = [kServerAddress stringByAppendingFormat:@"api/sns/group/search"];
605 NSLog(@"searchGroup link %@ page %d", url, page); 620 NSLog(@"searchGroup link %@ page %d", url, page);
606 if(searchTask != nil) { 621 if(searchTask != nil) {
607 [searchTask cancel]; 622 [searchTask cancel];
608 } 623 }
609 624
610 searchTask = [self _request:url method:@"POST" token:token paras:@{@"keyword":key, @"page": [NSNumber numberWithInt:page]} completion:^(NSData *data, NSError *error) { 625 searchTask = [self _request:url method:@"POST" token:token paras:@{@"keyword":key, @"page": [NSNumber numberWithInt:page]} completion:^(NSData *data, NSError *error) {
611 searchTask = nil; 626 searchTask = nil;
612 if (completion == NULL) { 627 if (completion == NULL) {
613 return ; 628 return ;
614 } 629 }
615 630
616 if (error == nil) 631 if (error == nil)
617 { 632 {
618 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error]; 633 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
619 NSLog(@"%@", dataResult); 634 NSLog(@"%@", dataResult);
620 int status = [dataResult[@"status"] intValue]; 635 int status = [dataResult[@"status"] intValue];
621 if (status == 1) { // status = 1 success 636 if (status == 1) { // status = 1 success
622 if(dataResult[@"result"] != nil) { 637 if(dataResult[@"result"] != nil) {
623 NSArray * array = dataResult[@"result"]; 638 NSArray * array = dataResult[@"result"];
624 NSMutableArray * arrayTweets = [[NSMutableArray alloc] init]; 639 NSMutableArray * arrayTweets = [[NSMutableArray alloc] init];
625 for(NSDictionary * dict in array) { 640 for(NSDictionary * dict in array) {
626 GroupObject * object = [[GroupObject alloc] initWithData:dict]; 641 GroupObject * object = [[GroupObject alloc] initWithData:dict];
627 [arrayTweets addObject:object]; 642 [arrayTweets addObject:object];
628 } 643 }
629 completion(arrayTweets, nil); 644 completion(arrayTweets, nil);
630 } 645 }
631 else { 646 else {
632 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":@"Unknown Error"}]; 647 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":@"Unknown Error"}];
633 completion(nil, errorObject); 648 completion(nil, errorObject);
634 } 649 }
635 } 650 }
636 else { 651 else {
637 NSString *message = dataResult[@"message"]; 652 NSString *message = dataResult[@"message"];
638 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}]; 653 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}];
639 completion(nil, errorObject); 654 completion(nil, errorObject);
640 } 655 }
641 } 656 }
642 else 657 else
643 { 658 {
644 completion(nil, error); 659 completion(nil, error);
645 } 660 }
646 }]; 661 }];
647 } 662 }
648 663
664 #pragma mark - Group Function
665 -(void) requestCreateGroup:(NSString *)token withGroup:(GroupObject *)group CompletionHandler:(void (^)(GroupObject *, NSError *)) completion {
666 NSString *url = [kServerAddress stringByAppendingFormat:@"api/groups/newGroup"];
667 NSLog(@"requestCreateGroup link %@", url);
668 NSDictionary * dict = @{@"group_name":group.name,
669 @"goal":group.goal,
670 @"walk_mode_active":[NSNumber numberWithBool:group.walkMode],
671 @"run_mode_active":[NSNumber numberWithBool:group.runMode],
672 @"bike_mode_active":[NSNumber numberWithBool:group.bikeMode],
673 @"step_mode_active":[NSNumber numberWithBool:group.stepMode],
674 @"gym_mode_active":[NSNumber numberWithBool:group.gymMode],
675 @"beginer_mode_active":[NSNumber numberWithBool:group.beginMode],
676 @"walk_mode_goal":[NSNumber numberWithBool:group.walkGoal],
677 @"run_mode_goal":[NSNumber numberWithBool:group.runGoal],
678 @"bike_mode_goal":[NSNumber numberWithBool:group.bikeGoal]};
679
680 [self _request:url method:@"POST" token:token paras:dict completion:^(NSData *data, NSError *error) {
681
682 if (completion == NULL) {
683 return ;
684 }
685
686 if (error == nil)
687 {
688 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
689 NSLog(@"%@", dataResult);
690 int status = [dataResult[@"status"] intValue];
691 if (status == 1) { // status = 1 success
692 if(dataResult[@"result"] != nil) {
693 NSDictionary * dict = dataResult[@"result"];
694 group.groupID = [dict[@"group_id"] intValue];
695 completion(group, nil);
696 }
697 else {
698 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":@"Unknown Error"}];
699 completion(nil, errorObject);
700 }
701 }
702 else {
703 NSString *message = dataResult[@"message"];
704 if (message == nil) {
705 message = @"Unknown error";
706 }
707
708 if ([message isEqualToString:@"Token is invalid"]) {
709 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES];
710 NSString *tokenNew = [[NSUserDefaults standardUserDefaults] objectForKey:kToken];
711 [self requestCreateGroup:tokenNew withGroup:group CompletionHandler:completion];
712 }
713 else {
714 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}];
715 completion(nil, errorObject);
716 }
717 }
718 }
719 else
720 {
721 completion(nil, error);
722 }
723 }];
724 }
725
726 - (void) getGroupDetail:(NSString *)token withGroupID:(int)groupID CompletionHandler:(void (^)(GroupObject *, NSError *)) completion {
727 NSString *url = [kServerAddress stringByAppendingFormat:@"api/sns/group/detail/%d", groupID];
728 NSLog(@"getGroupDetail link %@", url);
729 [self _request:url method:@"GET" token:token paras:nil completion:^(NSData *data, NSError *error) {
730
731 if (completion == NULL) {
732 return ;
733 }
734
735 if (error == nil)
736 {
737 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
738 NSLog(@"%@", dataResult);
739 int status = [dataResult[@"status"] intValue];
740 if (status == 1) { // status = 1 success
741 if(dataResult[@"result"] != nil) {
742 NSArray * array = dataResult[@"result"];
743 GroupObject * object = [[GroupObject alloc] initWithData:array[0] andGroupID:groupID];
744 completion(object, nil);
745 }
746 else {
747 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":@"Unknown Error"}];
748 completion(nil, errorObject);
749 }
750 }
751 else {
752 NSString *message = dataResult[@"message"];
753 if (message == nil) {
754 message = @"Unknown error";
755 }
756
757 if ([message isEqualToString:@"Token is invalid"]) {
758 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES];
759 NSString *tokenNew = [[NSUserDefaults standardUserDefaults] objectForKey:kToken];
760 [self getGroupDetail:tokenNew withGroupID:groupID CompletionHandler:completion];
761 }
762 else {
763 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}];
764 completion(nil, errorObject);
765 }
766 }
767 }
768 else
769 {
770 completion(nil, error);
771 }
772 }];
773 }
774
775 - (void) requestMemberList:(NSString *)token groupID: (int) groupID withPage:(int)page CompletionHandler:(void (^)(NSArray *, NSError *)) completion {
776 NSString *url = [kServerAddress stringByAppendingFormat:@"api/sns/group/member/%d/%d", groupID, page];
777 NSLog(@"requestMemberList link %@ page %d", url, page);
778
779 [self _request:url method:@"GET" token:token paras:nil completion:^(NSData *data, NSError *error) {
780 if (completion == NULL) {
781 return ;
782 }
783
784 if (error == nil)
785 {
786 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
787 NSLog(@"%@", dataResult);
788 int status = [dataResult[@"status"] intValue];
789 if (status == 1) { // status = 1 success
790 if(dataResult[@"result"] != nil) {
791 NSArray * array = dataResult[@"result"];
792 NSMutableArray * arrayTweets = [[NSMutableArray alloc] init];
793 for(NSDictionary * dict in array) {
794 MemberObject * object = [[MemberObject alloc] initWithData:dict];
795 [arrayTweets addObject:object];
796 }
797 completion(arrayTweets, nil);
798 }
799 else {
800 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":@"Unknown Error"}];
801 completion(nil, errorObject);
802 }
803 }
804 else {
805 NSString *message = dataResult[@"message"];
806 if (message == nil) {
807 message = @"Unknown error";
808 }
809
810 if ([message isEqualToString:@"Token is invalid"]) {
811 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES];
812 NSString *tokenNew = [[NSUserDefaults standardUserDefaults] objectForKey:kToken];
813 [self requestMemberList:tokenNew groupID:groupID withPage:page CompletionHandler:completion];
814 }
815 else {
816 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}];
817 completion(nil, errorObject);
818 }
819 }
820 }
821 else
822 {
823 completion(nil, error);
824 }
825 }];
826 }
827
828 - (void) requestJoinGroup:(NSString *)token groupID: (int) groupID CompletionHandler:(void (^)(NSError *)) completion {
829 NSString *url = [kServerAddress stringByAppendingFormat:@"api/sns/group/join"];
830 NSLog(@"requestJoinGroup link %@", url);
831
832 [self _request:url method:@"POST" token:token paras:@{@"group_id": [NSNumber numberWithInt:groupID]} completion:^(NSData *data, NSError *error) {
833 if (completion == NULL) {
834 return ;
835 }
836
837 if (error == nil)
838 {
839 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
840 NSLog(@"%@", dataResult);
841 int status = [dataResult[@"status"] intValue];
842 if (status == 1) { // status = 1 success
843 if(dataResult[@"result"] != nil) {
844 completion(nil);
845 }
846 else {
847 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":@"Unknown Error"}];
848 completion(errorObject);
849 }
850 }
851 else {
852 NSString *message = dataResult[@"message"];
853 if ([message isEqualToString:@"Token is invalid"]) {
854 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES];
855 NSString *tokenNew = [[NSUserDefaults standardUserDefaults] objectForKey:kToken];
856 [self requestJoinGroup:tokenNew groupID:groupID CompletionHandler:completion];
857 }
858 else {
859 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}];
860 completion(errorObject);
861 }
862 }
863 }
864 else
865 {
866 completion(error);
867 }
868 }];
869 }
870
871 - (void) requestGroupList:(NSString *)token CompletionHandler:(void (^)(NSArray *, NSError *)) completion {
872 NSString *url = [kServerAddress stringByAppendingFormat:@"api/groups/list"];
873 NSLog(@"requestGroupList link %@", url);
874
875 [self _request:url method:@"GET" token:token paras:nil completion:^(NSData *data, NSError *error) {
876 if (completion == NULL) {
877 return ;
878 }
879
880 if (error == nil)
881 {
882 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
883 NSLog(@"%@", dataResult);
884 int status = [dataResult[@"status"] intValue];
885 if (status == 1) { // status = 1 success
886 if(dataResult[@"result"] != nil) {
887 NSArray * array = dataResult[@"result"];
888 NSMutableArray * arrayGroup = [[NSMutableArray alloc] init];
889 for(NSDictionary * dict in array) {
890 GroupObject * object = [[GroupObject alloc] initWithShortData:dict];
891 [arrayGroup addObject:object];
892 }
893 completion(arrayGroup, nil);
894 }
895 else {
896 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":@"Unknown Error"}];
897 completion(nil, errorObject);
898 }
899 }
900 else {
901 NSString *message = dataResult[@"message"];
902 if (message == nil) {
903 message = @"Unknown error";
904 }
905
906 if ([message isEqualToString:@"Token is invalid"]) {
907 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES];
908 NSString *tokenNew = [[NSUserDefaults standardUserDefaults] objectForKey:kToken];
909 [self requestGroupList:tokenNew CompletionHandler:completion];
910 }
911 else {
912 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}];
913 completion(nil, errorObject);
914 }
915 }
916 }
917 else
918 {
919 completion(nil, error);
920 }
921 }];
922 }
649 #pragma mark - Group Function 923 #pragma mark - Common API
650 -(void) requestCreateGroup:(NSString *)token withGroup:(GroupObject *)group CompletionHandler:(void (^)(GroupObject *, NSError *)) completion { 924 - (void)refreshToken: (NSString *)userID CompletionHandler:(void (^)(NSString *, NSError *))completion {
651 NSString *url = [kServerAddress stringByAppendingFormat:@"api/groups/newGroup"]; 925 [self _request:[kServerAddress stringByAppendingFormat: @"refreshToken"] method:@"POST" token:@"" paras:@{@"userId":userID} completion:^(NSData *data, NSError *error) {
652 NSLog(@"requestCreateGroup link %@", url); 926
653 NSDictionary * dict = @{@"group_name":group.name, 927 if (completion == NULL) {
654 @"goal":group.goal, 928 return ;
655 @"walk_mode_active":[NSNumber numberWithBool:group.walkMode], 929 }
656 @"run_mode_active":[NSNumber numberWithBool:group.runMode], 930
657 @"bike_mode_active":[NSNumber numberWithBool:group.bikeMode], 931 if (error == nil)
658 @"step_mode_active":[NSNumber numberWithBool:group.stepMode], 932 {
659 @"gym_mode_active":[NSNumber numberWithBool:group.gymMode], 933 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error];
660 @"beginer_mode_active":[NSNumber numberWithBool:group.beginMode], 934
661 @"walk_mode_goal":[NSNumber numberWithBool:group.walkGoal], 935 int status = [dataResult[@"status"] intValue];
662 @"run_mode_goal":[NSNumber numberWithBool:group.runGoal], 936 if (status == 1) { // status = 1 success
663 @"bike_mode_goal":[NSNumber numberWithBool:group.bikeGoal]}; 937 NSArray *arrayResult = dataResult[@"result"];
664 938 if (arrayResult.count > 0) {
665 [self _request:url method:@"POST" token:token paras:dict completion:^(NSData *data, NSError *error) { 939 NSString *token = arrayResult[0];
666 940 completion(token, nil);
667 if (completion == NULL) { 941 }
668 return ; 942 else {
669 } 943 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":@"Unknown Error"}];
670 944 completion(nil, errorObject);
671 if (error == nil) 945 }
672 { 946
673 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error]; 947 }
674 NSLog(@"%@", dataResult); 948 else { // status = 0 error
675 int status = [dataResult[@"status"] intValue]; 949 NSString *message = dataResult[@"message"];
676 if (status == 1) { // status = 1 success 950 if (message == nil) {
677 if(dataResult[@"result"] != nil) { 951 message = @"Unknown error";
678 NSDictionary * dict = dataResult[@"result"]; 952 }
679 group.groupID = [dict[@"group_id"] intValue]; 953 NSError *loginFaild = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}];
680 completion(group, nil); 954 completion(nil, loginFaild);
681 } 955 }
682 else { 956 }
683 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":@"Unknown Error"}]; 957 else
684 completion(nil, errorObject); 958 {
685 } 959 completion(nil, error);
686 } 960 }
687 else { 961 }];
688 NSString *message = dataResult[@"message"]; 962 }
689 if (message == nil) { 963
690 message = @"Unknown error"; 964 #pragma mark - Private Function
691 } 965 - (void) checkToken {
692 966 // [[NSNotificationCenter defaultCenter] postNotificationName:kNotificationToken object:nil];
693 if ([message isEqualToString:@"Token is invalid"]) { 967 NSData *data = [[NSUserDefaults standardUserDefaults] objectForKey:kUser];
694 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES]; 968 User *user = (User *)[NSKeyedUnarchiver unarchiveObjectWithData:data];
695 NSString *tokenNew = [[NSUserDefaults standardUserDefaults] objectForKey:kToken]; 969 if (user != nil) {
696 [self requestCreateGroup:tokenNew withGroup:group CompletionHandler:completion]; 970 [self refreshToken:user.user_id CompletionHandler:^(NSString *token, NSError *error) {
697 } 971 if (error == nil) {
698 else { 972 [[NSUserDefaults standardUserDefaults] setObject:token forKey:kToken];
699 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}]; 973 [[NSUserDefaults standardUserDefaults] synchronize];
700 completion(nil, errorObject); 974 }
701 } 975 }];
702 } 976 }
703 } 977 }
704 else 978 - (NSData *) _encodeDictionary: (NSDictionary *) dictionary
705 { 979 {
706 completion(nil, error); 980 NSMutableArray *parts = [[NSMutableArray alloc] init];
707 } 981 for (id key in dictionary)
708 }]; 982 {
709 } 983 NSString *encodedValue = [[dictionary[key] description] urlencode];
710 984 NSString *encodedKey = [[key description] urlencode];//[[key description] stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
711 - (void) getGroupDetail:(NSString *)token withGroupID:(int)groupID CompletionHandler:(void (^)(GroupObject *, NSError *)) completion { 985 NSString *part = [NSString stringWithFormat: @"%@=%@", encodedKey, encodedValue];
712 NSString *url = [kServerAddress stringByAppendingFormat:@"api/sns/group/detail/%d", groupID]; 986 [parts addObject:part];
713 NSLog(@"getGroupDetail link %@", url); 987 }
714 [self _request:url method:@"GET" token:token paras:nil completion:^(NSData *data, NSError *error) { 988 NSString *encodedDictionary = [parts componentsJoinedByString:@"&"];
715 989 return [encodedDictionary dataUsingEncoding: NSUTF8StringEncoding];
716 if (completion == NULL) { 990 }
717 return ; 991
718 } 992 - (NSURLSessionDataTask *) _request:(NSString *)address method:(NSString *)method token:(NSString *) token paras:(NSDictionary *)paras completion:(void (^)(NSData *data, NSError *error))completion
719 993 {
720 if (error == nil) 994 NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL: [NSURL URLWithString:address]];
721 { 995 request.HTTPMethod = method;
722 NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error]; 996 [request setValue: @"application/json" forHTTPHeaderField: @"Accept"];
723 NSLog(@"%@", dataResult); 997 [request setValue: @"application/json" forHTTPHeaderField: @"Content-Type"];
724 int status = [dataResult[@"status"] intValue]; 998 if(token != nil && ![token isEqual: @""]) {
725 if (status == 1) { // status = 1 success 999 [request setValue: token forHTTPHeaderField: @"token"];
726 if(dataResult[@"result"] != nil) { 1000 }
727 NSArray * array = dataResult[@"result"]; 1001 [request setTimeoutInterval:self.timeOutInterval];
728 GroupObject * object = [[GroupObject alloc] initWithData:array[0] andGroupID:groupID]; 1002
729 completion(object, nil); 1003 if (paras != nil)
730 } 1004 {
731 else { 1005 NSData *encodedData = [self _encodeDictionary: paras];
732 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":@"Unknown Error"}]; 1006 [request setValue: [NSString stringWithFormat: @"%lu", (unsigned long) encodedData.length] forHTTPHeaderField: @"Content-Length"];
733 completion(nil, errorObject); 1007 [request setValue: @"application/x-www-form-urlencoded charset=utf-8" forHTTPHeaderField: @"Content-Type"];
734 } 1008 [request setHTTPBody: encodedData];
735 } 1009 }
736 else { 1010
737 NSString *message = dataResult[@"message"]; 1011 NSURLSession *session = [NSURLSession sharedSession];
738 if (message == nil) { 1012 NSURLSessionDataTask *task = [session dataTaskWithRequest:request
739 message = @"Unknown error"; 1013 completionHandler:
740 } 1014 ^(NSData *data, NSURLResponse *response, NSError *error) {
741 1015 if (completion == NULL) {
742 if ([message isEqualToString:@"Token is invalid"]) { 1016 return ;
743 [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES]; 1017 }
744 NSString *tokenNew = [[NSUserDefaults standardUserDefaults] objectForKey:kToken]; 1018 if (error == nil)
745 [self getGroupDetail:tokenNew withGroupID:groupID CompletionHandler:completion]; 1019 {
746 } 1020 completion(data, nil);
747 else { 1021 }
748 NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}]; 1022 else
749 completion(nil, errorObject); 1023 {
750 } 1024 completion(nil, error);
751 } 1025 }
752 } 1026 }];
753 else 1027 [task resume];
754 { 1028 return task;
755 completion(nil, error); 1029 }
756 } 1030
757 }]; 1031 -(void)waitUntilDone:(void(^)(void))waitBlock {
758 } 1032 //use your statement or call method here
759 1033 if(waitBlock){
760 - (void) requestMemberList:(NSString *)token groupID: (int) groupID withPage:(int)page CompletionHandler:(void (^)(NSArray *, NSError *)) completion { 1034 waitBlock();
761 NSString *url = [kServerAddress stringByAppendingFormat:@"api/sns/group/member/%d/%d", groupID, page]; 1035 }
762 NSLog(@"requestMemberList link %@ page %d", url, page); 1036 }
763 1037
764 [self _request:url method:@"GET" token:token paras:nil completion:^(NSData *data, NSError *error) { 1038 @end
765 if (completion == NULL) { 1039
LifeLog/LifeLog/TweetObject.h
1 // 1 //
2 // TweetObject.h 2 // TweetObject.h
3 // LifeLog 3 // LifeLog
4 // 4 //
5 // Created by nvtu on 8/11/17. 5 // Created by nvtu on 8/11/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 TweetObject : NSObject 11 @interface TweetObject : NSObject
12 12
13 @property (nonatomic) int tweetID; 13 @property (nonatomic) int tweetID;
14 @property (nonatomic) int groupID; 14 @property (nonatomic) int groupID;
15 @property (nonatomic) int userID; 15 @property (nonatomic) int userID;
16 @property (nonatomic) float distance; 16 @property (nonatomic) float distance;
17 17
18 @property (nonatomic, strong) NSString * content; 18 @property (nonatomic, strong) NSString * content;
19 @property (nonatomic, strong) NSString * mode; 19 @property (nonatomic, strong) NSString * mode;
20 @property (nonatomic, strong) NSString * time; 20 @property (nonatomic, strong) NSString * time;
21 @property (nonatomic, strong) NSString * userName; 21 @property (nonatomic, strong) NSString * userName;
22 @property (nonatomic, strong) NSString * avatar; 22 @property (nonatomic, strong) NSString * avatar;
23 @property (nonatomic, strong) NSDate * createDate; 23 @property (nonatomic, strong) NSDate * createDate;
24 24
25 -(id) initWithData : (NSDictionary *) dict; 25 -(id) initWithData : (NSDictionary *) dict;
26 26
27 @end 27 @end
28 28
LifeLog/LifeLog/TweetObject.m
1 // 1 //
2 // TweetObject.m 2 // TweetObject.m
3 // LifeLog 3 // LifeLog
4 // 4 //
5 // Created by nvtu on 8/11/17. 5 // Created by nvtu on 8/11/17.
6 // Copyright © 2017 PhongNV. All rights reserved. 6 // Copyright © 2017 PhongNV. All rights reserved.
7 // 7 //
8 8
9 #import "TweetObject.h" 9 #import "TweetObject.h"
10 #import "Utilities.h" 10 #import "Utilities.h"
11 11
12 @implementation TweetObject 12 @implementation TweetObject
13 13
14 -(id) initWithData : (NSDictionary *) dict { 14 -(id) initWithData : (NSDictionary *) dict {
15 if([dict objectForKey:@"id"] != nil) { 15 if([dict objectForKey:@"id"] != nil) {
16 self.tweetID = [dict[@"id"] intValue]; 16 self.tweetID = [dict[@"id"] intValue];
17 } 17 }
18 if([dict objectForKey:@"group_id"] != nil) { 18 if([dict objectForKey:@"group_id"] != nil) {
19 self.groupID = [dict[@"group_id"] intValue]; 19 self.groupID = [dict[@"group_id"] intValue];
20 } 20 }
21 if([dict objectForKey:@"tweet_content"] != nil) { 21 if([dict objectForKey:@"tweet_content"] != nil) {
22 self.content = dict[@"tweet_content"]; 22 self.content = dict[@"tweet_content"];
23 } 23 }
24 if([dict objectForKey:@"mode"] != nil) { 24 if([dict objectForKey:@"mode"] != nil) {
25 int modeInt = [dict[@"mode"] intValue]; 25 int modeInt = [dict[@"mode"] intValue];
26 switch (modeInt) { 26 switch (modeInt) {
27 case 2: 27 case 2:
28 self.mode = @"running"; 28 self.mode = @"running";
29 break; 29 break;
30 case 3: 30 case 3:
31 self.mode = @"bike"; 31 self.mode = @"bike";
32 break; 32 break;
33 default: 33 default:
34 self.mode = @"walking"; 34 self.mode = @"walking";
35 break; 35 break;
36 } 36 }
37 } 37 }
38 if([dict objectForKey:@"distance"] != nil) { 38 if([dict objectForKey:@"distance"] != nil) {
39 self.distance = [dict[@"distance"] floatValue]; 39 self.distance = [dict[@"distance"] floatValue];
40 } 40 }
41 if([dict objectForKey:@"time"] != nil) { 41 if([dict objectForKey:@"time"] != nil) {
42 self.time = dict[@"time"]; 42 self.time = dict[@"time"];
43 } 43 }
44 if([dict objectForKey:@"user_id"] != nil) { 44 if([dict objectForKey:@"user_id"] != nil) {
45 self.userID = [dict[@"user_id"] intValue]; 45 self.userID = [dict[@"user_id"] intValue];
46 } 46 }
47 if([dict objectForKey:@"user_created"] != nil) { 47 if([dict objectForKey:@"user_created"] != nil) {
48 self.userID = [dict[@"user_created"] intValue]; 48 self.userID = [dict[@"user_created"] intValue];
49 } 49 }
50 if([dict objectForKey:@"username"] != nil) { 50 if([dict objectForKey:@"username"] != nil) {
51 self.userName = dict[@"username"]; 51 self.userName = dict[@"username"];
52 } 52 }
53 if([dict objectForKey:@"full_name"] != nil) { 53 if([dict objectForKey:@"full_name"] != nil) {
54 self.userName = dict[@"full_name"]; 54 self.userName = dict[@"full_name"];
55 } 55 }
56 if([dict objectForKey:@"profile_image"] != nil) { 56 if([dict objectForKey:@"profile_image"] != nil) {
57 self.avatar = dict[@"profile_image"]; 57 self.avatar = dict[@"profile_image"];
58 } 58 }
59 if([dict objectForKey:@"created_at"] != nil) { 59 if([dict objectForKey:@"created_at"] != nil) {
60 NSString *dateString = dict[@"created_at"]; 60 NSString *dateString = dict[@"created_at"];
61 self.createDate = [Utilities dateFromString:dateString withFormat:@"yyyy-MM-dd hh:mm:ss"]; 61 self.createDate = [Utilities dateFromString:dateString withFormat:@"yyyy-MM-dd hh:mm:ss"];
62 } 62 }
63 else if([dict objectForKey:@"date_created"] != nil && [dict objectForKey:@"time_created"] != nil) { 63 else if([dict objectForKey:@"date_created"] != nil && [dict objectForKey:@"time_created"] != nil) {
64 NSString *dateString = dict[@"date_created"]; 64 NSString *dateString = dict[@"date_created"];
65 [dateString stringByAppendingString:@" "]; 65 [dateString stringByAppendingString:@" "];
66 [dateString stringByAppendingString:dict[@"time_created"]]; 66 [dateString stringByAppendingString:dict[@"time_created"]];
67 self.createDate = [Utilities dateFromString:dateString withFormat:@"yyyy-MM-dd hh:mm:ss"]; 67 self.createDate = [Utilities dateFromString:dateString withFormat:@"yyyy-MM-dd hh:mm:ss"];
68 } 68 }
69 else { 69 else {
70 self.createDate = [NSDate date]; 70 self.createDate = [NSDate date];
71 } 71 }
72 return self; 72 return self;
73 } 73 }
74 74
75 @end 75 @end
76 76
LifeLog/LifeLog/Utilities.h
1 // 1 //
2 // Utilities.h 2 // Utilities.h
3 // LifeLog 3 // LifeLog
4 // 4 //
5 // Created by Nguyen Van Phong on 7/29/17. 5 // Created by Nguyen Van Phong on 7/29/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 #import <UIKit/UIKit.h> 10 #import <UIKit/UIKit.h>
11 11
12 @interface Utilities : NSObject 12 @interface Utilities : NSObject
13 + (NSString *)addCommaFromNumber:(NSInteger)number; 13 + (NSString *)addCommaFromNumber:(NSInteger)number;
14 + (UIColor *)convertHecToColor:(int) hex; 14 + (UIColor *)convertHecToColor:(int) hex;
15 + (void)showMessage:(NSString *)message withViewController:(UIViewController *)vc;
15 + (void)showMessage:(NSString *)message withViewController:(UIViewController *)vc; 16 + (void)showErrorMessage:(NSString *)message withViewController:(UIViewController *)vc;
16 + (void)showErrorMessage:(NSString *)message withViewController:(UIViewController *)vc; 17 + (NSString *) getImageLink : (NSString *) path;
17 + (NSString *) getImageLink : (NSString *) path; 18
18 19 //share function
19 //share function 20 + (void) shareFacebook : (NSString *) content withViewController:(UIViewController *)vc;
20 + (void) shareFacebook : (NSString *) content withViewController:(UIViewController *)vc; 21 + (void) shareTwitter : (NSString *) content withViewController:(UIViewController *)vc;
21 + (void) shareTwitter : (NSString *) content withViewController:(UIViewController *)vc; 22 + (void) shareLine : (NSString *) content withViewController:(UIViewController *)vc;
22 + (void) shareLine : (NSString *) content withViewController:(UIViewController *)vc; 23 + (void) shareEmail : (NSString *) content withViewController:(UIViewController *)vc;
23 + (void) shareEmail : (NSString *) content withViewController:(UIViewController *)vc; 24
24 25 //convert date time
25 //convert date time 26 + (NSDate *) dateFromString : (NSString *) dateString withFormat: (NSString *) format;
26 + (NSDate *) dateFromString : (NSString *) dateString withFormat: (NSString *) format; 27 + (NSString *) stringFromDate : (NSDate *) date withFormat: (NSString *) format locale:(NSString *) locale;
27 + (NSString *) stringFromDate : (NSDate *) date withFormat: (NSString *) format; 28 @end
28 @end 29
LifeLog/LifeLog/Utilities.m
1 // 1 //
2 // Utilities.m 2 // Utilities.m
3 // LifeLog 3 // LifeLog
4 // 4 //
5 // Created by Nguyen Van Phong on 7/29/17. 5 // Created by Nguyen Van Phong on 7/29/17.
6 // Copyright © 2017 PhongNV. All rights reserved. 6 // Copyright © 2017 PhongNV. All rights reserved.
7 // 7 //
8 8
9 #import <Social/Social.h> 9 #import <Social/Social.h>
10 #import <LineKit/Line.h> 10 #import <LineKit/Line.h>
11 11
12 #import "Utilities.h" 12 #import "Utilities.h"
13 #import "ServerAPI.h" 13 #import "ServerAPI.h"
14 14
15 @implementation Utilities 15 @implementation Utilities
16 + (NSString *)addCommaFromNumber:(NSInteger)number 16 + (NSString *)addCommaFromNumber:(NSInteger)number
17 { 17 {
18 NSNumberFormatter *fmt = [[NSNumberFormatter alloc] init]; 18 NSNumberFormatter *fmt = [[NSNumberFormatter alloc] init];
19 [fmt setNumberStyle:NSNumberFormatterDecimalStyle]; 19 [fmt setNumberStyle:NSNumberFormatterDecimalStyle];
20 [fmt setMaximumFractionDigits:0]; 20 [fmt setMaximumFractionDigits:0];
21 NSString *result = [fmt stringFromNumber:@(number)]; 21 NSString *result = [fmt stringFromNumber:@(number)];
22 return result; 22 return result;
23 } 23 }
24 24
25 + (UIColor *)convertHecToColor:(int) hex 25 + (UIColor *)convertHecToColor:(int) hex
26 { 26 {
27 return [UIColor colorWithRed:((float)((hex & 0xFF0000) >> 16))/255.0 \ 27 return [UIColor colorWithRed:((float)((hex & 0xFF0000) >> 16))/255.0 \
28 green:((float)((hex & 0xFF00) >> 8))/255.0 \ 28 green:((float)((hex & 0xFF00) >> 8))/255.0 \
29 blue:((float)(hex & 0xFF))/255.0 alpha:1.0]; 29 blue:((float)(hex & 0xFF))/255.0 alpha:1.0];
30 } 30 }
31 31
32 + (void)showMessage:(NSString *)message withViewController:(UIViewController *)vc
33 {
34 if (message.length > 0) {
35 UIAlertController * alert= [UIAlertController
36 alertControllerWithTitle:@"Message"
37 message:message
38 preferredStyle:UIAlertControllerStyleAlert];
39
40 UIAlertAction* ok = [UIAlertAction
41 actionWithTitle:@"OK"
42 style:UIAlertActionStyleDefault
43 handler:^(UIAlertAction * action)
44 {
45 [alert dismissViewControllerAnimated:YES completion:nil];
46 }];
47
48 [alert addAction:ok];
49
50 [vc presentViewController:alert animated:YES completion:nil];
51 }
52 }
53
32 + (void)showMessage:(NSString *)message withViewController:(UIViewController *)vc 54 + (void)showErrorMessage:(NSString *)message withViewController:(UIViewController *)vc
33 { 55 {
34 if (message.length > 0) { 56 if (message.length > 0) {
35 UIAlertController * alert= [UIAlertController 57 UIAlertController * alert= [UIAlertController
36 alertControllerWithTitle:@"Message" 58 alertControllerWithTitle:@"Error"
37 message:message 59 message:message
38 preferredStyle:UIAlertControllerStyleAlert]; 60 preferredStyle:UIAlertControllerStyleAlert];
39 61
40 UIAlertAction* ok = [UIAlertAction 62 UIAlertAction* ok = [UIAlertAction
41 actionWithTitle:@"OK" 63 actionWithTitle:@"OK"
42 style:UIAlertActionStyleDefault 64 style:UIAlertActionStyleDefault
43 handler:^(UIAlertAction * action) 65 handler:^(UIAlertAction * action)
44 { 66 {
45 [alert dismissViewControllerAnimated:YES completion:nil]; 67 [alert dismissViewControllerAnimated:YES completion:nil];
46 }];
47 68 }];
48 [alert addAction:ok]; 69
49 70 [alert addAction:ok];
50 [vc presentViewController:alert animated:YES completion:nil]; 71
51 } 72 [vc presentViewController:alert animated:YES completion:nil];
52 } 73 }
53 74 }
54 + (void)showErrorMessage:(NSString *)message withViewController:(UIViewController *)vc 75
55 { 76 + (NSString *) getImageLink : (NSString *) path {
56 if (message.length > 0) { 77 NSString * link = kServerAddress;
57 UIAlertController * alert= [UIAlertController 78 return [link stringByAppendingString:path];
58 alertControllerWithTitle:@"Error" 79 }
59 message:message 80
60 preferredStyle:UIAlertControllerStyleAlert]; 81 + (void) shareFacebook : (NSString *) content withViewController:(UIViewController *)vc {
61 82 if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook])
62 UIAlertAction* ok = [UIAlertAction 83 {
63 actionWithTitle:@"OK" 84 SLComposeViewController *composeViewController = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
64 style:UIAlertActionStyleDefault 85
65 handler:^(UIAlertAction * action) 86 [composeViewController setInitialText:content];
66 { 87 [composeViewController setCompletionHandler:^(SLComposeViewControllerResult result) {
67 [alert dismissViewControllerAnimated:YES completion:nil]; 88
68 }]; 89 switch (result) {
69 90 case SLComposeViewControllerResultCancelled:
70 [alert addAction:ok]; 91 NSLog(@"canceled");
71 92 break;
72 [vc presentViewController:alert animated:YES completion:nil]; 93 case SLComposeViewControllerResultDone:
73 } 94 NSLog(@"done");
74 } 95 break;
75 96 default:
76 + (NSString *) getImageLink : (NSString *) path { 97 break;
77 NSString * link = kServerAddress; 98 }
78 return [link stringByAppendingString:path]; 99 }];
79 } 100 [vc presentViewController:composeViewController animated:YES completion:nil];
80 101 }
81 + (void) shareFacebook : (NSString *) content withViewController:(UIViewController *)vc { 102 else {
82 if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) 103 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"App-Prefs:root=FACEBOOK"]];
83 { 104 }
84 SLComposeViewController *composeViewController = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook]; 105 }
85 106
86 [composeViewController setInitialText:content]; 107 + (void) shareTwitter : (NSString *) content withViewController:(UIViewController *)vc {
87 [composeViewController setCompletionHandler:^(SLComposeViewControllerResult result) { 108 if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter])
88 109 {
89 switch (result) { 110 SLComposeViewController *composeViewController = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
90 case SLComposeViewControllerResultCancelled: 111
91 NSLog(@"canceled"); 112 [composeViewController setInitialText:content];
92 break; 113 [composeViewController setCompletionHandler:^(SLComposeViewControllerResult result) {
93 case SLComposeViewControllerResultDone: 114
94 NSLog(@"done"); 115 switch (result) {
95 break; 116 case SLComposeViewControllerResultCancelled:
96 default: 117 NSLog(@"canceled");
97 break; 118 break;
98 } 119 case SLComposeViewControllerResultDone:
99 }]; 120 NSLog(@"done");
100 [vc presentViewController:composeViewController animated:YES completion:nil]; 121 break;
101 } 122 default:
102 else { 123 break;
103 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"App-Prefs:root=FACEBOOK"]]; 124 }
104 } 125 }];
105 } 126 [vc presentViewController:composeViewController animated:YES completion:nil];
106 127 }
107 + (void) shareTwitter : (NSString *) content withViewController:(UIViewController *)vc { 128 else {
108 if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]) 129 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"App-Prefs:root=TWITTER"]];
109 { 130 }
110 SLComposeViewController *composeViewController = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter]; 131 }
111 132
112 [composeViewController setInitialText:content]; 133 + (void) shareLine : (NSString *) content withViewController:(UIViewController *)vc {
113 [composeViewController setCompletionHandler:^(SLComposeViewControllerResult result) { 134 if (![Line isLineInstalled]) {
114 135 [self showErrorMessage:@"Install Line app first" withViewController:vc];
115 switch (result) { 136 }
116 case SLComposeViewControllerResultCancelled: 137 else {
117 NSLog(@"canceled"); 138 [Line shareText:content];
118 break; 139 }
119 case SLComposeViewControllerResultDone: 140 }
120 NSLog(@"done"); 141
121 break; 142 + (void) shareEmail : (NSString *) content withViewController:(UIViewController *)vc {
122 default: 143 NSString *urlEmail = @"mailto:?subject=Share from LifeLog&body=";
123 break; 144 urlEmail = [urlEmail stringByAppendingString:content];
124 } 145 urlEmail = [urlEmail stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]];
125 }]; 146 [[UIApplication sharedApplication] openURL: [NSURL URLWithString: urlEmail]];
126 [vc presentViewController:composeViewController animated:YES completion:nil]; 147 }
127 } 148
128 else { 149 #pragma mark convert date time
129 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"App-Prefs:root=TWITTER"]]; 150 + (NSDate *) dateFromString : (NSString *) dateString withFormat: (NSString *) format {
130 } 151 NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
131 } 152 [dateFormat setDateFormat:format];
132 153 NSDate *date = [dateFormat dateFromString:dateString];
133 + (void) shareLine : (NSString *) content withViewController:(UIViewController *)vc { 154 if(date == NULL) {
134 if (![Line isLineInstalled]) { 155 return [NSDate date];
135 [self showErrorMessage:@"Install Line app first" withViewController:vc]; 156 }
136 } 157 return date;
137 else { 158 }
138 [Line shareText:content]; 159
139 } 160 + (NSString *) stringFromDate : (NSDate *) date withFormat: (NSString *) format locale:(NSString *) locale {
140 } 161 NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
141 162 [dateFormat setDateFormat:format];
163 if(![locale isEqual: @""]) {
164 [dateFormat setLocale:[[NSLocale alloc] initWithLocaleIdentifier:locale]];
165 }
142 + (void) shareEmail : (NSString *) content withViewController:(UIViewController *)vc { 166 NSString *dateString = [dateFormat stringFromDate:date];
143 NSString *urlEmail = @"mailto:?subject=Share from LifeLog&body="; 167 return dateString;
144 urlEmail = [urlEmail stringByAppendingString:content]; 168 }
145 urlEmail = [urlEmail stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]]; 169
146 [[UIApplication sharedApplication] openURL: [NSURL URLWithString: urlEmail]]; 170 @end