From e872835f0583b5660e905bfa200d192c6221f208 Mon Sep 17 00:00:00 2001 From: Joshua Greene Date: Thu, 7 May 2015 04:27:58 -0700 Subject: [PATCH 01/21] Need to check if `selectedTextRange` is empty, not nil. --- AutoLayoutTextViews/ALKeyboardAvoidingTextView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AutoLayoutTextViews/ALKeyboardAvoidingTextView.m b/AutoLayoutTextViews/ALKeyboardAvoidingTextView.m index 6e21a50..d295731 100644 --- a/AutoLayoutTextViews/ALKeyboardAvoidingTextView.m +++ b/AutoLayoutTextViews/ALKeyboardAvoidingTextView.m @@ -126,7 +126,7 @@ - (void)setBottomConstraintConstant:(CGFloat)constant animationInfo:(NSDictionar // Warning-- this method is needed to animate scrolling to selection, but this call isn't in the unit tests // there's some issues around testing this that I haven't been able to get around... :/ -JRG - if (self.selectedTextRange) { + if (!self.selectedTextRange.empty) { self.contentOffset = [self caretRectForPosition:self.selectedTextRange.start].origin; } From 6aad913f6cc5a7ba27749dbdced814270dc69a8d Mon Sep 17 00:00:00 2001 From: Joshua Greene Date: Thu, 7 May 2015 04:28:28 -0700 Subject: [PATCH 02/21] Need to reset bottom constraint constant to original value, which isn't necessarily zero. --- .../ALKeyboardAvoidingTextView.m | 20 ++++++++- .../ALKeyboardAvoidingTextViewTests.m | 41 ++++++++++++++++--- 2 files changed, 54 insertions(+), 7 deletions(-) diff --git a/AutoLayoutTextViews/ALKeyboardAvoidingTextView.m b/AutoLayoutTextViews/ALKeyboardAvoidingTextView.m index d295731..d7abebe 100644 --- a/AutoLayoutTextViews/ALKeyboardAvoidingTextView.m +++ b/AutoLayoutTextViews/ALKeyboardAvoidingTextView.m @@ -24,6 +24,10 @@ #import "ALKeyboardAvoidingTextView.h" +@interface ALKeyboardAvoidingTextView() +@property (nonatomic, assign) CGFloat bottomConstraintToBottomLayoutGuideConstant; +@end + @implementation ALKeyboardAvoidingTextView #pragma mark - View Setup @@ -63,6 +67,18 @@ - (BOOL)secondItemMatchesBottomConstraint:(NSLayoutConstraint *)constraint return constraint.secondItem == self && constraint.secondAttribute == NSLayoutAttributeBottom; } +#pragma mark - Custom Accessors + +- (void)setBottomConstraintToBottomLayoutGuide:(NSLayoutConstraint *)bottomConstraintToBottomLayoutGuide { + + if (_bottomConstraintToBottomLayoutGuide == bottomConstraintToBottomLayoutGuide) { + return; + } + + _bottomConstraintToBottomLayoutGuide = bottomConstraintToBottomLayoutGuide; + _bottomConstraintToBottomLayoutGuideConstant = bottomConstraintToBottomLayoutGuide.constant; +} + #pragma mark - Notifications #pragma mark - keyboardWillShow: @@ -99,7 +115,9 @@ - (CGFloat)constraintConstantMultiplier - (void)keyboardWillHide:(NSNotification *)notification { [super keyboardWillHide:notification]; - [self setBottomConstraintConstant:0 animationInfo:[notification userInfo] animated:![self shouldDrawPlaceholder]]; + [self setBottomConstraintConstant:self.bottomConstraintToBottomLayoutGuideConstant + animationInfo:[notification userInfo] + animated:![self shouldDrawPlaceholder]]; } #pragma mark - setBottomConstant: animationInfo: animated: diff --git a/AutoLayoutTextViewsTests/ALKeyboardAvoidingTextViewTests.m b/AutoLayoutTextViewsTests/ALKeyboardAvoidingTextViewTests.m index f39a758..c5cefeb 100644 --- a/AutoLayoutTextViewsTests/ALKeyboardAvoidingTextViewTests.m +++ b/AutoLayoutTextViewsTests/ALKeyboardAvoidingTextViewTests.m @@ -35,6 +35,10 @@ #import +@interface ALKeyboardAvoidingTextView() +@property (nonatomic, assign) CGFloat bottomConstraintToBottomLayoutGuideConstant; +@end + @interface ALKeyboardAvoidingTextViewTests : XCTestCase @end @@ -42,6 +46,8 @@ @implementation ALKeyboardAvoidingTextViewTests { Test_ALKeyboardAvoidingTextView *sut; + CGFloat constant; + id partialMock; id mockBottomConstraint; id mockNotification; @@ -58,9 +64,7 @@ - (void)setUp [super setUp]; sut = [[Test_ALKeyboardAvoidingTextView alloc] init]; - - mockBottomConstraint = OCMClassMock([NSLayoutConstraint class]); - sut.bottomConstraintToBottomLayoutGuide = mockBottomConstraint; + [self givenMockBottomConstraintWithConstant:0]; } - (void)tearDown @@ -99,6 +103,16 @@ - (void)givenNotificationUserInfo #pragma mark - Given - Mocks +- (void)givenMockBottomConstraintWithConstant:(CGFloat)constant { + + [mockBottomConstraint stopMocking]; + + mockBottomConstraint = OCMClassMock([NSLayoutConstraint class]); + OCMStub([mockBottomConstraint constant]).andReturn(constant); + + sut.bottomConstraintToBottomLayoutGuide = mockBottomConstraint; +} + - (void)givenViewClass { viewClass = OCMClassMock([UIView class]); @@ -170,6 +184,19 @@ - (void)test___awakeFromNib___sets_bottomConstraint_fromSuperViewConstraints_whe expect(sut.bottomConstraintToBottomLayoutGuide).toNot.beNil(); } +#pragma mark - Custom Accessors - Tests + +- (void)test___setBottomConstraintToBottomLayoutGuide___setsbottomConstraintToBottomLayoutGuideConstant { + + // given + CGFloat expected = 42; + + [self givenMockBottomConstraintWithConstant:expected]; + + // then + expect(sut.bottomConstraintToBottomLayoutGuideConstant).to.equal(expected); +} + #pragma mark - Keyboard Will Show - Tests - (void)test___keyboardWillShow___setsBottomConstraintConstant_asNegative_ifTextViewIsFirstItemInConstraint @@ -277,14 +304,16 @@ - (void)test___keyboardWillShow___animatesChange_GivenNoPlaceholderAndNoText #pragma mark - Keyboard Will Hide Tests -- (void)test___keyboardWillHide___setsBottomConstraintConstantToZero +- (void)test___keyboardWillHide___setsBottomConstraintConstantToStoredValue { // given + CGFloat expected = 42; + sut.bottomConstraintToBottomLayoutGuideConstant = expected; + OCMStub([mockBottomConstraint secondItem]).andReturn(sut); + [self givenMockNotification]; - CGFloat expected = 0; - // when [sut keyboardWillHide:mockNotification]; From 081eef663a230927ea1e9ec4c70caa366ae7101e Mon Sep 17 00:00:00 2001 From: Anthony Miller Date: Mon, 4 Apr 2016 12:22:28 -0700 Subject: [PATCH 03/21] 'ALPlaceholderTextView' will not account for placeholder text when calculating 'sizeThatFits' --- AutoLayoutTextViews.xcodeproj/project.pbxproj | 1793 ++++++----------- AutoLayoutTextViews/ALPlaceholderTextView.m | 41 +- .../project.pbxproj | 28 +- .../ALPlaceholderTextViewTests.m | 12 + Podfile.lock | 10 +- 5 files changed, 661 insertions(+), 1223 deletions(-) diff --git a/AutoLayoutTextViews.xcodeproj/project.pbxproj b/AutoLayoutTextViews.xcodeproj/project.pbxproj index 0fdf6b8..61873da 100644 --- a/AutoLayoutTextViews.xcodeproj/project.pbxproj +++ b/AutoLayoutTextViews.xcodeproj/project.pbxproj @@ -1,1203 +1,590 @@ - - - - - archiveVersion - 1 - classes - - objectVersion - 46 - objects - - 0154CB6408E142EDBF9F6F69 - - fileRef - 487F164A8F7D4EEEA6DBA088 - isa - PBXBuildFile - - 015C12BBC346E6EC48E4175F - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-AutoLayoutTextViewsTests.release.xcconfig - path - Pods/Target Support Files/Pods-AutoLayoutTextViewsTests/Pods-AutoLayoutTextViewsTests.release.xcconfig - sourceTree - <group> - - 3D0B36F7E6184547AF32BA2F - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - Copy Pods Resources - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-AutoLayoutTextViewsTests/Pods-AutoLayoutTextViewsTests-resources.sh" - - showEnvVarsInLog - 0 - - 42613CED1A09AFCB00CAEDBB - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - Test_ALKeyboardAvoidingTextView.h - sourceTree - <group> - - 42613CEE1A09AFCB00CAEDBB - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - Test_ALKeyboardAvoidingTextView.m - sourceTree - <group> - - 42613CEF1A09AFCB00CAEDBB - - fileRef - 42613CEE1A09AFCB00CAEDBB - isa - PBXBuildFile - - 446084F7194282310093A6FA - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ALAutoResizingTextView.h - sourceTree - <group> - - 446084F8194282310093A6FA - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - lineEnding - 0 - path - ALAutoResizingTextView.m - sourceTree - <group> - - 446084F9194282310093A6FA - - fileRef - 446084F8194282310093A6FA - isa - PBXBuildFile - - 446084FE194283600093A6FA - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - lineEnding - 0 - path - ALPlaceholderTextView.h - sourceTree - <group> - - 446084FF194283600093A6FA - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - lineEnding - 0 - path - ALPlaceholderTextView.m - sourceTree - <group> - - 44608500194283600093A6FA - - fileRef - 446084FF194283600093A6FA - isa - PBXBuildFile - - 44608502194283AC0093A6FA - - children - - 446084F7194282310093A6FA - 446084F8194282310093A6FA - 44FC5CF01946581C004812F4 - 44FC5CF11946581C004812F4 - 446084FE194283600093A6FA - 446084FF194283600093A6FA - - isa - PBXGroup - name - Views - sourceTree - <group> - - 4460854C19429A520093A6FA - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - lineEnding - 0 - path - ALPlaceholderTextViewTests.m - sourceTree - <group> - xcLanguageSpecificationIdentifier - xcode.lang.objc - - 4460854D19429A520093A6FA - - fileRef - 4460854C19429A520093A6FA - isa - PBXBuildFile - - 4460854E19429FCE0093A6FA - - children - - 448FA0C4194639EF00F79989 - 4460854C19429A520093A6FA - 448D9DFA1946801D00453E69 - - isa - PBXGroup - name - Cases - sourceTree - <group> - - 4460854F19429FD40093A6FA - - children - - 44FC5CED19463C43004812F4 - 44FC5CEE19463C43004812F4 - 42613CED1A09AFCB00CAEDBB - 42613CEE1A09AFCB00CAEDBB - 4460855019429FEA0093A6FA - 4460855119429FEA0093A6FA - - isa - PBXGroup - name - Classes - sourceTree - <group> - - 4460855019429FEA0093A6FA - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - Test_ALPlaceholderTextView.h - sourceTree - <group> - - 4460855119429FEA0093A6FA - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - Test_ALPlaceholderTextView.m - sourceTree - <group> - - 4460855219429FEA0093A6FA - - fileRef - 4460855119429FEA0093A6FA - isa - PBXBuildFile - - 447BD44119413B840062487D - - children - - 447BD44F19413B840062487D - 447BD46319413B840062487D - 447BD44C19413B840062487D - 447BD44B19413B840062487D - 4DE5F4F0AF09DE466948CCA8 - - isa - PBXGroup - sourceTree - <group> - - 447BD44219413B840062487D - - attributes - - CLASSPREFIX - AL - LastUpgradeCheck - 0510 - ORGANIZATIONNAME - - - buildConfigurationList - 447BD44519413B840062487D - compatibilityVersion - Xcode 3.2 - developmentRegion - English - hasScannedForEncodings - 0 - isa - PBXProject - knownRegions - - en - - mainGroup - 447BD44119413B840062487D - productRefGroup - 447BD44B19413B840062487D - projectDirPath - - projectReferences - - projectRoot - - targets - - 447BD44919413B840062487D - 447BD45919413B840062487D - - - 447BD44519413B840062487D - - buildConfigurations - - 447BD46B19413B840062487D - 447BD46C19413B840062487D - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 447BD44619413B840062487D - - buildActionMask - 2147483647 - files - - 446084F9194282310093A6FA - 44608500194283600093A6FA - 44FC5CF21946581C004812F4 - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 447BD44719413B840062487D - - buildActionMask - 2147483647 - files - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 447BD44819413B840062487D - - buildActionMask - 2147483647 - dstPath - include/$(PRODUCT_NAME) - dstSubfolderSpec - 16 - files - - isa - PBXCopyFilesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 447BD44919413B840062487D - - buildConfigurationList - 447BD46D19413B840062487D - buildPhases - - 447BD44619413B840062487D - 447BD44719413B840062487D - 447BD44819413B840062487D - - buildRules - - dependencies - - isa - PBXNativeTarget - name - AutoLayoutTextViews - productName - AOTextViews - productReference - 447BD44A19413B840062487D - productType - com.apple.product-type.library.static - - 447BD44A19413B840062487D - - explicitFileType - archive.ar - includeInIndex - 0 - isa - PBXFileReference - path - libAutoLayoutTextViews.a - sourceTree - BUILT_PRODUCTS_DIR - - 447BD44B19413B840062487D - - children - - 447BD44A19413B840062487D - 447BD45A19413B840062487D - - isa - PBXGroup - name - Products - sourceTree - <group> - - 447BD44C19413B840062487D - - children - - 447BD44D19413B840062487D - 447BD45B19413B840062487D - 447BD45E19413B840062487D - 5A67EE64DD2D40EBBB06338F - 487F164A8F7D4EEEA6DBA088 - - isa - PBXGroup - name - Frameworks - sourceTree - <group> - - 447BD44D19413B840062487D - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - Foundation.framework - path - System/Library/Frameworks/Foundation.framework - sourceTree - SDKROOT - - 447BD44F19413B840062487D - - children - - 448D9DF3194671C700453E69 - 44608502194283AC0093A6FA - 447BD45019413B840062487D - - isa - PBXGroup - path - AutoLayoutTextViews - sourceTree - <group> - - 447BD45019413B840062487D - - children - - 447BD45119413B840062487D - - isa - PBXGroup - name - Supporting Files - sourceTree - <group> - - 447BD45119413B840062487D - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - AutoLayoutTextViews-Prefix.pch - sourceTree - <group> - - 447BD45619413B840062487D - - buildActionMask - 2147483647 - files - - 4460854D19429A520093A6FA - 4460855219429FEA0093A6FA - 42613CEF1A09AFCB00CAEDBB - 449026B4197325DA00A737C3 - 449026B519732E9700A737C3 - 44FC5CEF19463C43004812F4 - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 447BD45719413B840062487D - - buildActionMask - 2147483647 - files - - 44A095891970F153000ED5B6 - 447BD45C19413B840062487D - 0154CB6408E142EDBF9F6F69 - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 447BD45819413B840062487D - - buildActionMask - 2147483647 - files - - 447BD46819413B840062487D - - isa - PBXResourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 447BD45919413B840062487D - - buildConfigurationList - 447BD47019413B840062487D - buildPhases - - 7187785AB32A4D1A8D893AA5 - 447BD45619413B840062487D - 447BD45719413B840062487D - 447BD45819413B840062487D - 3D0B36F7E6184547AF32BA2F - - buildRules - - dependencies - - 447BD46119413B840062487D - - isa - PBXNativeTarget - name - AutoLayoutTextViewsTests - productName - AOTextViewsTests - productReference - 447BD45A19413B840062487D - productType - com.apple.product-type.bundle.unit-test - - 447BD45A19413B840062487D - - explicitFileType - wrapper.cfbundle - includeInIndex - 0 - isa - PBXFileReference - path - AutoLayoutTextViewsTests.xctest - sourceTree - BUILT_PRODUCTS_DIR - - 447BD45B19413B840062487D - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - XCTest.framework - path - Library/Frameworks/XCTest.framework - sourceTree - DEVELOPER_DIR - - 447BD45C19413B840062487D - - fileRef - 447BD45B19413B840062487D - isa - PBXBuildFile - - 447BD45E19413B840062487D - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - UIKit.framework - path - Library/Frameworks/UIKit.framework - sourceTree - DEVELOPER_DIR - - 447BD46019413B840062487D - - containerPortal - 447BD44219413B840062487D - isa - PBXContainerItemProxy - proxyType - 1 - remoteGlobalIDString - 447BD44919413B840062487D - remoteInfo - AOTextViews - - 447BD46119413B840062487D - - isa - PBXTargetDependency - target - 447BD44919413B840062487D - targetProxy - 447BD46019413B840062487D - - 447BD46319413B840062487D - - children - - 4460854E19429FCE0093A6FA - 4460854F19429FD40093A6FA - 447BD46419413B840062487D - - isa - PBXGroup - path - AutoLayoutTextViewsTests - sourceTree - <group> - - 447BD46419413B840062487D - - children - - 447BD46519413B840062487D - 447BD46619413B840062487D - - isa - PBXGroup - name - Supporting Files - sourceTree - <group> - - 447BD46519413B840062487D - - isa - PBXFileReference - lastKnownFileType - text.plist.xml - path - AutoLayoutTextViewsTests-Info.plist - sourceTree - <group> - - 447BD46619413B840062487D - - children - - 447BD46719413B840062487D - - isa - PBXVariantGroup - name - InfoPlist.strings - sourceTree - <group> - - 447BD46719413B840062487D - - isa - PBXFileReference - lastKnownFileType - text.plist.strings - name - en - path - en.lproj/InfoPlist.strings - sourceTree - <group> - - 447BD46819413B840062487D - - fileRef - 447BD46619413B840062487D - isa - PBXBuildFile - - 447BD46B19413B840062487D - - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - CLANG_CXX_LANGUAGE_STANDARD - gnu++0x - CLANG_CXX_LIBRARY - libc++ - CLANG_ENABLE_MODULES - YES - CLANG_ENABLE_OBJC_ARC - YES - CLANG_WARN_BOOL_CONVERSION - YES - CLANG_WARN_CONSTANT_CONVERSION - YES - CLANG_WARN_DIRECT_OBJC_ISA_USAGE - YES_ERROR - CLANG_WARN_EMPTY_BODY - YES - CLANG_WARN_ENUM_CONVERSION - YES - CLANG_WARN_INT_CONVERSION - YES - CLANG_WARN_OBJC_ROOT_CLASS - YES_ERROR - CLANG_WARN__DUPLICATE_METHOD_MATCH - YES - COPY_PHASE_STRIP - NO - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO - GCC_WARN_64_TO_32_BIT_CONVERSION - YES - GCC_WARN_ABOUT_RETURN_TYPE - YES_ERROR - GCC_WARN_UNDECLARED_SELECTOR - YES - GCC_WARN_UNINITIALIZED_AUTOS - YES_AGGRESSIVE - GCC_WARN_UNUSED_FUNCTION - YES - GCC_WARN_UNUSED_VARIABLE - YES - IPHONEOS_DEPLOYMENT_TARGET - 7.1 - ONLY_ACTIVE_ARCH - YES - SDKROOT - iphoneos - - isa - XCBuildConfiguration - name - Debug - - 447BD46C19413B840062487D - - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - CLANG_CXX_LANGUAGE_STANDARD - gnu++0x - CLANG_CXX_LIBRARY - libc++ - CLANG_ENABLE_MODULES - YES - CLANG_ENABLE_OBJC_ARC - YES - CLANG_WARN_BOOL_CONVERSION - YES - CLANG_WARN_CONSTANT_CONVERSION - YES - CLANG_WARN_DIRECT_OBJC_ISA_USAGE - YES_ERROR - CLANG_WARN_EMPTY_BODY - YES - CLANG_WARN_ENUM_CONVERSION - YES - CLANG_WARN_INT_CONVERSION - YES - CLANG_WARN_OBJC_ROOT_CLASS - YES_ERROR - CLANG_WARN__DUPLICATE_METHOD_MATCH - YES - COPY_PHASE_STRIP - YES - ENABLE_NS_ASSERTIONS - NO - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_WARN_64_TO_32_BIT_CONVERSION - YES - GCC_WARN_ABOUT_RETURN_TYPE - YES_ERROR - GCC_WARN_UNDECLARED_SELECTOR - YES - GCC_WARN_UNINITIALIZED_AUTOS - YES_AGGRESSIVE - GCC_WARN_UNUSED_FUNCTION - YES - GCC_WARN_UNUSED_VARIABLE - YES - IPHONEOS_DEPLOYMENT_TARGET - 7.1 - SDKROOT - iphoneos - VALIDATE_PRODUCT - YES - - isa - XCBuildConfiguration - name - Release - - 447BD46D19413B840062487D - - buildConfigurations - - 447BD46E19413B840062487D - 447BD46F19413B840062487D - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 447BD46E19413B840062487D - - buildSettings - - DSTROOT - /tmp/AutoLayoutTextViews.dst - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - AutoLayoutTextViews/AutoLayoutTextViews-Prefix.pch - OTHER_LDFLAGS - -ObjC - PRODUCT_NAME - AutoLayoutTextViews - SKIP_INSTALL - YES - - isa - XCBuildConfiguration - name - Debug - - 447BD46F19413B840062487D - - buildSettings - - DSTROOT - /tmp/AutoLayoutTextViews.dst - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - AutoLayoutTextViews/AutoLayoutTextViews-Prefix.pch - OTHER_LDFLAGS - -ObjC - PRODUCT_NAME - AutoLayoutTextViews - SKIP_INSTALL - YES - - isa - XCBuildConfiguration - name - Release - - 447BD47019413B840062487D - - buildConfigurations - - 447BD47119413B840062487D - 447BD47219413B840062487D - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 447BD47119413B840062487D - - baseConfigurationReference - C00AAB0725FD6ABBB55E5C19 - buildSettings - - FRAMEWORK_SEARCH_PATHS - - $(SDKROOT)/Developer/Library/Frameworks - $(inherited) - $(DEVELOPER_FRAMEWORKS_DIR) - - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - AutoLayoutTextViews/AutoLayoutTextViews-Prefix.pch - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - INFOPLIST_FILE - AutoLayoutTextViewsTests/AutoLayoutTextViewsTests-Info.plist - PRODUCT_NAME - AutoLayoutTextViewsTests - WRAPPER_EXTENSION - xctest - - isa - XCBuildConfiguration - name - Debug - - 447BD47219413B840062487D - - baseConfigurationReference - 015C12BBC346E6EC48E4175F - buildSettings - - FRAMEWORK_SEARCH_PATHS - - $(SDKROOT)/Developer/Library/Frameworks - $(inherited) - $(DEVELOPER_FRAMEWORKS_DIR) - - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - AutoLayoutTextViews/AutoLayoutTextViews-Prefix.pch - INFOPLIST_FILE - AutoLayoutTextViewsTests/AutoLayoutTextViewsTests-Info.plist - PRODUCT_NAME - AutoLayoutTextViewsTests - WRAPPER_EXTENSION - xctest - - isa - XCBuildConfiguration - name - Release - - 448D9DF3194671C700453E69 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - AutoLayoutTextViews.h - sourceTree - <group> - - 448D9DFA1946801D00453E69 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - ALKeyboardAvoidingTextViewTests.m - sourceTree - <group> - - 448FA0C4194639EF00F79989 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - lineEnding - 0 - path - ALAutoResizingTextViewTests.m - sourceTree - <group> - xcLanguageSpecificationIdentifier - xcode.lang.objc - - 449026B4197325DA00A737C3 - - fileRef - 448D9DFA1946801D00453E69 - isa - PBXBuildFile - - 449026B519732E9700A737C3 - - fileRef - 448FA0C4194639EF00F79989 - isa - PBXBuildFile - - 44A095891970F153000ED5B6 - - fileRef - 447BD44A19413B840062487D - isa - PBXBuildFile - - 44FC5CED19463C43004812F4 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - Test_ALAutoResizingTextView.h - sourceTree - <group> - - 44FC5CEE19463C43004812F4 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - lineEnding - 0 - path - Test_ALAutoResizingTextView.m - sourceTree - <group> - xcLanguageSpecificationIdentifier - xcode.lang.objc - - 44FC5CEF19463C43004812F4 - - fileRef - 44FC5CEE19463C43004812F4 - isa - PBXBuildFile - - 44FC5CF01946581C004812F4 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ALKeyboardAvoidingTextView.h - sourceTree - <group> - - 44FC5CF11946581C004812F4 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - ALKeyboardAvoidingTextView.m - sourceTree - <group> - - 44FC5CF21946581C004812F4 - - fileRef - 44FC5CF11946581C004812F4 - isa - PBXBuildFile - - 487F164A8F7D4EEEA6DBA088 - - explicitFileType - archive.ar - includeInIndex - 0 - isa - PBXFileReference - path - libPods-AutoLayoutTextViewsTests.a - sourceTree - BUILT_PRODUCTS_DIR - - 4DE5F4F0AF09DE466948CCA8 - - children - - C00AAB0725FD6ABBB55E5C19 - 015C12BBC346E6EC48E4175F - - isa - PBXGroup - name - Pods - sourceTree - <group> - - 5A67EE64DD2D40EBBB06338F - - explicitFileType - archive.ar - includeInIndex - 0 - isa - PBXFileReference - path - libPods-AOTextViewsTests.a - sourceTree - BUILT_PRODUCTS_DIR - - 7187785AB32A4D1A8D893AA5 - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - Check Pods Manifest.lock - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null -if [[ $? != 0 ]] ; then - cat << EOM -error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. -EOM - exit 1 -fi - - showEnvVarsInLog - 0 - - C00AAB0725FD6ABBB55E5C19 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-AutoLayoutTextViewsTests.debug.xcconfig - path - Pods/Target Support Files/Pods-AutoLayoutTextViewsTests/Pods-AutoLayoutTextViewsTests.debug.xcconfig - sourceTree - <group> - - - rootObject - 447BD44219413B840062487D - - +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 42613CEF1A09AFCB00CAEDBB /* Test_ALKeyboardAvoidingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 42613CEE1A09AFCB00CAEDBB /* Test_ALKeyboardAvoidingTextView.m */; }; + 446084F9194282310093A6FA /* ALAutoResizingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 446084F8194282310093A6FA /* ALAutoResizingTextView.m */; }; + 44608500194283600093A6FA /* ALPlaceholderTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 446084FF194283600093A6FA /* ALPlaceholderTextView.m */; }; + 4460854D19429A520093A6FA /* ALPlaceholderTextViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4460854C19429A520093A6FA /* ALPlaceholderTextViewTests.m */; }; + 4460855219429FEA0093A6FA /* Test_ALPlaceholderTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4460855119429FEA0093A6FA /* Test_ALPlaceholderTextView.m */; }; + 447BD45C19413B840062487D /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 447BD45B19413B840062487D /* XCTest.framework */; }; + 447BD46819413B840062487D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 447BD46619413B840062487D /* InfoPlist.strings */; }; + 449026B4197325DA00A737C3 /* ALKeyboardAvoidingTextViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 448D9DFA1946801D00453E69 /* ALKeyboardAvoidingTextViewTests.m */; }; + 449026B519732E9700A737C3 /* ALAutoResizingTextViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 448FA0C4194639EF00F79989 /* ALAutoResizingTextViewTests.m */; }; + 44A095891970F153000ED5B6 /* libAutoLayoutTextViews.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 447BD44A19413B840062487D /* libAutoLayoutTextViews.a */; }; + 44FC5CEF19463C43004812F4 /* Test_ALAutoResizingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44FC5CEE19463C43004812F4 /* Test_ALAutoResizingTextView.m */; }; + 44FC5CF21946581C004812F4 /* ALKeyboardAvoidingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44FC5CF11946581C004812F4 /* ALKeyboardAvoidingTextView.m */; }; + 6ED50CC8621BA8FF1C19C608 /* libPods-AutoLayoutTextViews.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E69A689147E6C81B73117F10 /* libPods-AutoLayoutTextViews.a */; }; + D92251557C643F2B201080E7 /* libPods-AutoLayoutTextViewsTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D76956A698BDE9F9880C3A7D /* libPods-AutoLayoutTextViewsTests.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 447BD46019413B840062487D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 447BD44219413B840062487D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 447BD44919413B840062487D; + remoteInfo = AOTextViews; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 447BD44819413B840062487D /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 3C97E920332596DBD4729856 /* Pods-AutoLayoutTextViews.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoLayoutTextViews.release.xcconfig"; path = "Pods/Target Support Files/Pods-AutoLayoutTextViews/Pods-AutoLayoutTextViews.release.xcconfig"; sourceTree = ""; }; + 42613CED1A09AFCB00CAEDBB /* Test_ALKeyboardAvoidingTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Test_ALKeyboardAvoidingTextView.h; sourceTree = ""; }; + 42613CEE1A09AFCB00CAEDBB /* Test_ALKeyboardAvoidingTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Test_ALKeyboardAvoidingTextView.m; sourceTree = ""; }; + 446084F7194282310093A6FA /* ALAutoResizingTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALAutoResizingTextView.h; sourceTree = ""; }; + 446084F8194282310093A6FA /* ALAutoResizingTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ALAutoResizingTextView.m; sourceTree = ""; }; + 446084FE194283600093A6FA /* ALPlaceholderTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ALPlaceholderTextView.h; sourceTree = ""; }; + 446084FF194283600093A6FA /* ALPlaceholderTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ALPlaceholderTextView.m; sourceTree = ""; }; + 4460854C19429A520093A6FA /* ALPlaceholderTextViewTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ALPlaceholderTextViewTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 4460855019429FEA0093A6FA /* Test_ALPlaceholderTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Test_ALPlaceholderTextView.h; sourceTree = ""; }; + 4460855119429FEA0093A6FA /* Test_ALPlaceholderTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Test_ALPlaceholderTextView.m; sourceTree = ""; }; + 447BD44A19413B840062487D /* libAutoLayoutTextViews.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAutoLayoutTextViews.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 447BD44D19413B840062487D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 447BD45119413B840062487D /* AutoLayoutTextViews-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AutoLayoutTextViews-Prefix.pch"; sourceTree = ""; }; + 447BD45A19413B840062487D /* AutoLayoutTextViewsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AutoLayoutTextViewsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 447BD45B19413B840062487D /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 447BD45E19413B840062487D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + 447BD46519413B840062487D /* AutoLayoutTextViewsTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "AutoLayoutTextViewsTests-Info.plist"; sourceTree = ""; }; + 447BD46719413B840062487D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 448D9DF3194671C700453E69 /* AutoLayoutTextViews.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AutoLayoutTextViews.h; sourceTree = ""; }; + 448D9DFA1946801D00453E69 /* ALKeyboardAvoidingTextViewTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALKeyboardAvoidingTextViewTests.m; sourceTree = ""; }; + 448FA0C4194639EF00F79989 /* ALAutoResizingTextViewTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ALAutoResizingTextViewTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 44FC5CED19463C43004812F4 /* Test_ALAutoResizingTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Test_ALAutoResizingTextView.h; sourceTree = ""; }; + 44FC5CEE19463C43004812F4 /* Test_ALAutoResizingTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = Test_ALAutoResizingTextView.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 44FC5CF01946581C004812F4 /* ALKeyboardAvoidingTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALKeyboardAvoidingTextView.h; sourceTree = ""; }; + 44FC5CF11946581C004812F4 /* ALKeyboardAvoidingTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALKeyboardAvoidingTextView.m; sourceTree = ""; }; + B90A51AFD8D34D01331B1B4C /* Pods-AutoLayoutTextViewsTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoLayoutTextViewsTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AutoLayoutTextViewsTests/Pods-AutoLayoutTextViewsTests.debug.xcconfig"; sourceTree = ""; }; + D1D2A9FC6FA1EE2FCB9D6CA4 /* Pods-AutoLayoutTextViewsTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoLayoutTextViewsTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-AutoLayoutTextViewsTests/Pods-AutoLayoutTextViewsTests.release.xcconfig"; sourceTree = ""; }; + D76956A698BDE9F9880C3A7D /* libPods-AutoLayoutTextViewsTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AutoLayoutTextViewsTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + E69A689147E6C81B73117F10 /* libPods-AutoLayoutTextViews.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AutoLayoutTextViews.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + F709BA331C6B0ADAE8E98165 /* Pods-AutoLayoutTextViews.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoLayoutTextViews.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AutoLayoutTextViews/Pods-AutoLayoutTextViews.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 447BD44719413B840062487D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 6ED50CC8621BA8FF1C19C608 /* libPods-AutoLayoutTextViews.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 447BD45719413B840062487D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 44A095891970F153000ED5B6 /* libAutoLayoutTextViews.a in Frameworks */, + 447BD45C19413B840062487D /* XCTest.framework in Frameworks */, + D92251557C643F2B201080E7 /* libPods-AutoLayoutTextViewsTests.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 44608502194283AC0093A6FA /* Views */ = { + isa = PBXGroup; + children = ( + 446084F7194282310093A6FA /* ALAutoResizingTextView.h */, + 446084F8194282310093A6FA /* ALAutoResizingTextView.m */, + 44FC5CF01946581C004812F4 /* ALKeyboardAvoidingTextView.h */, + 44FC5CF11946581C004812F4 /* ALKeyboardAvoidingTextView.m */, + 446084FE194283600093A6FA /* ALPlaceholderTextView.h */, + 446084FF194283600093A6FA /* ALPlaceholderTextView.m */, + ); + name = Views; + sourceTree = ""; + }; + 4460854E19429FCE0093A6FA /* Cases */ = { + isa = PBXGroup; + children = ( + 448FA0C4194639EF00F79989 /* ALAutoResizingTextViewTests.m */, + 4460854C19429A520093A6FA /* ALPlaceholderTextViewTests.m */, + 448D9DFA1946801D00453E69 /* ALKeyboardAvoidingTextViewTests.m */, + ); + name = Cases; + sourceTree = ""; + }; + 4460854F19429FD40093A6FA /* Classes */ = { + isa = PBXGroup; + children = ( + 44FC5CED19463C43004812F4 /* Test_ALAutoResizingTextView.h */, + 44FC5CEE19463C43004812F4 /* Test_ALAutoResizingTextView.m */, + 42613CED1A09AFCB00CAEDBB /* Test_ALKeyboardAvoidingTextView.h */, + 42613CEE1A09AFCB00CAEDBB /* Test_ALKeyboardAvoidingTextView.m */, + 4460855019429FEA0093A6FA /* Test_ALPlaceholderTextView.h */, + 4460855119429FEA0093A6FA /* Test_ALPlaceholderTextView.m */, + ); + name = Classes; + sourceTree = ""; + }; + 447BD44119413B840062487D = { + isa = PBXGroup; + children = ( + 447BD44F19413B840062487D /* AutoLayoutTextViews */, + 447BD46319413B840062487D /* AutoLayoutTextViewsTests */, + 447BD44C19413B840062487D /* Frameworks */, + 447BD44B19413B840062487D /* Products */, + 7F3FDEA9E08B7C5B59C4421E /* Pods */, + ); + sourceTree = ""; + }; + 447BD44B19413B840062487D /* Products */ = { + isa = PBXGroup; + children = ( + 447BD44A19413B840062487D /* libAutoLayoutTextViews.a */, + 447BD45A19413B840062487D /* AutoLayoutTextViewsTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 447BD44C19413B840062487D /* Frameworks */ = { + isa = PBXGroup; + children = ( + 447BD44D19413B840062487D /* Foundation.framework */, + 447BD45B19413B840062487D /* XCTest.framework */, + 447BD45E19413B840062487D /* UIKit.framework */, + E69A689147E6C81B73117F10 /* libPods-AutoLayoutTextViews.a */, + D76956A698BDE9F9880C3A7D /* libPods-AutoLayoutTextViewsTests.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 447BD44F19413B840062487D /* AutoLayoutTextViews */ = { + isa = PBXGroup; + children = ( + 448D9DF3194671C700453E69 /* AutoLayoutTextViews.h */, + 44608502194283AC0093A6FA /* Views */, + 447BD45019413B840062487D /* Supporting Files */, + ); + path = AutoLayoutTextViews; + sourceTree = ""; + }; + 447BD45019413B840062487D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 447BD45119413B840062487D /* AutoLayoutTextViews-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 447BD46319413B840062487D /* AutoLayoutTextViewsTests */ = { + isa = PBXGroup; + children = ( + 4460854E19429FCE0093A6FA /* Cases */, + 4460854F19429FD40093A6FA /* Classes */, + 447BD46419413B840062487D /* Supporting Files */, + ); + path = AutoLayoutTextViewsTests; + sourceTree = ""; + }; + 447BD46419413B840062487D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 447BD46519413B840062487D /* AutoLayoutTextViewsTests-Info.plist */, + 447BD46619413B840062487D /* InfoPlist.strings */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 7F3FDEA9E08B7C5B59C4421E /* Pods */ = { + isa = PBXGroup; + children = ( + F709BA331C6B0ADAE8E98165 /* Pods-AutoLayoutTextViews.debug.xcconfig */, + 3C97E920332596DBD4729856 /* Pods-AutoLayoutTextViews.release.xcconfig */, + B90A51AFD8D34D01331B1B4C /* Pods-AutoLayoutTextViewsTests.debug.xcconfig */, + D1D2A9FC6FA1EE2FCB9D6CA4 /* Pods-AutoLayoutTextViewsTests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 447BD44919413B840062487D /* AutoLayoutTextViews */ = { + isa = PBXNativeTarget; + buildConfigurationList = 447BD46D19413B840062487D /* Build configuration list for PBXNativeTarget "AutoLayoutTextViews" */; + buildPhases = ( + 0A8DE686AB7C5D1C10615584 /* 📦 Check Pods Manifest.lock */, + 447BD44619413B840062487D /* Sources */, + 447BD44719413B840062487D /* Frameworks */, + 447BD44819413B840062487D /* CopyFiles */, + DF5E9AB8F4F64E84FD40E6FA /* 📦 Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = AutoLayoutTextViews; + productName = AOTextViews; + productReference = 447BD44A19413B840062487D /* libAutoLayoutTextViews.a */; + productType = "com.apple.product-type.library.static"; + }; + 447BD45919413B840062487D /* AutoLayoutTextViewsTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 447BD47019413B840062487D /* Build configuration list for PBXNativeTarget "AutoLayoutTextViewsTests" */; + buildPhases = ( + 05BA7F88660374D9CE33FF7C /* 📦 Check Pods Manifest.lock */, + 447BD45619413B840062487D /* Sources */, + 447BD45719413B840062487D /* Frameworks */, + 447BD45819413B840062487D /* Resources */, + C7270F5A23C5C508F495F0C7 /* 📦 Embed Pods Frameworks */, + 48F7E2847664EC8FFB336E64 /* 📦 Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + 447BD46119413B840062487D /* PBXTargetDependency */, + ); + name = AutoLayoutTextViewsTests; + productName = AOTextViewsTests; + productReference = 447BD45A19413B840062487D /* AutoLayoutTextViewsTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 447BD44219413B840062487D /* Project object */ = { + isa = PBXProject; + attributes = { + CLASSPREFIX = AL; + LastUpgradeCheck = 0510; + ORGANIZATIONNAME = ""; + }; + buildConfigurationList = 447BD44519413B840062487D /* Build configuration list for PBXProject "AutoLayoutTextViews" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 447BD44119413B840062487D; + productRefGroup = 447BD44B19413B840062487D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 447BD44919413B840062487D /* AutoLayoutTextViews */, + 447BD45919413B840062487D /* AutoLayoutTextViewsTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 447BD45819413B840062487D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 447BD46819413B840062487D /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 05BA7F88660374D9CE33FF7C /* 📦 Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "📦 Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 0A8DE686AB7C5D1C10615584 /* 📦 Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "📦 Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 48F7E2847664EC8FFB336E64 /* 📦 Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "📦 Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AutoLayoutTextViewsTests/Pods-AutoLayoutTextViewsTests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + C7270F5A23C5C508F495F0C7 /* 📦 Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "📦 Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AutoLayoutTextViewsTests/Pods-AutoLayoutTextViewsTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + DF5E9AB8F4F64E84FD40E6FA /* 📦 Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "📦 Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AutoLayoutTextViews/Pods-AutoLayoutTextViews-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 447BD44619413B840062487D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 446084F9194282310093A6FA /* ALAutoResizingTextView.m in Sources */, + 44608500194283600093A6FA /* ALPlaceholderTextView.m in Sources */, + 44FC5CF21946581C004812F4 /* ALKeyboardAvoidingTextView.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 447BD45619413B840062487D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4460854D19429A520093A6FA /* ALPlaceholderTextViewTests.m in Sources */, + 4460855219429FEA0093A6FA /* Test_ALPlaceholderTextView.m in Sources */, + 42613CEF1A09AFCB00CAEDBB /* Test_ALKeyboardAvoidingTextView.m in Sources */, + 449026B4197325DA00A737C3 /* ALKeyboardAvoidingTextViewTests.m in Sources */, + 449026B519732E9700A737C3 /* ALAutoResizingTextViewTests.m in Sources */, + 44FC5CEF19463C43004812F4 /* Test_ALAutoResizingTextView.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 447BD46119413B840062487D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 447BD44919413B840062487D /* AutoLayoutTextViews */; + targetProxy = 447BD46019413B840062487D /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 447BD46619413B840062487D /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 447BD46719413B840062487D /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 447BD46B19413B840062487D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 447BD46C19413B840062487D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.1; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 447BD46E19413B840062487D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F709BA331C6B0ADAE8E98165 /* Pods-AutoLayoutTextViews.debug.xcconfig */; + buildSettings = { + DSTROOT = /tmp/AutoLayoutTextViews.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "AutoLayoutTextViews/AutoLayoutTextViews-Prefix.pch"; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = AutoLayoutTextViews; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 447BD46F19413B840062487D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3C97E920332596DBD4729856 /* Pods-AutoLayoutTextViews.release.xcconfig */; + buildSettings = { + DSTROOT = /tmp/AutoLayoutTextViews.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "AutoLayoutTextViews/AutoLayoutTextViews-Prefix.pch"; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = AutoLayoutTextViews; + SKIP_INSTALL = YES; + }; + name = Release; + }; + 447BD47119413B840062487D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B90A51AFD8D34D01331B1B4C /* Pods-AutoLayoutTextViewsTests.debug.xcconfig */; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "AutoLayoutTextViews/AutoLayoutTextViews-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = "AutoLayoutTextViewsTests/AutoLayoutTextViewsTests-Info.plist"; + PRODUCT_NAME = AutoLayoutTextViewsTests; + WRAPPER_EXTENSION = xctest; + }; + name = Debug; + }; + 447BD47219413B840062487D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D1D2A9FC6FA1EE2FCB9D6CA4 /* Pods-AutoLayoutTextViewsTests.release.xcconfig */; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "AutoLayoutTextViews/AutoLayoutTextViews-Prefix.pch"; + INFOPLIST_FILE = "AutoLayoutTextViewsTests/AutoLayoutTextViewsTests-Info.plist"; + PRODUCT_NAME = AutoLayoutTextViewsTests; + WRAPPER_EXTENSION = xctest; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 447BD44519413B840062487D /* Build configuration list for PBXProject "AutoLayoutTextViews" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 447BD46B19413B840062487D /* Debug */, + 447BD46C19413B840062487D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 447BD46D19413B840062487D /* Build configuration list for PBXNativeTarget "AutoLayoutTextViews" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 447BD46E19413B840062487D /* Debug */, + 447BD46F19413B840062487D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 447BD47019413B840062487D /* Build configuration list for PBXNativeTarget "AutoLayoutTextViewsTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 447BD47119413B840062487D /* Debug */, + 447BD47219413B840062487D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 447BD44219413B840062487D /* Project object */; +} diff --git a/AutoLayoutTextViews/ALPlaceholderTextView.m b/AutoLayoutTextViews/ALPlaceholderTextView.m index 0fff14f..24fc797 100644 --- a/AutoLayoutTextViews/ALPlaceholderTextView.m +++ b/AutoLayoutTextViews/ALPlaceholderTextView.m @@ -107,6 +107,7 @@ - (void)keyboardWillHide:(NSNotification *)notification [self setNeedsDisplay]; } + #pragma mark - Custom Accessors - (void)setPlaceholder:(NSString *)placeholder @@ -138,6 +139,34 @@ - (void)setText:(NSString *)text [self setNeedsDisplay]; } +#pragma mark - Size That Fits + +- (CGSize)sizeThatFits:(CGSize)size +{ + CGSize contentSize = [super sizeThatFits:size]; + CGSize placeholderTextSize = [_placeholder boundingRectWithSize:CGSizeMake(size.width, CGFLOAT_MAX) + options:NSStringDrawingUsesLineFragmentOrigin + attributes:[self placeholderAttributes] + context:nil].size; + + CGSize placeholderSize = CGSizeMake(placeholderTextSize.width, placeholderTextSize.height + + _placeholderInsets.top + + _placeholderInsets.bottom); + + return contentSize.height >= placeholderSize.height ? contentSize : placeholderSize; +} + +- (NSDictionary *)placeholderAttributes +{ + NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle defaultParagraphStyle] mutableCopy]; + paragraphStyle.lineBreakMode = NSLineBreakByWordWrapping; + paragraphStyle.alignment = self.textAlignment; + + return @{NSFontAttributeName: self.font, + NSParagraphStyleAttributeName: paragraphStyle, + NSForegroundColorAttributeName: self.placeholderColor}; +} + #pragma mark - Draw Rect - (void)drawRect:(CGRect)rect @@ -148,15 +177,7 @@ - (void)drawRect:(CGRect)rect return; } - NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle defaultParagraphStyle] mutableCopy]; - paragraphStyle.lineBreakMode = NSLineBreakByWordWrapping; - paragraphStyle.alignment = self.textAlignment; - - NSDictionary *attributes = @{NSFontAttributeName: self.font, - NSParagraphStyleAttributeName: paragraphStyle, - NSForegroundColorAttributeName: self.placeholderColor}; - - [self.placeholder drawInRect:[self calculatePlaceholderRectInsetInRect:rect] withAttributes:attributes]; + [self.placeholder drawInRect:[self calculatePlaceholderRectInsetInRect:rect] withAttributes:[self placeholderAttributes]]; } - (BOOL)shouldDrawPlaceholder @@ -171,4 +192,4 @@ - (CGRect)calculatePlaceholderRectInsetInRect:(CGRect)rect return placeholderRect; } -@end +@end \ No newline at end of file diff --git a/AutoLayoutTextViewsDemo/AutoLayoutTextViewsDemo.xcodeproj/project.pbxproj b/AutoLayoutTextViewsDemo/AutoLayoutTextViewsDemo.xcodeproj/project.pbxproj index 95c6d69..cf91f9e 100644 --- a/AutoLayoutTextViewsDemo/AutoLayoutTextViewsDemo.xcodeproj/project.pbxproj +++ b/AutoLayoutTextViewsDemo/AutoLayoutTextViewsDemo.xcodeproj/project.pbxproj @@ -147,11 +147,12 @@ isa = PBXNativeTarget; buildConfigurationList = 4460853E194286690093A6FA /* Build configuration list for PBXNativeTarget "AutoLayoutTextViewsDemo" */; buildPhases = ( - 48AC5D1F2B7C490899E425E0 /* Check Pods Manifest.lock */, + 48AC5D1F2B7C490899E425E0 /* 📦 Check Pods Manifest.lock */, 44608508194286690093A6FA /* Sources */, 44608509194286690093A6FA /* Frameworks */, 4460850A194286690093A6FA /* Resources */, - FB9D0AA459E34F9F8F778979 /* Copy Pods Resources */, + FB9D0AA459E34F9F8F778979 /* 📦 Copy Pods Resources */, + 39008B6E526BA84E9FB17D67 /* 📦 Embed Pods Frameworks */, ); buildRules = ( ); @@ -204,14 +205,29 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 48AC5D1F2B7C490899E425E0 /* Check Pods Manifest.lock */ = { + 39008B6E526BA84E9FB17D67 /* 📦 Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "📦 Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-AutoLayoutTextViewsDemo/Pods-AutoLayoutTextViewsDemo-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 48AC5D1F2B7C490899E425E0 /* 📦 Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "📦 Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -219,14 +235,14 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - FB9D0AA459E34F9F8F778979 /* Copy Pods Resources */ = { + FB9D0AA459E34F9F8F778979 /* 📦 Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "📦 Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; diff --git a/AutoLayoutTextViewsTests/ALPlaceholderTextViewTests.m b/AutoLayoutTextViewsTests/ALPlaceholderTextViewTests.m index a5621d0..34f7ddd 100644 --- a/AutoLayoutTextViewsTests/ALPlaceholderTextViewTests.m +++ b/AutoLayoutTextViewsTests/ALPlaceholderTextViewTests.m @@ -178,6 +178,18 @@ - (void)test___setText___calls___setsNeedsDisplay { expect(sut.called_setNeedsDisplay).to.beTruthy(); } +- (void)test__sizeThatFits__givenLongerPlaceholderTextThanContentText_returnsSizeWithHeightFittingPlaceholder +{ + // given + sut.placeholder = @"Long Placeholder Text Long Placeholder Text Long Placeholder Text Long Placeholder Text Long Placeholder Text Long Placeholder Text"; + + // when + CGSize actual = [sut sizeThatFits:CGSizeMake(50.0f, 50.0f)]; + + // then + expect(actual.height).to.beGreaterThan(50.0f); +} + - (void)test___drawRect___returnsNO_ifHasText { // given diff --git a/Podfile.lock b/Podfile.lock index d93a27c..0c42729 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - AutoLayoutTextViews (1.2.1) + - AutoLayoutTextViews (1.2.3) - Expecta (1.0.0) - OCMock (3.1.2) @@ -10,11 +10,13 @@ DEPENDENCIES: EXTERNAL SOURCES: AutoLayoutTextViews: - :path: . + :path: "." SPEC CHECKSUMS: - AutoLayoutTextViews: 48faabcd0e2270f789ed027a79ab253184fa6e2e + AutoLayoutTextViews: 50d76d8938f263794e3344ee6876001f806c7cda Expecta: 32604574add2c46a36f8d2f716b6c5736eb75024 OCMock: a10ea9f0a6e921651f96f78b6faee95ebc813b92 -COCOAPODS: 0.36.4 +PODFILE CHECKSUM: 39fc9cc36b90223b88dacabd7f23e46884ff2383 + +COCOAPODS: 1.0.0.beta.6 From 0cb10ee5df9e584fcdafb7825d8cf8a545b2bce7 Mon Sep 17 00:00:00 2001 From: Anthony Miller Date: Mon, 4 Apr 2016 13:12:49 -0700 Subject: [PATCH 04/21] Fixed bottom placeholder content inset for calculating placeholder text height --- AutoLayoutTextViews/ALPlaceholderTextView.m | 2 +- AutoLayoutTextViewsTests/ALPlaceholderTextViewTests.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AutoLayoutTextViews/ALPlaceholderTextView.m b/AutoLayoutTextViews/ALPlaceholderTextView.m index 24fc797..2743672 100644 --- a/AutoLayoutTextViews/ALPlaceholderTextView.m +++ b/AutoLayoutTextViews/ALPlaceholderTextView.m @@ -54,7 +54,7 @@ - (void)dealloc - (void)commonInit { _placeholderColor = [UIColor lightGrayColor]; - _placeholderInsets = UIEdgeInsetsMake(8.0f, 4.0f, 0.0f, 0.0f); + _placeholderInsets = UIEdgeInsetsMake(8.0f, 4.0f, 8.0f, 0.0f); self.font = self.font ?: [UIFont preferredFontForTextStyle:UIFontTextStyleBody]; [self startObservingNotifications]; diff --git a/AutoLayoutTextViewsTests/ALPlaceholderTextViewTests.m b/AutoLayoutTextViewsTests/ALPlaceholderTextViewTests.m index 34f7ddd..4f84f67 100644 --- a/AutoLayoutTextViewsTests/ALPlaceholderTextViewTests.m +++ b/AutoLayoutTextViewsTests/ALPlaceholderTextViewTests.m @@ -101,7 +101,7 @@ - (void)test_placeholderColorIsLightGrayColorByDefault - (void)test_placeholderInsetsSetToCorrectDefaultValue { // given - UIEdgeInsets expected = UIEdgeInsetsMake(8.0f, 4.0f, 0.0f, 0.0f); + UIEdgeInsets expected = UIEdgeInsetsMake(8.0f, 4.0f, 8.0f, 0.0f); // when UIEdgeInsets actual = sut.placeholderInsets; From e6c64c27e20c014ebacee4d9151628b8afe1ad1e Mon Sep 17 00:00:00 2001 From: Anthony Miller Date: Tue, 5 Apr 2016 10:30:19 -0700 Subject: [PATCH 05/21] Bumped pod version --- AutoLayoutTextViews.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AutoLayoutTextViews.podspec b/AutoLayoutTextViews.podspec index c359726..09319cd 100644 --- a/AutoLayoutTextViews.podspec +++ b/AutoLayoutTextViews.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |s| s.platform = :ios s.ios.deployment_target = "7.0" s.name = "AutoLayoutTextViews" - s.version = "1.2.3" + s.version = "1.2.4" s.summary = "AutoLayoutTextViews subclasses UITextView and adds placeholder text, auto resizing, and keyboard avoiding functionality." s.homepage = "https://github.com/JRG-Developer/AutoLayoutTextViews" s.license = { :type => "MIT", :file => "LICENSE" } From 6d8bf00431aba07eb31d13c84c5bd672a7fbf00c Mon Sep 17 00:00:00 2001 From: Joshua Greene Date: Mon, 5 Sep 2016 14:30:41 -0500 Subject: [PATCH 06/21] - Fixed bug related to height changes (need to add some sort of unit test for this) - Use latest version of CocoaPods --- AutoLayoutTextViews.xcodeproj/project.pbxproj | 43 ++++++++++++------- AutoLayoutTextViews/ALAutoResizingTextView.m | 15 +++---- .../project.pbxproj | 26 +++++++---- ...LAutoResizingTextViewTableViewController.h | 2 +- .../Base.lproj/Main.storyboard | 27 ++++++------ .../ALPlaceholderTextViewTests.m | 4 +- .../AutoLayoutTextViewsTests-Info.plist | 2 +- Podfile | 6 +-- Podfile.lock | 18 ++++---- 9 files changed, 83 insertions(+), 60 deletions(-) diff --git a/AutoLayoutTextViews.xcodeproj/project.pbxproj b/AutoLayoutTextViews.xcodeproj/project.pbxproj index 61873da..8e2c291 100644 --- a/AutoLayoutTextViews.xcodeproj/project.pbxproj +++ b/AutoLayoutTextViews.xcodeproj/project.pbxproj @@ -20,6 +20,7 @@ 44FC5CEF19463C43004812F4 /* Test_ALAutoResizingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44FC5CEE19463C43004812F4 /* Test_ALAutoResizingTextView.m */; }; 44FC5CF21946581C004812F4 /* ALKeyboardAvoidingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44FC5CF11946581C004812F4 /* ALKeyboardAvoidingTextView.m */; }; 6ED50CC8621BA8FF1C19C608 /* libPods-AutoLayoutTextViews.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E69A689147E6C81B73117F10 /* libPods-AutoLayoutTextViews.a */; }; + A0FAB2ADE29F0046A3064CF0 /* libPods-AutoLayoutTextViews-AutoLayoutTextViewsTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 64858685EF628981D5ECE76A /* libPods-AutoLayoutTextViews-AutoLayoutTextViewsTests.a */; }; D92251557C643F2B201080E7 /* libPods-AutoLayoutTextViewsTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D76956A698BDE9F9880C3A7D /* libPods-AutoLayoutTextViewsTests.a */; }; /* End PBXBuildFile section */ @@ -71,11 +72,14 @@ 44FC5CEE19463C43004812F4 /* Test_ALAutoResizingTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = Test_ALAutoResizingTextView.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 44FC5CF01946581C004812F4 /* ALKeyboardAvoidingTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALKeyboardAvoidingTextView.h; sourceTree = ""; }; 44FC5CF11946581C004812F4 /* ALKeyboardAvoidingTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALKeyboardAvoidingTextView.m; sourceTree = ""; }; + 64858685EF628981D5ECE76A /* libPods-AutoLayoutTextViews-AutoLayoutTextViewsTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AutoLayoutTextViews-AutoLayoutTextViewsTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 9E5D89973620E899D9995AA5 /* Pods-AutoLayoutTextViews-AutoLayoutTextViewsTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoLayoutTextViews-AutoLayoutTextViewsTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AutoLayoutTextViews-AutoLayoutTextViewsTests/Pods-AutoLayoutTextViews-AutoLayoutTextViewsTests.debug.xcconfig"; sourceTree = ""; }; B90A51AFD8D34D01331B1B4C /* Pods-AutoLayoutTextViewsTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoLayoutTextViewsTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AutoLayoutTextViewsTests/Pods-AutoLayoutTextViewsTests.debug.xcconfig"; sourceTree = ""; }; D1D2A9FC6FA1EE2FCB9D6CA4 /* Pods-AutoLayoutTextViewsTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoLayoutTextViewsTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-AutoLayoutTextViewsTests/Pods-AutoLayoutTextViewsTests.release.xcconfig"; sourceTree = ""; }; D76956A698BDE9F9880C3A7D /* libPods-AutoLayoutTextViewsTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AutoLayoutTextViewsTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; E69A689147E6C81B73117F10 /* libPods-AutoLayoutTextViews.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AutoLayoutTextViews.a"; sourceTree = BUILT_PRODUCTS_DIR; }; F709BA331C6B0ADAE8E98165 /* Pods-AutoLayoutTextViews.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoLayoutTextViews.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AutoLayoutTextViews/Pods-AutoLayoutTextViews.debug.xcconfig"; sourceTree = ""; }; + FA9A3324D32230CC88F7A991 /* Pods-AutoLayoutTextViews-AutoLayoutTextViewsTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoLayoutTextViews-AutoLayoutTextViewsTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-AutoLayoutTextViews-AutoLayoutTextViewsTests/Pods-AutoLayoutTextViews-AutoLayoutTextViewsTests.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -94,6 +98,7 @@ 44A095891970F153000ED5B6 /* libAutoLayoutTextViews.a in Frameworks */, 447BD45C19413B840062487D /* XCTest.framework in Frameworks */, D92251557C643F2B201080E7 /* libPods-AutoLayoutTextViewsTests.a in Frameworks */, + A0FAB2ADE29F0046A3064CF0 /* libPods-AutoLayoutTextViews-AutoLayoutTextViewsTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -164,6 +169,7 @@ 447BD45E19413B840062487D /* UIKit.framework */, E69A689147E6C81B73117F10 /* libPods-AutoLayoutTextViews.a */, D76956A698BDE9F9880C3A7D /* libPods-AutoLayoutTextViewsTests.a */, + 64858685EF628981D5ECE76A /* libPods-AutoLayoutTextViews-AutoLayoutTextViewsTests.a */, ); name = Frameworks; sourceTree = ""; @@ -212,6 +218,8 @@ 3C97E920332596DBD4729856 /* Pods-AutoLayoutTextViews.release.xcconfig */, B90A51AFD8D34D01331B1B4C /* Pods-AutoLayoutTextViewsTests.debug.xcconfig */, D1D2A9FC6FA1EE2FCB9D6CA4 /* Pods-AutoLayoutTextViewsTests.release.xcconfig */, + 9E5D89973620E899D9995AA5 /* Pods-AutoLayoutTextViews-AutoLayoutTextViewsTests.debug.xcconfig */, + FA9A3324D32230CC88F7A991 /* Pods-AutoLayoutTextViews-AutoLayoutTextViewsTests.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -223,11 +231,11 @@ isa = PBXNativeTarget; buildConfigurationList = 447BD46D19413B840062487D /* Build configuration list for PBXNativeTarget "AutoLayoutTextViews" */; buildPhases = ( - 0A8DE686AB7C5D1C10615584 /* 📦 Check Pods Manifest.lock */, + 0A8DE686AB7C5D1C10615584 /* [CP] Check Pods Manifest.lock */, 447BD44619413B840062487D /* Sources */, 447BD44719413B840062487D /* Frameworks */, 447BD44819413B840062487D /* CopyFiles */, - DF5E9AB8F4F64E84FD40E6FA /* 📦 Copy Pods Resources */, + DF5E9AB8F4F64E84FD40E6FA /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -242,12 +250,12 @@ isa = PBXNativeTarget; buildConfigurationList = 447BD47019413B840062487D /* Build configuration list for PBXNativeTarget "AutoLayoutTextViewsTests" */; buildPhases = ( - 05BA7F88660374D9CE33FF7C /* 📦 Check Pods Manifest.lock */, + 05BA7F88660374D9CE33FF7C /* [CP] Check Pods Manifest.lock */, 447BD45619413B840062487D /* Sources */, 447BD45719413B840062487D /* Frameworks */, 447BD45819413B840062487D /* Resources */, - C7270F5A23C5C508F495F0C7 /* 📦 Embed Pods Frameworks */, - 48F7E2847664EC8FFB336E64 /* 📦 Copy Pods Resources */, + C7270F5A23C5C508F495F0C7 /* [CP] Embed Pods Frameworks */, + 48F7E2847664EC8FFB336E64 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -266,7 +274,7 @@ isa = PBXProject; attributes = { CLASSPREFIX = AL; - LastUpgradeCheck = 0510; + LastUpgradeCheck = 0730; ORGANIZATIONNAME = ""; }; buildConfigurationList = 447BD44519413B840062487D /* Build configuration list for PBXProject "AutoLayoutTextViews" */; @@ -299,14 +307,14 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 05BA7F88660374D9CE33FF7C /* 📦 Check Pods Manifest.lock */ = { + 05BA7F88660374D9CE33FF7C /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -314,14 +322,14 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - 0A8DE686AB7C5D1C10615584 /* 📦 Check Pods Manifest.lock */ = { + 0A8DE686AB7C5D1C10615584 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -329,14 +337,14 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - 48F7E2847664EC8FFB336E64 /* 📦 Copy Pods Resources */ = { + 48F7E2847664EC8FFB336E64 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -344,14 +352,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AutoLayoutTextViewsTests/Pods-AutoLayoutTextViewsTests-resources.sh\"\n"; showEnvVarsInLog = 0; }; - C7270F5A23C5C508F495F0C7 /* 📦 Embed Pods Frameworks */ = { + C7270F5A23C5C508F495F0C7 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Embed Pods Frameworks"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -359,14 +367,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AutoLayoutTextViewsTests/Pods-AutoLayoutTextViewsTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - DF5E9AB8F4F64E84FD40E6FA /* 📦 Copy Pods Resources */ = { + DF5E9AB8F4F64E84FD40E6FA /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -439,6 +447,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; @@ -532,6 +541,7 @@ "$(inherited)", ); INFOPLIST_FILE = "AutoLayoutTextViewsTests/AutoLayoutTextViewsTests-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.jrgdeveloper.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = AutoLayoutTextViewsTests; WRAPPER_EXTENSION = xctest; }; @@ -549,6 +559,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "AutoLayoutTextViews/AutoLayoutTextViews-Prefix.pch"; INFOPLIST_FILE = "AutoLayoutTextViewsTests/AutoLayoutTextViewsTests-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.jrgdeveloper.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = AutoLayoutTextViewsTests; WRAPPER_EXTENSION = xctest; }; diff --git a/AutoLayoutTextViews/ALAutoResizingTextView.m b/AutoLayoutTextViews/ALAutoResizingTextView.m index e590d54..c377722 100644 --- a/AutoLayoutTextViews/ALAutoResizingTextView.m +++ b/AutoLayoutTextViews/ALAutoResizingTextView.m @@ -98,13 +98,17 @@ - (void)updateConstraints - (void)updateHeightConstraint { - self.oldHeight = self.heightConstraint.constant; - self.newHeight = [self calculateNewHeight]; - if (![self didHeightChange]) { + CGFloat oldHeight = self.heightConstraint.constant; + CGFloat newHeight = [self calculateNewHeight]; + + if (oldHeight == newHeight) { return; } + self.oldHeight = oldHeight; + self.newHeight = newHeight; + if ([self shouldAnimateHeightChange]) { [self animateHeightChange]; @@ -127,11 +131,6 @@ - (CGFloat)heightThatFitsContents return size.height + self.contentInset.top; } -- (BOOL)didHeightChange -{ - return self.newHeight != self.oldHeight; -} - - (BOOL)shouldAnimateHeightChange { return self.autoresizingAnimationDuration > 0 && ![self shouldDrawPlaceholder]; diff --git a/AutoLayoutTextViewsDemo/AutoLayoutTextViewsDemo.xcodeproj/project.pbxproj b/AutoLayoutTextViewsDemo/AutoLayoutTextViewsDemo.xcodeproj/project.pbxproj index cf91f9e..1076741 100644 --- a/AutoLayoutTextViewsDemo/AutoLayoutTextViewsDemo.xcodeproj/project.pbxproj +++ b/AutoLayoutTextViewsDemo/AutoLayoutTextViewsDemo.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 0AC65AEF667A53D48F78FDDE /* libPods-AutoLayoutTextViews-AutoLayoutTextViewsDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 37CC977061B34842E205F1FA /* libPods-AutoLayoutTextViews-AutoLayoutTextViewsDemo.a */; }; 42D015801A09C82B00D2950F /* ALTextViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D0157F1A09C82B00D2950F /* ALTextViewCell.m */; }; 4460851A194286690093A6FA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 44608518194286690093A6FA /* InfoPlist.strings */; }; 4460851C194286690093A6FA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4460851B194286690093A6FA /* main.m */; }; @@ -21,6 +22,8 @@ /* Begin PBXFileReference section */ 2BE76039C2C7EEA18CED60A5 /* Pods-AutoLayoutTextViewsDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoLayoutTextViewsDemo.release.xcconfig"; path = "../Pods/Target Support Files/Pods-AutoLayoutTextViewsDemo/Pods-AutoLayoutTextViewsDemo.release.xcconfig"; sourceTree = ""; }; + 2DFB6B9C62D372274CCEAB0B /* Pods-AutoLayoutTextViews-AutoLayoutTextViewsDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoLayoutTextViews-AutoLayoutTextViewsDemo.release.xcconfig"; path = "../Pods/Target Support Files/Pods-AutoLayoutTextViews-AutoLayoutTextViewsDemo/Pods-AutoLayoutTextViews-AutoLayoutTextViewsDemo.release.xcconfig"; sourceTree = ""; }; + 37CC977061B34842E205F1FA /* libPods-AutoLayoutTextViews-AutoLayoutTextViewsDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AutoLayoutTextViews-AutoLayoutTextViewsDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 42D0157E1A09C82B00D2950F /* ALTextViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALTextViewCell.h; sourceTree = ""; }; 42D0157F1A09C82B00D2950F /* ALTextViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALTextViewCell.m; sourceTree = ""; }; 4460850C194286690093A6FA /* AutoLayoutTextViewsDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AutoLayoutTextViewsDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -37,6 +40,7 @@ 448D9DF41946743300453E69 /* ALTextViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALTextViewController.h; sourceTree = ""; }; 448D9DF51946743300453E69 /* ALTextViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALTextViewController.m; sourceTree = ""; }; 51292E7F96A1AFFE4C821792 /* Pods-AutoLayoutTextViewsDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoLayoutTextViewsDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-AutoLayoutTextViewsDemo/Pods-AutoLayoutTextViewsDemo.release.xcconfig"; sourceTree = ""; }; + 65D127BDD1EEDFD8C0FF43B7 /* Pods-AutoLayoutTextViews-AutoLayoutTextViewsDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoLayoutTextViews-AutoLayoutTextViewsDemo.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-AutoLayoutTextViews-AutoLayoutTextViewsDemo/Pods-AutoLayoutTextViews-AutoLayoutTextViewsDemo.debug.xcconfig"; sourceTree = ""; }; 818333B692AE1B0E33029DB0 /* Pods-AutoLayoutTextViewsDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoLayoutTextViewsDemo.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-AutoLayoutTextViewsDemo/Pods-AutoLayoutTextViewsDemo.debug.xcconfig"; sourceTree = ""; }; 92D8DF861A09AB16006F106A /* ALAutoResizingTextViewTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALAutoResizingTextViewTableViewController.h; sourceTree = ""; }; 92D8DF871A09AB16006F106A /* ALAutoResizingTextViewTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALAutoResizingTextViewTableViewController.m; sourceTree = ""; }; @@ -50,6 +54,7 @@ buildActionMask = 2147483647; files = ( 815B5596A10C4D67A6634888 /* libPods-AutoLayoutTextViewsDemo.a in Frameworks */, + 0AC65AEF667A53D48F78FDDE /* libPods-AutoLayoutTextViews-AutoLayoutTextViewsDemo.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -63,6 +68,8 @@ 51292E7F96A1AFFE4C821792 /* Pods-AutoLayoutTextViewsDemo.release.xcconfig */, 818333B692AE1B0E33029DB0 /* Pods-AutoLayoutTextViewsDemo.debug.xcconfig */, 2BE76039C2C7EEA18CED60A5 /* Pods-AutoLayoutTextViewsDemo.release.xcconfig */, + 65D127BDD1EEDFD8C0FF43B7 /* Pods-AutoLayoutTextViews-AutoLayoutTextViewsDemo.debug.xcconfig */, + 2DFB6B9C62D372274CCEAB0B /* Pods-AutoLayoutTextViews-AutoLayoutTextViewsDemo.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -89,6 +96,7 @@ isa = PBXGroup; children = ( CCFC0BAE800147B481EB2390 /* libPods-AutoLayoutTextViewsDemo.a */, + 37CC977061B34842E205F1FA /* libPods-AutoLayoutTextViews-AutoLayoutTextViewsDemo.a */, ); name = Frameworks; sourceTree = ""; @@ -147,12 +155,12 @@ isa = PBXNativeTarget; buildConfigurationList = 4460853E194286690093A6FA /* Build configuration list for PBXNativeTarget "AutoLayoutTextViewsDemo" */; buildPhases = ( - 48AC5D1F2B7C490899E425E0 /* 📦 Check Pods Manifest.lock */, + 48AC5D1F2B7C490899E425E0 /* [CP] Check Pods Manifest.lock */, 44608508194286690093A6FA /* Sources */, 44608509194286690093A6FA /* Frameworks */, 4460850A194286690093A6FA /* Resources */, - FB9D0AA459E34F9F8F778979 /* 📦 Copy Pods Resources */, - 39008B6E526BA84E9FB17D67 /* 📦 Embed Pods Frameworks */, + FB9D0AA459E34F9F8F778979 /* [CP] Copy Pods Resources */, + 39008B6E526BA84E9FB17D67 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -205,14 +213,14 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 39008B6E526BA84E9FB17D67 /* 📦 Embed Pods Frameworks */ = { + 39008B6E526BA84E9FB17D67 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Embed Pods Frameworks"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -220,14 +228,14 @@ shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-AutoLayoutTextViewsDemo/Pods-AutoLayoutTextViewsDemo-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 48AC5D1F2B7C490899E425E0 /* 📦 Check Pods Manifest.lock */ = { + 48AC5D1F2B7C490899E425E0 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -235,14 +243,14 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - FB9D0AA459E34F9F8F778979 /* 📦 Copy Pods Resources */ = { + FB9D0AA459E34F9F8F778979 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; diff --git a/AutoLayoutTextViewsDemo/AutoLayoutTextViewsDemo/ALAutoResizingTextViewTableViewController.h b/AutoLayoutTextViewsDemo/AutoLayoutTextViewsDemo/ALAutoResizingTextViewTableViewController.h index e1e6e42..c982f15 100644 --- a/AutoLayoutTextViewsDemo/AutoLayoutTextViewsDemo/ALAutoResizingTextViewTableViewController.h +++ b/AutoLayoutTextViewsDemo/AutoLayoutTextViewsDemo/ALAutoResizingTextViewTableViewController.h @@ -9,7 +9,7 @@ #import #import -#import +#import "AutoLayoutTextViews.h" @interface ALAutoResizingTextViewTableViewController : UITableViewController diff --git a/AutoLayoutTextViewsDemo/AutoLayoutTextViewsDemo/Base.lproj/Main.storyboard b/AutoLayoutTextViewsDemo/AutoLayoutTextViewsDemo/Base.lproj/Main.storyboard index 97a8f43..d9c8baf 100644 --- a/AutoLayoutTextViewsDemo/AutoLayoutTextViewsDemo/Base.lproj/Main.storyboard +++ b/AutoLayoutTextViewsDemo/AutoLayoutTextViewsDemo/Base.lproj/Main.storyboard @@ -1,7 +1,8 @@ - + - + + @@ -19,11 +20,11 @@ - +