Skip to content
This repository has been archived by the owner on Apr 22, 2019. It is now read-only.

Add carthage support #128

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion class/HPTextViewInternal.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,15 @@ - (void)drawRect:(CGRect)rect
}
else {
[self.placeholderColor set];
[self.placeholder drawInRect:CGRectMake(8.0f, 8.0f, self.frame.size.width - 16.0f, self.frame.size.height - 16.0f) withFont:self.font];
CGRect rect = CGRectMake(8.0f, 8.0f, self.frame.size.width - 16.0f, self.frame.size.height - 16.0f);
if ([self.placeholder respondsToSelector:@selector(drawInRect:withAttributes:)]) {
[self.placeholder drawInRect:rect withAttributes:@{NSFontAttributeName: self.font}];
} else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[self.placeholder drawInRect:rect withFont:self.font];
#pragma clang diagnostic pop
}
}
}
}
Expand Down
214 changes: 214 additions & 0 deletions example/GrowingTextViewExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; };
28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };
28D7ACF80DDB3853001CB0EB /* GrowingTextViewExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* GrowingTextViewExampleViewController.m */; };
37F040EE1E39EAB000548C03 /* HPGrowingTextView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A5B30CA13EC633200DB7A65 /* HPGrowingTextView.h */; settings = {ATTRIBUTES = (Public, ); }; };
37F040EF1E39EAB000548C03 /* HPTextViewInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A5B30CC13EC633200DB7A65 /* HPTextViewInternal.h */; settings = {ATTRIBUTES = (Public, ); }; };
37F040F01E39EAC400548C03 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
37F040F11E39EAC900548C03 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
37F040F21E39EAD200548C03 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; };
37F040F31E39EADC00548C03 /* HPGrowingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A5B30CB13EC633200DB7A65 /* HPGrowingTextView.m */; };
37F040F41E39EADC00548C03 /* HPTextViewInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A5B30CD13EC633200DB7A65 /* HPTextViewInternal.m */; };
37F040F91E39EB1400548C03 /* HPGrowingTextViewUmbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 37F040F61E39EB1400548C03 /* HPGrowingTextViewUmbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
37F040FA1E39EB1400548C03 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 37F040F71E39EB1400548C03 /* Info.plist */; };
3A5B30CE13EC633200DB7A65 /* HPGrowingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A5B30CB13EC633200DB7A65 /* HPGrowingTextView.m */; };
3A5B30CF13EC633200DB7A65 /* HPTextViewInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A5B30CD13EC633200DB7A65 /* HPTextViewInternal.m */; };
3A6144DE17719E8500311E3E /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3A6144DD17719E8500311E3E /* Default-568h@2x.png */; };
Expand All @@ -39,6 +48,10 @@
28D7ACF70DDB3853001CB0EB /* GrowingTextViewExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GrowingTextViewExampleViewController.m; sourceTree = "<group>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
32CA4F630368D1EE00C91783 /* GrowingTextViewExample_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GrowingTextViewExample_Prefix.pch; sourceTree = "<group>"; };
37F040E51E39E95800548C03 /* HPGrowingTextView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HPGrowingTextView.framework; sourceTree = BUILT_PRODUCTS_DIR; };
37F040F61E39EB1400548C03 /* HPGrowingTextViewUmbrella.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HPGrowingTextViewUmbrella.h; sourceTree = "<group>"; };
37F040F71E39EB1400548C03 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
37F040F81E39EB1400548C03 /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = "<group>"; };
3A5B30CA13EC633200DB7A65 /* HPGrowingTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HPGrowingTextView.h; sourceTree = "<group>"; };
3A5B30CB13EC633200DB7A65 /* HPGrowingTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HPGrowingTextView.m; sourceTree = "<group>"; };
3A5B30CC13EC633200DB7A65 /* HPTextViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HPTextViewInternal.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -66,6 +79,16 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
37F040E11E39E95800548C03 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
37F040F21E39EAD200548C03 /* CoreGraphics.framework in Frameworks */,
37F040F11E39EAC900548C03 /* UIKit.framework in Frameworks */,
37F040F01E39EAC400548C03 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
Expand All @@ -85,6 +108,7 @@
isa = PBXGroup;
children = (
1D6058910D05DD3D006BFB54 /* GrowingTextViewExample.app */,
37F040E51E39E95800548C03 /* HPGrowingTextView.framework */,
);
name = Products;
sourceTree = "<group>";
Expand All @@ -95,6 +119,7 @@
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
37F040F51E39EB1400548C03 /* HPGrowingTextViewFramework */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
);
Expand Down Expand Up @@ -138,6 +163,16 @@
name = Frameworks;
sourceTree = "<group>";
};
37F040F51E39EB1400548C03 /* HPGrowingTextViewFramework */ = {
isa = PBXGroup;
children = (
37F040F61E39EB1400548C03 /* HPGrowingTextViewUmbrella.h */,
37F040F71E39EB1400548C03 /* Info.plist */,
37F040F81E39EB1400548C03 /* module.modulemap */,
);
path = HPGrowingTextViewFramework;
sourceTree = "<group>";
};
3A5B30C913EC633200DB7A65 /* HPGrowingTextView */ = {
isa = PBXGroup;
children = (
Expand All @@ -152,6 +187,19 @@
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
37F040E21E39E95800548C03 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
37F040EF1E39EAB000548C03 /* HPTextViewInternal.h in Headers */,
37F040F91E39EB1400548C03 /* HPGrowingTextViewUmbrella.h in Headers */,
37F040EE1E39EAB000548C03 /* HPGrowingTextView.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
1D6058900D05DD3D006BFB54 /* GrowingTextViewExample */ = {
isa = PBXNativeTarget;
Expand All @@ -170,13 +218,37 @@
productReference = 1D6058910D05DD3D006BFB54 /* GrowingTextViewExample.app */;
productType = "com.apple.product-type.application";
};
37F040E41E39E95800548C03 /* HPGrowingTextView */ = {
isa = PBXNativeTarget;
buildConfigurationList = 37F040EC1E39E95800548C03 /* Build configuration list for PBXNativeTarget "HPGrowingTextView" */;
buildPhases = (
37F040E01E39E95800548C03 /* Sources */,
37F040E11E39E95800548C03 /* Frameworks */,
37F040E21E39E95800548C03 /* Headers */,
37F040E31E39E95800548C03 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = HPGrowingTextView;
productName = HPGrowingTextView;
productReference = 37F040E51E39E95800548C03 /* HPGrowingTextView.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0460;
TargetAttributes = {
37F040E41E39E95800548C03 = {
CreatedOnToolsVersion = 8.2.1;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "GrowingTextViewExample" */;
compatibilityVersion = "Xcode 3.2";
Expand All @@ -193,6 +265,7 @@
projectRoot = "";
targets = (
1D6058900D05DD3D006BFB54 /* GrowingTextViewExample */,
37F040E41E39E95800548C03 /* HPGrowingTextView */,
);
};
/* End PBXProject section */
Expand All @@ -215,6 +288,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
37F040E31E39E95800548C03 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
37F040FA1E39EB1400548C03 /* Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand All @@ -230,6 +311,15 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
37F040E01E39E95800548C03 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
37F040F31E39EADC00548C03 /* HPGrowingTextView.m in Sources */,
37F040F41E39EADC00548C03 /* HPTextViewInternal.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
Expand Down Expand Up @@ -268,6 +358,122 @@
};
name = Release;
};
37F040EA1E39E95800548C03 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ANALYZER_NONNULL = YES;
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_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
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;
INFOPLIST_FILE = "$(SRCROOT)/HPGrowingTextViewFramework/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "$(SRCROOT)/HPGrowingTextViewFramework/module.modulemap";
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.HansPinckaers.HPGrowingTextView;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
37F040EB1E39E95800548C03 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ANALYZER_NONNULL = YES;
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_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
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;
INFOPLIST_FILE = "$(SRCROOT)/HPGrowingTextViewFramework/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "$(SRCROOT)/HPGrowingTextViewFramework/module.modulemap";
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.HansPinckaers.HPGrowingTextView;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -305,6 +511,14 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
37F040EC1E39E95800548C03 /* Build configuration list for PBXNativeTarget "HPGrowingTextView" */ = {
isa = XCConfigurationList;
buildConfigurations = (
37F040EA1E39E95800548C03 /* Debug */,
37F040EB1E39E95800548C03 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "GrowingTextViewExample" */ = {
isa = XCConfigurationList;
buildConfigurations = (
Expand Down
Loading