Commit 03a8708ee32eced7335c64cd8be7fbcae9946f3d

Authored by nvtu11790@gmail.com
1 parent da40f74562

Finish create group screen, add API create group, optimize UX when search group

Showing 12 changed files with 859 additions and 5 deletions Side-by-side Diff

LifeLog/LifeLog.xcodeproj/project.pbxproj
... ... @@ -58,6 +58,8 @@
58 58 E9373E4A1F35AA180059355A /* HistoryObject.m in Sources */ = {isa = PBXBuildFile; fileRef = E9373E491F35AA180059355A /* HistoryObject.m */; };
59 59 E9373E4D1F361A230059355A /* HistoryGraphObject.m in Sources */ = {isa = PBXBuildFile; fileRef = E9373E4C1F361A230059355A /* HistoryGraphObject.m */; };
60 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 */; };
61 63 E9682E2E1F39675A00FE05A2 /* RankingTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E9682E2C1F39675A00FE05A2 /* RankingTableViewCell.m */; };
62 64 E9682E2F1F39675A00FE05A2 /* RankingTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E9682E2D1F39675A00FE05A2 /* RankingTableViewCell.xib */; };
63 65 E968550A1F3C444900317CEF /* AutoTransButton.m in Sources */ = {isa = PBXBuildFile; fileRef = E96855091F3C444900317CEF /* AutoTransButton.m */; };
... ... @@ -184,6 +186,9 @@
184 186 E9373E4C1F361A230059355A /* HistoryGraphObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HistoryGraphObject.m; sourceTree = "<group>"; };
185 187 E9497FD31F46EC1100E6AF8D /* MemberObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemberObject.h; sourceTree = "<group>"; };
186 188 E9497FD41F46EC1100E6AF8D /* MemberObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MemberObject.m; sourceTree = "<group>"; };
  189 + E95F4CEA1F475C6A00D27E80 /* CreateGroupViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CreateGroupViewController.h; sourceTree = "<group>"; };
  190 + E95F4CEB1F475C6A00D27E80 /* CreateGroupViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CreateGroupViewController.m; sourceTree = "<group>"; };
  191 + E95F4CEC1F475C6A00D27E80 /* CreateGroupViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CreateGroupViewController.xib; sourceTree = "<group>"; };
187 192 E9682E2B1F39675A00FE05A2 /* RankingTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RankingTableViewCell.h; sourceTree = "<group>"; };
188 193 E9682E2C1F39675A00FE05A2 /* RankingTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RankingTableViewCell.m; sourceTree = "<group>"; };
189 194 E9682E2D1F39675A00FE05A2 /* RankingTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RankingTableViewCell.xib; sourceTree = "<group>"; };
... ... @@ -436,6 +441,7 @@
436 441 6E84E3AC1F27A954001EB88E /* SNS */ = {
437 442 isa = PBXGroup;
438 443 children = (
  444 + E95F4CE91F475C4B00D27E80 /* CreateGroup */,
439 445 E933E6751F4050E6002926F5 /* GroupDetail */,
440 446 E933E6671F3E0479002926F5 /* SeachGroup */,
441 447 6E84E3BC1F27A9B1001EB88E /* SNSViewController.h */,
... ... @@ -581,6 +587,16 @@
581 587 name = AutoTranslateView;
582 588 sourceTree = "<group>";
583 589 };
  590 + E95F4CE91F475C4B00D27E80 /* CreateGroup */ = {
  591 + isa = PBXGroup;
  592 + children = (
  593 + E95F4CEA1F475C6A00D27E80 /* CreateGroupViewController.h */,
  594 + E95F4CEB1F475C6A00D27E80 /* CreateGroupViewController.m */,
  595 + E95F4CEC1F475C6A00D27E80 /* CreateGroupViewController.xib */,
  596 + );
  597 + name = CreateGroup;
  598 + sourceTree = "<group>";
  599 + };
584 600 E99E13A71F336F0C00C78787 /* CustomView */ = {
585 601 isa = PBXGroup;
586 602 children = (
... ... @@ -714,6 +730,7 @@
714 730 buildActionMask = 2147483647;
715 731 files = (
716 732 9CBDA1001F2F03810055DED1 /* RegisterViewController.xib in Resources */,
  733 + E95F4CEE1F475C6A00D27E80 /* CreateGroupViewController.xib in Resources */,
717 734 6E18CED41F2E39DB0029891F /* LoginViewController.xib in Resources */,
718 735 E99E13AD1F336F4500C78787 /* CollectionView.xib in Resources */,
719 736 6E84E3BB1F27A9A0001EB88E /* RankingViewController.xib in Resources */,
... ... @@ -827,6 +844,7 @@
827 844 6EDC8BF41F2C68D700765ACC /* CMMotionActivityExtra.m in Sources */,
828 845 E933E6791F40513C002926F5 /* GroupDetailViewController.m in Sources */,
829 846 6EA4AF311F40BB7A00F52CFE /* StepObject.m in Sources */,
  847 + E95F4CED1F475C6A00D27E80 /* CreateGroupViewController.m in Sources */,
830 848 9CBDA0FF1F2F03810055DED1 /* RegisterViewController.m in Sources */,
831 849 E9373E4A1F35AA180059355A /* HistoryObject.m in Sources */,
832 850 9CA8AEEA1F31BB4600C5FC74 /* ConfirmForgetPassViewController.m in Sources */,
LifeLog/LifeLog/BaseTableViewController.m
... ... @@ -61,6 +61,9 @@
61 61 }
62 62 if(error == nil) {
63 63 if(array.count != 0) {
  64 + if(_curPage == 1) {
  65 + [_curDataList removeAllObjects];
  66 + }
64 67 [_curDataList addObjectsFromArray:array];
65 68 dispatch_async(dispatch_get_main_queue(), ^{
66 69 [weakSelf.tableBase reloadData];
LifeLog/LifeLog/CreateGroupViewController.h
  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
LifeLog/LifeLog/CreateGroupViewController.m
  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
LifeLog/LifeLog/CreateGroupViewController.xib
  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 + <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">
  79 + <rect key="frame" x="0.0" y="46" width="320" height="580"/>
  80 + <subviews>
  81 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9w1-87-U1W">
  82 + <rect key="frame" x="0.0" y="0.0" width="320" height="580"/>
  83 + <subviews>
  84 + <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">
  85 + <rect key="frame" x="8" y="10" width="70" height="30"/>
  86 + <constraints>
  87 + <constraint firstAttribute="width" constant="70" id="Zvx-V3-7AW"/>
  88 + <constraint firstAttribute="height" constant="30" id="nok-hA-mW9"/>
  89 + </constraints>
  90 + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
  91 + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  92 + <nil key="highlightedColor"/>
  93 + <userDefinedRuntimeAttributes>
  94 + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.name"/>
  95 + </userDefinedRuntimeAttributes>
  96 + </label>
  97 + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="pXO-K0-vne">
  98 + <rect key="frame" x="88" y="10" width="222" height="30"/>
  99 + <constraints>
  100 + <constraint firstAttribute="height" constant="30" id="YJe-TW-hvA"/>
  101 + </constraints>
  102 + <nil key="textColor"/>
  103 + <fontDescription key="fontDescription" type="system" pointSize="14"/>
  104 + <textInputTraits key="textInputTraits"/>
  105 + <connections>
  106 + <outlet property="delegate" destination="-1" id="3NL-Ya-JuM"/>
  107 + </connections>
  108 + </textField>
  109 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ONn-27-HqB">
  110 + <rect key="frame" x="10" y="50" width="140" height="120"/>
  111 + <subviews>
  112 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="S2z-DI-pIE">
  113 + <rect key="frame" x="0.0" y="0.0" width="140" height="40"/>
  114 + <subviews>
  115 + <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3xD-aH-JHl">
  116 + <rect key="frame" x="85" y="4" width="51" height="31"/>
  117 + <constraints>
  118 + <constraint firstAttribute="width" secondItem="3xD-aH-JHl" secondAttribute="height" multiplier="49:31" id="7LJ-H5-oQR"/>
  119 + </constraints>
  120 + <color key="onTintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  121 + </switch>
  122 + <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">
  123 + <rect key="frame" x="6" y="10.5" width="47.5" height="20.5"/>
  124 + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
  125 + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  126 + <nil key="highlightedColor"/>
  127 + <userDefinedRuntimeAttributes>
  128 + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.walk"/>
  129 + </userDefinedRuntimeAttributes>
  130 + </label>
  131 + </subviews>
  132 + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
  133 + <constraints>
  134 + <constraint firstAttribute="trailing" secondItem="3xD-aH-JHl" secondAttribute="trailing" constant="6" id="KNe-Rx-lun"/>
  135 + <constraint firstAttribute="height" constant="40" id="akz-T7-d2v"/>
  136 + <constraint firstItem="3xD-aH-JHl" firstAttribute="centerY" secondItem="S2z-DI-pIE" secondAttribute="centerY" id="oRy-OM-Om1"/>
  137 + <constraint firstItem="yFv-kp-ag8" firstAttribute="leading" secondItem="S2z-DI-pIE" secondAttribute="leading" constant="6" id="prt-UF-Ori"/>
  138 + <constraint firstItem="yFv-kp-ag8" firstAttribute="centerY" secondItem="S2z-DI-pIE" secondAttribute="centerY" id="xEl-Rl-8C1"/>
  139 + </constraints>
  140 + </view>
  141 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dVh-y2-XTr">
  142 + <rect key="frame" x="0.0" y="40" width="140" height="40"/>
  143 + <subviews>
  144 + <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2gX-B2-tkR">
  145 + <rect key="frame" x="85" y="4" width="51" height="31"/>
  146 + <constraints>
  147 + <constraint firstAttribute="width" secondItem="2gX-B2-tkR" secondAttribute="height" multiplier="49:31" id="pBG-Mw-aNK"/>
  148 + </constraints>
  149 + <color key="onTintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  150 + </switch>
  151 + <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">
  152 + <rect key="frame" x="6" y="10.5" width="36" height="20.5"/>
  153 + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
  154 + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  155 + <nil key="highlightedColor"/>
  156 + <userDefinedRuntimeAttributes>
  157 + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.run"/>
  158 + </userDefinedRuntimeAttributes>
  159 + </label>
  160 + </subviews>
  161 + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
  162 + <constraints>
  163 + <constraint firstItem="2gX-B2-tkR" firstAttribute="centerY" secondItem="dVh-y2-XTr" secondAttribute="centerY" id="bNR-wC-PQG"/>
  164 + <constraint firstItem="r9v-yX-mx8" firstAttribute="leading" secondItem="dVh-y2-XTr" secondAttribute="leading" constant="6" id="iHM-Q7-Z1Z"/>
  165 + <constraint firstAttribute="height" constant="40" id="s8W-Ak-VrH"/>
  166 + <constraint firstAttribute="trailing" secondItem="2gX-B2-tkR" secondAttribute="trailing" constant="6" id="usV-BG-oqp"/>
  167 + <constraint firstItem="r9v-yX-mx8" firstAttribute="centerY" secondItem="dVh-y2-XTr" secondAttribute="centerY" id="yZW-Wk-raQ"/>
  168 + </constraints>
  169 + </view>
  170 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7PQ-zz-N0X">
  171 + <rect key="frame" x="0.0" y="80" width="140" height="40"/>
  172 + <subviews>
  173 + <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Yga-UQ-xoU">
  174 + <rect key="frame" x="85" y="4" width="51" height="31"/>
  175 + <constraints>
  176 + <constraint firstAttribute="width" secondItem="Yga-UQ-xoU" secondAttribute="height" multiplier="49:31" id="laB-Zs-gOj"/>
  177 + </constraints>
  178 + <color key="onTintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  179 + </switch>
  180 + <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">
  181 + <rect key="frame" x="6" y="10.5" width="35" height="20.5"/>
  182 + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
  183 + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  184 + <nil key="highlightedColor"/>
  185 + <userDefinedRuntimeAttributes>
  186 + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.gym"/>
  187 + </userDefinedRuntimeAttributes>
  188 + </label>
  189 + </subviews>
  190 + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
  191 + <constraints>
  192 + <constraint firstItem="EFD-Ys-PqS" firstAttribute="centerY" secondItem="7PQ-zz-N0X" secondAttribute="centerY" id="Ein-vC-mpy"/>
  193 + <constraint firstAttribute="height" constant="40" id="aKm-hG-Hyh"/>
  194 + <constraint firstAttribute="trailing" secondItem="Yga-UQ-xoU" secondAttribute="trailing" constant="6" id="cfd-4G-1NF"/>
  195 + <constraint firstItem="EFD-Ys-PqS" firstAttribute="leading" secondItem="7PQ-zz-N0X" secondAttribute="leading" constant="6" id="ojT-rz-8oC"/>
  196 + <constraint firstItem="Yga-UQ-xoU" firstAttribute="centerY" secondItem="7PQ-zz-N0X" secondAttribute="centerY" id="xYy-kb-5Sk"/>
  197 + </constraints>
  198 + </view>
  199 + </subviews>
  200 + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
  201 + <constraints>
  202 + <constraint firstItem="dVh-y2-XTr" firstAttribute="top" secondItem="S2z-DI-pIE" secondAttribute="bottom" id="2LH-28-ssn"/>
  203 + <constraint firstItem="7PQ-zz-N0X" firstAttribute="leading" secondItem="ONn-27-HqB" secondAttribute="leading" id="6md-Y8-lIk"/>
  204 + <constraint firstAttribute="height" constant="120" id="7Tb-oJ-5eC"/>
  205 + <constraint firstItem="7PQ-zz-N0X" firstAttribute="top" secondItem="dVh-y2-XTr" secondAttribute="bottom" id="Fsa-Ai-cKQ"/>