Commit 03a8708ee32eced7335c64cd8be7fbcae9946f3d
1 parent
da40f74562
Exists in
master
and in
1 other branch
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
- LifeLog/LifeLog/BaseTableViewController.m
- LifeLog/LifeLog/CreateGroupViewController.h
- LifeLog/LifeLog/CreateGroupViewController.m
- LifeLog/LifeLog/CreateGroupViewController.xib
- LifeLog/LifeLog/GroupObject.m
- LifeLog/LifeLog/Localizable.strings
- LifeLog/LifeLog/SearchGroupViewController.h
- LifeLog/LifeLog/SearchGroupViewController.m
- LifeLog/LifeLog/SearchGroupViewController.xib
- LifeLog/LifeLog/ServerAPI.h
- LifeLog/LifeLog/ServerAPI.m
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
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"/> | |
206 | + <constraint firstAttribute="trailing" secondItem="S2z-DI-pIE" secondAttribute="trailing" id="OV6-wK-IJj"/> | |
207 | + <constraint firstItem="dVh-y2-XTr" firstAttribute="leading" secondItem="ONn-27-HqB" secondAttribute="leading" id="TFE-bH-HwH"/> | |
208 | + <constraint firstAttribute="trailing" secondItem="dVh-y2-XTr" secondAttribute="trailing" id="Vul-EM-V8H"/> | |
209 | + <constraint firstItem="S2z-DI-pIE" firstAttribute="top" secondItem="ONn-27-HqB" secondAttribute="top" id="Yf4-Rz-E4g"/> | |
210 | + <constraint firstAttribute="trailing" secondItem="7PQ-zz-N0X" secondAttribute="trailing" id="hLr-NV-hyv"/> | |
211 | + <constraint firstItem="S2z-DI-pIE" firstAttribute="leading" secondItem="ONn-27-HqB" secondAttribute="leading" id="zMY-Vd-Ge9"/> | |
212 | + </constraints> | |
213 | + </view> | |
214 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Kpa-HJ-7cE"> | |
215 | + <rect key="frame" x="170" y="50" width="140" height="120"/> | |
216 | + <subviews> | |
217 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ALk-sL-SXG"> | |
218 | + <rect key="frame" x="0.0" y="0.0" width="140" height="40"/> | |
219 | + <subviews> | |
220 | + <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fGW-Vw-PwQ"> | |
221 | + <rect key="frame" x="85" y="4" width="51" height="31"/> | |
222 | + <constraints> | |
223 | + <constraint firstAttribute="width" secondItem="fGW-Vw-PwQ" secondAttribute="height" multiplier="49:31" id="qd5-Cg-6pG"/> | |
224 | + </constraints> | |
225 | + <color key="onTintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
226 | + </switch> | |
227 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="BIKE" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WfE-YM-vVU" customClass="AutoTransLabel"> | |
228 | + <rect key="frame" x="6" y="10.5" width="36.5" height="20.5"/> | |
229 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/> | |
230 | + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
231 | + <nil key="highlightedColor"/> | |
232 | + <userDefinedRuntimeAttributes> | |
233 | + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.bike"/> | |
234 | + </userDefinedRuntimeAttributes> | |
235 | + </label> | |
236 | + </subviews> | |
237 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | |
238 | + <constraints> | |
239 | + <constraint firstItem="WfE-YM-vVU" firstAttribute="leading" secondItem="ALk-sL-SXG" secondAttribute="leading" constant="6" id="7xm-U8-L7U"/> | |
240 | + <constraint firstAttribute="height" constant="40" id="L4u-uj-rHa"/> | |
241 | + <constraint firstItem="fGW-Vw-PwQ" firstAttribute="centerY" secondItem="ALk-sL-SXG" secondAttribute="centerY" id="PBA-tv-gec"/> | |
242 | + <constraint firstAttribute="trailing" secondItem="fGW-Vw-PwQ" secondAttribute="trailing" constant="6" id="bHc-Ih-6ar"/> | |
243 | + <constraint firstItem="WfE-YM-vVU" firstAttribute="centerY" secondItem="ALk-sL-SXG" secondAttribute="centerY" id="te7-Im-Oqh"/> | |
244 | + </constraints> | |
245 | + </view> | |
246 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4Az-6N-8u4"> | |
247 | + <rect key="frame" x="0.0" y="40" width="140" height="40"/> | |
248 | + <subviews> | |
249 | + <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="RoR-w7-dNT"> | |
250 | + <rect key="frame" x="85" y="4" width="51" height="31"/> | |
251 | + <constraints> | |
252 | + <constraint firstAttribute="width" secondItem="RoR-w7-dNT" secondAttribute="height" multiplier="49:31" id="YUz-Eh-EmZ"/> | |
253 | + </constraints> | |
254 | + <color key="onTintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
255 | + </switch> | |
256 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="STEP" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZyO-6K-2gA" customClass="AutoTransLabel"> | |
257 | + <rect key="frame" x="6" y="10.5" width="42" height="20.5"/> | |
258 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/> | |
259 | + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
260 | + <nil key="highlightedColor"/> | |
261 | + <userDefinedRuntimeAttributes> | |
262 | + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.step"/> | |
263 | + </userDefinedRuntimeAttributes> | |
264 | + </label> | |
265 | + </subviews> | |
266 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | |
267 | + <constraints> | |
268 | + <constraint firstAttribute="trailing" secondItem="RoR-w7-dNT" secondAttribute="trailing" constant="6" id="Cc4-W7-Qc8"/> | |
269 | + <constraint firstItem="ZyO-6K-2gA" firstAttribute="leading" secondItem="4Az-6N-8u4" secondAttribute="leading" constant="6" id="ER7-Bx-w9j"/> | |
270 | + <constraint firstAttribute="height" constant="40" id="Kcy-ij-IsH"/> | |
271 | + <constraint firstItem="RoR-w7-dNT" firstAttribute="centerY" secondItem="4Az-6N-8u4" secondAttribute="centerY" id="O1R-k3-iBZ"/> | |
272 | + <constraint firstItem="ZyO-6K-2gA" firstAttribute="centerY" secondItem="4Az-6N-8u4" secondAttribute="centerY" id="fWH-tG-gSV"/> | |
273 | + </constraints> | |
274 | + </view> | |
275 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ORZ-El-owx"> | |
276 | + <rect key="frame" x="0.0" y="80" width="140" height="40"/> | |
277 | + <subviews> | |
278 | + <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="e63-8i-6aa"> | |
279 | + <rect key="frame" x="85" y="4" width="51" height="31"/> | |
280 | + <constraints> | |
281 | + <constraint firstAttribute="width" secondItem="e63-8i-6aa" secondAttribute="height" multiplier="49:31" id="TTd-tM-PrG"/> | |
282 | + </constraints> | |
283 | + <color key="onTintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
284 | + </switch> | |
285 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ๅๅฟ่ " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RfO-1U-s4W" customClass="AutoTransLabel"> | |
286 | + <rect key="frame" x="6" y="10.5" width="52" height="20.5"/> | |
287 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/> | |
288 | + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
289 | + <nil key="highlightedColor"/> | |
290 | + <userDefinedRuntimeAttributes> | |
291 | + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.begin"/> | |
292 | + </userDefinedRuntimeAttributes> | |
293 | + </label> | |
294 | + </subviews> | |
295 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | |
296 | + <constraints> | |
297 | + <constraint firstItem="RfO-1U-s4W" firstAttribute="leading" secondItem="ORZ-El-owx" secondAttribute="leading" constant="6" id="5Vq-B2-215"/> | |
298 | + <constraint firstAttribute="trailing" secondItem="e63-8i-6aa" secondAttribute="trailing" constant="6" id="NUX-0H-z8v"/> | |
299 | + <constraint firstAttribute="height" constant="40" id="PdI-3J-BTC"/> | |
300 | + <constraint firstItem="e63-8i-6aa" firstAttribute="centerY" secondItem="ORZ-El-owx" secondAttribute="centerY" id="Vxw-Vk-POY"/> | |
301 | + <constraint firstItem="RfO-1U-s4W" firstAttribute="centerY" secondItem="ORZ-El-owx" secondAttribute="centerY" id="tX1-Qb-pKG"/> | |
302 | + </constraints> | |
303 | + </view> | |
304 | + </subviews> | |
305 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | |
306 | + <constraints> | |
307 | + <constraint firstAttribute="height" constant="120" id="1Z3-Ap-Qv1"/> | |
308 | + <constraint firstAttribute="trailing" secondItem="ALk-sL-SXG" secondAttribute="trailing" id="2DO-V0-pH1"/> | |
309 | + <constraint firstItem="ORZ-El-owx" firstAttribute="top" secondItem="4Az-6N-8u4" secondAttribute="bottom" id="9ap-NH-2HO"/> | |
310 | + <constraint firstItem="ALk-sL-SXG" firstAttribute="top" secondItem="Kpa-HJ-7cE" secondAttribute="top" id="Lc0-Xq-rka"/> | |
311 | + <constraint firstItem="4Az-6N-8u4" firstAttribute="leading" secondItem="Kpa-HJ-7cE" secondAttribute="leading" id="PVG-jU-N5c"/> | |
312 | + <constraint firstAttribute="trailing" secondItem="ORZ-El-owx" secondAttribute="trailing" id="WYz-Kv-H08"/> | |
313 | + <constraint firstItem="ORZ-El-owx" firstAttribute="leading" secondItem="Kpa-HJ-7cE" secondAttribute="leading" id="a7E-Je-SkO"/> | |
314 | + <constraint firstAttribute="bottom" secondItem="ORZ-El-owx" secondAttribute="bottom" id="dr5-Tk-AAg"/> | |
315 | + <constraint firstAttribute="trailing" secondItem="4Az-6N-8u4" secondAttribute="trailing" id="wOX-wa-25X"/> | |
316 | + <constraint firstItem="4Az-6N-8u4" firstAttribute="top" secondItem="ALk-sL-SXG" secondAttribute="bottom" id="xgc-3W-TS2"/> | |
317 | + <constraint firstItem="ALk-sL-SXG" firstAttribute="leading" secondItem="Kpa-HJ-7cE" secondAttribute="leading" id="yrE-eZ-Vg4"/> | |
318 | + </constraints> | |
319 | + </view> | |
320 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="็ฎๆจ" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KTY-Ed-NJL" customClass="AutoTransLabel"> | |
321 | + <rect key="frame" x="10" y="178" width="70" height="30"/> | |
322 | + <constraints> | |
323 | + <constraint firstAttribute="width" constant="70" id="Zlu-jK-x6p"/> | |
324 | + <constraint firstAttribute="height" constant="30" id="tVk-5e-QAY"/> | |
325 | + </constraints> | |
326 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/> | |
327 | + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
328 | + <nil key="highlightedColor"/> | |
329 | + <userDefinedRuntimeAttributes> | |
330 | + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.goal"/> | |
331 | + </userDefinedRuntimeAttributes> | |
332 | + </label> | |
333 | + <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="hWb-vU-yVd"> | |
334 | + <rect key="frame" x="88" y="178" width="222" height="120"/> | |
335 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
336 | + <constraints> | |
337 | + <constraint firstAttribute="height" constant="120" id="iYo-mA-ZGR"/> | |
338 | + </constraints> | |
339 | + <fontDescription key="fontDescription" type="system" pointSize="14"/> | |
340 | + <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> | |
341 | + <userDefinedRuntimeAttributes> | |
342 | + <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> | |
343 | + <integer key="value" value="10"/> | |
344 | + </userDefinedRuntimeAttribute> | |
345 | + </userDefinedRuntimeAttributes> | |
346 | + <connections> | |
347 | + <outlet property="delegate" destination="-1" id="fVh-oh-7St"/> | |
348 | + </connections> | |
349 | + </textView> | |
350 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ใใใ" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qdi-Na-zsj" customClass="AutoTransLabel"> | |
351 | + <rect key="frame" x="10" y="313" width="70" height="30"/> | |
352 | + <constraints> | |
353 | + <constraint firstAttribute="height" constant="30" id="Ptf-0N-ewh"/> | |
354 | + <constraint firstAttribute="width" constant="70" id="mT3-FA-eev"/> | |
355 | + </constraints> | |
356 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/> | |
357 | + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
358 | + <nil key="highlightedColor"/> | |
359 | + <userDefinedRuntimeAttributes> | |
360 | + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.map"/> | |
361 | + </userDefinedRuntimeAttributes> | |
362 | + </label> | |
363 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="๏ผๆฅ็ฎๆจ" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qfU-7x-uss" customClass="AutoTransLabel"> | |
364 | + <rect key="frame" x="10" y="353" width="300" height="30"/> | |
365 | + <constraints> | |
366 | + <constraint firstAttribute="height" constant="30" id="9dB-8p-Wdv"/> | |
367 | + </constraints> | |
368 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/> | |
369 | + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
370 | + <nil key="highlightedColor"/> | |
371 | + <userDefinedRuntimeAttributes> | |
372 | + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.goal1day"/> | |
373 | + </userDefinedRuntimeAttributes> | |
374 | + </label> | |
375 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KEy-T1-mdK" customClass="AutoTransButton"> | |
376 | + <rect key="frame" x="88" y="313" width="110" height="30"/> | |
377 | + <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> | |
378 | + <constraints> | |
379 | + <constraint firstAttribute="height" constant="30" id="MWc-Aj-2JZ"/> | |
380 | + <constraint firstAttribute="width" constant="110" id="V16-pC-FRv"/> | |
381 | + </constraints> | |
382 | + <state key="normal" title="ใใใไฝๆ"> | |
383 | + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
384 | + </state> | |
385 | + <userDefinedRuntimeAttributes> | |
386 | + <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> | |
387 | + <integer key="value" value="5"/> | |
388 | + </userDefinedRuntimeAttribute> | |
389 | + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.bt.map"/> | |
390 | + </userDefinedRuntimeAttributes> | |
391 | + </button> | |
392 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="WALK" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3QV-Ov-PmX" customClass="AutoTransLabel"> | |
393 | + <rect key="frame" x="10" y="391" width="70" height="30"/> | |
394 | + <constraints> | |
395 | + <constraint firstAttribute="height" constant="30" id="GSj-Tq-AsU"/> | |
396 | + <constraint firstAttribute="width" constant="70" id="uIv-Ty-eR2"/> | |
397 | + </constraints> | |
398 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/> | |
399 | + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
400 | + <nil key="highlightedColor"/> | |
401 | + <userDefinedRuntimeAttributes> | |
402 | + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.walk"/> | |
403 | + </userDefinedRuntimeAttributes> | |
404 | + </label> | |
405 | + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="4JZ-J2-3D9"> | |
406 | + <rect key="frame" x="95" y="391" width="130" height="30"/> | |
407 | + <constraints> | |
408 | + <constraint firstAttribute="height" constant="30" id="JaF-D4-zT2"/> | |
409 | + <constraint firstAttribute="width" constant="130" id="qCj-P5-l4y"/> | |
410 | + </constraints> | |
411 | + <nil key="textColor"/> | |
412 | + <fontDescription key="fontDescription" type="system" pointSize="14"/> | |
413 | + <textInputTraits key="textInputTraits" keyboardType="numberPad"/> | |
414 | + </textField> | |
415 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="m" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="o9b-Am-GTl"> | |
416 | + <rect key="frame" x="240" y="391" width="70" height="30"/> | |
417 | + <constraints> | |
418 | + <constraint firstAttribute="width" constant="70" id="MN1-fg-mf1"/> | |
419 | + <constraint firstAttribute="height" constant="30" id="l7E-J3-Syw"/> | |
420 | + </constraints> | |
421 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/> | |
422 | + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
423 | + <nil key="highlightedColor"/> | |
424 | + <userDefinedRuntimeAttributes> | |
425 | + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.name"/> | |
426 | + </userDefinedRuntimeAttributes> | |
427 | + </label> | |
428 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="RUN" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bq4-nh-Cxk" customClass="AutoTransLabel"> | |
429 | + <rect key="frame" x="10" y="429" width="70" height="30"/> | |
430 | + <constraints> | |
431 | + <constraint firstAttribute="height" constant="30" id="MmK-Nk-eFt"/> | |
432 | + <constraint firstAttribute="width" constant="70" id="nuP-fj-jk2"/> | |
433 | + </constraints> | |
434 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/> | |
435 | + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
436 | + <nil key="highlightedColor"/> | |
437 | + <userDefinedRuntimeAttributes> | |
438 | + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.run"/> | |
439 | + </userDefinedRuntimeAttributes> | |
440 | + </label> | |
441 | + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="3aE-uP-KLS"> | |
442 | + <rect key="frame" x="95" y="429" width="130" height="30"/> | |
443 | + <constraints> | |
444 | + <constraint firstAttribute="height" constant="30" id="37e-2c-qka"/> | |
445 | + <constraint firstAttribute="width" constant="130" id="owG-Ob-QnB"/> | |
446 | + </constraints> | |
447 | + <nil key="textColor"/> | |
448 | + <fontDescription key="fontDescription" type="system" pointSize="14"/> | |
449 | + <textInputTraits key="textInputTraits" keyboardType="numberPad"/> | |
450 | + </textField> | |
451 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="m" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CGA-Xm-2ll"> | |
452 | + <rect key="frame" x="240" y="429" width="70" height="30"/> | |
453 | + <constraints> | |
454 | + <constraint firstAttribute="width" constant="70" id="6cf-Y6-Dwq"/> | |
455 | + <constraint firstAttribute="height" constant="30" id="dHv-kM-AX2"/> | |
456 | + </constraints> | |
457 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/> | |
458 | + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
459 | + <nil key="highlightedColor"/> | |
460 | + <userDefinedRuntimeAttributes> | |
461 | + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.name"/> | |
462 | + </userDefinedRuntimeAttributes> | |
463 | + </label> | |
464 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="BIKE" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mvZ-9L-7a8" customClass="AutoTransLabel"> | |
465 | + <rect key="frame" x="10" y="467" width="70" height="30"/> | |
466 | + <constraints> | |
467 | + <constraint firstAttribute="height" constant="30" id="hX2-SJ-SMG"/> | |
468 | + <constraint firstAttribute="width" constant="70" id="roN-jL-tXp"/> | |
469 | + </constraints> | |
470 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/> | |
471 | + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
472 | + <nil key="highlightedColor"/> | |
473 | + <userDefinedRuntimeAttributes> | |
474 | + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.bike"/> | |
475 | + </userDefinedRuntimeAttributes> | |
476 | + </label> | |
477 | + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="eOi-eo-GYn"> | |
478 | + <rect key="frame" x="95" y="467" width="130" height="30"/> | |
479 | + <constraints> | |
480 | + <constraint firstAttribute="width" constant="130" id="SBb-jw-NHP"/> | |
481 | + <constraint firstAttribute="height" constant="30" id="ida-Ih-wRM"/> | |
482 | + </constraints> | |
483 | + <nil key="textColor"/> | |
484 | + <fontDescription key="fontDescription" type="system" pointSize="14"/> | |
485 | + <textInputTraits key="textInputTraits" keyboardType="numberPad"/> | |
486 | + </textField> | |
487 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="m" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="t6i-sV-ycx"> | |
488 | + <rect key="frame" x="240" y="467" width="70" height="30"/> | |
489 | + <constraints> | |
490 | + <constraint firstAttribute="width" constant="70" id="DoG-hb-QbI"/> | |
491 | + <constraint firstAttribute="height" constant="30" id="pAs-GK-YE3"/> | |
492 | + </constraints> | |
493 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/> | |
494 | + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
495 | + <nil key="highlightedColor"/> | |
496 | + <userDefinedRuntimeAttributes> | |
497 | + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.lbl.name"/> | |
498 | + </userDefinedRuntimeAttributes> | |
499 | + </label> | |
500 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sef-8T-0hQ" customClass="AutoTransButton"> | |
501 | + <rect key="frame" x="10" y="509" width="300" height="30"/> | |
502 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
503 | + <constraints> | |
504 | + <constraint firstAttribute="height" constant="30" id="8XP-Y1-hlJ"/> | |
505 | + </constraints> | |
506 | + <state key="normal" title="ใฐใซใผใใไฝๆใใ"> | |
507 | + <color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> | |
508 | + </state> | |
509 | + <userDefinedRuntimeAttributes> | |
510 | + <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> | |
511 | + <integer key="value" value="5"/> | |
512 | + </userDefinedRuntimeAttribute> | |
513 | + <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.createGr.bt.createGr"/> | |
514 | + </userDefinedRuntimeAttributes> | |
515 | + <connections> | |
516 | + <action selector="clickCreateGroup:" destination="-1" eventType="touchUpInside" id="n8x-KR-til"/> | |
517 | + </connections> | |
518 | + </button> | |
519 | + </subviews> | |
520 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | |
521 | + <constraints> | |
522 | + <constraint firstItem="KTY-Ed-NJL" firstAttribute="leading" secondItem="9w1-87-U1W" secondAttribute="leading" constant="10" id="08M-tc-J6o"/> | |
523 | + <constraint firstItem="3QV-Ov-PmX" firstAttribute="leading" secondItem="qfU-7x-uss" secondAttribute="leading" id="1CN-mt-xv7"/> | |
524 | + <constraint firstItem="3aE-uP-KLS" firstAttribute="top" secondItem="bq4-nh-Cxk" secondAttribute="top" id="1YH-oa-gPy"/> | |
525 | + <constraint firstAttribute="trailing" secondItem="qfU-7x-uss" secondAttribute="trailing" constant="10" id="1fh-fC-Tvd"/> | |
526 | + <constraint firstItem="t6i-sV-ycx" firstAttribute="leading" secondItem="eOi-eo-GYn" secondAttribute="trailing" constant="15" id="2d5-8C-v4q"/> | |
527 | + <constraint firstItem="4JZ-J2-3D9" firstAttribute="top" secondItem="3QV-Ov-PmX" secondAttribute="top" id="2rO-Pd-t8O"/> | |
528 | + <constraint firstItem="t6i-sV-ycx" firstAttribute="top" secondItem="mvZ-9L-7a8" secondAttribute="top" id="4rc-co-XRr"/> | |
529 | + <constraint firstAttribute="trailing" secondItem="sef-8T-0hQ" secondAttribute="trailing" constant="10" id="89W-o8-uLa"/> | |
530 | + <constraint firstItem="qdi-Na-zsj" firstAttribute="leading" secondItem="9w1-87-U1W" secondAttribute="leading" constant="10" id="8Cr-Gt-ts7"/> | |
531 | + <constraint firstItem="ZtU-mt-3Ov" firstAttribute="leading" secondItem="9w1-87-U1W" secondAttribute="leading" constant="8" id="8QA-ZH-zig"/> | |
532 | + <constraint firstItem="KTY-Ed-NJL" firstAttribute="top" secondItem="ONn-27-HqB" secondAttribute="bottom" constant="8" id="8cI-hb-3IU"/> | |
533 | + <constraint firstItem="CGA-Xm-2ll" firstAttribute="leading" secondItem="3aE-uP-KLS" secondAttribute="trailing" constant="15" id="AJD-KP-oLm"/> | |
534 | + <constraint firstItem="qfU-7x-uss" firstAttribute="leading" secondItem="9w1-87-U1W" secondAttribute="leading" constant="10" id="Akh-2h-Y5Z"/> | |
535 | + <constraint firstItem="mvZ-9L-7a8" firstAttribute="leading" secondItem="qfU-7x-uss" secondAttribute="leading" id="CyJ-DC-cmk"/> | |
536 | + <constraint firstAttribute="trailing" secondItem="hWb-vU-yVd" secondAttribute="trailing" constant="10" id="Gpv-Cf-wmA"/> | |
537 | + <constraint firstItem="ONn-27-HqB" firstAttribute="leading" secondItem="9w1-87-U1W" secondAttribute="leading" constant="10" id="GqQ-jG-2Ss"/> | |
538 | + <constraint firstItem="Kpa-HJ-7cE" firstAttribute="top" secondItem="ONn-27-HqB" secondAttribute="top" id="I8B-QJ-8Kw"/> | |
539 | + <constraint firstItem="ONn-27-HqB" firstAttribute="top" secondItem="pXO-K0-vne" secondAttribute="bottom" constant="10" id="IUV-iX-zqx"/> | |
540 | + <constraint firstItem="pXO-K0-vne" firstAttribute="leading" secondItem="ZtU-mt-3Ov" secondAttribute="trailing" constant="10" id="JQi-T2-HRB"/> | |
541 | + <constraint firstItem="o9b-Am-GTl" firstAttribute="top" secondItem="3QV-Ov-PmX" secondAttribute="top" id="Osm-tS-nSE"/> | |
542 | + <constraint firstItem="sef-8T-0hQ" firstAttribute="top" secondItem="t6i-sV-ycx" secondAttribute="bottom" constant="12" id="PNY-xc-4go"/> | |
543 | + <constraint firstItem="3aE-uP-KLS" firstAttribute="leading" secondItem="bq4-nh-Cxk" secondAttribute="trailing" constant="15" id="QhW-Vx-RNc"/> | |
544 | + <constraint firstItem="mvZ-9L-7a8" firstAttribute="top" secondItem="bq4-nh-Cxk" secondAttribute="bottom" constant="8" id="Qu7-jT-zZM"/> | |
545 | + <constraint firstItem="qdi-Na-zsj" firstAttribute="top" secondItem="KTY-Ed-NJL" secondAttribute="bottom" constant="105" id="Rbx-GC-D0X"/> | |
546 | + <constraint firstItem="eOi-eo-GYn" firstAttribute="leading" secondItem="mvZ-9L-7a8" secondAttribute="trailing" constant="15" id="Rcg-h2-Qfa"/> | |
547 | + <constraint firstItem="pXO-K0-vne" firstAttribute="top" secondItem="ZtU-mt-3Ov" secondAttribute="top" id="T8M-OQ-0Wk"/> | |
548 | + <constraint firstItem="o9b-Am-GTl" firstAttribute="leading" secondItem="4JZ-J2-3D9" secondAttribute="trailing" constant="15" id="UyE-qx-Mtp"/> | |
549 | + <constraint firstItem="4JZ-J2-3D9" firstAttribute="top" secondItem="3QV-Ov-PmX" secondAttribute="top" id="aRK-i9-XKN"/> | |
550 | + <constraint firstItem="hWb-vU-yVd" firstAttribute="top" secondItem="Kpa-HJ-7cE" secondAttribute="bottom" constant="8" id="chw-2w-QOv"/> | |
551 | + <constraint firstItem="sef-8T-0hQ" firstAttribute="leading" secondItem="9w1-87-U1W" secondAttribute="leading" constant="10" id="dfN-4U-9Oc"/> | |
552 | + <constraint firstItem="eOi-eo-GYn" firstAttribute="top" secondItem="mvZ-9L-7a8" secondAttribute="top" id="e8C-p7-obk"/> | |
553 | + <constraint firstItem="bq4-nh-Cxk" firstAttribute="top" secondItem="3QV-Ov-PmX" secondAttribute="bottom" constant="8" id="gjA-dw-4j6"/> | |
554 | + <constraint firstItem="4JZ-J2-3D9" firstAttribute="leading" secondItem="3QV-Ov-PmX" secondAttribute="trailing" constant="15" id="hCs-KK-0oG"/> | |
555 | + <constraint firstItem="Kpa-HJ-7cE" firstAttribute="width" secondItem="ONn-27-HqB" secondAttribute="width" id="i0I-s6-95a"/> | |
556 | + <constraint firstAttribute="trailing" secondItem="pXO-K0-vne" secondAttribute="trailing" constant="10" id="j2H-Na-egE"/> | |
557 | + <constraint firstItem="bq4-nh-Cxk" firstAttribute="leading" secondItem="qfU-7x-uss" secondAttribute="leading" id="kTU-cF-wdS"/> | |
558 | + <constraint firstItem="hWb-vU-yVd" firstAttribute="leading" secondItem="KTY-Ed-NJL" secondAttribute="trailing" constant="8" id="ka5-tK-yxs"/> | |
559 | + <constraint firstItem="eOi-eo-GYn" firstAttribute="top" secondItem="mvZ-9L-7a8" secondAttribute="top" id="klA-2z-2Kx"/> | |
560 | + <constraint firstItem="3aE-uP-KLS" firstAttribute="top" secondItem="bq4-nh-Cxk" secondAttribute="top" id="pdY-Ef-eHr"/> | |
561 | + <constraint firstItem="3QV-Ov-PmX" firstAttribute="top" secondItem="qfU-7x-uss" secondAttribute="bottom" constant="8" id="qLb-a1-eOB"/> | |
562 | + <constraint firstItem="Kpa-HJ-7cE" firstAttribute="leading" secondItem="ONn-27-HqB" secondAttribute="trailing" constant="20" id="rMt-rx-zDY"/> | |
563 | + <constraint firstItem="KEy-T1-mdK" firstAttribute="top" secondItem="hWb-vU-yVd" secondAttribute="bottom" constant="15" id="sIJ-Rk-gj3"/> | |
564 | + <constraint firstItem="ZtU-mt-3Ov" firstAttribute="top" secondItem="9w1-87-U1W" secondAttribute="top" constant="10" id="tBp-C6-fjS"/> | |
565 | + <constraint firstItem="CGA-Xm-2ll" firstAttribute="top" secondItem="bq4-nh-Cxk" secondAttribute="top" id="uaB-yp-z16"/> | |
566 | + <constraint firstItem="qfU-7x-uss" firstAttribute="top" secondItem="KEy-T1-mdK" secondAttribute="bottom" constant="10" id="w4X-lJ-yL1"/> | |
567 | + <constraint firstAttribute="trailing" secondItem="Kpa-HJ-7cE" secondAttribute="trailing" constant="10" id="wvh-Lk-tt9"/> | |
568 | + <constraint firstItem="KEy-T1-mdK" firstAttribute="leading" secondItem="qdi-Na-zsj" secondAttribute="trailing" constant="8" id="xGa-CF-V9a"/> | |
569 | + </constraints> | |
570 | + </view> | |
571 | + </subviews> | |
572 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | |
573 | + <constraints> | |
574 | + <constraint firstItem="9w1-87-U1W" firstAttribute="leading" secondItem="aKu-bd-xMP" secondAttribute="leading" id="BLm-dD-oN3"/> | |
575 | + <constraint firstItem="9w1-87-U1W" firstAttribute="centerY" secondItem="aKu-bd-xMP" secondAttribute="centerY" id="DT9-CK-3ZL"/> | |
576 | + <constraint firstItem="9w1-87-U1W" firstAttribute="top" secondItem="aKu-bd-xMP" secondAttribute="top" id="PZC-BJ-DLV"/> | |
577 | + <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"/> | |
579 | + <constraint firstItem="9w1-87-U1W" firstAttribute="centerX" secondItem="aKu-bd-xMP" secondAttribute="centerX" id="wJD-gn-ctq"/> | |
580 | + </constraints> | |
581 | + </scrollView> | |
582 | + </subviews> | |
583 | + <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> | |
584 | + <constraints> | |
585 | + <constraint firstItem="aKu-bd-xMP" firstAttribute="top" secondItem="QYv-QM-Bkk" secondAttribute="bottom" id="Q7l-Ra-0wb"/> | |
586 | + <constraint firstAttribute="trailing" secondItem="aKu-bd-xMP" secondAttribute="trailing" id="WAl-wE-FB4"/> | |
587 | + <constraint firstAttribute="trailing" secondItem="QYv-QM-Bkk" secondAttribute="trailing" id="XdX-OA-ALX"/> | |
588 | + <constraint firstItem="aKu-bd-xMP" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="cE7-y5-LL4"/> | |
589 | + <constraint firstItem="QYv-QM-Bkk" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="dAn-YE-2s3"/> | |
590 | + <constraint firstItem="QYv-QM-Bkk" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="fFF-bj-0uk"/> | |
591 | + <constraint firstAttribute="bottom" secondItem="aKu-bd-xMP" secondAttribute="bottom" id="oPE-ST-BIo"/> | |
592 | + </constraints> | |
593 | + <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> | |
594 | + <point key="canvasLocation" x="26" y="125"/> | |
595 | + </view> | |
596 | + </objects> | |
597 | + <resources> | |
598 | + <image name="icon_menu" width="30" height="30"/> | |
599 | + <image name="today_back_button" width="73" height="37"/> | |
600 | + </resources> | |
601 | +</document> |
LifeLog/LifeLog/GroupObject.m
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | if([dict objectForKey:@"group_avatar"] != nil) { |
18 | 18 | self.avatar = dict[@"group_avatar"]; |
19 | 19 | } |
20 | - if([dict objectForKey:@"created_at"] != nil) { | |
20 | + if([dict objectForKey:@"created_at"] != nil && ![[dict objectForKey:@"created_at"] isKindOfClass:[NSNull class]]) { | |
21 | 21 | NSString *dateString = dict[@"created_at"]; |
22 | 22 | self.createDate = [Utilities dateFromString:dateString withFormat:@"yyyy-MM-dd hh:mm:ss"]; |
23 | 23 | } |
LifeLog/LifeLog/Localizable.strings
No preview for this file type
LifeLog/LifeLog/SearchGroupViewController.h
... | ... | @@ -9,7 +9,9 @@ |
9 | 9 | #import <UIKit/UIKit.h> |
10 | 10 | #import "BaseTableViewController.h" |
11 | 11 | |
12 | -@interface SearchGroupViewController : BaseTableViewController<UITextFieldDelegate> | |
12 | +@interface SearchGroupViewController : BaseTableViewController<UITextFieldDelegate> { | |
13 | + NSTimer *timerSearch; | |
14 | +} | |
13 | 15 | |
14 | 16 | @property (weak, nonatomic) IBOutlet UITextField *textFieldSearch; |
15 | 17 |
LifeLog/LifeLog/SearchGroupViewController.m
... | ... | @@ -14,6 +14,7 @@ |
14 | 14 | #import "Utilities.h" |
15 | 15 | |
16 | 16 | #import "SearchGroupTableViewCell.h" |
17 | +#import "CreateGroupViewController.h" | |
17 | 18 | #import "GroupDetailViewController.h" |
18 | 19 | |
19 | 20 | @interface SearchGroupViewController () |
20 | 21 | |
... | ... | @@ -42,11 +43,18 @@ |
42 | 43 | } |
43 | 44 | |
44 | 45 | - (IBAction)clickSearch:(id)sender { |
46 | + [self.view endEditing:true]; | |
45 | 47 | [self resetData]; |
46 | 48 | } |
47 | 49 | |
48 | 50 | - (IBAction)clickCreateGroup:(id)sender { |
49 | - | |
51 | + CreateGroupViewController * create = [[CreateGroupViewController alloc] init]; | |
52 | + create.createGroupSuccess = ^(GroupObject *object){ | |
53 | + GroupDetailViewController * detail = [[GroupDetailViewController alloc] init]; | |
54 | + [detail setGroup:object]; | |
55 | + [self.navigationController pushViewController:detail animated:true]; | |
56 | + }; | |
57 | + [self.navigationController pushViewController:create animated:true]; | |
50 | 58 | } |
51 | 59 | |
52 | 60 | #pragma mark UITableView Delegate |
53 | 61 | |
... | ... | @@ -74,8 +82,16 @@ |
74 | 82 | } |
75 | 83 | |
76 | 84 | #pragma mark UITextField Delegate |
85 | +-(BOOL) textFieldShouldReturn:(UITextField *)textField { | |
86 | + [self.view endEditing:true]; | |
87 | + return true; | |
88 | +} | |
89 | + | |
77 | 90 | -(BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { |
78 | - [self resetData]; | |
91 | + if(timerSearch != nil) { | |
92 | + [timerSearch invalidate]; | |
93 | + } | |
94 | + timerSearch = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(resetData) userInfo:nil repeats:false]; | |
79 | 95 | return true; |
80 | 96 | } |
81 | 97 |
LifeLog/LifeLog/SearchGroupViewController.xib
... | ... | @@ -112,7 +112,7 @@ |
112 | 112 | <userDefinedRuntimeAttribute type="string" keyPath="localizeKey" value="lifelog.searchGr.bt.createGr"/> |
113 | 113 | </userDefinedRuntimeAttributes> |
114 | 114 | <connections> |
115 | - <action selector="clickCreateGroup:" destination="-1" eventType="touchUpOutside" id="iYI-HB-mhb"/> | |
115 | + <action selector="clickCreateGroup:" destination="-1" eventType="touchUpInside" id="J9P-5a-SrT"/> | |
116 | 116 | </connections> |
117 | 117 | </button> |
118 | 118 | <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="70" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="yF3-ZN-ebL"> |
LifeLog/LifeLog/ServerAPI.h
... | ... | @@ -34,6 +34,7 @@ |
34 | 34 | - (void) requestHistoryGraph:(NSString *)token withType:(int)type andMode:(int) mode CompletionHandler:(void (^)(HistoryGraphObject *, NSError *)) completion; |
35 | 35 | - (void) requestHistoryList:(NSString *)token withType:(int)type andMode:(int) mode AtPage:(int) page CompletionHandler:(void (^)(NSArray *, NSError *)) completion; |
36 | 36 | - (void) requestJoinGroup:(NSString *)token groupID: (int) groupID CompletionHandler:(void (^)(NSError *)) completion; |
37 | +-(void) requestCreateGroup:(NSString *)token withGroup:(GroupObject *)group CompletionHandler:(void (^)(GroupObject *, NSError *)) completion; | |
37 | 38 | |
38 | 39 | #pragma mark - SNS Screen Function |
39 | 40 | /* |
LifeLog/LifeLog/ServerAPI.m
... | ... | @@ -647,6 +647,67 @@ |
647 | 647 | } |
648 | 648 | |
649 | 649 | #pragma mark - Group Function |
650 | +-(void) requestCreateGroup:(NSString *)token withGroup:(GroupObject *)group CompletionHandler:(void (^)(GroupObject *, NSError *)) completion { | |
651 | + NSString *url = [kServerAddress stringByAppendingFormat:@"api/groups/newGroup"]; | |
652 | + NSLog(@"requestCreateGroup link %@", url); | |
653 | + NSDictionary * dict = @{@"group_name":group.name, | |
654 | + @"goal":group.goal, | |
655 | + @"walk_mode_active":[NSNumber numberWithBool:group.walkMode], | |
656 | + @"run_mode_active":[NSNumber numberWithBool:group.runMode], | |
657 | + @"bike_mode_active":[NSNumber numberWithBool:group.bikeMode], | |
658 | + @"step_mode_active":[NSNumber numberWithBool:group.stepMode], | |
659 | + @"gym_mode_active":[NSNumber numberWithBool:group.gymMode], | |
660 | + @"beginer_mode_active":[NSNumber numberWithBool:group.beginMode], | |
661 | + @"walk_mode_goal":[NSNumber numberWithBool:group.walkGoal], | |
662 | + @"run_mode_goal":[NSNumber numberWithBool:group.runGoal], | |
663 | + @"bike_mode_goal":[NSNumber numberWithBool:group.bikeGoal]}; | |
664 | + | |
665 | + [self _request:url method:@"POST" token:token paras:dict completion:^(NSData *data, NSError *error) { | |
666 | + | |
667 | + if (completion == NULL) { | |
668 | + return ; | |
669 | + } | |
670 | + | |
671 | + if (error == nil) | |
672 | + { | |
673 | + NSDictionary *dataResult = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingAllowFragments error: &error]; | |
674 | + NSLog(@"%@", dataResult); | |
675 | + int status = [dataResult[@"status"] intValue]; | |
676 | + if (status == 1) { // status = 1 success | |
677 | + if(dataResult[@"result"] != nil) { | |
678 | + NSDictionary * dict = dataResult[@"result"]; | |
679 | + group.groupID = [dict[@"group_id"] intValue]; | |
680 | + completion(group, nil); | |
681 | + } | |
682 | + else { | |
683 | + NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":@"Unknown Error"}]; | |
684 | + completion(nil, errorObject); | |
685 | + } | |
686 | + } | |
687 | + else { | |
688 | + NSString *message = dataResult[@"message"]; | |
689 | + if (message == nil) { | |
690 | + message = @"Unknown error"; | |
691 | + } | |
692 | + | |
693 | + if ([message isEqualToString:@"Token is invalid"]) { | |
694 | + [self performSelectorOnMainThread:@selector(checkToken) withObject:nil waitUntilDone:YES]; | |
695 | + NSString *tokenNew = [[NSUserDefaults standardUserDefaults] objectForKey:kToken]; | |
696 | + [self requestCreateGroup:tokenNew withGroup:group CompletionHandler:completion]; | |
697 | + } | |
698 | + else { | |
699 | + NSError *errorObject = [NSError errorWithDomain:@"LifeLog_Domain" code:-1 userInfo:@{@"message":message}]; | |
700 | + completion(nil, errorObject); | |
701 | + } | |
702 | + } | |
703 | + } | |
704 | + else | |
705 | + { | |
706 | + completion(nil, error); | |
707 | + } | |
708 | + }]; | |
709 | +} | |
710 | + | |
650 | 711 | - (void) getGroupDetail:(NSString *)token withGroupID:(int)groupID CompletionHandler:(void (^)(GroupObject *, NSError *)) completion { |
651 | 712 | NSString *url = [kServerAddress stringByAppendingFormat:@"api/sns/group/detail/%d", groupID]; |
652 | 713 | NSLog(@"getGroupDetail link %@", url); |