Commit cd46bb24e6e3cf40366253ddad3e05ba2efc336b

Authored by phong
1 parent 7597b958ff

Update and Fixbug

Showing 6 changed files with 89 additions and 88 deletions Side-by-side Diff

LifeLog/LifeLog.xcodeproj/project.pbxproj
... ... @@ -13,6 +13,10 @@
13 13 6E18CED81F2E3C840029891F /* ServerAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E18CED71F2E3C840029891F /* ServerAPI.m */; };
14 14 6E18CEDC1F2E40F50029891F /* User.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E18CEDB1F2E40F50029891F /* User.m */; };
15 15 6E48AF0D1F2F9D3300C1D184 /* CustomTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E48AF0C1F2F9D3200C1D184 /* CustomTextField.m */; };
  16 + 6E7F93421F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7F933B1F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.m */; };
  17 + 6E7F93431F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7F933D1F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.m */; };
  18 + 6E7F93441F35872B00EFBC71 /* TPKeyboardAvoidingTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7F933F1F35872B00EFBC71 /* TPKeyboardAvoidingTableView.m */; };
  19 + 6E7F93451F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7F93411F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.m */; };
16 20 6E84E3761F27A701001EB88E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3751F27A701001EB88E /* main.m */; };
17 21 6E84E3791F27A701001EB88E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E84E3781F27A701001EB88E /* AppDelegate.m */; };
18 22 6E84E3811F27A701001EB88E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6E84E3801F27A701001EB88E /* Assets.xcassets */; };
... ... @@ -73,6 +77,14 @@
73 77 6E18CEDD1F2E46570029891F /* Entities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Entities.h; sourceTree = "<group>"; };
74 78 6E48AF0B1F2F9D3200C1D184 /* CustomTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomTextField.h; sourceTree = "<group>"; };
75 79 6E48AF0C1F2F9D3200C1D184 /* CustomTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomTextField.m; sourceTree = "<group>"; };
  80 + 6E7F933A1F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPKeyboardAvoidingCollectionView.h; sourceTree = "<group>"; };
  81 + 6E7F933B1F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPKeyboardAvoidingCollectionView.m; sourceTree = "<group>"; };
  82 + 6E7F933C1F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPKeyboardAvoidingScrollView.h; sourceTree = "<group>"; };
  83 + 6E7F933D1F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPKeyboardAvoidingScrollView.m; sourceTree = "<group>"; };
  84 + 6E7F933E1F35872B00EFBC71 /* TPKeyboardAvoidingTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPKeyboardAvoidingTableView.h; sourceTree = "<group>"; };
  85 + 6E7F933F1F35872B00EFBC71 /* TPKeyboardAvoidingTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPKeyboardAvoidingTableView.m; sourceTree = "<group>"; };
  86 + 6E7F93401F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIScrollView+TPKeyboardAvoidingAdditions.h"; sourceTree = "<group>"; };
  87 + 6E7F93411F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+TPKeyboardAvoidingAdditions.m"; sourceTree = "<group>"; };
76 88 6E84E3711F27A700001EB88E /* LifeLog.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LifeLog.app; sourceTree = BUILT_PRODUCTS_DIR; };
77 89 6E84E3751F27A701001EB88E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
78 90 6E84E3771F27A701001EB88E /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
... ... @@ -185,6 +197,21 @@
185 197 name = Model;
186 198 sourceTree = "<group>";
187 199 };
  200 + 6E7F93391F35870F00EFBC71 /* TPKeyboardAvoiding */ = {
  201 + isa = PBXGroup;
  202 + children = (
  203 + 6E7F933A1F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.h */,
  204 + 6E7F933B1F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.m */,
  205 + 6E7F933C1F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.h */,
  206 + 6E7F933D1F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.m */,
  207 + 6E7F933E1F35872B00EFBC71 /* TPKeyboardAvoidingTableView.h */,
  208 + 6E7F933F1F35872B00EFBC71 /* TPKeyboardAvoidingTableView.m */,
  209 + 6E7F93401F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.h */,
  210 + 6E7F93411F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.m */,
  211 + );
  212 + name = TPKeyboardAvoiding;
  213 + sourceTree = "<group>";
  214 + };
188 215 6E84E3681F27A700001EB88E = {
189 216 isa = PBXGroup;
190 217 children = (
... ... @@ -339,6 +366,7 @@
339 366 6ECC406D1F2A5FA500AAEB97 /* Library */ = {
340 367 isa = PBXGroup;
341 368 children = (
  369 + 6E7F93391F35870F00EFBC71 /* TPKeyboardAvoiding */,
342 370 6ECC406E1F2A5FB200AAEB97 /* Category */,
343 371 );
344 372 name = Library;
345 373  
346 374  
... ... @@ -599,12 +627,16 @@
599 627 buildActionMask = 2147483647;
600 628 files = (
601 629 6E18CED81F2E3C840029891F /* ServerAPI.m in Sources */,
  630 + 6E7F93431F35872B00EFBC71 /* TPKeyboardAvoidingScrollView.m in Sources */,
  631 + 6E7F93421F35872B00EFBC71 /* TPKeyboardAvoidingCollectionView.m in Sources */,
602 632 9CBDA0FA1F2ECE2C0055DED1 /* BaseViewController.m in Sources */,
603 633 6E8DA0F71F2BAC3400CCE941 /* TodayViewController.m in Sources */,
  634 + 6E7F93451F35872B00EFBC71 /* UIScrollView+TPKeyboardAvoidingAdditions.m in Sources */,
604 635 6E48AF0D1F2F9D3300C1D184 /* CustomTextField.m in Sources */,
605 636 6E84E3B01F27A975001EB88E /* HomeViewController.m in Sources */,
606 637 6E84E3791F27A701001EB88E /* AppDelegate.m in Sources */,
607 638 6E84E3BA1F27A9A0001EB88E /* RankingViewController.m in Sources */,
  639 + 6E7F93441F35872B00EFBC71 /* TPKeyboardAvoidingTableView.m in Sources */,
608 640 6EDC8BF41F2C68D700765ACC /* CMMotionActivityExtra.m in Sources */,
609 641 9CBDA0FF1F2F03810055DED1 /* RegisterViewController.m in Sources */,
610 642 9CA8AEEA1F31BB4600C5FC74 /* ConfirmForgetPassViewController.m in Sources */,
... ... @@ -768,6 +800,7 @@
768 800 "-framework",
769 801 "\"CircleProgressBar\"",
770 802 "-all_load",
  803 + "-ObjC",
771 804 );
772 805 PRODUCT_BUNDLE_IDENTIFIER = mobileworld.jp.lifelog;
773 806 PRODUCT_NAME = "$(TARGET_NAME)";
... ... @@ -791,6 +824,7 @@
791 824 "-framework",
792 825 "\"CircleProgressBar\"",
793 826 "-all_load",
  827 + "-ObjC",
794 828 );
795 829 PRODUCT_BUNDLE_IDENTIFIER = mobileworld.jp.lifelog;
796 830 PRODUCT_NAME = "$(TARGET_NAME)";
LifeLog/LifeLog/BaseViewController.h
... ... @@ -7,8 +7,12 @@
7 7 //
8 8  
9 9 #import <UIKit/UIKit.h>
  10 +#import "TPKeyboardAvoidingCollectionView.h"
  11 +#import "TPKeyboardAvoidingScrollView.h"
  12 +#import "TPKeyboardAvoidingTableView.h"
  13 +#import "UIScrollView+TPKeyboardAvoidingAdditions.h"
10 14  
11 15 @interface BaseViewController : UIViewController
12   -@property (nonatomic, weak) IBOutlet UIScrollView *scrollView;
  16 +@property (nonatomic, weak) IBOutlet TPKeyboardAvoidingScrollView *scrollView;
13 17 @end
LifeLog/LifeLog/BaseViewController.m
... ... @@ -16,92 +16,12 @@
16 16  
17 17 - (void)viewDidLoad {
18 18 [super viewDidLoad];
19   - // Do any additional setup after loading the view.
20   - NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
21   - [center addObserver:self
22   - selector:@selector(keyboardWillShow:)
23   - name:UIKeyboardWillShowNotification
24   - object:nil];
25   - [center addObserver:self
26   - selector:@selector(keyboardWillHide:)
27   - name:UIKeyboardWillHideNotification
28   - object:nil];
29   - // self.scrollView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;
  19 + self.scrollView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;
30 20 }
31 21  
32 22 - (void)didReceiveMemoryWarning {
33 23 [super didReceiveMemoryWarning];
34 24 // Dispose of any resources that can be recreated.
35   -}
36   -
37   -#pragma mark - keyboard notifications
38   -
39   -- (void)keyboardWillShow:(NSNotification *)notification
40   -{
41   - //Obtain Keyboard Position and Size Information - ใ‚ญใƒผใƒœใƒผใƒ‰ใฎใƒใ‚ธใ‚ทใƒงใƒณใƒปใ‚ตใ‚คใ‚บใ‚’ๅ–ๅพ—
42   - CGRect keyboardFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
43   -
44   - // Add the keyboard size to the bottom content inset of the scroll view.
45   - // ใ‚นใ‚ฏใƒญใƒผใƒซใƒ“ใƒฅใƒผใฎๅบ•ContentInsetใ‚ญใƒผใƒœใƒผใƒ‰ใ‚ตใ‚คใ‚บใ‚’่ฟฝๅŠ 
46   - UIEdgeInsets inset = self.scrollView.contentInset;
47   - inset.bottom = keyboardFrame.size.height;
48   - self.scrollView.contentInset = inset;
49   -
50   - UIEdgeInsets scrollInset = self.scrollView.scrollIndicatorInsets;
51   - scrollInset.bottom = keyboardFrame.size.height;
52   - self.scrollView.scrollIndicatorInsets = scrollInset;
53   -
54   - //Obtain First Responder - FirstResponderใ‚’ๅ…ฅๆ‰‹
55   - UIView *currentFirstResponder = [self _findFirstResponder:self.scrollView];
56   - CGRect rectResponder = currentFirstResponder.frame;
57   -
58   - // Determine visible frame - ่กจ็คบใชใƒ•ใƒฌใƒผใƒ ใ‚’่จญๅฎš
59   - CGRect visibleFrame = self.view.frame;
60   - visibleFrame.size.height -= keyboardFrame.size.height;
61   -
62   - // Determine whether item is in visible frame - ใ‚ขใ‚คใƒ†ใƒ ใ‚’่กจ็คบใƒ•ใƒฌใƒผใƒ ๅ†…ใซใ‚ใ‚‹ใ‹ใฉใ†ใ‹ใ‚’็ขบ่ช
63   - if (!CGRectContainsPoint(visibleFrame, rectResponder.origin) )
64   - {
65   - [UIView beginAnimations:nil context:NULL];
66   - [UIView setAnimationDuration:[notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue]];
67   - [UIView setAnimationCurve:[notification.userInfo[UIKeyboardAnimationCurveUserInfoKey] integerValue]];
68   - [UIView setAnimationBeginsFromCurrentState:YES];
69   - int scrollPointY = (rectResponder.origin.y - keyboardFrame.origin.y) + rectResponder.size.height + 5;
70   - //5 = minor padding - 5ใฏใƒžใ‚คใƒŠใƒผใƒ‘ใƒ‡ใ‚ฃใƒณใ‚ฐ
71   - CGPoint scrollPoint = CGPointMake(0.0, scrollPointY);
72   - //Scroll to new point - ๆ–ฐใƒใ‚คใƒณใƒˆใซใ‚นใ‚ฏใƒญใƒผใƒซ
73   - [self.scrollView setContentOffset:scrollPoint animated:YES];
74   - [UIView commitAnimations];
75   - }
76   -}
77   -
78   -
79   -- (void)keyboardWillHide:(NSNotification *)notification
80   -{
81   - [UIView beginAnimations:nil context:NULL];
82   - [UIView setAnimationDuration:[notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue]];
83   - [UIView setAnimationCurve:[notification.userInfo[UIKeyboardAnimationCurveUserInfoKey] integerValue]];
84   - [UIView setAnimationBeginsFromCurrentState:YES];
85   - UIEdgeInsets inset = self.scrollView.contentInset;
86   - inset.bottom = 0;
87   - self.scrollView.contentInset = inset;
88   -
89   - UIEdgeInsets scrollInset = self.scrollView.scrollIndicatorInsets;
90   - scrollInset.bottom = 0;
91   - self.scrollView.scrollIndicatorInsets = scrollInset;
92   -
93   - [self.scrollView setContentOffset:CGPointMake(0, -self.scrollView.contentInset.top) animated:YES];
94   - [UIView commitAnimations];
95   -}
96   -
97   -- (UIView *)_findFirstResponder:(UIView *)view
98   -{
99   - for ( UIView *childView in view.subviews ) {
100   - if ( [childView respondsToSelector:@selector(isFirstResponder)] && [childView isFirstResponder] ) return childView;
101   - UIView *result = [self _findFirstResponder:childView];
102   - if ( result ) return result;
103   - }
104   - return nil;
105 25 }
106 26  
107 27 @end
LifeLog/LifeLog/LoginViewController.m
... ... @@ -54,7 +54,42 @@
54 54 // Dispose of any resources that can be recreated.
55 55 }
56 56  
  57 +- (BOOL)checkAllowLogin
  58 +{
  59 + NSString *message = @"";
  60 + if (_tfEmail.text.length <= 0) {
  61 + message = @"Please input email";
  62 + [Utilities showErrorMessage:message withViewController:self];
  63 + return NO;
  64 + }
  65 + if (_tfPassword.text.length <= 0) {
  66 + message = @"Please input password";
  67 + [Utilities showErrorMessage:message withViewController:self];
  68 + return NO;
  69 + }
  70 + if (_tfEmail.text.length > 255) {
  71 + message = @"Email maximum length 255";
  72 + [Utilities showErrorMessage:message withViewController:self];
  73 + return NO;
  74 + }
  75 + if (_tfPassword.text.length < 6) {
  76 + message = @"Password minimum length 6";
  77 + [Utilities showErrorMessage:message withViewController:self];
  78 + return NO;
  79 + }
  80 + if (![_tfEmail.text containsString:@"@"]) {
  81 + message = @"Email invalid";
  82 + [Utilities showErrorMessage:message withViewController:self];
  83 + return NO;
  84 + }
  85 + return YES;
  86 +}
  87 +
57 88 - (IBAction)buttonLoginTouchUpInside:(id)sender {
  89 + [self resignTextField];
  90 + if (![self checkAllowLogin]) {
  91 + return;
  92 + }
58 93 LoginViewController __weak *weakSelf = self;
59 94 [[ServerAPI server] loginWithEmail:_tfEmail.text Password:_tfPassword.text CompletionHandler:^(User *user, NSString *token, NSError *error) {
60 95 if (error == nil) {
... ... @@ -78,6 +113,7 @@
78 113 }
79 114  
80 115 - (IBAction)buttonForgetTouchUpInside:(id)sender {
  116 + [self resignTextField];
81 117 if (_tfEmail.text.length > 0) {
82 118 LoginViewController __weak *weakSelf = self;
83 119 [[ServerAPI server] forgetPass:_tfEmail.text CompletionHandler:^(NSError *error) {
84 120  
... ... @@ -103,8 +139,15 @@
103 139 }
104 140  
105 141 - (IBAction)buttonRegisterTouchUpInside:(id)sender {
  142 + [self resignTextField];
106 143 RegisterViewController *registerVC = [[RegisterViewController alloc] initWithNibName:@"RegisterViewController" bundle:nil];
107 144 [self.navigationController pushViewController:registerVC animated:YES];
  145 +}
  146 +
  147 +- (void)resignTextField
  148 +{
  149 + [_tfEmail resignFirstResponder];
  150 + [_tfPassword resignFirstResponder];
108 151 }
109 152  
110 153 @end
LifeLog/LifeLog/LoginViewController.xib
... ... @@ -17,7 +17,7 @@
17 17 <outlet property="lblEmail" destination="htO-UE-kfl" id="uI0-fA-HNf"/>
18 18 <outlet property="lblPassword" destination="alT-fI-Ydb" id="ayy-MY-olh"/>
19 19 <outlet property="lblRegister" destination="PUa-4y-ZZw" id="h8s-4C-dSb"/>
20   - <outlet property="scrollView" destination="Dce-dI-aNd" id="WVY-zf-L9x"/>
  20 + <outlet property="scrollView" destination="Dce-dI-aNd" id="ZTG-Qy-Y9x"/>
21 21 <outlet property="tfEmail" destination="Y59-LM-Oyy" id="8GT-KF-g0W"/>
22 22 <outlet property="tfPassword" destination="EwF-NI-ZUZ" id="Wua-iL-Qim"/>
23 23 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
... ... @@ -28,7 +28,7 @@
28 28 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
29 29 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
30 30 <subviews>
31   - <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" keyboardDismissMode="onDrag" translatesAutoresizingMaskIntoConstraints="NO" id="Dce-dI-aNd">
  31 + <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" keyboardDismissMode="onDrag" translatesAutoresizingMaskIntoConstraints="NO" id="Dce-dI-aNd" customClass="TPKeyboardAvoidingScrollView">
32 32 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
33 33 <subviews>
34 34 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e2G-8H-Nv8" userLabel="ViewContent">
LifeLog/LifeLog/RegisterViewController.xib
1 1 <?xml version="1.0" encoding="UTF-8"?>
2   -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
  2 +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
3 3 <device id="retina4_7" orientation="portrait">
4 4 <adaptation id="fullscreen"/>
5 5 </device>
6 6 <dependencies>
7   - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
  7 + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
8 8 <capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
9 9 <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
10 10 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
... ... @@ -31,7 +31,7 @@
31 31 <outlet property="lblWeight" destination="pZE-Z0-mBT" id="f1V-oF-sTz"/>
32 32 <outlet property="lblWeightUnit" destination="ohe-eQ-W4K" id="ULW-e5-x5g"/>
33 33 <outlet property="physicalActivity" destination="taM-tm-4DU" id="tME-Dt-KP1"/>
34   - <outlet property="scrollView" destination="UVu-Gq-UFp" id="eaL-3k-Rqq"/>
  34 + <outlet property="scrollView" destination="UVu-Gq-UFp" id="rkl-8Y-3HJ"/>
35 35 <outlet property="tfArea" destination="69Q-GU-kDs" id="l0M-1l-c9a"/>
36 36 <outlet property="tfBirthday" destination="fvl-fG-4tE" id="VYZ-I8-ZiG"/>
37 37 <outlet property="tfConfirmPassword" destination="tId-EG-K2l" id="6Gp-vW-don"/>
... ... @@ -54,7 +54,7 @@
54 54 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
55 55 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
56 56 <subviews>
57   - <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UVu-Gq-UFp">
  57 + <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UVu-Gq-UFp" customClass="TPKeyboardAvoidingScrollView">
58 58 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
59 59 <subviews>
60 60 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vxb-ck-Qak" userLabel="ViewContent">