Commit e759cbb03c694dfdd25155d4319fe336d039b76d
1 parent
fcfef58783
Exists in
master
and in
1 other branch
Fix UI issue in SNS screen
Showing 10 changed files with 150 additions and 197 deletions Side-by-side Diff
- LifeLog/LifeLog/CreateGroupViewController.xib
- LifeLog/LifeLog/GroupDetailViewController.h
- LifeLog/LifeLog/GroupDetailViewController.m
- LifeLog/LifeLog/GroupDetailViewController.xib
- LifeLog/LifeLog/MyGroupViewController.h
- LifeLog/LifeLog/MyGroupViewController.m
- LifeLog/LifeLog/MyGroupViewController.xib
- LifeLog/LifeLog/SNSViewController.xib
- LifeLog/LifeLog/Utilities.h
- LifeLog/LifeLog/Utilities.m
LifeLog/LifeLog/CreateGroupViewController.xib
| ... | ... | @@ -30,52 +30,7 @@ |
| 30 | 30 | <rect key="frame" x="0.0" y="0.0" width="320" height="626"/> |
| 31 | 31 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
| 32 | 32 | <subviews> |
| 33 | - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QYv-QM-Bkk" userLabel="ViewHeader"> | |
| 34 | - <rect key="frame" x="0.0" y="0.0" width="320" height="46"/> | |
| 35 | - <subviews> | |
| 36 | - <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"> | |
| 37 | - <rect key="frame" x="0.0" y="0.0" width="320" height="46"/> | |
| 38 | - <fontDescription key="fontDescription" type="system" pointSize="16"/> | |
| 39 | - <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
| 40 | - <nil key="highlightedColor"/> | |
| 41 | - <userDefinedRuntimeAttributes> | |
| 42 | - <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.title"/> | |
| 43 | - </userDefinedRuntimeAttributes> | |
| 44 | - </label> | |
| 45 | - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="O23-Hy-4Ld"> | |
| 46 | - <rect key="frame" x="0.0" y="5" width="70" height="36"/> | |
| 47 | - <constraints> | |
| 48 | - <constraint firstAttribute="width" constant="70" id="8vZ-Ta-Rzv"/> | |
| 49 | - </constraints> | |
| 50 | - <state key="normal" image="today_back_button"/> | |
| 51 | - <connections> | |
| 52 | - <action selector="clickBack:" destination="-1" eventType="touchUpInside" id="BO6-jx-vuO"/> | |
| 53 | - </connections> | |
| 54 | - </button> | |
| 55 | - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fPg-VP-VkU"> | |
| 56 | - <rect key="frame" x="275" y="0.0" width="45" height="46"/> | |
| 57 | - <constraints> | |
| 58 | - <constraint firstAttribute="width" constant="45" id="k1W-Oc-mRq"/> | |
| 59 | - </constraints> | |
| 60 | - <state key="normal" image="icon_menu"/> | |
| 61 | - </button> | |
| 62 | - </subviews> | |
| 63 | - <color key="backgroundColor" red="0.098039215690000001" green="0.098039215690000001" blue="0.098039215690000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
| 64 | - <constraints> | |
| 65 | - <constraint firstAttribute="trailing" secondItem="9hM-Gv-AxQ" secondAttribute="trailing" id="5f8-Xt-vKd"/> | |
| 66 | - <constraint firstAttribute="bottom" secondItem="9hM-Gv-AxQ" secondAttribute="bottom" id="Q3z-hF-VbV"/> | |
| 67 | - <constraint firstItem="9hM-Gv-AxQ" firstAttribute="top" secondItem="QYv-QM-Bkk" secondAttribute="top" id="XNi-3d-xFW"/> | |
| 68 | - <constraint firstItem="O23-Hy-4Ld" firstAttribute="leading" secondItem="QYv-QM-Bkk" secondAttribute="leading" id="aMc-uz-vGA"/> | |
| 69 | - <constraint firstItem="fPg-VP-VkU" firstAttribute="top" secondItem="QYv-QM-Bkk" secondAttribute="top" id="bLC-DU-cJf"/> | |
| 70 | - <constraint firstItem="9hM-Gv-AxQ" firstAttribute="leading" secondItem="QYv-QM-Bkk" secondAttribute="leading" id="cUY-dT-Rh0"/> | |
| 71 | - <constraint firstAttribute="trailing" secondItem="fPg-VP-VkU" secondAttribute="trailing" id="fn0-SY-e1Z"/> | |
| 72 | - <constraint firstAttribute="height" constant="46" id="lBP-32-aFw"/> | |
| 73 | - <constraint firstItem="O23-Hy-4Ld" firstAttribute="top" secondItem="QYv-QM-Bkk" secondAttribute="top" constant="5" id="ogR-c4-QQ3"/> | |
| 74 | - <constraint firstAttribute="bottom" secondItem="fPg-VP-VkU" secondAttribute="bottom" id="wdr-SH-Wm2"/> | |
| 75 | - <constraint firstAttribute="bottom" secondItem="O23-Hy-4Ld" secondAttribute="bottom" constant="5" id="yJ4-81-rJx"/> | |
| 76 | - </constraints> | |
| 77 | - </view> | |
| 78 | - <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aKu-bd-xMP" customClass="TPKeyboardAvoidingScrollView"> | |
| 33 | + <scrollView multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aKu-bd-xMP" customClass="TPKeyboardAvoidingScrollView"> | |
| 79 | 34 | <rect key="frame" x="0.0" y="46" width="320" height="580"/> |
| 80 | 35 | <subviews> |
| 81 | 36 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9w1-87-U1W"> |
| 82 | 37 | |
| ... | ... | @@ -575,10 +530,55 @@ |
| 575 | 530 | <constraint firstItem="9w1-87-U1W" firstAttribute="centerY" secondItem="aKu-bd-xMP" secondAttribute="centerY" id="DT9-CK-3ZL"/> |
| 576 | 531 | <constraint firstItem="9w1-87-U1W" firstAttribute="top" secondItem="aKu-bd-xMP" secondAttribute="top" id="PZC-BJ-DLV"/> |
| 577 | 532 | <constraint firstAttribute="trailing" secondItem="9w1-87-U1W" secondAttribute="trailing" id="RDM-mt-Fjr"/> |
| 578 | - <constraint firstAttribute="bottom" secondItem="9w1-87-U1W" secondAttribute="bottom" id="w42-vd-D7e"/> | |
| 533 | + <constraint firstAttribute="bottom" secondItem="9w1-87-U1W" secondAttribute="bottom" constant="50" id="w42-vd-D7e"/> | |
| 579 | 534 | <constraint firstItem="9w1-87-U1W" firstAttribute="centerX" secondItem="aKu-bd-xMP" secondAttribute="centerX" id="wJD-gn-ctq"/> |
| 580 | 535 | </constraints> |
| 581 | 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 | 582 | </subviews> |
| 583 | 583 | <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> |
| 584 | 584 | <constraints> |
LifeLog/LifeLog/GroupDetailViewController.h
| ... | ... | @@ -23,9 +23,10 @@ |
| 23 | 23 | @property (weak, nonatomic) IBOutlet AutoTransButton *btJoinGrp; |
| 24 | 24 | @property (weak, nonatomic) IBOutlet AutoTransButton *btSwitch; |
| 25 | 25 | |
| 26 | -- (IBAction)clickBack:(id)sender; | |
| 27 | - | |
| 28 | 26 | - (void) setGroup : (GroupObject *) object; |
| 27 | +- (void) requestGroupDetail; | |
| 28 | + | |
| 29 | +- (IBAction)clickBack:(id)sender; | |
| 29 | 30 | - (IBAction)clickSwitch:(AutoTransButton *)sender; |
| 30 | 31 | - (IBAction)clickJoin:(AutoTransButton *)sender; |
| 31 | 32 | @end |
LifeLog/LifeLog/GroupDetailViewController.m
| ... | ... | @@ -41,24 +41,34 @@ |
| 41 | 41 | |
| 42 | 42 | - (void)setupView { |
| 43 | 43 | if(_curGroup != nil) { |
| 44 | - if(_curGroup.avatar && ![_curGroup.avatar isKindOfClass:[NSNull class]]) { | |
| 44 | + if(self.imgAva != nil && _curGroup.avatar && ![_curGroup.avatar isKindOfClass:[NSNull class]]) { | |
| 45 | 45 | [self.imgAva sd_setImageWithURL:[NSURL URLWithString:[Utilities getImageLink:_curGroup.avatar]]]; |
| 46 | 46 | } |
| 47 | - [self.lblGrpName setText:_curGroup.name]; | |
| 48 | - [self.lblGrpGoal setText:_curGroup.goal]; | |
| 49 | - [self.btJoinGrp setHidden:_curGroup.isJoin]; | |
| 47 | + if(self.lblGrpName != nil) { | |
| 48 | + [self.lblGrpName setText:_curGroup.name]; | |
| 49 | + } | |
| 50 | + if(self.btJoinGrp != nil) { | |
| 51 | + [self.btJoinGrp setHidden:false]; | |
| 52 | + } | |
| 50 | 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 | + } | |
| 51 | 58 | if(_curGroup.runMode) { |
| 52 | 59 | mode = [mode stringByAppendingString:NSLocalizedString(@"lifelog.grDetail.mode.running", nil)]; |
| 53 | 60 | mode = [mode stringByAppendingString:@"\n"]; |
| 61 | + goalText = [goalText stringByAppendingFormat:@"RUN %dm, ", _curGroup.runGoal]; | |
| 54 | 62 | } |
| 55 | 63 | if(_curGroup.walkMode) { |
| 56 | 64 | mode = [mode stringByAppendingString:NSLocalizedString(@"lifelog.grDetail.mode.walking", nil)]; |
| 57 | 65 | mode = [mode stringByAppendingString:@"\n"]; |
| 66 | + goalText = [goalText stringByAppendingFormat:@"WALK %dm, ", _curGroup.walkGoal]; | |
| 58 | 67 | } |
| 59 | 68 | if(_curGroup.bikeMode) { |
| 60 | 69 | mode = [mode stringByAppendingString:NSLocalizedString(@"lifelog.grDetail.mode.bike", nil)]; |
| 61 | 70 | mode = [mode stringByAppendingString:@"\n"]; |
| 71 | + goalText = [goalText stringByAppendingFormat:@"BIKE %dm, ", _curGroup.bikeGoal]; | |
| 62 | 72 | } |
| 63 | 73 | if(_curGroup.stepMode) { |
| 64 | 74 | mode = [mode stringByAppendingString:NSLocalizedString(@"lifelog.grDetail.mode.step", nil)]; |
| 65 | 75 | |
| ... | ... | @@ -76,9 +86,29 @@ |
| 76 | 86 | if(range.length > 0) { |
| 77 | 87 | mode = [mode stringByReplacingOccurrencesOfString:@"\n" withString:@"" options:NSBackwardsSearch range:range]; |
| 78 | 88 | } |
| 79 | - self.lbbGrpActiveMode.text = mode; | |
| 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]; | |
| 80 | 95 | } |
| 81 | 96 | } |
| 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 | + | |
| 82 | 112 | #pragma mark IBAction |
| 83 | 113 | |
| 84 | 114 | - (IBAction)clickBack:(id)sender { |
| ... | ... | @@ -107,6 +137,7 @@ |
| 107 | 137 | if(error == nil) { |
| 108 | 138 | _curGroup.isJoin = true; |
| 109 | 139 | [weakSelf.btJoinGrp setHidden:_curGroup.isJoin]; |
| 140 | + [Utilities showMessage:@"Join successfully" withViewController:weakSelf]; | |
| 110 | 141 | } |
| 111 | 142 | }); |
| 112 | 143 | }]; |
| ... | ... | @@ -153,20 +184,6 @@ |
| 153 | 184 | } |
| 154 | 185 | |
| 155 | 186 | #pragma mark Private Function |
| 156 | - | |
| 157 | -- (void) requestGroupDetail { | |
| 158 | - NSString * token = [[NSUserDefaults standardUserDefaults] stringForKey:kToken]; | |
| 159 | - MBProgressHUD *hudView = [MBProgressHUD showHUDAddedTo:self.view animated:true]; | |
| 160 | - [[ServerAPI server] getGroupDetail:token withGroupID:_curGroup.groupID CompletionHandler:^(GroupObject *object, NSError *error) { | |
| 161 | - GroupDetailViewController __weak *weakSelf = self; | |
| 162 | - [_curGroup updateDate:object]; | |
| 163 | - dispatch_async(dispatch_get_main_queue(), ^{ | |
| 164 | - [hudView hideAnimated:true]; | |
| 165 | - [weakSelf setupView]; | |
| 166 | - [weakSelf callRequestToUpdateData]; | |
| 167 | - }); | |
| 168 | - }]; | |
| 169 | -} | |
| 170 | 187 | |
| 171 | 188 | -(void) callRequestToUpdateData { |
| 172 | 189 | [super callRequestToUpdateData]; |
LifeLog/LifeLog/GroupDetailViewController.xib
| ... | ... | @@ -22,14 +22,14 @@ |
| 22 | 22 | </placeholder> |
| 23 | 23 | <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> |
| 24 | 24 | <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> |
| 25 | - <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |
| 25 | + <rect key="frame" x="0.0" y="0.0" width="320" height="567"/> | |
| 26 | 26 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
| 27 | 27 | <subviews> |
| 28 | 28 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="25d-3H-0fr" userLabel="ViewHeader"> |
| 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="320" height="46"/> | |
| 30 | 30 | <subviews> |
| 31 | 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"> |
| 32 | - <rect key="frame" x="0.0" y="0.0" width="375" height="46"/> | |
| 32 | + <rect key="frame" x="0.0" y="0.0" width="320" height="46"/> | |
| 33 | 33 | <fontDescription key="fontDescription" type="system" pointSize="17"/> |
| 34 | 34 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 35 | 35 | <nil key="highlightedColor"/> |
| ... | ... | @@ -48,7 +48,7 @@ |
| 48 | 48 | </connections> |
| 49 | 49 | </button> |
| 50 | 50 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="y09-DG-Krp"> |
| 51 | - <rect key="frame" x="330" y="0.0" width="45" height="46"/> | |
| 51 | + <rect key="frame" x="275" y="0.0" width="45" height="46"/> | |
| 52 | 52 | <constraints> |
| 53 | 53 | <constraint firstAttribute="width" constant="45" id="hHa-aE-1zd"/> |
| 54 | 54 | </constraints> |
| 55 | 55 | |
| 56 | 56 | |
| ... | ... | @@ -71,16 +71,16 @@ |
| 71 | 71 | </constraints> |
| 72 | 72 | </view> |
| 73 | 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"> |
| 74 | - <rect key="frame" x="15" y="54" width="345" height="21"/> | |
| 74 | + <rect key="frame" x="15" y="54" width="290" height="21"/> | |
| 75 | 75 | <constraints> |
| 76 | 76 | <constraint firstAttribute="height" constant="21" id="fQO-ja-W9R"/> |
| 77 | 77 | </constraints> |
| 78 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
| 78 | + <fontDescription key="fontDescription" type="system" pointSize="15"/> | |
| 79 | 79 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 80 | 80 | <nil key="highlightedColor"/> |
| 81 | 81 | </label> |
| 82 | 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"> |
| 83 | - <rect key="frame" x="15" y="85" width="243" height="60"/> | |
| 83 | + <rect key="frame" x="15" y="85" width="188" height="60"/> | |
| 84 | 84 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
| 85 | 85 | <constraints> |
| 86 | 86 | <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="60" id="Bid-NM-Ree"/> |
| 87 | 87 | |
| 88 | 88 | |
| 89 | 89 | |
| 90 | 90 | |
| 91 | 91 | |
| ... | ... | @@ -90,27 +90,28 @@ |
| 90 | 90 | <nil key="highlightedColor"/> |
| 91 | 91 | </label> |
| 92 | 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"> |
| 93 | - <rect key="frame" x="15" y="160" width="345" height="80"/> | |
| 93 | + <rect key="frame" x="15" y="160" width="290" height="0.0"/> | |
| 94 | 94 | <constraints> |
| 95 | - <constraint firstAttribute="height" constant="80" id="jgH-57-Bae"/> | |
| 95 | + <constraint firstAttribute="height" relation="greaterThanOrEqual" id="jgH-57-Bae"/> | |
| 96 | 96 | </constraints> |
| 97 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
| 97 | + <fontDescription key="fontDescription" type="system" pointSize="14"/> | |
| 98 | 98 | <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 99 | 99 | <nil key="highlightedColor"/> |
| 100 | 100 | </label> |
| 101 | 101 | <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="qYg-Gw-R2b"> |
| 102 | - <rect key="frame" x="280" y="85" width="80" height="60"/> | |
| 102 | + <rect key="frame" x="225" y="85" width="80" height="60"/> | |
| 103 | 103 | <constraints> |
| 104 | 104 | <constraint firstAttribute="width" constant="80" id="NEk-vg-zus"/> |
| 105 | 105 | <constraint firstAttribute="height" constant="60" id="qlv-ht-SUw"/> |
| 106 | 106 | </constraints> |
| 107 | 107 | </imageView> |
| 108 | 108 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gBg-k9-tgw" customClass="AutoTransButton"> |
| 109 | - <rect key="frame" x="15" y="270" width="162" height="30"/> | |
| 109 | + <rect key="frame" x="15" y="190" width="134.5" height="30"/> | |
| 110 | 110 | <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| 111 | 111 | <constraints> |
| 112 | 112 | <constraint firstAttribute="height" constant="30" id="6Ir-ZZ-NOb"/> |
| 113 | 113 | </constraints> |
| 114 | + <fontDescription key="fontDescription" type="system" pointSize="14"/> | |
| 114 | 115 | <state key="normal" title="メンバーを見る"> |
| 115 | 116 | <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 116 | 117 | </state> |
| 117 | 118 | |
| ... | ... | @@ -125,11 +126,12 @@ |
| 125 | 126 | </connections> |
| 126 | 127 | </button> |
| 127 | 128 | <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="caN-x7-hJz" customClass="AutoTransButton"> |
| 128 | - <rect key="frame" x="197" y="270" width="162" height="30"/> | |
| 129 | + <rect key="frame" x="169.5" y="190" width="134.5" height="30"/> | |
| 129 | 130 | <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| 130 | 131 | <constraints> |
| 131 | 132 | <constraint firstAttribute="height" constant="30" id="gIs-Km-dbx"/> |
| 132 | 133 | </constraints> |
| 134 | + <fontDescription key="fontDescription" type="system" pointSize="14"/> | |
| 133 | 135 | <state key="normal" title="グループに参加する"> |
| 134 | 136 | <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
| 135 | 137 | </state> |
| ... | ... | @@ -144,7 +146,7 @@ |
| 144 | 146 | </connections> |
| 145 | 147 | </button> |
| 146 | 148 | <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="100" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="4VU-Ye-7Au"> |
| 147 | - <rect key="frame" x="0.0" y="310" width="375" height="307"/> | |
| 149 | + <rect key="frame" x="0.0" y="230" width="320" height="287"/> | |
| 148 | 150 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
| 149 | 151 | <connections> |
| 150 | 152 | <outlet property="dataSource" destination="-1" id="TLB-6X-bRI"/> |
| ... | ... | @@ -179,6 +181,7 @@ |
| 179 | 181 | <constraint firstItem="Bdy-dI-j47" firstAttribute="top" secondItem="O8z-6V-YFd" secondAttribute="bottom" constant="15" id="xEO-fP-Riz"/> |
| 180 | 182 | <constraint firstAttribute="trailing" secondItem="4VU-Ye-7Au" secondAttribute="trailing" id="ylN-vm-QF2"/> |
| 181 | 183 | </constraints> |
| 184 | + <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> | |
| 182 | 185 | <point key="canvasLocation" x="24.5" y="52.5"/> |
| 183 | 186 | </view> |
| 184 | 187 | </objects> |
LifeLog/LifeLog/MyGroupViewController.h
| ... | ... | @@ -7,27 +7,18 @@ |
| 7 | 7 | // |
| 8 | 8 | |
| 9 | 9 | #import <UIKit/UIKit.h> |
| 10 | -#import "BaseTableViewController.h" | |
| 10 | +#import "GroupDetailViewController.h" | |
| 11 | 11 | #import "AutoTransButton.h" |
| 12 | 12 | #import "Entities.h" |
| 13 | 13 | |
| 14 | -@interface MyGroupViewController : BaseTableViewController { | |
| 14 | +@interface MyGroupViewController : GroupDetailViewController { | |
| 15 | 15 | NSMutableArray *_curListGrp; |
| 16 | - GroupObject *_curGroup; | |
| 17 | - BOOL isMemberList; | |
| 18 | 16 | } |
| 19 | 17 | |
| 20 | 18 | @property (weak, nonatomic) IBOutlet UITableView *tableGrp; |
| 21 | - | |
| 22 | -@property (weak, nonatomic) IBOutlet UILabel *lblGroupName; | |
| 23 | -@property (weak, nonatomic) IBOutlet UILabel *lblActiveMode; | |
| 24 | -@property (weak, nonatomic) IBOutlet UILabel *lblGoal; | |
| 25 | 19 | @property (weak, nonatomic) IBOutlet UIButton *btShowGrp; |
| 26 | -@property (weak, nonatomic) IBOutlet AutoTransButton *btSwitch; | |
| 27 | 20 | |
| 28 | -- (IBAction)clickBack:(id)sender; | |
| 29 | 21 | - (IBAction)clickShowGrp:(id)sender; |
| 30 | -- (IBAction)clickSwitch:(id)sender; | |
| 31 | 22 | |
| 32 | 23 | @end |
LifeLog/LifeLog/MyGroupViewController.m
| ... | ... | @@ -34,42 +34,6 @@ |
| 34 | 34 | // Dispose of any resources that can be recreated. |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | -- (void)setupView { | |
| 38 | - if(_curGroup != nil) { | |
| 39 | - [self.lblGoal setText:_curGroup.goal]; | |
| 40 | - NSString *mode = @""; | |
| 41 | - if(_curGroup.runMode) { | |
| 42 | - mode = [mode stringByAppendingString:NSLocalizedString(@"lifelog.grDetail.mode.running", nil)]; | |
| 43 |