├── .swift-version ├── screenshot.gif ├── Example ├── Podfile ├── Pods │ ├── Target Support Files │ │ ├── ReadMoreTextView │ │ │ ├── ReadMoreTextView.modulemap │ │ │ ├── ReadMoreTextView-dummy.m │ │ │ ├── ReadMoreTextView-prefix.pch │ │ │ ├── ReadMoreTextView-umbrella.h │ │ │ ├── ReadMoreTextView.xcconfig │ │ │ └── Info.plist │ │ └── Pods-ReadMoreTextViewExample │ │ │ ├── Pods-ReadMoreTextViewExample.modulemap │ │ │ ├── Pods-ReadMoreTextViewExample-dummy.m │ │ │ ├── Pods-ReadMoreTextViewExample-umbrella.h │ │ │ ├── Pods-ReadMoreTextViewExample.debug.xcconfig │ │ │ ├── Pods-ReadMoreTextViewExample.release.xcconfig │ │ │ ├── Info.plist │ │ │ ├── Pods-ReadMoreTextViewExample-acknowledgements.markdown │ │ │ ├── Pods-ReadMoreTextViewExample-acknowledgements.plist │ │ │ ├── Pods-ReadMoreTextViewExample-frameworks.sh │ │ │ └── Pods-ReadMoreTextViewExample-resources.sh │ ├── Manifest.lock │ ├── Local Podspecs │ │ └── ReadMoreTextView.podspec.json │ └── Pods.xcodeproj │ │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── ReadMoreTextView.xcscheme │ │ └── project.pbxproj ├── ReadMoreTextView.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── project.pbxproj ├── ReadMoreTextView.xcworkspace │ └── contents.xcworkspacedata ├── Podfile.lock └── ReadMoreTextView │ ├── AppDelegate.swift │ ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Info.plist │ ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard │ └── ViewController.swift ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── ReadMoreTextView.podspec ├── README.md └── Sources ├── UITextView+Extensions.swift └── ReadMoreTextView.swift /.swift-version: -------------------------------------------------------------------------------- 1 | 4.0 2 | -------------------------------------------------------------------------------- /screenshot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilyapuchka/ReadMoreTextView/HEAD/screenshot.gif -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | target 'ReadMoreTextViewExample' 2 | 3 | use_frameworks! 4 | 5 | pod 'ReadMoreTextView', :path => '..' 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ReadMoreTextView/ReadMoreTextView.modulemap: -------------------------------------------------------------------------------- 1 | framework module ReadMoreTextView { 2 | umbrella header "ReadMoreTextView-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ReadMoreTextView/ReadMoreTextView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_ReadMoreTextView : NSObject 3 | @end 4 | @implementation PodsDummy_ReadMoreTextView 5 | @end 6 | -------------------------------------------------------------------------------- /Example/ReadMoreTextView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ReadMoreTextViewExample/Pods-ReadMoreTextViewExample.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_ReadMoreTextViewExample { 2 | umbrella header "Pods-ReadMoreTextViewExample-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ReadMoreTextViewExample/Pods-ReadMoreTextViewExample-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ReadMoreTextViewExample : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ReadMoreTextViewExample 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ReadMoreTextView/ReadMoreTextView-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/ReadMoreTextView.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ReadMoreTextView (1.2.1) 3 | 4 | DEPENDENCIES: 5 | - ReadMoreTextView (from `..`) 6 | 7 | EXTERNAL SOURCES: 8 | ReadMoreTextView: 9 | :path: .. 10 | 11 | SPEC CHECKSUMS: 12 | ReadMoreTextView: 289daabb6d028f89ffba131f3f5c068049d01351 13 | 14 | PODFILE CHECKSUM: 72daab87156ddc53981cfb66c0eac16103dd9957 15 | 16 | COCOAPODS: 1.2.0 17 | -------------------------------------------------------------------------------- /Example/ReadMoreTextView/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ReadMoreTextView 4 | // 5 | // Created by Ilya Puchka on 06.04.15. 6 | // Copyright (c) 2015 Ilya Puchka. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ReadMoreTextView (1.2.1) 3 | 4 | DEPENDENCIES: 5 | - ReadMoreTextView (from `..`) 6 | 7 | EXTERNAL SOURCES: 8 | ReadMoreTextView: 9 | :path: .. 10 | 11 | SPEC CHECKSUMS: 12 | ReadMoreTextView: 289daabb6d028f89ffba131f3f5c068049d01351 13 | 14 | PODFILE CHECKSUM: 72daab87156ddc53981cfb66c0eac16103dd9957 15 | 16 | COCOAPODS: 1.2.0 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ReadMoreTextView/ReadMoreTextView-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double ReadMoreTextViewVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char ReadMoreTextViewVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ReadMoreTextViewExample/Pods-ReadMoreTextViewExample-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_ReadMoreTextViewExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_ReadMoreTextViewExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | #Pods/ 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ReadMoreTextView/ReadMoreTextView.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/ReadMoreTextView 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ReadMoreTextViewExample/Pods-ReadMoreTextViewExample.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ReadMoreTextView" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/ReadMoreTextView/ReadMoreTextView.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "ReadMoreTextView" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ReadMoreTextViewExample/Pods-ReadMoreTextViewExample.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ReadMoreTextView" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/ReadMoreTextView/ReadMoreTextView.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "ReadMoreTextView" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ReadMoreTextView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.2.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ReadMoreTextViewExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/ReadMoreTextView/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | #CHANGELOG 2 | 3 | ##3.0.1 4 | 5 | - Swift 4.2 support 6 | - use `utf16` symbols count to place more & less buttons correctly in the HTML page. 7 | 8 | ##3.0.0 9 | 10 | - Swift 4 support 11 | 12 | ##2.0.0 13 | 14 | - dropped Swift 2.3 support 15 | - improved logic around size change callback 16 | 17 | ##1.2.1 18 | 19 | - fixed regression causing infinite layout loop 20 | 21 | ##1.2.0 22 | 23 | - fixed loosing data detector info when updating text 24 | - moved helper methods to public UITextView extension to easily add custom handling for toucher in arbitrary text ranges 25 | 26 | ##1.1.0 27 | 28 | - added `setNeedsUpdateTrim` method to force update trimming 29 | 30 | ### Fixed 31 | 32 | - fixed typo in `onSizeChange` method name 33 | - fixed setting attributed text on iOS 8 34 | - fixed `hitTest` 35 | 36 | ##1.0.0 37 | 38 | - added "read less" text capability 39 | - added callback when content size changes 40 | - added Swift 2.3 compatibility 41 | - removed some unneeded methods and cleaned up code in general 42 | 43 | 44 | ##0.0.1 45 | 46 | Initial release 47 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/ReadMoreTextView.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ReadMoreTextView", 3 | "version": "1.2.1", 4 | "summary": "UITextView subclass with \"read more\"/\"read less\" capabilities and UITextView extensions to handle touches in characters range.", 5 | "description": "UITextView subclass with \"Read more\" behavior.\nUITextView extensions to handle touches in characters range. \n\n* Set \"read more\"/\"read less\" text as a String or NSAttributedString\n* Set maximum number of lines to display\n* Turn trim on/off\n* Live updates and setup in Interface Builder\n* Use UITextView extension methods to detect touches in arbitrary text ranges.", 6 | "homepage": "http://ilya.puchka.me/custom-uitextview-in-swift/", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "Ilya Puchka": "ilya@puchka.me" 13 | }, 14 | "social_media_url": "http://twitter.com/ilyapuchka", 15 | "platforms": { 16 | "ios": "8.0" 17 | }, 18 | "source": { 19 | "git": "https://github.com/ilyapuchka/ReadMoreTextView.git", 20 | "tag": "1.2.1" 21 | }, 22 | "source_files": "Sources/*.swift" 23 | } 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2016 Ilya Puchka 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /ReadMoreTextView.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | 3 | s.name = "ReadMoreTextView" 4 | s.version = "3.0.1" 5 | s.summary = 'UITextView subclass with "read more"/"read less" capabilities and UITextView extensions to handle touches in characters range.' 6 | 7 | s.description = <<-DESC 8 | UITextView subclass with "Read more" behavior. 9 | UITextView extensions to handle touches in characters range. 10 | 11 | * Set "read more"/"read less" text as a String or NSAttributedString 12 | * Set maximum number of lines to display 13 | * Turn trim on/off 14 | * Live updates and setup in Interface Builder 15 | * Use UITextView extension methods to detect touches in arbitrary text ranges. 16 | DESC 17 | 18 | s.homepage = "http://ilya.puchka.me/custom-uitextview-in-swift/" 19 | 20 | s.license = { :type => "MIT", :file => "LICENSE" } 21 | 22 | s.author = { "Ilya Puchka" => "ilya@puchka.me" } 23 | s.social_media_url = "http://twitter.com/ilyapuchka" 24 | 25 | s.platform = :ios, "8.0" 26 | 27 | s.source = { :git => "https://github.com/ilyapuchka/ReadMoreTextView.git", :tag => s.version } 28 | 29 | s.source_files = "Sources/*.swift" 30 | 31 | end 32 | -------------------------------------------------------------------------------- /Example/ReadMoreTextView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ReadMoreTextViewExample/Pods-ReadMoreTextViewExample-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## ReadMoreTextView 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) 2015-2016 Ilya Puchka 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | 29 | Generated by CocoaPods - https://cocoapods.org 30 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ReadMoreTextViewExample/Pods-ReadMoreTextViewExample-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | The MIT License (MIT) 18 | 19 | Copyright (c) 2015-2016 Ilya Puchka 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | 40 | License 41 | MIT 42 | Title 43 | ReadMoreTextView 44 | Type 45 | PSGroupSpecifier 46 | 47 | 48 | FooterText 49 | Generated by CocoaPods - https://cocoapods.org 50 | Title 51 | 52 | Type 53 | PSGroupSpecifier 54 | 55 | 56 | StringsTable 57 | Acknowledgements 58 | Title 59 | Acknowledgements 60 | 61 | 62 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/) 2 | [![Version](https://img.shields.io/cocoapods/v/ReadMoreTextView.svg?style=flat)](http://cocoapods.org/pods/ReadMoreTextView) 3 | [![License](https://img.shields.io/cocoapods/l/ReadMoreTextView.svg?style=flat)](http://cocoapods.org/pods/ReadMoreTextView) 4 | [![Platform](https://img.shields.io/cocoapods/p/ReadMoreTextView.svg?style=flat)](http://cocoapods.org/pods/ReadMoreTextView) 5 | [![Swift Version](https://img.shields.io/badge/Swift-4-F16D39.svg?style=flat)](https://developer.apple.com/swift) 6 | 7 | # ReadMoreTextView 8 | 9 | UITextView subclass with "read more"/"read less" capabilities and UITextView extensions to handle touches in characters range. 10 | 11 | ![](screenshot.gif) 12 | 13 | ## Usage 14 | 15 | let textView = ReadMoreTextView() 16 | 17 | textView.text = "Lorem ipsum dolor ..." 18 | 19 | textView.shouldTrim = true 20 | textView.maximumNumberOfLines = 4 21 | textView.attributedReadMoreText = NSAttributedString(string: "... Read more") 22 | textView.attributedReadLessText = NSAttributedString(string: " Read less") 23 | 24 | ## Custom touches handling. 25 | 26 | This project also includes few helper methods that will allow you to detect and handle touches in arbitrary text ranges. This way you can for exapmle implement custom links handling in your `UITextView` subclass. `ReadMoreTextView` uses these methods itself to detect touches in "read more"/"read less" action areas. 27 | 28 | ```swift 29 | 30 | extension UITextView { 31 | 32 | /** 33 | Calls provided `test` block if point is in gliph range and there is no link detected at this point. 34 | Will pass in to `test` a character index that corresponds to `point`. 35 | Return `self` in `test` if text view should intercept the touch event or `nil` otherwise. 36 | */ 37 | public func hitTest(pointInGliphRange:event:test:) -> UIView? 38 | 39 | /** 40 | Returns true if point is in text bounding rect adjusted with padding. 41 | Bounding rect will be enlarged with positive padding values and decreased with negative values. 42 | */ 43 | public func pointIsInTextRange(point:range:padding:) -> Bool 44 | 45 | /** 46 | Returns index of character for glyph at provided point. Returns `nil` if point is out of any glyph. 47 | */ 48 | public func charIndexForPointInGlyphRect(point:) -> Int? 49 | 50 | } 51 | 52 | extension NSLayoutManager { 53 | 54 | /** 55 | Returns characters range that completely fits into container. 56 | */ 57 | public func characterRangeThatFits(textContainer:) -> NSRange 58 | 59 | /** 60 | Returns bounding rect in provided container for characters in provided range. 61 | */ 62 | public func boundingRectForCharacterRange(range:inTextContainer:) -> CGRect 63 | 64 | } 65 | 66 | ``` 67 | 68 | 69 | ## Installation 70 | 71 | Available in [Cocoa Pods](https://github.com/CocoaPods/CocoaPods): 72 | 73 | ` pod 'ReadMoreTextView' ` 74 | 75 | ## License 76 | 77 | ReadMoreTextView is available under the [MIT license](http://www.opensource.org/licenses/mit-license.php). 78 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/ReadMoreTextView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 47 | 48 | 54 | 55 | 56 | 57 | 58 | 59 | 65 | 66 | 72 | 73 | 74 | 75 | 77 | 78 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /Sources/UITextView+Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ReadMoreTextView.swift 3 | // ReadMoreTextView 4 | // 5 | // Created by Ilya Puchka on 06.04.15. 6 | // Copyright (c) 2015 - 2016 Ilya Puchka. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UITextView { 12 | 13 | /** 14 | Calls provided `test` block if point is in gliph range and there is no link detected at this point. 15 | Will pass in to `test` a character index that corresponds to `point`. 16 | Return `self` in `test` if text view should intercept the touch event or `nil` otherwise. 17 | */ 18 | public func hitTest(pointInGliphRange aPoint: CGPoint, event: UIEvent?, test: (Int) -> UIView?) -> UIView? { 19 | guard let charIndex = charIndexForPointInGlyphRect(point: aPoint) else { 20 | return super.hitTest(aPoint, with: event) 21 | } 22 | guard textStorage.attribute(NSAttributedString.Key.link, at: charIndex, effectiveRange: nil) == nil else { 23 | return super.hitTest(aPoint, with: event) 24 | } 25 | return test(charIndex) 26 | } 27 | 28 | /** 29 | Returns true if point is in text bounding rect adjusted with padding. 30 | Bounding rect will be enlarged with positive padding values and decreased with negative values. 31 | */ 32 | public func pointIsInTextRange(point aPoint: CGPoint, range: NSRange, padding: UIEdgeInsets) -> Bool { 33 | var boundingRect = layoutManager.boundingRectForCharacterRange(range: range, inTextContainer: textContainer) 34 | boundingRect = boundingRect.offsetBy(dx: textContainerInset.left, dy: textContainerInset.top) 35 | boundingRect = boundingRect.insetBy(dx: -(padding.left + padding.right), dy: -(padding.top + padding.bottom)) 36 | return boundingRect.contains(aPoint) 37 | } 38 | 39 | /** 40 | Returns index of character for glyph at provided point. Returns `nil` if point is out of any glyph. 41 | */ 42 | public func charIndexForPointInGlyphRect(point aPoint: CGPoint) -> Int? { 43 | let point = CGPoint(x: aPoint.x, y: aPoint.y - textContainerInset.top) 44 | let glyphIndex = layoutManager.glyphIndex(for: point, in: textContainer) 45 | let glyphRect = layoutManager.boundingRect(forGlyphRange: NSMakeRange(glyphIndex, 1), in: textContainer) 46 | if glyphRect.contains(point) { 47 | return layoutManager.characterIndexForGlyph(at: glyphIndex) 48 | } else { 49 | return nil 50 | } 51 | } 52 | 53 | } 54 | 55 | extension NSLayoutManager { 56 | 57 | /** 58 | Returns characters range that completely fits into container. 59 | */ 60 | public func characterRangeThatFits(textContainer container: NSTextContainer) -> NSRange { 61 | var rangeThatFits = self.glyphRange(for: container) 62 | rangeThatFits = self.characterRange(forGlyphRange: rangeThatFits, actualGlyphRange: nil) 63 | return rangeThatFits 64 | } 65 | 66 | /** 67 | Returns bounding rect in provided container for characters in provided range. 68 | */ 69 | public func boundingRectForCharacterRange(range aRange: NSRange, inTextContainer container: NSTextContainer) -> CGRect { 70 | let glyphRange = self.glyphRange(forCharacterRange: aRange, actualCharacterRange: nil) 71 | let boundingRect = self.boundingRect(forGlyphRange: glyphRange, in: container) 72 | return boundingRect 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /Example/ReadMoreTextView/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ReadMoreTextViewExample/Pods-ReadMoreTextViewExample-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | 91 | if [[ "$CONFIGURATION" == "Debug" ]]; then 92 | install_framework "$BUILT_PRODUCTS_DIR/ReadMoreTextView/ReadMoreTextView.framework" 93 | fi 94 | if [[ "$CONFIGURATION" == "Release" ]]; then 95 | install_framework "$BUILT_PRODUCTS_DIR/ReadMoreTextView/ReadMoreTextView.framework" 96 | fi 97 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 98 | wait 99 | fi 100 | -------------------------------------------------------------------------------- /Example/ReadMoreTextView/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // ReadMoreTextView 4 | // 5 | // Created by Ilya Puchka on 06.04.15. 6 | // Copyright (c) 2015 Ilya Puchka. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import ReadMoreTextView 11 | 12 | class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { 13 | 14 | @IBOutlet weak var topReadMoreTextView: ReadMoreTextView! 15 | @IBOutlet weak var readMoreTextView: ReadMoreTextView! 16 | @IBOutlet weak var tableView: UITableView! { 17 | didSet { 18 | tableView.estimatedRowHeight = 100 19 | tableView.rowHeight = UITableViewAutomaticDimension 20 | } 21 | } 22 | 23 | override func viewDidLoad() { 24 | super.viewDidLoad() 25 | 26 | readMoreTextView.text = "👨‍👩‍👧‍👦👨‍👩‍👧‍👦👨‍👩‍👧‍👦👨‍👩‍👧‍👦 Lorem http://ipsum.com dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda." 27 | let readMoreTextAttributes: [NSAttributedStringKey: Any] = [ 28 | NSAttributedStringKey.foregroundColor: view.tintColor, 29 | NSAttributedStringKey.font: UIFont.boldSystemFont(ofSize: 16) 30 | ] 31 | let readLessTextAttributes = [ 32 | NSAttributedStringKey.foregroundColor: UIColor.red, 33 | NSAttributedStringKey.font: UIFont.italicSystemFont(ofSize: 16) 34 | ] 35 | readMoreTextView.attributedReadMoreText = NSAttributedString(string: "... Read more", attributes: readMoreTextAttributes) 36 | readMoreTextView.attributedReadLessText = NSAttributedString(string: " Read less", attributes: readLessTextAttributes) 37 | readMoreTextView.maximumNumberOfLines = 6 38 | readMoreTextView.shouldTrim = true 39 | } 40 | 41 | override func viewDidLayoutSubviews() { 42 | tableView.reloadData() 43 | } 44 | 45 | var expandedCells = Set() 46 | 47 | @IBAction func toggleTrim(_ sender: UIButton) { 48 | readMoreTextView.shouldTrim = !readMoreTextView.shouldTrim 49 | } 50 | 51 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 52 | return 50 53 | } 54 | 55 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 56 | let cell = tableView.dequeueReusableCell(withIdentifier: "ReadMoreCell", for: indexPath) 57 | let readMoreTextView = cell.contentView.viewWithTag(1) as! ReadMoreTextView 58 | readMoreTextView.shouldTrim = !expandedCells.contains(indexPath.row) 59 | readMoreTextView.setNeedsUpdateTrim() 60 | readMoreTextView.layoutIfNeeded() 61 | return cell 62 | } 63 | 64 | func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { 65 | let readMoreTextView = cell.contentView.viewWithTag(1) as! ReadMoreTextView 66 | readMoreTextView.onSizeChange = { [unowned tableView, unowned self] r in 67 | let point = tableView.convert(r.bounds.origin, from: r) 68 | guard let indexPath = tableView.indexPathForRow(at: point) else { return } 69 | if r.shouldTrim { 70 | self.expandedCells.remove(indexPath.row) 71 | } else { 72 | self.expandedCells.insert(indexPath.row) 73 | } 74 | tableView.reloadData() 75 | } 76 | } 77 | 78 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 79 | let cell = tableView.cellForRow(at: indexPath)! 80 | let readMoreTextView = cell.contentView.viewWithTag(1) as! ReadMoreTextView 81 | readMoreTextView.shouldTrim = !readMoreTextView.shouldTrim 82 | } 83 | 84 | override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { 85 | coordinator.animate(alongsideTransition: {_ in 86 | self.readMoreTextView.setNeedsUpdateTrim() 87 | self.topReadMoreTextView.setNeedsUpdateTrim() 88 | }, completion: nil) 89 | } 90 | 91 | } 92 | 93 | class ReadMoreCell : UITableViewCell { 94 | 95 | @IBOutlet weak var readMoreTextView: ReadMoreTextView! 96 | 97 | override func awakeFromNib() { 98 | super.awakeFromNib() 99 | } 100 | 101 | override func prepareForReuse() { 102 | super.prepareForReuse() 103 | 104 | readMoreTextView.onSizeChange = { _ in } 105 | readMoreTextView.shouldTrim = true 106 | } 107 | 108 | } 109 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ReadMoreTextViewExample/Pods-ReadMoreTextViewExample-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | *) 25 | TARGET_DEVICE_ARGS="--target-device mac" 26 | ;; 27 | esac 28 | 29 | install_resource() 30 | { 31 | if [[ "$1" = /* ]] ; then 32 | RESOURCE_PATH="$1" 33 | else 34 | RESOURCE_PATH="${PODS_ROOT}/$1" 35 | fi 36 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 37 | cat << EOM 38 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 39 | EOM 40 | exit 1 41 | fi 42 | case $RESOURCE_PATH in 43 | *.storyboard) 44 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 45 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 46 | ;; 47 | *.xib) 48 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 49 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 50 | ;; 51 | *.framework) 52 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 53 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 54 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 55 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | ;; 57 | *.xcdatamodel) 58 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 59 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 60 | ;; 61 | *.xcdatamodeld) 62 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 63 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 64 | ;; 65 | *.xcmappingmodel) 66 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 67 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 68 | ;; 69 | *.xcassets) 70 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 71 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 72 | ;; 73 | *) 74 | echo "$RESOURCE_PATH" 75 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 76 | ;; 77 | esac 78 | } 79 | 80 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 82 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 83 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | fi 86 | rm -f "$RESOURCES_TO_COPY" 87 | 88 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 89 | then 90 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 91 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 92 | while read line; do 93 | if [[ $line != "${PODS_ROOT}*" ]]; then 94 | XCASSET_FILES+=("$line") 95 | fi 96 | done <<<"$OTHER_XCASSETS" 97 | 98 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | fi 100 | -------------------------------------------------------------------------------- /Example/ReadMoreTextView/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /Sources/ReadMoreTextView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ReadMoreTextView.swift 3 | // ReadMoreTextView 4 | // 5 | // Created by Ilya Puchka on 06.04.15. 6 | // Copyright (c) 2015 - 2016 Ilya Puchka. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | /** 12 | UITextView subclass that adds "read more"/"read less" capabilities. 13 | Disables scrolling and editing, so do not set these properties to true. 14 | */ 15 | @IBDesignable 16 | public class ReadMoreTextView: UITextView { 17 | 18 | public override init(frame: CGRect, textContainer: NSTextContainer?) { 19 | readMoreTextPadding = .zero 20 | readLessTextPadding = .zero 21 | super.init(frame: frame, textContainer: textContainer) 22 | setupDefaults() 23 | } 24 | 25 | public convenience init(frame: CGRect) { 26 | self.init(frame: frame, textContainer: nil) 27 | } 28 | 29 | public convenience init() { 30 | self.init(frame: CGRect.zero, textContainer: nil) 31 | } 32 | 33 | public required init?(coder aDecoder: NSCoder) { 34 | readMoreTextPadding = .zero 35 | readLessTextPadding = .zero 36 | super.init(coder: aDecoder) 37 | setupDefaults() 38 | } 39 | 40 | func setupDefaults() { 41 | let defaultReadMoreText = NSLocalizedString("ReadMoreTextView.readMore", value: "more", comment: "") 42 | let attributedReadMoreText = NSMutableAttributedString(string: "... ") 43 | 44 | readMoreTextPadding = .zero 45 | readLessTextPadding = .zero 46 | isScrollEnabled = false 47 | isEditable = false 48 | 49 | let attributedDefaultReadMoreText = NSAttributedString(string: defaultReadMoreText, attributes: [ 50 | NSAttributedString.Key.foregroundColor: UIColor.lightGray, 51 | NSAttributedString.Key.font: font ?? UIFont.systemFont(ofSize: 14) 52 | ]) 53 | attributedReadMoreText.append(attributedDefaultReadMoreText) 54 | self.attributedReadMoreText = attributedReadMoreText 55 | } 56 | 57 | /**Block to be invoked when text view changes its content size.*/ 58 | public var onSizeChange: (ReadMoreTextView)->() = { _ in } 59 | 60 | /** 61 | The maximum number of lines that the text view can display. If text does not fit that number it will be trimmed. 62 | Default is `0` which means that no text will be never trimmed. 63 | */ 64 | @IBInspectable 65 | public var maximumNumberOfLines: Int = 0 { 66 | didSet { 67 | _originalMaximumNumberOfLines = maximumNumberOfLines 68 | setNeedsLayout() 69 | } 70 | } 71 | 72 | /**The text to trim the original text. Setting this property resets `attributedReadMoreText`.*/ 73 | @IBInspectable 74 | public var readMoreText: String? { 75 | get { 76 | return attributedReadMoreText?.string 77 | } 78 | set { 79 | if let text = newValue { 80 | attributedReadMoreText = attributedStringWithDefaultAttributes(from: text) 81 | } else { 82 | attributedReadMoreText = nil 83 | } 84 | } 85 | } 86 | 87 | /**The attributed text to trim the original text. Setting this property resets `readMoreText`.*/ 88 | public var attributedReadMoreText: NSAttributedString? { 89 | didSet { 90 | setNeedsLayout() 91 | } 92 | } 93 | 94 | /** 95 | The text to append to the original text when not trimming. 96 | */ 97 | @IBInspectable 98 | public var readLessText: String? { 99 | get { 100 | return attributedReadLessText?.string 101 | } 102 | set { 103 | if let text = newValue { 104 | attributedReadLessText = attributedStringWithDefaultAttributes(from: text) 105 | } else { 106 | attributedReadLessText = nil 107 | } 108 | } 109 | } 110 | 111 | /** 112 | The attributed text to append to the original text when not trimming. 113 | */ 114 | public var attributedReadLessText: NSAttributedString? { 115 | didSet { 116 | setNeedsLayout() 117 | } 118 | } 119 | 120 | /** 121 | A Boolean that controls whether the text view should trim it's content to fit the `maximumNumberOfLines`. 122 | The default value is `false`. 123 | */ 124 | @IBInspectable 125 | public var shouldTrim: Bool = false { 126 | didSet { 127 | guard shouldTrim != oldValue else { return } 128 | 129 | if shouldTrim { 130 | maximumNumberOfLines = _originalMaximumNumberOfLines 131 | } else { 132 | let _maximumNumberOfLines = maximumNumberOfLines 133 | maximumNumberOfLines = 0 134 | _originalMaximumNumberOfLines = _maximumNumberOfLines 135 | } 136 | cachedIntrinsicContentHeight = nil 137 | setNeedsLayout() 138 | } 139 | } 140 | 141 | /** 142 | Force to update trimming on the next layout pass. To update right away call `layoutIfNeeded` right after. 143 | */ 144 | public func setNeedsUpdateTrim() { 145 | _needsUpdateTrim = true 146 | setNeedsLayout() 147 | } 148 | 149 | /** 150 | A padding around "read more" text to adjust touchable area. 151 | If text is trimmed touching in this area will change `shouldTream` to `false` and remove trimming. 152 | That will cause text view to change it's content size. Use `onSizeChange` to adjust layout on that event. 153 | */ 154 | public var readMoreTextPadding: UIEdgeInsets 155 | 156 | /** 157 | A padding around "read less" text to adjust touchable area. 158 | If text is not trimmed and `readLessText` or `attributedReadLessText` is set touching in this area 159 | will change `shouldTream` to `true` and cause trimming. That will cause text view to change it's content size. 160 | Use `onSizeChange` to adjust layout on that event. 161 | */ 162 | public var readLessTextPadding: UIEdgeInsets 163 | 164 | public override var text: String! { 165 | didSet { 166 | if let text = text { 167 | _originalAttributedText = attributedStringWithDefaultAttributes(from: text) 168 | } else { 169 | _originalAttributedText = nil 170 | } 171 | } 172 | } 173 | 174 | public override var attributedText: NSAttributedString! { 175 | willSet { 176 | if #available(iOS 9.0, *) { return } 177 | //on iOS 8 text view should be selectable to properly set attributed text 178 | if newValue != nil { 179 | isSelectable = true 180 | } 181 | } 182 | didSet { 183 | _originalAttributedText = attributedText 184 | } 185 | } 186 | 187 | public override func layoutSubviews() { 188 | super.layoutSubviews() 189 | 190 | if _needsUpdateTrim { 191 | //reset text to force update trim 192 | attributedText = _originalAttributedText 193 | _needsUpdateTrim = false 194 | } 195 | needsTrim() ? showLessText() : showMoreText() 196 | } 197 | 198 | public override var intrinsicContentSize : CGSize { 199 | textContainer.size = CGSize(width: bounds.size.width, height: CGFloat.greatestFiniteMagnitude) 200 | var intrinsicContentSize = layoutManager.boundingRect(forGlyphRange: layoutManager.glyphRange(for: textContainer), in: textContainer).size 201 | intrinsicContentSize.width = UIView.noIntrinsicMetric 202 | intrinsicContentSize.height += (textContainerInset.top + textContainerInset.bottom) 203 | intrinsicContentSize.height = ceil(intrinsicContentSize.height) 204 | return intrinsicContentSize 205 | } 206 | 207 | private var intrinsicContentHeight: CGFloat { 208 | return intrinsicContentSize.height 209 | } 210 | 211 | private var cachedIntrinsicContentHeight: CGFloat? 212 | 213 | public override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { 214 | return hitTest(pointInGliphRange: point, event: event) { _ in 215 | guard pointIsInReadMoreOrReadLessTextRange(point: point) != nil else { return nil } 216 | return self 217 | } 218 | } 219 | 220 | public override func touchesEnded(_ touches: Set, with event: UIEvent?) { 221 | if let point = touches.first?.location(in: self) { 222 | shouldTrim = pointIsInReadMoreOrReadLessTextRange(point: point) ?? shouldTrim 223 | } 224 | super.touchesEnded(touches, with: event) 225 | } 226 | 227 | //MARK: Private methods 228 | 229 | private var _needsUpdateTrim = false 230 | private var _originalMaximumNumberOfLines: Int = 0 231 | private var _originalAttributedText: NSAttributedString! 232 | private var _originalTextLength: Int { 233 | get { 234 | return _originalAttributedText?.string.length ?? 0 235 | } 236 | } 237 | 238 | private func attributedStringWithDefaultAttributes(from text: String) -> NSAttributedString { 239 | return NSAttributedString(string: text, attributes: [ 240 | NSAttributedString.Key.font: font ?? UIFont.systemFont(ofSize: 14), 241 | NSAttributedString.Key.foregroundColor: textColor ?? UIColor.black 242 | ]) 243 | } 244 | 245 | private func needsTrim() -> Bool { 246 | return shouldTrim && readMoreText != nil 247 | } 248 | 249 | private func showLessText() { 250 | if let readMoreText = readMoreText, text.hasSuffix(readMoreText) { return } 251 | 252 | shouldTrim = true 253 | textContainer.maximumNumberOfLines = maximumNumberOfLines 254 | 255 | layoutManager.invalidateLayout(forCharacterRange: layoutManager.characterRangeThatFits(textContainer: textContainer), actualCharacterRange: nil) 256 | textContainer.size = CGSize(width: bounds.size.width, height: CGFloat.greatestFiniteMagnitude) 257 | 258 | if let text = attributedReadMoreText { 259 | let range = rangeToReplaceWithReadMoreText() 260 | guard range.location != NSNotFound else { return } 261 | 262 | textStorage.replaceCharacters(in: range, with: text) 263 | } 264 | 265 | invalidateIntrinsicContentSize() 266 | invokeOnSizeChangeIfNeeded() 267 | } 268 | 269 | private func showMoreText() { 270 | if let readLessText = readLessText, text.hasSuffix(readLessText) { return } 271 | 272 | shouldTrim = false 273 | textContainer.maximumNumberOfLines = 0 274 | 275 | if let originalAttributedText = _originalAttributedText?.mutableCopy() as? NSMutableAttributedString { 276 | attributedText = _originalAttributedText 277 | let range = NSRange(location: 0, length: text.length) 278 | if let attributedReadLessText = attributedReadLessText { 279 | originalAttributedText.append(attributedReadLessText) 280 | } 281 | textStorage.replaceCharacters(in: range, with: originalAttributedText) 282 | } 283 | 284 | invalidateIntrinsicContentSize() 285 | invokeOnSizeChangeIfNeeded() 286 | } 287 | 288 | private func invokeOnSizeChangeIfNeeded() { 289 | if let cachedIntrinsicContentHeight = cachedIntrinsicContentHeight { 290 | if intrinsicContentHeight != cachedIntrinsicContentHeight { 291 | self.cachedIntrinsicContentHeight = intrinsicContentHeight 292 | onSizeChange(self) 293 | } 294 | } else { 295 | self.cachedIntrinsicContentHeight = intrinsicContentHeight 296 | onSizeChange(self) 297 | } 298 | } 299 | 300 | private func rangeToReplaceWithReadMoreText() -> NSRange { 301 | let rangeThatFitsContainer = layoutManager.characterRangeThatFits(textContainer: textContainer) 302 | if NSMaxRange(rangeThatFitsContainer) == _originalTextLength { 303 | return NSMakeRange(NSNotFound, 0) 304 | } 305 | else { 306 | let lastCharacterIndex = characterIndexBeforeTrim(range: rangeThatFitsContainer) 307 | if lastCharacterIndex > 0 { 308 | return NSMakeRange(lastCharacterIndex, textStorage.string.length - lastCharacterIndex) 309 | } 310 | else { 311 | return NSMakeRange(NSNotFound, 0) 312 | } 313 | } 314 | } 315 | 316 | private func characterIndexBeforeTrim(range rangeThatFits: NSRange) -> Int { 317 | if let text = attributedReadMoreText { 318 | let readMoreBoundingRect = attributedReadMoreText(text: text, boundingRectThatFits: textContainer.size) 319 | let lastCharacterRect = layoutManager.boundingRectForCharacterRange(range: NSMakeRange(NSMaxRange(rangeThatFits)-1, 1), inTextContainer: textContainer) 320 | var point = lastCharacterRect.origin 321 | point.x = textContainer.size.width - ceil(readMoreBoundingRect.size.width) 322 | let glyphIndex = layoutManager.glyphIndex(for: point, in: textContainer, fractionOfDistanceThroughGlyph: nil) 323 | let characterIndex = layoutManager.characterIndexForGlyph(at: glyphIndex) 324 | return characterIndex - 1 325 | } else { 326 | return NSMaxRange(rangeThatFits) - readMoreText!.length 327 | } 328 | } 329 | 330 | private func attributedReadMoreText(text aText: NSAttributedString, boundingRectThatFits size: CGSize) -> CGRect { 331 | let textContainer = NSTextContainer(size: size) 332 | let textStorage = NSTextStorage(attributedString: aText) 333 | let layoutManager = NSLayoutManager() 334 | layoutManager.addTextContainer(textContainer) 335 | textStorage.addLayoutManager(layoutManager) 336 | let readMoreBoundingRect = layoutManager.boundingRectForCharacterRange(range: NSMakeRange(0, text.length), inTextContainer: textContainer) 337 | return readMoreBoundingRect 338 | } 339 | 340 | private func readMoreTextRange() -> NSRange { 341 | var readMoreTextRange = rangeToReplaceWithReadMoreText() 342 | if readMoreTextRange.location != NSNotFound { 343 | readMoreTextRange.length = readMoreText!.length + 1 344 | } 345 | return readMoreTextRange 346 | } 347 | 348 | private func readLessTextRange() -> NSRange { 349 | return NSRange(location: _originalTextLength, length: readLessText!.length + 1) 350 | } 351 | 352 | private func pointIsInReadMoreOrReadLessTextRange(point aPoint: CGPoint) -> Bool? { 353 | if needsTrim() && pointIsInTextRange(point: aPoint, range: readMoreTextRange(), padding: readMoreTextPadding) { 354 | return false 355 | } else if readLessText != nil && pointIsInTextRange(point: aPoint, range: readLessTextRange(), padding: readLessTextPadding) { 356 | return true 357 | } 358 | return nil 359 | } 360 | 361 | } 362 | 363 | extension String { 364 | var length: Int { 365 | return utf16.count 366 | } 367 | } 368 | -------------------------------------------------------------------------------- /Example/ReadMoreTextView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 094F385D1AD1DD6E00BCD70D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 094F385C1AD1DD6E00BCD70D /* AppDelegate.swift */; }; 11 | 094F385F1AD1DD6E00BCD70D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 094F385E1AD1DD6E00BCD70D /* ViewController.swift */; }; 12 | 094F38621AD1DD6E00BCD70D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 094F38601AD1DD6E00BCD70D /* Main.storyboard */; }; 13 | 094F38641AD1DD6E00BCD70D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 094F38631AD1DD6E00BCD70D /* Images.xcassets */; }; 14 | 094F38671AD1DD6E00BCD70D /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 094F38651AD1DD6E00BCD70D /* LaunchScreen.xib */; }; 15 | 4BA60EAA9E49C9F33187FAA4 /* Pods_ReadMoreTextViewExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 481361E09D26A602BE5C1B45 /* Pods_ReadMoreTextViewExample.framework */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 094F38571AD1DD6E00BCD70D /* ReadMoreTextViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ReadMoreTextViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 20 | 094F385B1AD1DD6E00BCD70D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 21 | 094F385C1AD1DD6E00BCD70D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 22 | 094F385E1AD1DD6E00BCD70D /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 23 | 094F38611AD1DD6E00BCD70D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 24 | 094F38631AD1DD6E00BCD70D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 25 | 094F38661AD1DD6E00BCD70D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 26 | 481361E09D26A602BE5C1B45 /* Pods_ReadMoreTextViewExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ReadMoreTextViewExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 27 | 7C937E2F4988BFA784F501EA /* Pods-ReadMoreTextViewExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReadMoreTextViewExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ReadMoreTextViewExample/Pods-ReadMoreTextViewExample.debug.xcconfig"; sourceTree = ""; }; 28 | A015F18144C48980B24F9D27 /* Pods-ReadMoreTextViewExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReadMoreTextViewExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-ReadMoreTextViewExample/Pods-ReadMoreTextViewExample.release.xcconfig"; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | 094F38541AD1DD6E00BCD70D /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | 4BA60EAA9E49C9F33187FAA4 /* Pods_ReadMoreTextViewExample.framework in Frameworks */, 37 | ); 38 | runOnlyForDeploymentPostprocessing = 0; 39 | }; 40 | /* End PBXFrameworksBuildPhase section */ 41 | 42 | /* Begin PBXGroup section */ 43 | 094F384E1AD1DD6E00BCD70D = { 44 | isa = PBXGroup; 45 | children = ( 46 | 094F38591AD1DD6E00BCD70D /* ReadMoreTextView */, 47 | 094F38581AD1DD6E00BCD70D /* Products */, 48 | E72E4B2B844AC1C39FF268E0 /* Pods */, 49 | 7342E6F06149117E2842EF5C /* Frameworks */, 50 | ); 51 | sourceTree = ""; 52 | }; 53 | 094F38581AD1DD6E00BCD70D /* Products */ = { 54 | isa = PBXGroup; 55 | children = ( 56 | 094F38571AD1DD6E00BCD70D /* ReadMoreTextViewExample.app */, 57 | ); 58 | name = Products; 59 | sourceTree = ""; 60 | }; 61 | 094F38591AD1DD6E00BCD70D /* ReadMoreTextView */ = { 62 | isa = PBXGroup; 63 | children = ( 64 | 094F385C1AD1DD6E00BCD70D /* AppDelegate.swift */, 65 | 094F385E1AD1DD6E00BCD70D /* ViewController.swift */, 66 | 094F38601AD1DD6E00BCD70D /* Main.storyboard */, 67 | 094F38631AD1DD6E00BCD70D /* Images.xcassets */, 68 | 094F38651AD1DD6E00BCD70D /* LaunchScreen.xib */, 69 | 094F385A1AD1DD6E00BCD70D /* Supporting Files */, 70 | ); 71 | path = ReadMoreTextView; 72 | sourceTree = ""; 73 | }; 74 | 094F385A1AD1DD6E00BCD70D /* Supporting Files */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 094F385B1AD1DD6E00BCD70D /* Info.plist */, 78 | ); 79 | name = "Supporting Files"; 80 | sourceTree = ""; 81 | }; 82 | 7342E6F06149117E2842EF5C /* Frameworks */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 481361E09D26A602BE5C1B45 /* Pods_ReadMoreTextViewExample.framework */, 86 | ); 87 | name = Frameworks; 88 | sourceTree = ""; 89 | }; 90 | E72E4B2B844AC1C39FF268E0 /* Pods */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 7C937E2F4988BFA784F501EA /* Pods-ReadMoreTextViewExample.debug.xcconfig */, 94 | A015F18144C48980B24F9D27 /* Pods-ReadMoreTextViewExample.release.xcconfig */, 95 | ); 96 | name = Pods; 97 | sourceTree = ""; 98 | }; 99 | /* End PBXGroup section */ 100 | 101 | /* Begin PBXNativeTarget section */ 102 | 094F38561AD1DD6E00BCD70D /* ReadMoreTextViewExample */ = { 103 | isa = PBXNativeTarget; 104 | buildConfigurationList = 094F38761AD1DD6E00BCD70D /* Build configuration list for PBXNativeTarget "ReadMoreTextViewExample" */; 105 | buildPhases = ( 106 | E6B3640D3CB553546926593C /* [CP] Check Pods Manifest.lock */, 107 | 094F38531AD1DD6E00BCD70D /* Sources */, 108 | 094F38541AD1DD6E00BCD70D /* Frameworks */, 109 | 094F38551AD1DD6E00BCD70D /* Resources */, 110 | 54C285754EAE89184A0E360A /* [CP] Embed Pods Frameworks */, 111 | 1AF7CE2E6A3452679EA874E3 /* [CP] Copy Pods Resources */, 112 | ); 113 | buildRules = ( 114 | ); 115 | dependencies = ( 116 | ); 117 | name = ReadMoreTextViewExample; 118 | productName = ReadMoreTextView; 119 | productReference = 094F38571AD1DD6E00BCD70D /* ReadMoreTextViewExample.app */; 120 | productType = "com.apple.product-type.application"; 121 | }; 122 | /* End PBXNativeTarget section */ 123 | 124 | /* Begin PBXProject section */ 125 | 094F384F1AD1DD6E00BCD70D /* Project object */ = { 126 | isa = PBXProject; 127 | attributes = { 128 | LastSwiftUpdateCheck = 0730; 129 | LastUpgradeCheck = 0900; 130 | ORGANIZATIONNAME = "Ilya Puchka"; 131 | TargetAttributes = { 132 | 094F38561AD1DD6E00BCD70D = { 133 | CreatedOnToolsVersion = 6.2; 134 | DevelopmentTeam = 4LTD6LARKC; 135 | LastSwiftMigration = 0800; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 094F38521AD1DD6E00BCD70D /* Build configuration list for PBXProject "ReadMoreTextView" */; 140 | compatibilityVersion = "Xcode 3.2"; 141 | developmentRegion = English; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 094F384E1AD1DD6E00BCD70D; 148 | productRefGroup = 094F38581AD1DD6E00BCD70D /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 094F38561AD1DD6E00BCD70D /* ReadMoreTextViewExample */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 094F38551AD1DD6E00BCD70D /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 094F38621AD1DD6E00BCD70D /* Main.storyboard in Resources */, 163 | 094F38671AD1DD6E00BCD70D /* LaunchScreen.xib in Resources */, 164 | 094F38641AD1DD6E00BCD70D /* Images.xcassets in Resources */, 165 | ); 166 | runOnlyForDeploymentPostprocessing = 0; 167 | }; 168 | /* End PBXResourcesBuildPhase section */ 169 | 170 | /* Begin PBXShellScriptBuildPhase section */ 171 | 1AF7CE2E6A3452679EA874E3 /* [CP] Copy Pods Resources */ = { 172 | isa = PBXShellScriptBuildPhase; 173 | buildActionMask = 2147483647; 174 | files = ( 175 | ); 176 | inputPaths = ( 177 | ); 178 | name = "[CP] Copy Pods Resources"; 179 | outputPaths = ( 180 | ); 181 | runOnlyForDeploymentPostprocessing = 0; 182 | shellPath = /bin/sh; 183 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ReadMoreTextViewExample/Pods-ReadMoreTextViewExample-resources.sh\"\n"; 184 | showEnvVarsInLog = 0; 185 | }; 186 | 54C285754EAE89184A0E360A /* [CP] Embed Pods Frameworks */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | ); 193 | name = "[CP] Embed Pods Frameworks"; 194 | outputPaths = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | shellPath = /bin/sh; 198 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ReadMoreTextViewExample/Pods-ReadMoreTextViewExample-frameworks.sh\"\n"; 199 | showEnvVarsInLog = 0; 200 | }; 201 | E6B3640D3CB553546926593C /* [CP] Check Pods Manifest.lock */ = { 202 | isa = PBXShellScriptBuildPhase; 203 | buildActionMask = 2147483647; 204 | files = ( 205 | ); 206 | inputPaths = ( 207 | ); 208 | name = "[CP] Check Pods Manifest.lock"; 209 | outputPaths = ( 210 | ); 211 | runOnlyForDeploymentPostprocessing = 0; 212 | shellPath = /bin/sh; 213 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 214 | showEnvVarsInLog = 0; 215 | }; 216 | /* End PBXShellScriptBuildPhase section */ 217 | 218 | /* Begin PBXSourcesBuildPhase section */ 219 | 094F38531AD1DD6E00BCD70D /* Sources */ = { 220 | isa = PBXSourcesBuildPhase; 221 | buildActionMask = 2147483647; 222 | files = ( 223 | 094F385F1AD1DD6E00BCD70D /* ViewController.swift in Sources */, 224 | 094F385D1AD1DD6E00BCD70D /* AppDelegate.swift in Sources */, 225 | ); 226 | runOnlyForDeploymentPostprocessing = 0; 227 | }; 228 | /* End PBXSourcesBuildPhase section */ 229 | 230 | /* Begin PBXVariantGroup section */ 231 | 094F38601AD1DD6E00BCD70D /* Main.storyboard */ = { 232 | isa = PBXVariantGroup; 233 | children = ( 234 | 094F38611AD1DD6E00BCD70D /* Base */, 235 | ); 236 | name = Main.storyboard; 237 | sourceTree = ""; 238 | }; 239 | 094F38651AD1DD6E00BCD70D /* LaunchScreen.xib */ = { 240 | isa = PBXVariantGroup; 241 | children = ( 242 | 094F38661AD1DD6E00BCD70D /* Base */, 243 | ); 244 | name = LaunchScreen.xib; 245 | sourceTree = ""; 246 | }; 247 | /* End PBXVariantGroup section */ 248 | 249 | /* Begin XCBuildConfiguration section */ 250 | 094F38741AD1DD6E00BCD70D /* Debug */ = { 251 | isa = XCBuildConfiguration; 252 | buildSettings = { 253 | ALWAYS_SEARCH_USER_PATHS = NO; 254 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 255 | CLANG_CXX_LIBRARY = "libc++"; 256 | CLANG_ENABLE_MODULES = YES; 257 | CLANG_ENABLE_OBJC_ARC = YES; 258 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 259 | CLANG_WARN_BOOL_CONVERSION = YES; 260 | CLANG_WARN_COMMA = YES; 261 | CLANG_WARN_CONSTANT_CONVERSION = YES; 262 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 263 | CLANG_WARN_EMPTY_BODY = YES; 264 | CLANG_WARN_ENUM_CONVERSION = YES; 265 | CLANG_WARN_INFINITE_RECURSION = YES; 266 | CLANG_WARN_INT_CONVERSION = YES; 267 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 268 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 269 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 270 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 271 | CLANG_WARN_STRICT_PROTOTYPES = YES; 272 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 273 | CLANG_WARN_UNREACHABLE_CODE = YES; 274 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 275 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 276 | COPY_PHASE_STRIP = NO; 277 | CURRENT_PROJECT_VERSION = 3.0.0; 278 | ENABLE_STRICT_OBJC_MSGSEND = YES; 279 | ENABLE_TESTABILITY = YES; 280 | GCC_C_LANGUAGE_STANDARD = gnu99; 281 | GCC_DYNAMIC_NO_PIC = NO; 282 | GCC_NO_COMMON_BLOCKS = YES; 283 | GCC_OPTIMIZATION_LEVEL = 0; 284 | GCC_PREPROCESSOR_DEFINITIONS = ( 285 | "DEBUG=1", 286 | "$(inherited)", 287 | ); 288 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 289 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 290 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 291 | GCC_WARN_UNDECLARED_SELECTOR = YES; 292 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 293 | GCC_WARN_UNUSED_FUNCTION = YES; 294 | GCC_WARN_UNUSED_VARIABLE = YES; 295 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 296 | MTL_ENABLE_DEBUG_INFO = YES; 297 | ONLY_ACTIVE_ARCH = YES; 298 | SDKROOT = iphoneos; 299 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 300 | SWIFT_VERSION = 4.0; 301 | }; 302 | name = Debug; 303 | }; 304 | 094F38751AD1DD6E00BCD70D /* Release */ = { 305 | isa = XCBuildConfiguration; 306 | buildSettings = { 307 | ALWAYS_SEARCH_USER_PATHS = NO; 308 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 309 | CLANG_CXX_LIBRARY = "libc++"; 310 | CLANG_ENABLE_MODULES = YES; 311 | CLANG_ENABLE_OBJC_ARC = YES; 312 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 313 | CLANG_WARN_BOOL_CONVERSION = YES; 314 | CLANG_WARN_COMMA = YES; 315 | CLANG_WARN_CONSTANT_CONVERSION = YES; 316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 317 | CLANG_WARN_EMPTY_BODY = YES; 318 | CLANG_WARN_ENUM_CONVERSION = YES; 319 | CLANG_WARN_INFINITE_RECURSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 323 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 324 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 325 | CLANG_WARN_STRICT_PROTOTYPES = YES; 326 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 327 | CLANG_WARN_UNREACHABLE_CODE = YES; 328 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 329 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 330 | COPY_PHASE_STRIP = NO; 331 | CURRENT_PROJECT_VERSION = 3.0.0; 332 | ENABLE_NS_ASSERTIONS = NO; 333 | ENABLE_STRICT_OBJC_MSGSEND = YES; 334 | GCC_C_LANGUAGE_STANDARD = gnu99; 335 | GCC_NO_COMMON_BLOCKS = YES; 336 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 337 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 338 | GCC_WARN_UNDECLARED_SELECTOR = YES; 339 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 340 | GCC_WARN_UNUSED_FUNCTION = YES; 341 | GCC_WARN_UNUSED_VARIABLE = YES; 342 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 343 | MTL_ENABLE_DEBUG_INFO = NO; 344 | SDKROOT = iphoneos; 345 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 346 | SWIFT_VERSION = 4.0; 347 | VALIDATE_PRODUCT = YES; 348 | }; 349 | name = Release; 350 | }; 351 | 094F38771AD1DD6E00BCD70D /* Debug */ = { 352 | isa = XCBuildConfiguration; 353 | baseConfigurationReference = 7C937E2F4988BFA784F501EA /* Pods-ReadMoreTextViewExample.debug.xcconfig */; 354 | buildSettings = { 355 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 356 | DEVELOPMENT_TEAM = 4LTD6LARKC; 357 | INFOPLIST_FILE = ReadMoreTextView/Info.plist; 358 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 359 | PRODUCT_BUNDLE_IDENTIFIER = "ilya.puchka.$(PRODUCT_NAME:rfc1034identifier)"; 360 | PRODUCT_NAME = "$(TARGET_NAME)"; 361 | }; 362 | name = Debug; 363 | }; 364 | 094F38781AD1DD6E00BCD70D /* Release */ = { 365 | isa = XCBuildConfiguration; 366 | baseConfigurationReference = A015F18144C48980B24F9D27 /* Pods-ReadMoreTextViewExample.release.xcconfig */; 367 | buildSettings = { 368 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 369 | DEVELOPMENT_TEAM = 4LTD6LARKC; 370 | INFOPLIST_FILE = ReadMoreTextView/Info.plist; 371 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 372 | PRODUCT_BUNDLE_IDENTIFIER = "ilya.puchka.$(PRODUCT_NAME:rfc1034identifier)"; 373 | PRODUCT_NAME = "$(TARGET_NAME)"; 374 | }; 375 | name = Release; 376 | }; 377 | /* End XCBuildConfiguration section */ 378 | 379 | /* Begin XCConfigurationList section */ 380 | 094F38521AD1DD6E00BCD70D /* Build configuration list for PBXProject "ReadMoreTextView" */ = { 381 | isa = XCConfigurationList; 382 | buildConfigurations = ( 383 | 094F38741AD1DD6E00BCD70D /* Debug */, 384 | 094F38751AD1DD6E00BCD70D /* Release */, 385 | ); 386 | defaultConfigurationIsVisible = 0; 387 | defaultConfigurationName = Release; 388 | }; 389 | 094F38761AD1DD6E00BCD70D /* Build configuration list for PBXNativeTarget "ReadMoreTextViewExample" */ = { 390 | isa = XCConfigurationList; 391 | buildConfigurations = ( 392 | 094F38771AD1DD6E00BCD70D /* Debug */, 393 | 094F38781AD1DD6E00BCD70D /* Release */, 394 | ); 395 | defaultConfigurationIsVisible = 0; 396 | defaultConfigurationName = Release; 397 | }; 398 | /* End XCConfigurationList section */ 399 | }; 400 | rootObject = 094F384F1AD1DD6E00BCD70D /* Project object */; 401 | } 402 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3597379FC64DCDE942F8E95F45B193E9 /* Pods-ReadMoreTextViewExample-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B8E5C911BA6C82BB46A58A9DAE6DAFF /* Pods-ReadMoreTextViewExample-dummy.m */; }; 11 | 441810EAE3F3920D5348210E5AACF64F /* UITextView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F5C04F3E0018ED544E4A66514840D90 /* UITextView+Extensions.swift */; }; 12 | 5BDAD7A35C58867223BDFB0199256FDD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; 13 | 6607EFA7CC6A2940E1C9C7B440D8B985 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; 14 | 9DA62777FE564F447F62CC729272C11C /* ReadMoreTextView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3526E25B2CC58051C91993A8C358CC91 /* ReadMoreTextView-dummy.m */; }; 15 | CC8A6281EF7BAB4EA92415A00C225856 /* ReadMoreTextView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C27167D6C246375AD6F4FDCF9186B0C3 /* ReadMoreTextView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 16 | DDD3C1ACBEA9F0BDBC7B3437133D1AA0 /* ReadMoreTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1609B3C4999713E2C4F0EB2808861DBD /* ReadMoreTextView.swift */; }; 17 | E67B6835FB2E53C4B862925A4539AD24 /* Pods-ReadMoreTextViewExample-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B7D82AAAD19A18B94EDAC41E9F506038 /* Pods-ReadMoreTextViewExample-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | 91AA6817508E420D8C6910C9028F600C /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = 07DCEE2FF5E1495CC9CD5D15A23A7D6A; 26 | remoteInfo = ReadMoreTextView; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 15FBCC2E5E4196D7B251B9FD94432897 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 1609B3C4999713E2C4F0EB2808861DBD /* ReadMoreTextView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ReadMoreTextView.swift; sourceTree = ""; }; 33 | 196DE5EDC2496F02C6B7E71A521B4274 /* Pods-ReadMoreTextViewExample-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ReadMoreTextViewExample-acknowledgements.plist"; sourceTree = ""; }; 34 | 19BDF3558CAA5431362CCD557177E3A0 /* Pods-ReadMoreTextViewExample-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ReadMoreTextViewExample-acknowledgements.markdown"; sourceTree = ""; }; 35 | 2A9384A0F0089F5094E5C89C13713E01 /* ReadMoreTextView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ReadMoreTextView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 2B8E5C911BA6C82BB46A58A9DAE6DAFF /* Pods-ReadMoreTextViewExample-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ReadMoreTextViewExample-dummy.m"; sourceTree = ""; }; 37 | 31C2C5582F899E9E529AE415EC62D533 /* Pods-ReadMoreTextViewExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ReadMoreTextViewExample.debug.xcconfig"; sourceTree = ""; }; 38 | 3526E25B2CC58051C91993A8C358CC91 /* ReadMoreTextView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ReadMoreTextView-dummy.m"; sourceTree = ""; }; 39 | 4219EEDC3BE989ADCFBCF2A711865152 /* Pods_ReadMoreTextViewExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ReadMoreTextViewExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 4686C661354B6F81835B5D3B7AEB075C /* Pods-ReadMoreTextViewExample-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ReadMoreTextViewExample-resources.sh"; sourceTree = ""; }; 41 | 5ABA830DBB4F3F2C1B74C9F462093D49 /* Pods-ReadMoreTextViewExample.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-ReadMoreTextViewExample.modulemap"; sourceTree = ""; }; 42 | 5F5C04F3E0018ED544E4A66514840D90 /* UITextView+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UITextView+Extensions.swift"; sourceTree = ""; }; 43 | 689AC87BE06C7E360AAEEAC1ECADAFD9 /* ReadMoreTextView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ReadMoreTextView-prefix.pch"; sourceTree = ""; }; 44 | 799C9CB346F2178E8EB1A1C71405BF04 /* Pods-ReadMoreTextViewExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ReadMoreTextViewExample.release.xcconfig"; sourceTree = ""; }; 45 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 46 | B7D82AAAD19A18B94EDAC41E9F506038 /* Pods-ReadMoreTextViewExample-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ReadMoreTextViewExample-umbrella.h"; sourceTree = ""; }; 47 | C027649DC0037F206E0684986D9D7CF2 /* Pods-ReadMoreTextViewExample-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ReadMoreTextViewExample-frameworks.sh"; sourceTree = ""; }; 48 | C27167D6C246375AD6F4FDCF9186B0C3 /* ReadMoreTextView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ReadMoreTextView-umbrella.h"; sourceTree = ""; }; 49 | C7B889C0CC27D4ED27ACEB5BF1807D46 /* ReadMoreTextView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = ReadMoreTextView.modulemap; sourceTree = ""; }; 50 | CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 51 | DB417DECB634E49A92B283D3E65A170A /* ReadMoreTextView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ReadMoreTextView.xcconfig; sourceTree = ""; }; 52 | FBFA14730588EA147201B871A9C9800B /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | /* End PBXFileReference section */ 54 | 55 | /* Begin PBXFrameworksBuildPhase section */ 56 | 7B61C0138ED40BE89F2EB97A1908E688 /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | 6607EFA7CC6A2940E1C9C7B440D8B985 /* Foundation.framework in Frameworks */, 61 | ); 62 | runOnlyForDeploymentPostprocessing = 0; 63 | }; 64 | F8B0B28A27EE2FE981FA074DF02CF642 /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | 5BDAD7A35C58867223BDFB0199256FDD /* Foundation.framework in Frameworks */, 69 | ); 70 | runOnlyForDeploymentPostprocessing = 0; 71 | }; 72 | /* End PBXFrameworksBuildPhase section */ 73 | 74 | /* Begin PBXGroup section */ 75 | 09F2513A67F15497EB6AA766C99B653A /* Targets Support Files */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 28D4AC494D794C24B887CB3B089A97CD /* Pods-ReadMoreTextViewExample */, 79 | ); 80 | name = "Targets Support Files"; 81 | sourceTree = ""; 82 | }; 83 | 0E397243B5B850B567026C8E73A7D3FF /* ReadMoreTextView */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 951855D157E243094C230683202DC646 /* Sources */, 87 | 3B71841FF53DF0378694021D594BCD6C /* Support Files */, 88 | ); 89 | name = ReadMoreTextView; 90 | path = ../..; 91 | sourceTree = ""; 92 | }; 93 | 28D4AC494D794C24B887CB3B089A97CD /* Pods-ReadMoreTextViewExample */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | FBFA14730588EA147201B871A9C9800B /* Info.plist */, 97 | 5ABA830DBB4F3F2C1B74C9F462093D49 /* Pods-ReadMoreTextViewExample.modulemap */, 98 | 19BDF3558CAA5431362CCD557177E3A0 /* Pods-ReadMoreTextViewExample-acknowledgements.markdown */, 99 | 196DE5EDC2496F02C6B7E71A521B4274 /* Pods-ReadMoreTextViewExample-acknowledgements.plist */, 100 | 2B8E5C911BA6C82BB46A58A9DAE6DAFF /* Pods-ReadMoreTextViewExample-dummy.m */, 101 | C027649DC0037F206E0684986D9D7CF2 /* Pods-ReadMoreTextViewExample-frameworks.sh */, 102 | 4686C661354B6F81835B5D3B7AEB075C /* Pods-ReadMoreTextViewExample-resources.sh */, 103 | B7D82AAAD19A18B94EDAC41E9F506038 /* Pods-ReadMoreTextViewExample-umbrella.h */, 104 | 31C2C5582F899E9E529AE415EC62D533 /* Pods-ReadMoreTextViewExample.debug.xcconfig */, 105 | 799C9CB346F2178E8EB1A1C71405BF04 /* Pods-ReadMoreTextViewExample.release.xcconfig */, 106 | ); 107 | name = "Pods-ReadMoreTextViewExample"; 108 | path = "Target Support Files/Pods-ReadMoreTextViewExample"; 109 | sourceTree = ""; 110 | }; 111 | 3B2CDE234BF4135C53DB0ED6D289715E /* Products */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | 4219EEDC3BE989ADCFBCF2A711865152 /* Pods_ReadMoreTextViewExample.framework */, 115 | 2A9384A0F0089F5094E5C89C13713E01 /* ReadMoreTextView.framework */, 116 | ); 117 | name = Products; 118 | sourceTree = ""; 119 | }; 120 | 3B71841FF53DF0378694021D594BCD6C /* Support Files */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 15FBCC2E5E4196D7B251B9FD94432897 /* Info.plist */, 124 | C7B889C0CC27D4ED27ACEB5BF1807D46 /* ReadMoreTextView.modulemap */, 125 | DB417DECB634E49A92B283D3E65A170A /* ReadMoreTextView.xcconfig */, 126 | 3526E25B2CC58051C91993A8C358CC91 /* ReadMoreTextView-dummy.m */, 127 | 689AC87BE06C7E360AAEEAC1ECADAFD9 /* ReadMoreTextView-prefix.pch */, 128 | C27167D6C246375AD6F4FDCF9186B0C3 /* ReadMoreTextView-umbrella.h */, 129 | ); 130 | name = "Support Files"; 131 | path = "Example/Pods/Target Support Files/ReadMoreTextView"; 132 | sourceTree = ""; 133 | }; 134 | 4C1CFEDC476ED9B4534BA4721C98A4E2 /* Development Pods */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 0E397243B5B850B567026C8E73A7D3FF /* ReadMoreTextView */, 138 | ); 139 | name = "Development Pods"; 140 | sourceTree = ""; 141 | }; 142 | 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */, 146 | ); 147 | name = iOS; 148 | sourceTree = ""; 149 | }; 150 | 7DB346D0F39D3F0E887471402A8071AB = { 151 | isa = PBXGroup; 152 | children = ( 153 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 154 | 4C1CFEDC476ED9B4534BA4721C98A4E2 /* Development Pods */, 155 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 156 | 3B2CDE234BF4135C53DB0ED6D289715E /* Products */, 157 | 09F2513A67F15497EB6AA766C99B653A /* Targets Support Files */, 158 | ); 159 | sourceTree = ""; 160 | }; 161 | 951855D157E243094C230683202DC646 /* Sources */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | 1609B3C4999713E2C4F0EB2808861DBD /* ReadMoreTextView.swift */, 165 | 5F5C04F3E0018ED544E4A66514840D90 /* UITextView+Extensions.swift */, 166 | ); 167 | path = Sources; 168 | sourceTree = ""; 169 | }; 170 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 171 | isa = PBXGroup; 172 | children = ( 173 | 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */, 174 | ); 175 | name = Frameworks; 176 | sourceTree = ""; 177 | }; 178 | /* End PBXGroup section */ 179 | 180 | /* Begin PBXHeadersBuildPhase section */ 181 | 1ED0C0170EDB721EF60EBFE2ADC162D0 /* Headers */ = { 182 | isa = PBXHeadersBuildPhase; 183 | buildActionMask = 2147483647; 184 | files = ( 185 | CC8A6281EF7BAB4EA92415A00C225856 /* ReadMoreTextView-umbrella.h in Headers */, 186 | ); 187 | runOnlyForDeploymentPostprocessing = 0; 188 | }; 189 | 68F9AF72CE49AA121730757FA5A18416 /* Headers */ = { 190 | isa = PBXHeadersBuildPhase; 191 | buildActionMask = 2147483647; 192 | files = ( 193 | E67B6835FB2E53C4B862925A4539AD24 /* Pods-ReadMoreTextViewExample-umbrella.h in Headers */, 194 | ); 195 | runOnlyForDeploymentPostprocessing = 0; 196 | }; 197 | /* End PBXHeadersBuildPhase section */ 198 | 199 | /* Begin PBXNativeTarget section */ 200 | 07DCEE2FF5E1495CC9CD5D15A23A7D6A /* ReadMoreTextView */ = { 201 | isa = PBXNativeTarget; 202 | buildConfigurationList = 6B436AE262C1BD38DC1FF6ED5A71B638 /* Build configuration list for PBXNativeTarget "ReadMoreTextView" */; 203 | buildPhases = ( 204 | 699261A580E2FC3706BCB102A6AA10B5 /* Sources */, 205 | F8B0B28A27EE2FE981FA074DF02CF642 /* Frameworks */, 206 | 1ED0C0170EDB721EF60EBFE2ADC162D0 /* Headers */, 207 | ); 208 | buildRules = ( 209 | ); 210 | dependencies = ( 211 | ); 212 | name = ReadMoreTextView; 213 | productName = ReadMoreTextView; 214 | productReference = 2A9384A0F0089F5094E5C89C13713E01 /* ReadMoreTextView.framework */; 215 | productType = "com.apple.product-type.framework"; 216 | }; 217 | 1956BE8B64FE92A7D290AD341F37E8B8 /* Pods-ReadMoreTextViewExample */ = { 218 | isa = PBXNativeTarget; 219 | buildConfigurationList = 3302BEDCA86123DE074B9979BF612EA1 /* Build configuration list for PBXNativeTarget "Pods-ReadMoreTextViewExample" */; 220 | buildPhases = ( 221 | 9337B5E820A0989BE22EC12926D83685 /* Sources */, 222 | 7B61C0138ED40BE89F2EB97A1908E688 /* Frameworks */, 223 | 68F9AF72CE49AA121730757FA5A18416 /* Headers */, 224 | ); 225 | buildRules = ( 226 | ); 227 | dependencies = ( 228 | C5FE976AFD2E91AB14A615EAECB3B907 /* PBXTargetDependency */, 229 | ); 230 | name = "Pods-ReadMoreTextViewExample"; 231 | productName = "Pods-ReadMoreTextViewExample"; 232 | productReference = 4219EEDC3BE989ADCFBCF2A711865152 /* Pods_ReadMoreTextViewExample.framework */; 233 | productType = "com.apple.product-type.framework"; 234 | }; 235 | /* End PBXNativeTarget section */ 236 | 237 | /* Begin PBXProject section */ 238 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 239 | isa = PBXProject; 240 | attributes = { 241 | LastSwiftUpdateCheck = 0730; 242 | LastUpgradeCheck = 0900; 243 | }; 244 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 245 | compatibilityVersion = "Xcode 3.2"; 246 | developmentRegion = English; 247 | hasScannedForEncodings = 0; 248 | knownRegions = ( 249 | en, 250 | ); 251 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 252 | productRefGroup = 3B2CDE234BF4135C53DB0ED6D289715E /* Products */; 253 | projectDirPath = ""; 254 | projectRoot = ""; 255 | targets = ( 256 | 1956BE8B64FE92A7D290AD341F37E8B8 /* Pods-ReadMoreTextViewExample */, 257 | 07DCEE2FF5E1495CC9CD5D15A23A7D6A /* ReadMoreTextView */, 258 | ); 259 | }; 260 | /* End PBXProject section */ 261 | 262 | /* Begin PBXSourcesBuildPhase section */ 263 | 699261A580E2FC3706BCB102A6AA10B5 /* Sources */ = { 264 | isa = PBXSourcesBuildPhase; 265 | buildActionMask = 2147483647; 266 | files = ( 267 | 9DA62777FE564F447F62CC729272C11C /* ReadMoreTextView-dummy.m in Sources */, 268 | DDD3C1ACBEA9F0BDBC7B3437133D1AA0 /* ReadMoreTextView.swift in Sources */, 269 | 441810EAE3F3920D5348210E5AACF64F /* UITextView+Extensions.swift in Sources */, 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | }; 273 | 9337B5E820A0989BE22EC12926D83685 /* Sources */ = { 274 | isa = PBXSourcesBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | 3597379FC64DCDE942F8E95F45B193E9 /* Pods-ReadMoreTextViewExample-dummy.m in Sources */, 278 | ); 279 | runOnlyForDeploymentPostprocessing = 0; 280 | }; 281 | /* End PBXSourcesBuildPhase section */ 282 | 283 | /* Begin PBXTargetDependency section */ 284 | C5FE976AFD2E91AB14A615EAECB3B907 /* PBXTargetDependency */ = { 285 | isa = PBXTargetDependency; 286 | name = ReadMoreTextView; 287 | target = 07DCEE2FF5E1495CC9CD5D15A23A7D6A /* ReadMoreTextView */; 288 | targetProxy = 91AA6817508E420D8C6910C9028F600C /* PBXContainerItemProxy */; 289 | }; 290 | /* End PBXTargetDependency section */ 291 | 292 | /* Begin XCBuildConfiguration section */ 293 | 346777A8C1649A02C17ABEFD4B4FE872 /* Debug */ = { 294 | isa = XCBuildConfiguration; 295 | baseConfigurationReference = 31C2C5582F899E9E529AE415EC62D533 /* Pods-ReadMoreTextViewExample.debug.xcconfig */; 296 | buildSettings = { 297 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 298 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 299 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 300 | CURRENT_PROJECT_VERSION = 1; 301 | DEBUG_INFORMATION_FORMAT = dwarf; 302 | DEFINES_MODULE = YES; 303 | DYLIB_COMPATIBILITY_VERSION = 1; 304 | DYLIB_CURRENT_VERSION = 1; 305 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 306 | ENABLE_STRICT_OBJC_MSGSEND = YES; 307 | GCC_NO_COMMON_BLOCKS = YES; 308 | INFOPLIST_FILE = "Target Support Files/Pods-ReadMoreTextViewExample/Info.plist"; 309 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 310 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 311 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 312 | MACH_O_TYPE = staticlib; 313 | MODULEMAP_FILE = "Target Support Files/Pods-ReadMoreTextViewExample/Pods-ReadMoreTextViewExample.modulemap"; 314 | MTL_ENABLE_DEBUG_INFO = YES; 315 | OTHER_LDFLAGS = ""; 316 | OTHER_LIBTOOLFLAGS = ""; 317 | PODS_ROOT = "$(SRCROOT)"; 318 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 319 | PRODUCT_NAME = Pods_ReadMoreTextViewExample; 320 | SDKROOT = iphoneos; 321 | SKIP_INSTALL = YES; 322 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 323 | TARGETED_DEVICE_FAMILY = "1,2"; 324 | VERSIONING_SYSTEM = "apple-generic"; 325 | VERSION_INFO_PREFIX = ""; 326 | }; 327 | name = Debug; 328 | }; 329 | 38EE8368C2E217599711414DA4177CF2 /* Release */ = { 330 | isa = XCBuildConfiguration; 331 | buildSettings = { 332 | ALWAYS_SEARCH_USER_PATHS = NO; 333 | CLANG_ANALYZER_NONNULL = YES; 334 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 335 | CLANG_CXX_LIBRARY = "libc++"; 336 | CLANG_ENABLE_MODULES = YES; 337 | CLANG_ENABLE_OBJC_ARC = YES; 338 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 339 | CLANG_WARN_BOOL_CONVERSION = YES; 340 | CLANG_WARN_COMMA = YES; 341 | CLANG_WARN_CONSTANT_CONVERSION = YES; 342 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 343 | CLANG_WARN_EMPTY_BODY = YES; 344 | CLANG_WARN_ENUM_CONVERSION = YES; 345 | CLANG_WARN_INFINITE_RECURSION = YES; 346 | CLANG_WARN_INT_CONVERSION = YES; 347 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 348 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 349 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 350 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 351 | CLANG_WARN_STRICT_PROTOTYPES = YES; 352 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 353 | CLANG_WARN_UNREACHABLE_CODE = YES; 354 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 355 | CODE_SIGNING_REQUIRED = NO; 356 | COPY_PHASE_STRIP = YES; 357 | ENABLE_NS_ASSERTIONS = NO; 358 | ENABLE_STRICT_OBJC_MSGSEND = YES; 359 | GCC_C_LANGUAGE_STANDARD = gnu99; 360 | GCC_NO_COMMON_BLOCKS = YES; 361 | GCC_PREPROCESSOR_DEFINITIONS = ( 362 | "POD_CONFIGURATION_RELEASE=1", 363 | "$(inherited)", 364 | ); 365 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 366 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 367 | GCC_WARN_UNDECLARED_SELECTOR = YES; 368 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 369 | GCC_WARN_UNUSED_FUNCTION = YES; 370 | GCC_WARN_UNUSED_VARIABLE = YES; 371 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 372 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 373 | STRIP_INSTALLED_PRODUCT = NO; 374 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 375 | SWIFT_VERSION = 4.0; 376 | SYMROOT = "${SRCROOT}/../build"; 377 | VALIDATE_PRODUCT = YES; 378 | }; 379 | name = Release; 380 | }; 381 | 4A1DEA6984906477DF79EF0B48C6C290 /* Debug */ = { 382 | isa = XCBuildConfiguration; 383 | baseConfigurationReference = DB417DECB634E49A92B283D3E65A170A /* ReadMoreTextView.xcconfig */; 384 | buildSettings = { 385 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 386 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 387 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 388 | CURRENT_PROJECT_VERSION = 1; 389 | DEBUG_INFORMATION_FORMAT = dwarf; 390 | DEFINES_MODULE = YES; 391 | DYLIB_COMPATIBILITY_VERSION = 1; 392 | DYLIB_CURRENT_VERSION = 1; 393 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 394 | ENABLE_STRICT_OBJC_MSGSEND = YES; 395 | GCC_NO_COMMON_BLOCKS = YES; 396 | GCC_PREFIX_HEADER = "Target Support Files/ReadMoreTextView/ReadMoreTextView-prefix.pch"; 397 | INFOPLIST_FILE = "Target Support Files/ReadMoreTextView/Info.plist"; 398 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 399 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 400 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 401 | MODULEMAP_FILE = "Target Support Files/ReadMoreTextView/ReadMoreTextView.modulemap"; 402 | MTL_ENABLE_DEBUG_INFO = YES; 403 | PRODUCT_NAME = ReadMoreTextView; 404 | SDKROOT = iphoneos; 405 | SKIP_INSTALL = YES; 406 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 407 | SWIFT_VERSION = 4.0; 408 | TARGETED_DEVICE_FAMILY = "1,2"; 409 | VERSIONING_SYSTEM = "apple-generic"; 410 | VERSION_INFO_PREFIX = ""; 411 | }; 412 | name = Debug; 413 | }; 414 | 717203CFCF97FBAAC9828ACF699ED117 /* Debug */ = { 415 | isa = XCBuildConfiguration; 416 | buildSettings = { 417 | ALWAYS_SEARCH_USER_PATHS = NO; 418 | CLANG_ANALYZER_NONNULL = YES; 419 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 420 | CLANG_CXX_LIBRARY = "libc++"; 421 | CLANG_ENABLE_MODULES = YES; 422 | CLANG_ENABLE_OBJC_ARC = YES; 423 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 424 | CLANG_WARN_BOOL_CONVERSION = YES; 425 | CLANG_WARN_COMMA = YES; 426 | CLANG_WARN_CONSTANT_CONVERSION = YES; 427 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 428 | CLANG_WARN_EMPTY_BODY = YES; 429 | CLANG_WARN_ENUM_CONVERSION = YES; 430 | CLANG_WARN_INFINITE_RECURSION = YES; 431 | CLANG_WARN_INT_CONVERSION = YES; 432 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 433 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 434 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 435 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 436 | CLANG_WARN_STRICT_PROTOTYPES = YES; 437 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 438 | CLANG_WARN_UNREACHABLE_CODE = YES; 439 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 440 | CODE_SIGNING_REQUIRED = NO; 441 | COPY_PHASE_STRIP = NO; 442 | ENABLE_STRICT_OBJC_MSGSEND = YES; 443 | ENABLE_TESTABILITY = YES; 444 | GCC_C_LANGUAGE_STANDARD = gnu99; 445 | GCC_DYNAMIC_NO_PIC = NO; 446 | GCC_NO_COMMON_BLOCKS = YES; 447 | GCC_OPTIMIZATION_LEVEL = 0; 448 | GCC_PREPROCESSOR_DEFINITIONS = ( 449 | "POD_CONFIGURATION_DEBUG=1", 450 | "DEBUG=1", 451 | "$(inherited)", 452 | ); 453 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 454 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 455 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 456 | GCC_WARN_UNDECLARED_SELECTOR = YES; 457 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 458 | GCC_WARN_UNUSED_FUNCTION = YES; 459 | GCC_WARN_UNUSED_VARIABLE = YES; 460 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 461 | ONLY_ACTIVE_ARCH = YES; 462 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 463 | STRIP_INSTALLED_PRODUCT = NO; 464 | SWIFT_VERSION = 4.0; 465 | SYMROOT = "${SRCROOT}/../build"; 466 | }; 467 | name = Debug; 468 | }; 469 | A0CA2F9FB0B42835FC8BAA041732768D /* Release */ = { 470 | isa = XCBuildConfiguration; 471 | baseConfigurationReference = DB417DECB634E49A92B283D3E65A170A /* ReadMoreTextView.xcconfig */; 472 | buildSettings = { 473 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 474 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 475 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 476 | CURRENT_PROJECT_VERSION = 1; 477 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 478 | DEFINES_MODULE = YES; 479 | DYLIB_COMPATIBILITY_VERSION = 1; 480 | DYLIB_CURRENT_VERSION = 1; 481 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 482 | ENABLE_STRICT_OBJC_MSGSEND = YES; 483 | GCC_NO_COMMON_BLOCKS = YES; 484 | GCC_PREFIX_HEADER = "Target Support Files/ReadMoreTextView/ReadMoreTextView-prefix.pch"; 485 | INFOPLIST_FILE = "Target Support Files/ReadMoreTextView/Info.plist"; 486 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 487 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 488 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 489 | MODULEMAP_FILE = "Target Support Files/ReadMoreTextView/ReadMoreTextView.modulemap"; 490 | MTL_ENABLE_DEBUG_INFO = NO; 491 | PRODUCT_NAME = ReadMoreTextView; 492 | SDKROOT = iphoneos; 493 | SKIP_INSTALL = YES; 494 | SWIFT_VERSION = 4.0; 495 | TARGETED_DEVICE_FAMILY = "1,2"; 496 | VERSIONING_SYSTEM = "apple-generic"; 497 | VERSION_INFO_PREFIX = ""; 498 | }; 499 | name = Release; 500 | }; 501 | F39BB030AE002EFB55193458B6BBAEF5 /* Release */ = { 502 | isa = XCBuildConfiguration; 503 | baseConfigurationReference = 799C9CB346F2178E8EB1A1C71405BF04 /* Pods-ReadMoreTextViewExample.release.xcconfig */; 504 | buildSettings = { 505 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 506 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 507 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 508 | CURRENT_PROJECT_VERSION = 1; 509 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 510 | DEFINES_MODULE = YES; 511 | DYLIB_COMPATIBILITY_VERSION = 1; 512 | DYLIB_CURRENT_VERSION = 1; 513 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 514 | ENABLE_STRICT_OBJC_MSGSEND = YES; 515 | GCC_NO_COMMON_BLOCKS = YES; 516 | INFOPLIST_FILE = "Target Support Files/Pods-ReadMoreTextViewExample/Info.plist"; 517 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 518 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 519 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 520 | MACH_O_TYPE = staticlib; 521 | MODULEMAP_FILE = "Target Support Files/Pods-ReadMoreTextViewExample/Pods-ReadMoreTextViewExample.modulemap"; 522 | MTL_ENABLE_DEBUG_INFO = NO; 523 | OTHER_LDFLAGS = ""; 524 | OTHER_LIBTOOLFLAGS = ""; 525 | PODS_ROOT = "$(SRCROOT)"; 526 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 527 | PRODUCT_NAME = Pods_ReadMoreTextViewExample; 528 | SDKROOT = iphoneos; 529 | SKIP_INSTALL = YES; 530 | TARGETED_DEVICE_FAMILY = "1,2"; 531 | VERSIONING_SYSTEM = "apple-generic"; 532 | VERSION_INFO_PREFIX = ""; 533 | }; 534 | name = Release; 535 | }; 536 | /* End XCBuildConfiguration section */ 537 | 538 | /* Begin XCConfigurationList section */ 539 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 540 | isa = XCConfigurationList; 541 | buildConfigurations = ( 542 | 717203CFCF97FBAAC9828ACF699ED117 /* Debug */, 543 | 38EE8368C2E217599711414DA4177CF2 /* Release */, 544 | ); 545 | defaultConfigurationIsVisible = 0; 546 | defaultConfigurationName = Release; 547 | }; 548 | 3302BEDCA86123DE074B9979BF612EA1 /* Build configuration list for PBXNativeTarget "Pods-ReadMoreTextViewExample" */ = { 549 | isa = XCConfigurationList; 550 | buildConfigurations = ( 551 | 346777A8C1649A02C17ABEFD4B4FE872 /* Debug */, 552 | F39BB030AE002EFB55193458B6BBAEF5 /* Release */, 553 | ); 554 | defaultConfigurationIsVisible = 0; 555 | defaultConfigurationName = Release; 556 | }; 557 | 6B436AE262C1BD38DC1FF6ED5A71B638 /* Build configuration list for PBXNativeTarget "ReadMoreTextView" */ = { 558 | isa = XCConfigurationList; 559 | buildConfigurations = ( 560 | 4A1DEA6984906477DF79EF0B48C6C290 /* Debug */, 561 | A0CA2F9FB0B42835FC8BAA041732768D /* Release */, 562 | ); 563 | defaultConfigurationIsVisible = 0; 564 | defaultConfigurationName = Release; 565 | }; 566 | /* End XCConfigurationList section */ 567 | }; 568 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 569 | } 570 | --------------------------------------------------------------------------------