Commit 7f9c2f9ce5493320d7d79478ba9b3a67705724eb
1 parent
f4173d1653
Exists in
master
and in
1 other branch
Add ranking UI
Showing 13 changed files with 456 additions and 28 deletions Side-by-side Diff
- LifeLog/LifeLog.xcodeproj/project.pbxproj
- LifeLog/LifeLog/AppDelegate.m
- LifeLog/LifeLog/CollectionView.m
- LifeLog/LifeLog/CollectionView.xib
- LifeLog/LifeLog/HistoryViewController.xib
- LifeLog/LifeLog/LabelCollectionViewCell.xib
- LifeLog/LifeLog/Localizable.strings
- LifeLog/LifeLog/RankingTableViewCell.h
- LifeLog/LifeLog/RankingTableViewCell.m
- LifeLog/LifeLog/RankingTableViewCell.xib
- LifeLog/LifeLog/RankingViewController.h
- LifeLog/LifeLog/RankingViewController.m
- LifeLog/LifeLog/RankingViewController.xib
LifeLog/LifeLog.xcodeproj/project.pbxproj
... | ... | @@ -47,6 +47,8 @@ |
47 | 47 | E9373E471F3596940059355A /* AutoTransLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = E9373E461F3596940059355A /* AutoTransLabel.m */; }; |
48 | 48 | E9373E4A1F35AA180059355A /* HistoryObject.m in Sources */ = {isa = PBXBuildFile; fileRef = E9373E491F35AA180059355A /* HistoryObject.m */; }; |
49 | 49 | E9373E4D1F361A230059355A /* HistoryGraphObject.m in Sources */ = {isa = PBXBuildFile; fileRef = E9373E4C1F361A230059355A /* HistoryGraphObject.m */; }; |
50 | + E9682E2E1F39675A00FE05A2 /* RankingTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E9682E2C1F39675A00FE05A2 /* RankingTableViewCell.m */; }; | |
51 | + E9682E2F1F39675A00FE05A2 /* RankingTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E9682E2D1F39675A00FE05A2 /* RankingTableViewCell.xib */; }; | |
50 | 52 | E99E13AB1F336F3600C78787 /* CollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = E99E13AA1F336F3600C78787 /* CollectionView.m */; }; |
51 | 53 | E99E13AD1F336F4500C78787 /* CollectionView.xib in Resources */ = {isa = PBXBuildFile; fileRef = E99E13AC1F336F4500C78787 /* CollectionView.xib */; }; |
52 | 54 | E99E13B11F33720600C78787 /* LabelCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E99E13AF1F33720600C78787 /* LabelCollectionViewCell.m */; }; |
... | ... | @@ -146,6 +148,9 @@ |
146 | 148 | E9373E491F35AA180059355A /* HistoryObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HistoryObject.m; sourceTree = "<group>"; }; |
147 | 149 | E9373E4B1F361A230059355A /* HistoryGraphObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistoryGraphObject.h; sourceTree = "<group>"; }; |
148 | 150 | E9373E4C1F361A230059355A /* HistoryGraphObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HistoryGraphObject.m; sourceTree = "<group>"; }; |
151 | + E9682E2B1F39675A00FE05A2 /* RankingTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RankingTableViewCell.h; sourceTree = "<group>"; }; | |
152 | + E9682E2C1F39675A00FE05A2 /* RankingTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RankingTableViewCell.m; sourceTree = "<group>"; }; | |
153 | + E9682E2D1F39675A00FE05A2 /* RankingTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RankingTableViewCell.xib; sourceTree = "<group>"; }; | |
149 | 154 | E99E13A91F336F3600C78787 /* CollectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectionView.h; sourceTree = "<group>"; }; |
150 | 155 | E99E13AA1F336F3600C78787 /* CollectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CollectionView.m; sourceTree = "<group>"; }; |
151 | 156 | E99E13AC1F336F4500C78787 /* CollectionView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CollectionView.xib; sourceTree = "<group>"; }; |
... | ... | @@ -361,6 +366,9 @@ |
361 | 366 | 6E84E3B71F27A9A0001EB88E /* RankingViewController.h */, |
362 | 367 | 6E84E3B81F27A9A0001EB88E /* RankingViewController.m */, |
363 | 368 | 6E84E3B91F27A9A0001EB88E /* RankingViewController.xib */, |
369 | + E9682E2B1F39675A00FE05A2 /* RankingTableViewCell.h */, | |
370 | + E9682E2C1F39675A00FE05A2 /* RankingTableViewCell.m */, | |
371 | + E9682E2D1F39675A00FE05A2 /* RankingTableViewCell.xib */, | |
364 | 372 | ); |
365 | 373 | name = Ranking; |
366 | 374 | sourceTree = "<group>"; |
... | ... | @@ -566,7 +574,7 @@ |
566 | 574 | 6E84E3701F27A700001EB88E = { |
567 | 575 | CreatedOnToolsVersion = 8.3.3; |
568 | 576 | DevelopmentTeam = UXU4V3VUN4; |
569 | - ProvisioningStyle = Manual; | |
577 | + ProvisioningStyle = Automatic; | |
570 | 578 | }; |
571 | 579 | 6E84E3891F27A703001EB88E = { |
572 | 580 | CreatedOnToolsVersion = 8.3.3; |
... | ... | @@ -611,6 +619,7 @@ |
611 | 619 | 6E84E3BB1F27A9A0001EB88E /* RankingViewController.xib in Resources */, |
612 | 620 | 9CA8AEEB1F31BB4600C5FC74 /* ConfirmForgetPassViewController.xib in Resources */, |
613 | 621 | 6E84E3C01F27A9B1001EB88E /* SNSViewController.xib in Resources */, |
622 | + E9682E2F1F39675A00FE05A2 /* RankingTableViewCell.xib in Resources */, | |
614 | 623 | 6E8DA0F81F2BAC3500CCE941 /* TodayViewController.xib in Resources */, |
615 | 624 | 6E84E3841F27A701001EB88E /* LaunchScreen.storyboard in Resources */, |
616 | 625 | 6E84E3811F27A701001EB88E /* Assets.xcassets in Resources */, |
... | ... | @@ -698,6 +707,7 @@ |
698 | 707 | 9CBDA0FA1F2ECE2C0055DED1 /* BaseViewController.m in Sources */, |
699 | 708 | 6E8DA0F71F2BAC3400CCE941 /* TodayViewController.m in Sources */, |
700 | 709 | 6E7F93451F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.m in Sources */, |
710 | + E9682E2E1F39675A00FE05A2 /* RankingTableViewCell.m in Sources */, | |
701 | 711 | 6E48AF0D1F2F9D3300C1D184 /* CustomTextField.m in Sources */, |
702 | 712 | E99E13AB1F336F3600C78787 /* CollectionView.m in Sources */, |
703 | 713 | 6E84E3B01F27A975001EB88E /* HomeViewController.m in Sources */, |
... | ... | @@ -863,7 +873,8 @@ |
863 | 873 | baseConfigurationReference = 0FC2D57087AF4571C57FAE08 /* Pods-LifeLog.debug.xcconfig */; |
864 | 874 | buildSettings = { |
865 | 875 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
866 | - DEVELOPMENT_TEAM = UXU4V3VUN4; | |
876 | + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | |
877 | + DEVELOPMENT_TEAM = ""; | |
867 | 878 | INFOPLIST_FILE = LifeLog/Info.plist; |
868 | 879 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; |
869 | 880 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; |
... | ... | @@ -876,8 +887,8 @@ |
876 | 887 | ); |
877 | 888 | PRODUCT_BUNDLE_IDENTIFIER = mobileworld.jp.lifelog; |
878 | 889 | PRODUCT_NAME = "$(TARGET_NAME)"; |
879 | - PROVISIONING_PROFILE = "556082e4-d9c1-4ce1-bab1-13515289a7fd"; | |
880 | - PROVISIONING_PROFILE_SPECIFIER = Lifelog_Development; | |
890 | + PROVISIONING_PROFILE = ""; | |
891 | + PROVISIONING_PROFILE_SPECIFIER = ""; | |
881 | 892 | }; |
882 | 893 | name = Debug; |
883 | 894 | }; |
... | ... | @@ -886,8 +897,8 @@ |
886 | 897 | baseConfigurationReference = 4CFDA5714AF852358A1EB515 /* Pods-LifeLog.release.xcconfig */; |
887 | 898 | buildSettings = { |
888 | 899 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
889 | - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; | |
890 | - DEVELOPMENT_TEAM = UXU4V3VUN4; | |
900 | + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | |
901 | + DEVELOPMENT_TEAM = ""; | |
891 | 902 | INFOPLIST_FILE = LifeLog/Info.plist; |
892 | 903 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; |
893 | 904 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; |
... | ... | @@ -900,8 +911,8 @@ |
900 | 911 | ); |
901 | 912 | PRODUCT_BUNDLE_IDENTIFIER = mobileworld.jp.lifelog; |
902 | 913 | PRODUCT_NAME = "$(TARGET_NAME)"; |
903 | - PROVISIONING_PROFILE = "ffe70c33-5b08-4c2e-b96d-4e1bcb971ccb"; | |
904 | - PROVISIONING_PROFILE_SPECIFIER = Lifelog_Distribution; | |
914 | + PROVISIONING_PROFILE = ""; | |
915 | + PROVISIONING_PROFILE_SPECIFIER = ""; | |
905 | 916 | }; |
906 | 917 | name = Release; |
907 | 918 | }; |
LifeLog/LifeLog/AppDelegate.m
... | ... | @@ -88,7 +88,8 @@ |
88 | 88 | RankingViewController *rankingVC = [[RankingViewController alloc] initWithNibName:@"RankingViewController" bundle:nil]; |
89 | 89 | UINavigationController *naviRanking = [[UINavigationController alloc] initWithRootViewController:rankingVC]; |
90 | 90 | naviRanking.tabBarItem = [[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"lifelog.tapbar.ranking", @"") image:[UIImage imageNamed:@"tapbar_ranking"] tag:3]; |
91 | - | |
91 | + naviRanking.navigationBar.hidden = YES; | |
92 | + | |
92 | 93 | MapViewController *mapVC = [[MapViewController alloc] initWithNibName:@"MapViewController" bundle:nil]; |
93 | 94 | UINavigationController *naviMap = [[UINavigationController alloc] initWithRootViewController:mapVC]; |
94 | 95 | naviMap.tabBarItem = [[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"lifelog.tapbar.map", @"") image:[UIImage imageNamed:@"tapbar_map"] tag:4]; |
LifeLog/LifeLog/CollectionView.m
... | ... | @@ -83,7 +83,7 @@ |
83 | 83 | } |
84 | 84 | |
85 | 85 | - (CGSize) collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { |
86 | - return CGSizeMake((self.frame.size.width - (_spacing * _number)) / _number, collectionView.frame.size.height); | |
86 | + return CGSizeMake((collectionView.frame.size.width - (_spacing * _number)) / _number, collectionView.frame.size.height); | |
87 | 87 | } |
88 | 88 | |
89 | 89 | - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section { |
LifeLog/LifeLog/CollectionView.xib
1 | 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="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> | |
3 | 3 | <device id="retina4_7" orientation="portrait"> |
4 | 4 | <adaptation id="fullscreen"/> |
5 | 5 | </device> |
6 | 6 | |
... | ... | @@ -19,9 +19,8 @@ |
19 | 19 | <rect key="frame" x="0.0" y="0.0" width="375" height="50"/> |
20 | 20 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
21 | 21 | <subviews> |
22 | - <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" bounces="NO" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="ubI-h8-MKY"> | |
22 | + <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="ubI-h8-MKY"> | |
23 | 23 | <rect key="frame" x="0.0" y="0.0" width="375" height="50"/> |
24 | - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | |
25 | 24 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
26 | 25 | <collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="3" minimumInteritemSpacing="0.0" id="Q46-34-Q0S"> |
27 | 26 | <size key="itemSize" width="50" height="50"/> |
... | ... | @@ -36,6 +35,12 @@ |
36 | 35 | </collectionView> |
37 | 36 | </subviews> |
38 | 37 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
38 | + <constraints> | |
39 | + <constraint firstAttribute="trailing" secondItem="ubI-h8-MKY" secondAttribute="trailing" id="2qr-KO-b6X"/> | |
40 | + <constraint firstItem="ubI-h8-MKY" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="Ed3-m0-nTl"/> | |
41 | + <constraint firstAttribute="bottom" secondItem="ubI-h8-MKY" secondAttribute="bottom" id="jMb-yC-EPp"/> | |
42 | + <constraint firstItem="ubI-h8-MKY" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="lJg-28-TSi"/> | |
43 | + </constraints> | |
39 | 44 | <nil key="simulatedStatusBarMetrics"/> |
40 | 45 | <nil key="simulatedTopBarMetrics"/> |
41 | 46 | <nil key="simulatedBottomBarMetrics"/> |
LifeLog/LifeLog/HistoryViewController.xib
1 | 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="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> | |
3 | 3 | <device id="retina4_7" orientation="portrait"> |
4 | 4 | <adaptation id="fullscreen"/> |
5 | 5 | </device> |
6 | 6 | |
... | ... | @@ -37,9 +37,8 @@ |
37 | 37 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="clL-JG-rbd" userLabel="ViewHeader"> |
38 | 38 | <rect key="frame" x="0.0" y="0.0" width="375" height="46"/> |
39 | 39 | <subviews> |
40 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="TODAY" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ht6-rd-JXF"> | |
40 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TODAY" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ht6-rd-JXF"> | |
41 | 41 | <rect key="frame" x="0.0" y="0.0" width="375" height="46"/> |
42 | - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | |
43 | 42 | <fontDescription key="fontDescription" type="system" pointSize="17"/> |
44 | 43 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
45 | 44 | <nil key="highlightedColor"/> |
46 | 45 | |
47 | 46 | |
... | ... | @@ -61,11 +60,15 @@ |
61 | 60 | </subviews> |
62 | 61 | <color key="backgroundColor" red="0.098039215686274508" green="0.098039215686274508" blue="0.098039215686274508" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
63 | 62 | <constraints> |
63 | + <constraint firstAttribute="trailing" secondItem="Ht6-rd-JXF" secondAttribute="trailing" id="Fr9-Yj-q5e"/> | |
64 | 64 | <constraint firstItem="ytc-zM-ZGC" firstAttribute="leading" secondItem="clL-JG-rbd" secondAttribute="leading" id="LDb-Pq-Z5k"/> |
65 | 65 | <constraint firstAttribute="trailing" secondItem="CFx-sO-MAH" secondAttribute="trailing" id="PTh-vI-2DI"/> |
66 | + <constraint firstItem="Ht6-rd-JXF" firstAttribute="top" secondItem="clL-JG-rbd" secondAttribute="top" id="URG-nj-C2r"/> | |
66 | 67 | <constraint firstItem="CFx-sO-MAH" firstAttribute="top" secondItem="clL-JG-rbd" secondAttribute="top" id="Uxg-Wl-DlF"/> |
67 | 68 | <constraint firstAttribute="bottom" secondItem="CFx-sO-MAH" secondAttribute="bottom" id="X9D-m3-QXF"/> |
68 | 69 | <constraint firstAttribute="bottom" secondItem="ytc-zM-ZGC" secondAttribute="bottom" constant="5" id="hWb-ga-1wm"/> |
70 | + <constraint firstAttribute="bottom" secondItem="Ht6-rd-JXF" secondAttribute="bottom" id="iqI-Bi-QI1"/> | |
71 | + <constraint firstItem="Ht6-rd-JXF" firstAttribute="leading" secondItem="clL-JG-rbd" secondAttribute="leading" id="uzc-SO-7mw"/> | |
69 | 72 | <constraint firstItem="ytc-zM-ZGC" firstAttribute="top" secondItem="clL-JG-rbd" secondAttribute="top" constant="5" id="vFt-FE-klC"/> |
70 | 73 | <constraint firstAttribute="height" constant="46" id="xGd-BD-bgs"/> |
71 | 74 | </constraints> |
72 | 75 | |
73 | 76 | |
... | ... | @@ -116,17 +119,17 @@ |
116 | 119 | </constraints> |
117 | 120 | </view> |
118 | 121 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BVv-qD-EHM" customClass="CollectionView"> |
119 | - <rect key="frame" x="0.0" y="567" width="375" height="40"/> | |
122 | + <rect key="frame" x="0.0" y="577" width="375" height="40"/> | |
120 | 123 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
121 | 124 | <constraints> |
122 | 125 | <constraint firstAttribute="height" constant="40" id="6wc-NQ-UAH"/> |
123 | 126 | </constraints> |
124 | 127 | </view> |
125 | 128 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FLa-rV-Aas" userLabel="ViewContent"> |
126 | - <rect key="frame" x="0.0" y="151" width="375" height="411"/> | |
129 | + <rect key="frame" x="0.0" y="151" width="375" height="421"/> | |
127 | 130 | <subviews> |
128 | 131 | <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"> |
129 | - <rect key="frame" x="5" y="0.0" width="365" height="411"/> | |
132 | + <rect key="frame" x="5" y="0.0" width="365" height="421"/> | |
130 | 133 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
131 | 134 | <connections> |
132 | 135 | <outlet property="dataSource" destination="-1" id="GQy-lg-1Af"/> |
... | ... | @@ -464,7 +467,7 @@ |
464 | 467 | <constraint firstItem="yxY-4d-tB6" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="2" id="Jqg-nE-6dv"/> |
465 | 468 | <constraint firstAttribute="trailing" secondItem="BVv-qD-EHM" secondAttribute="trailing" id="MCi-Tl-hSp"/> |
466 | 469 | <constraint firstAttribute="trailing" secondItem="yxY-4d-tB6" secondAttribute="trailing" constant="2" id="Qs5-ky-nmB"/> |
467 | - <constraint firstAttribute="bottom" secondItem="BVv-qD-EHM" secondAttribute="bottom" constant="60" id="SbT-PG-8MJ"/> | |
470 | + <constraint firstAttribute="bottom" secondItem="BVv-qD-EHM" secondAttribute="bottom" constant="50" id="SbT-PG-8MJ"/> | |
468 | 471 | <constraint firstItem="BVv-qD-EHM" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="SqH-AA-Z2K"/> |
469 | 472 | <constraint firstItem="FLa-rV-Aas" firstAttribute="top" secondItem="yxY-4d-tB6" secondAttribute="bottom" constant="15" id="cWw-RX-1Kp"/> |
470 | 473 | <constraint firstItem="yxY-4d-tB6" firstAttribute="top" secondItem="Cf1-lP-zbB" secondAttribute="bottom" constant="15" id="dSN-ey-gQ7"/> |
LifeLog/LifeLog/LabelCollectionViewCell.xib
1 | 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="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> | |
3 | 3 | <device id="retina4_7" orientation="portrait"> |
4 | 4 | <adaptation id="fullscreen"/> |
5 | 5 | </device> |
6 | 6 | |
... | ... | @@ -17,10 +17,10 @@ |
17 | 17 | <rect key="frame" x="0.0" y="0.0" width="246" height="175"/> |
18 | 18 | <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
19 | 19 | <subviews> |
20 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="R7x-TO-3nQ"> | |
20 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="R7x-TO-3nQ"> | |
21 | 21 | <rect key="frame" x="0.0" y="0.0" width="246" height="175"/> |
22 | 22 | <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
23 | - <fontDescription key="fontDescription" type="system" pointSize="15"/> | |
23 | + <fontDescription key="fontDescription" type="system" pointSize="13"/> | |
24 | 24 | <nil key="textColor"/> |
25 | 25 | <nil key="highlightedColor"/> |
26 | 26 | </label> |
LifeLog/LifeLog/Localizable.strings
No preview for this file type
LifeLog/LifeLog/RankingTableViewCell.h
1 | +// | |
2 | +// RankingTableViewCell.h | |
3 | +// LifeLog | |
4 | +// | |
5 | +// Created by nvtu on 8/8/17. | |
6 | +// Copyright ยฉ 2017 PhongNV. All rights reserved. | |
7 | +// | |
8 | + | |
9 | +#import <UIKit/UIKit.h> | |
10 | + | |
11 | +@interface RankingTableViewCell : UITableViewCell | |
12 | +@property (weak, nonatomic) IBOutlet UILabel *lblIndex; | |
13 | +@property (weak, nonatomic) IBOutlet UILabel *lblName; | |
14 | +@property (weak, nonatomic) IBOutlet UILabel *lblStep; | |
15 | +@property (weak, nonatomic) IBOutlet UILabel *lblTime; | |
16 | +@property (weak, nonatomic) IBOutlet UILabel *lblDistance; | |
17 | + | |
18 | +@property (weak, nonatomic) IBOutlet UIImageView *imgAvatar; | |
19 | +@end |
LifeLog/LifeLog/RankingTableViewCell.m
1 | +// | |
2 | +// RankingTableViewCell.m | |
3 | +// LifeLog | |
4 | +// | |
5 | +// Created by nvtu on 8/8/17. | |
6 | +// Copyright ยฉ 2017 PhongNV. All rights reserved. | |
7 | +// | |
8 | + | |
9 | +#import "RankingTableViewCell.h" | |
10 | + | |
11 | +@implementation RankingTableViewCell | |
12 | + | |
13 | +- (void)awakeFromNib { | |
14 | + [super awakeFromNib]; | |
15 | + // Initialization code | |
16 | +} | |
17 | + | |
18 | +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { | |
19 | + [super setSelected:selected animated:animated]; | |
20 | + | |
21 | + // Configure the view for the selected state | |
22 | +} | |
23 | + | |
24 | +@end |
LifeLog/LifeLog/RankingTableViewCell.xib
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12118" systemVersion="16A323" 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="Constraints to layout margins" minToolsVersion="6.0"/> | |
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"/> | |
13 | + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | |
14 | + <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="RankCell" id="KGk-i7-Jjw" customClass="RankingTableViewCell"> | |
15 | + <rect key="frame" x="0.0" y="0.0" width="320" height="80"/> | |
16 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | |
17 | + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> | |
18 | + <rect key="frame" x="0.0" y="0.0" width="320" height="79.5"/> | |
19 | + <autoresizingMask key="autoresizingMask"/> | |
20 | + <subviews> | |
21 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="8qq-of-Fwv"> | |
22 | + <rect key="frame" x="0.0" y="0.0" width="40" height="80"/> | |
23 | + <constraints> | |
24 | + <constraint firstAttribute="width" constant="40" id="9dX-af-kQI"/> | |
25 | + </constraints> | |
26 | + <fontDescription key="fontDescription" type="system" pointSize="20"/> | |
27 | + <nil key="textColor"/> | |
28 | + <nil key="highlightedColor"/> | |
29 | + </label> | |
30 | + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="avatar_default" translatesAutoresizingMaskIntoConstraints="NO" id="1CW-Zi-SG6"> | |
31 | + <rect key="frame" x="48" y="15" width="50" height="50"/> | |
32 | + <constraints> | |
33 | + <constraint firstAttribute="width" constant="50" id="1kJ-7c-3b3"/> | |
34 | + <constraint firstAttribute="height" constant="50" id="LNu-c6-CgW"/> | |
35 | + </constraints> | |
36 | + </imageView> | |
37 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ใฆใผใถใผใใใใฏใใผใ " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zAG-NS-RSG"> | |
38 | + <rect key="frame" x="106" y="8" width="206" height="15"/> | |
39 | + <constraints> | |
40 | + <constraint firstAttribute="height" constant="15" id="RjF-Lj-HNO"/> | |
41 | + </constraints> | |
42 | + <fontDescription key="fontDescription" type="system" pointSize="12"/> | |
43 | + <nil key="textColor"/> | |
44 | + <nil key="highlightedColor"/> | |
45 | + </label> | |
46 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LgT-0e-lsD"> | |
47 | + <rect key="frame" x="106" y="31" width="78" height="15"/> | |
48 | + <constraints> | |
49 | + <constraint firstAttribute="height" constant="15" id="WXg-qM-mCv"/> | |
50 | + </constraints> | |
51 | + <string key="text" base64-UTF8="YES"> | |
52 | +MTIzNDUg5q2pAA | |
53 | +</string> | |
54 | + <fontDescription key="fontDescription" type="system" pointSize="12"/> | |
55 | + <nil key="textColor"/> | |
56 | + <nil key="highlightedColor"/> | |
57 | + </label> | |
58 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yeV-e1-xLt"> | |
59 | + <rect key="frame" x="194" y="28" width="78" height="15"/> | |
60 | + <constraints> | |
61 | + <constraint firstAttribute="height" constant="15" id="8uP-Oz-0UX"/> | |
62 | + </constraints> | |
63 | + <string key="text" base64-UTF8="YES"> | |
64 | +MTIzNDU2IGttAA | |
65 | +</string> | |
66 | + <fontDescription key="fontDescription" type="system" pointSize="12"/> | |
67 | + <nil key="textColor"/> | |
68 | + <nil key="highlightedColor"/> | |
69 | + </label> | |
70 | + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tapbar_today" translatesAutoresizingMaskIntoConstraints="NO" id="doD-2D-mUh"> | |
71 | + <rect key="frame" x="280" y="28" width="25" height="25"/> | |
72 | + <constraints> | |
73 | + <constraint firstAttribute="height" constant="25" id="m7H-Vi-MjX"/> | |
74 | + <constraint firstAttribute="width" constant="25" id="yJJ-70-k1M"/> | |
75 | + </constraints> | |
76 | + </imageView> | |
77 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="A45-dY-zJ7"> | |
78 | + <rect key="frame" x="0.0" y="78" width="320" height="2"/> | |
79 | + <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> | |
80 | + <constraints> | |
81 | + <constraint firstAttribute="height" constant="2" id="RXE-vE-Bye"/> | |
82 | + </constraints> | |
83 | + </view> | |
84 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="11:22:33" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="esv-WJ-Jwb"> | |
85 | + <rect key="frame" x="106" y="54" width="78" height="15"/> | |
86 | + <constraints> | |
87 | + <constraint firstAttribute="height" constant="15" id="ZwB-X4-TCe"/> | |
88 | + </constraints> | |
89 | + <fontDescription key="fontDescription" type="system" pointSize="12"/> | |
90 | + <nil key="textColor"/> | |
91 | + <nil key="highlightedColor"/> | |
92 | + </label> | |
93 | + </subviews> | |
94 | + <constraints> | |
95 | + <constraint firstItem="doD-2D-mUh" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="57o-am-4IN"/> | |
96 | + <constraint firstItem="esv-WJ-Jwb" firstAttribute="top" secondItem="LgT-0e-lsD" secondAttribute="bottom" constant="8" id="6Bw-Lm-urU"/> | |
97 | + <constraint firstItem="yeV-e1-xLt" firstAttribute="leading" secondItem="LgT-0e-lsD" secondAttribute="trailing" constant="10" id="8hM-D0-kmc"/> | |
98 | + <constraint firstItem="LgT-0e-lsD" firstAttribute="top" secondItem="zAG-NS-RSG" secondAttribute="bottom" constant="8" id="Esk-56-nD6"/> | |
99 | + <constraint firstItem="zAG-NS-RSG" firstAttribute="trailing" secondItem="H2p-sc-9uM" secondAttribute="trailingMargin" id="GMx-VQ-Jq1"/> | |
100 | + <constraint firstItem="doD-2D-mUh" firstAttribute="leading" secondItem="yeV-e1-xLt" secondAttribute="trailing" constant="8" id="Juh-q9-fxs"/> | |
101 | + <constraint firstItem="zAG-NS-RSG" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" id="R9z-fc-ARl"/> | |
102 | + <constraint firstItem="esv-WJ-Jwb" firstAttribute="leading" secondItem="zAG-NS-RSG" secondAttribute="leading" id="Sfp-Ch-JEA"/> | |
103 | + <constraint firstItem="yeV-e1-xLt" firstAttribute="width" secondItem="LgT-0e-lsD" secondAttribute="width" id="Slm-k1-rIR"/> | |
104 | + <constraint firstAttribute="bottom" secondItem="8qq-of-Fwv" secondAttribute="bottom" id="VVC-Dv-8ey"/> | |
105 | + <constraint firstItem="A45-dY-zJ7" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="Xwe-lc-LeM"/> | |
106 | + <constraint firstItem="LgT-0e-lsD" firstAttribute="leading" secondItem="1CW-Zi-SG6" secondAttribute="trailing" constant="8" id="dLZ-Nv-Dbr"/> | |
107 | + <constraint firstItem="8qq-of-Fwv" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="dUj-3F-TgF"/> | |
108 | + <constraint firstAttribute="trailing" secondItem="A45-dY-zJ7" secondAttribute="trailing" id="e8P-ju-Xmq"/> | |
109 | + <constraint firstItem="1CW-Zi-SG6" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="eCg-Ck-ONU"/> | |
110 | + <constraint firstItem="yeV-e1-xLt" firstAttribute="top" secondItem="zAG-NS-RSG" secondAttribute="bottom" constant="5" id="gYr-ss-0or"/> | |
111 | + <constraint firstAttribute="trailing" secondItem="doD-2D-mUh" secondAttribute="trailing" constant="15" id="iNO-rk-u4D"/> | |
112 | + <constraint firstItem="zAG-NS-RSG" firstAttribute="leading" secondItem="1CW-Zi-SG6" secondAttribute="trailing" constant="8" id="vfh-9w-5DO"/> | |
113 | + <constraint firstItem="8qq-of-Fwv" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="wiB-Bb-Ji6"/> | |
114 | + <constraint firstItem="esv-WJ-Jwb" firstAttribute="width" secondItem="LgT-0e-lsD" secondAttribute="width" id="xkA-nN-FEv"/> | |
115 | + <constraint firstItem="1CW-Zi-SG6" firstAttribute="leading" secondItem="8qq-of-Fwv" secondAttribute="trailing" constant="8" id="yFe-5g-aEi"/> | |
116 | + <constraint firstAttribute="bottom" secondItem="A45-dY-zJ7" secondAttribute="bottom" id="yTG-Cb-Hp9"/> | |
117 | + </constraints> | |
118 | + </tableViewCellContentView> | |
119 | + <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> | |
120 | + <connections> | |
121 | + <outlet property="imgAvatar" destination="1CW-Zi-SG6" id="uph-nw-Xrp"/> | |
122 | + <outlet property="lblDistance" destination="yeV-e1-xLt" id="zdb-bf-Qqp"/> | |
123 | + <outlet property="lblIndex" destination="8qq-of-Fwv" id="o6u-sg-ImL"/> | |
124 | + <outlet property="lblName" destination="zAG-NS-RSG" id="TaI-LH-ibF"/> | |
125 | + <outlet property="lblStep" destination="LgT-0e-lsD" id="w46-KP-Adf"/> | |
126 | + <outlet property="lblTime" destination="esv-WJ-Jwb" id="nMR-Om-aj9"/> | |
127 | + </connections> | |
128 | + </tableViewCell> | |
129 | + </objects> | |
130 | + <resources> | |
131 | + <image name="avatar_default" width="80" height="80"/> | |
132 | + <image name="tapbar_today" width="25" height="25"/> | |
133 | + </resources> | |
134 | +</document> |
LifeLog/LifeLog/RankingViewController.h
... | ... | @@ -8,7 +8,18 @@ |
8 | 8 | |
9 | 9 | #import <UIKit/UIKit.h> |
10 | 10 | |
11 | +#import "CollectionView.h" | |
12 | + | |
11 | 13 | @interface RankingViewController : UIViewController |
12 | 14 | |
15 | +@property (weak, nonatomic) IBOutlet UILabel *lblHeader; | |
16 | + | |
17 | +@property (weak, nonatomic) IBOutlet CollectionView *viewCollectionTime; | |
18 | +@property (weak, nonatomic) IBOutlet CollectionView *viewCollectionMode; | |
19 | +@property (weak, nonatomic) IBOutlet CollectionView *viewCollectionType; | |
20 | + | |
21 | +@property (weak, nonatomic) IBOutlet UITableView *tableRank; | |
22 | + | |
23 | +- (IBAction)clickButton:(UIButton *)sender; | |
13 | 24 | @end |
LifeLog/LifeLog/RankingViewController.m
... | ... | @@ -7,6 +7,7 @@ |
7 | 7 | // |
8 | 8 | |
9 | 9 | #import "RankingViewController.h" |
10 | +#import "RankingTableViewCell.h" | |
10 | 11 | |
11 | 12 | @interface RankingViewController () |
12 | 13 | |
... | ... | @@ -17,7 +18,13 @@ |
17 | 18 | - (void)viewDidLoad { |
18 | 19 | [super viewDidLoad]; |
19 | 20 | // Do any additional setup after loading the view from its nib. |
20 | - self.title = NSLocalizedString(@"lifelog.tapbar.ranking", nil); | |
21 | + self.title = NSLocalizedString(@"lifelog.rank.title", nil); | |
22 | + self.lblHeader.text = NSLocalizedString(@"lifelog.rank.title", nil); | |
23 | + | |
24 | + [self setupView]; | |
25 | + | |
26 | + //register nib for table view | |
27 | + [self.tableRank registerNib:[UINib nibWithNibName:@"RankingTableViewCell" bundle:nil] forCellReuseIdentifier:@"RankCell"]; | |
21 | 28 | } |
22 | 29 | |
23 | 30 | - (void)didReceiveMemoryWarning { |
... | ... | @@ -25,5 +32,67 @@ |
25 | 32 | // Dispose of any resources that can be recreated. |
26 | 33 | } |
27 | 34 | |
35 | +#pragma mark Setup and Update View | |
36 | + | |
37 | +- (void)setupView { | |
38 | + NSArray *timeTitle = [NSArray arrayWithObjects:NSLocalizedString(@"lifelog.rank.time.1", nil), NSLocalizedString(@"lifelog.rank.time.2", nil), NSLocalizedString(@"lifelog.rank.time.3", nil), NSLocalizedString(@"lifelog.rank.time.4", nil), nil]; | |
39 | + [self.viewCollectionTime setButtonNumber:timeTitle.count]; | |
40 | + [self.viewCollectionTime setSpacing:1]; | |
41 | + [self.viewCollectionTime setArrayTitle:timeTitle]; | |
42 | + self.viewCollectionTime.changeCurrentIndex = ^(int index){ | |
43 | + [self callRequestToUpdateData]; | |
44 | + }; | |
45 | + | |
46 | + NSArray *modeTitle = [NSArray arrayWithObjects:NSLocalizedString(@"lifelog.rank.mode.1", nil), NSLocalizedString(@"lifelog.rank.mode.2", nil), NSLocalizedString(@"lifelog.rank.mode.3", nil), NSLocalizedString(@"lifelog.rank.mode.4", nil), nil]; | |
47 | + [self.viewCollectionMode setButtonNumber:modeTitle.count]; | |
48 | + [self.viewCollectionMode setSpacing:1]; | |
49 | + [self.viewCollectionMode setArrayTitle:modeTitle]; | |
50 | + self.viewCollectionMode.changeCurrentIndex = ^(int index){ | |
51 | + [self callRequestToUpdateData]; | |
52 | + }; | |
53 | + | |
54 | + NSArray *typeTitle = [NSArray arrayWithObjects:NSLocalizedString(@"lifelog.rank.type.1", nil), NSLocalizedString(@"lifelog.rank.type.2", nil), NSLocalizedString(@"lifelog.rank.type.3", nil), NSLocalizedString(@"lifelog.rank.type.4", nil), nil]; | |
55 | + [self.viewCollectionType setButtonNumber:typeTitle.count]; | |
56 | + [self.viewCollectionType setSpacing:1]; | |
57 | + [self.viewCollectionType setArrayTitle:typeTitle]; | |
58 | + self.viewCollectionMode.changeCurrentIndex = ^(int index){ | |
59 | + [self callRequestToUpdateData]; | |
60 | + }; | |
61 | +} | |
62 | + | |
63 | + | |
64 | +#pragma mark IBAction function | |
65 | + | |
66 | +- (IBAction)clickButton:(UIButton *)sender { | |
67 | +} | |
68 | + | |
69 | +#pragma mark UITableView Delegate | |
70 | +- (NSInteger) numberOfSectionsInTableView:(UITableView *)tableView { | |
71 | +// if(_curHisList == nil || _curHisList.count == 0) { | |
72 | +// UILabel * noDataLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, tableView.frame.size.width, tableView.frame.size.height)]; | |
73 | +// noDataLabel.text = @"No data available"; | |
74 | +// noDataLabel.backgroundColor = [UIColor clearColor]; | |
75 | +// noDataLabel.textColor = [UIColor whiteColor]; | |
76 | +// noDataLabel.textAlignment = NSTextAlignmentCenter; | |
77 | +// tableView.backgroundView = noDataLabel; | |
78 | +// tableView.backgroundView.layer.zPosition -= 1; | |
79 | +// return 0; | |
80 | +// } | |
81 | +// tableView.backgroundView = nil; | |
82 | + return 1; | |
83 | +} | |
84 | + | |
85 | +- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | |
86 | + return 6; | |
87 | +} | |
88 | + | |
89 | +- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |
90 | + RankingTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"RankCell"]; | |
91 | + return cell; | |
92 | +} | |
93 | + | |
94 | +#pragma mark Private function | |
95 | +- (void)callRequestToUpdateData { | |
96 | +} | |
28 | 97 | @end |
LifeLog/LifeLog/RankingViewController.xib
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" 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="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> | |
3 | 3 | <device id="retina4_7" orientation="portrait"> |
4 | 4 | <adaptation id="fullscreen"/> |
5 | 5 | </device> |
6 | 6 | <dependencies> |
7 | - <deployment identifier="iOS"/> | |
8 | - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/> | |
7 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/> | |
9 | 8 | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
10 | 9 | </dependencies> |
11 | 10 | <objects> |
12 | 11 | <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="RankingViewController"> |
13 | 12 | <connections> |
13 | + <outlet property="lblHeader" destination="p97-40-8m9" id="KEJ-IZ-kLi"/> | |
14 | + <outlet property="tableRank" destination="R3A-K9-MFe" id="uEX-sL-6D2"/> | |
14 | 15 | <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> |
16 | + <outlet property="viewCollectionMode" destination="B33-xX-Jro" id="HP4-Xb-LJm"/> | |
17 | + <outlet property="viewCollectionTime" destination="syA-uK-pbr" id="WdA-Cq-Flj"/> | |
18 | + <outlet property="viewCollectionType" destination="oUo-Eo-tz5" id="bjw-El-34G"/> | |
15 | 19 | </connections> |
16 | 20 | </placeholder> |
17 | 21 | <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> |
18 | 22 | <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> |
19 | 23 | <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
20 | 24 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
21 | - <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
25 | + <subviews> | |
26 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GBx-lY-9YI" userLabel="ViewHeader"> | |
27 | + <rect key="frame" x="0.0" y="0.0" width="375" height="46"/> | |
28 | + <subviews> | |
29 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TODAY" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p97-40-8m9"> | |
30 | + <rect key="frame" x="0.0" y="0.0" width="375" height="46"/> | |
31 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
32 | + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
33 | + <nil key="highlightedColor"/> | |
34 | + </label> | |
35 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qPe-ff-jRp"> | |
36 | + <rect key="frame" x="0.0" y="5" width="70" height="36"/> | |
37 | + <constraints> | |
38 | + <constraint firstAttribute="width" constant="70" id="bEy-jt-69Q"/> | |
39 | + </constraints> | |
40 | + <state key="normal" image="today_back_button"/> | |
41 | + </button> | |
42 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WGc-2i-Swk"> | |
43 | + <rect key="frame" x="330" y="0.0" width="45" height="46"/> | |
44 | + <constraints> | |
45 | + <constraint firstAttribute="width" constant="45" id="nJ2-jH-Z45"/> | |
46 | + </constraints> | |
47 | + <state key="normal" image="icon_menu"/> | |
48 | + </button> | |
49 | + </subviews> | |
50 | + <color key="backgroundColor" red="0.098039215690000001" green="0.098039215690000001" blue="0.098039215690000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
51 | + <constraints> | |
52 | + <constraint firstAttribute="bottom" secondItem="WGc-2i-Swk" secondAttribute="bottom" id="0hd-fk-kJG"/> | |
53 | + <constraint firstAttribute="bottom" secondItem="p97-40-8m9" secondAttribute="bottom" id="78G-b2-wAu"/> | |
54 | + <constraint firstItem="qPe-ff-jRp" firstAttribute="leading" secondItem="GBx-lY-9YI" secondAttribute="leading" id="9ND-Te-qX9"/> | |
55 | + <constraint firstItem="qPe-ff-jRp" firstAttribute="top" secondItem="GBx-lY-9YI" secondAttribute="top" constant="5" id="9ZX-A3-Bnp"/> | |
56 | + <constraint firstItem="p97-40-8m9" firstAttribute="top" secondItem="GBx-lY-9YI" secondAttribute="top" id="CVN-ke-5KK"/> | |
57 | + <constraint firstAttribute="height" constant="46" id="SDI-ij-KbH"/> | |
58 | + <constraint firstItem="p97-40-8m9" firstAttribute="leading" secondItem="GBx-lY-9YI" secondAttribute="leading" id="U19-fM-q7G"/> | |
59 | + <constraint firstAttribute="bottom" secondItem="qPe-ff-jRp" secondAttribute="bottom" constant="5" id="jU7-xM-YKX"/> | |
60 | + <constraint firstItem="WGc-2i-Swk" firstAttribute="top" secondItem="GBx-lY-9YI" secondAttribute="top" id="knL-Yf-VTN"/> | |
61 | + <constraint firstAttribute="trailing" secondItem="p97-40-8m9" secondAttribute="trailing" id="sLL-ca-92S"/> | |
62 | + <constraint firstAttribute="trailing" secondItem="WGc-2i-Swk" secondAttribute="trailing" id="v0h-pb-83W"/> | |
63 | + </constraints> | |
64 | + </view> | |
65 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="syA-uK-pbr" customClass="CollectionView"> | |
66 | + <rect key="frame" x="0.0" y="46" width="375" height="30"/> | |
67 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | |
68 | + <constraints> | |
69 | + <constraint firstAttribute="height" constant="30" id="ezW-Qs-M7K"/> | |
70 | + </constraints> | |
71 | + </view> | |
72 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="B33-xX-Jro" customClass="CollectionView"> | |
73 | + <rect key="frame" x="0.0" y="116" width="375" height="30"/> | |
74 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | |
75 | + <constraints> | |
76 | + <constraint firstAttribute="height" constant="30" id="snn-FM-11r"/> | |
77 | + </constraints> | |
78 | + </view> | |
79 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="u5D-xz-8dK"> | |
80 | + <rect key="frame" x="0.0" y="76" width="375" height="40"/> | |
81 | + <subviews> | |
82 | + <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"> | |
83 | + <rect key="frame" x="0.0" y="0.0" width="375" height="40"/> | |
84 | + <string key="text" base64-UTF8="YES"> | |
85 | +MjAxNuW5tCAx5pyIMjLml6XjgIDvvI3jgIAyMDE35bm0IDHmnIgyMeaXpQ0KAA | |
86 | +</string> | |
87 | + <fontDescription key="fontDescription" type="system" pointSize="13"/> | |
88 | + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
89 | + <nil key="highlightedColor"/> | |
90 | + </label> | |
91 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eiH-Sk-3VV"> | |
92 | + <rect key="frame" x="15" y="5" width="30" height="30"/> | |
93 | + <constraints> | |
94 | + <constraint firstAttribute="height" constant="30" id="kEd-sQ-0ub"/> | |
95 | + <constraint firstAttribute="width" constant="30" id="sFT-sr-7pL"/> | |
96 | + </constraints> | |
97 | + <state key="normal" image="icon_left"/> | |
98 | + <connections> | |
99 | + <action selector="clickButton:" destination="-1" eventType="touchUpInside" id="f1Y-rj-F7d"/> | |
100 | + </connections> | |
101 | + </button> | |
102 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Usl-Cl-d9d"> | |
103 | + <rect key="frame" x="330" y="5" width="30" height="30"/> | |
104 | + <constraints> | |
105 | + <constraint firstAttribute="width" constant="30" id="uFf-AY-LsL"/> | |
106 | + <constraint firstAttribute="height" constant="30" id="v8w-hV-CY1"/> | |
107 | + </constraints> | |
108 | + <state key="normal" image="icon_right"/> | |
109 | + <connections> | |
110 | + <action selector="clickButton:" destination="-1" eventType="touchUpInside" id="OB1-mE-CGE"/> | |
111 | + </connections> | |
112 | + </button> | |
113 | + </subviews> | |
114 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | |
115 | + <constraints> | |
116 | + <constraint firstAttribute="height" constant="40" id="C5o-Zd-KjG"/> | |
117 | + <constraint firstAttribute="bottom" secondItem="5Ro-k6-fvT" secondAttribute="bottom" id="DQQ-wh-s1Q"/> | |
118 | + <constraint firstAttribute="trailing" secondItem="5Ro-k6-fvT" secondAttribute="trailing" id="E0c-bJ-AIi"/> | |
119 | + <constraint firstItem="5Ro-k6-fvT" firstAttribute="top" secondItem="u5D-xz-8dK" secondAttribute="top" id="Mrk-FC-rqh"/> | |
120 | + <constraint firstItem="eiH-Sk-3VV" firstAttribute="centerY" secondItem="u5D-xz-8dK" secondAttribute="centerY" id="k2J-Lc-ZDI"/> | |
121 | + <constraint firstItem="5Ro-k6-fvT" firstAttribute="leading" secondItem="u5D-xz-8dK" secondAttribute="leading" id="rj5-0J-xs3"/> | |
122 | + <constraint firstItem="Usl-Cl-d9d" firstAttribute="centerY" secondItem="u5D-xz-8dK" secondAttribute="centerY" id="sJX-n3-1pz"/> | |
123 | + <constraint firstItem="eiH-Sk-3VV" firstAttribute="leading" secondItem="u5D-xz-8dK" secondAttribute="leading" constant="15" id="to7-WU-7xo"/> | |
124 | + <constraint firstAttribute="trailing" secondItem="Usl-Cl-d9d" secondAttribute="trailing" constant="15" id="yDF-9k-XlW"/> | |
125 | + </constraints> | |
126 | + </view> | |
127 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oUo-Eo-tz5" customClass="CollectionView"> | |
128 | + <rect key="frame" x="0.0" y="577" width="375" height="40"/> | |
129 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | |
130 | + <constraints> | |
131 | + <constraint firstAttribute="height" constant="40" id="Trr-Ku-Ssy"/> | |
132 | + </constraints> | |
133 | + </view> | |
134 | + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" rowHeight="80" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="R3A-K9-MFe"> | |
135 | + <rect key="frame" x="0.0" y="147" width="375" height="429"/> | |
136 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | |
137 | + <color key="separatorColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | |
138 | + <connections> | |
139 | + <outlet property="dataSource" destination="-1" id="JJX-cg-LPL"/> | |
140 | + <outlet property="delegate" destination="-1" id="u0m-93-lsi"/> | |
141 | + </connections> | |
142 | + </tableView> | |
143 | + </subviews> | |
144 | + <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> | |
145 | + <constraints> | |
146 | + <constraint firstItem="B33-xX-Jro" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="2Mu-hy-FVU"/> | |
147 | + <constraint firstItem="GBx-lY-9YI" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="5CL-wT-MBg"/> | |
148 | + <constraint firstItem="u5D-xz-8dK" firstAttribute="top" secondItem="syA-uK-pbr" secondAttribute="bottom" id="5uu-dZ-oXI"/> | |
149 | + <constraint firstItem="syA-uK-pbr" firstAttribute="top" secondItem="GBx-lY-9YI" secondAttribute="bottom" id="6FQ-vy-d4N"/> | |
150 | + <constraint firstItem="u5D-xz-8dK" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="75z-RN-ObF"/> | |
151 | + <constraint firstItem="R3A-K9-MFe" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="LyL-9p-qcd"/> | |
152 | + <constraint firstItem="oUo-Eo-tz5" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="M7I-ue-lip"/> | |
153 | + <constraint firstAttribute="trailing" secondItem="B33-xX-Jro" secondAttribute="trailing" id="Pjd-Ay-GaV"/> | |
154 | + <constraint firstItem="oUo-Eo-tz5" firstAttribute="top" secondItem="R3A-K9-MFe" secondAttribute="bottom" constant="1" id="QMu-aq-2Zt"/> | |
155 | + <constraint firstAttribute="trailing" secondItem="syA-uK-pbr" secondAttribute="trailing" id="Qnl-Pp-y2G"/> | |
156 | + <constraint firstItem="B33-xX-Jro" firstAttribute="top" secondItem="u5D-xz-8dK" secondAttribute="bottom" id="VOl-jo-wU3"/> | |
157 | + <constraint firstItem="GBx-lY-9YI" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="YjB-ef-xTt"/> | |
158 | + <constraint firstItem="syA-uK-pbr" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="aTf-mb-wlT"/> | |
159 | + <constraint firstAttribute="bottom" secondItem="oUo-Eo-tz5" secondAttribute="bottom" constant="50" id="cux-Vm-qq7"/> | |
160 | + <constraint firstAttribute="trailing" secondItem="R3A-K9-MFe" secondAttribute="trailing" id="jBn-JI-SQP"/> | |
161 | + <constraint firstItem="R3A-K9-MFe" firstAttribute="top" secondItem="B33-xX-Jro" secondAttribute="bottom" constant="1" id="jTi-59-XsZ"/> | |
162 | + <constraint firstAttribute="trailing" secondItem="u5D-xz-8dK" secondAttribute="trailing" id="mDB-o3-gtA"/> | |
163 | + <constraint firstAttribute="trailing" secondItem="GBx-lY-9YI" secondAttribute="trailing" id="yaf-8r-ySL"/> | |
164 | + <constraint firstAttribute="trailing" secondItem="oUo-Eo-tz5" secondAttribute="trailing" id="zkl-by-qMp"/> | |
165 | + </constraints> | |
166 | + <point key="canvasLocation" x="26.5" y="52.5"/> | |
22 | 167 | </view> |
23 | 168 | </objects> |
169 | + <resources> | |
170 | + <image name="icon_left" width="30" height="30"/> | |
171 | + <image name="icon_menu" width="30" height="30"/> | |
172 | + <image name="icon_right" width="30" height="30"/> | |
173 | + <image name="today_back_button" width="73" height="37"/> | |
174 | + </resources> | |
24 | 175 | </document> |