Commit 8f47f698 authored by Ben Jackson's avatar Ben Jackson
Browse files

Fix font rendering in text input

This requires a patch to the SlackTextViewController cocoapod.
Unfortunately the upstream is abandoned, so we use a fork containing the
fix.
parent a15fbf46
......@@ -8,7 +8,9 @@ target 'Gitter' do
pod 'ISO8601DateFormatter', '0.6'
pod 'CrittercismSDK', '~> 5.5.5'
pod 'SDWebImage', '~>3.7.6'
pod 'SlackTextViewController', '1.9.6'
pod 'SlackTextViewController',
:git => 'https://github.com/gitterHQ/SlackTextViewController',
:branch => 'gitter'
target 'GitterTests' do
inherit! :search_paths
......
......@@ -17,7 +17,7 @@ DEPENDENCIES:
- LibComponentLogging-qlog (~> 1.1.1)
- "NSData+Base64 (= 1.0.0)"
- SDWebImage (~> 3.7.6)
- SlackTextViewController (= 1.9.6)
- SlackTextViewController (from `https://github.com/gitterHQ/SlackTextViewController`, branch `gitter`)
SPEC REPOS:
trunk:
......@@ -27,7 +27,16 @@ SPEC REPOS:
- LibComponentLogging-qlog
- "NSData+Base64"
- SDWebImage
- SlackTextViewController
EXTERNAL SOURCES:
SlackTextViewController:
:branch: gitter
:git: https://github.com/gitterHQ/SlackTextViewController
CHECKOUT OPTIONS:
SlackTextViewController:
:commit: 818c22c1c29d284726769d331f7d0a145f34dfbe
:git: https://github.com/gitterHQ/SlackTextViewController
SPEC CHECKSUMS:
CrittercismSDK: 1ba49c922528da3a21dbec6cde8e34c8170cdbb5
......@@ -36,8 +45,8 @@ SPEC CHECKSUMS:
LibComponentLogging-qlog: 60ef1090df3d98c575c1c8185ab3f52e67ef977c
"NSData+Base64": 4e84902c4db907a15673474677e57763ef3903e4
SDWebImage: c325cf02c30337336b95beff20a13df489ec0ec9
SlackTextViewController: b854e62c1c156336bc4fd409c6ca79b5773e8f9d
SlackTextViewController: 77bd984be710e7bb543d0e2ceff41a3b95ef935e
PODFILE CHECKSUM: 3ea346ec0a5cf9b66823985e3704c0e0adf951f2
PODFILE CHECKSUM: 17b5376a4eb84afd2008a24065bac4069dc1d6a2
COCOAPODS: 1.8.3
{
"name": "SlackTextViewController",
"version": "1.9.6",
"summary": "A drop-in UIViewController subclass with a custom growing text input and other useful messaging features.",
"description": "Meant to be a replacement for UITableViewController & UICollectionViewController. This library is used in Slack's iOS app. It was built to fit our needs, but is flexible enough to be reused by others wanting to build great messaging apps for iOS.",
"homepage": "https://slack.com/",
"screenshots": "https://github.com/slackhq/SlackTextViewController/raw/master/Screenshots/slacktextviewcontroller_demo.gif",
"license": {
"type": "MIT",
"file": "LICENSE"
},
"authors": {
"Slack Technologies, Inc.": "ios-team@slack-corp.com"
},
"source": {
"git": "https://github.com/slackhq/SlackTextViewController.git",
"tag": "v1.9.6"
},
"frameworks": [
"CoreGraphics",
"UIKit"
],
"platforms": {
"ios": "7.0"
},
"requires_arc": true,
"header_mappings_dir": "Source",
"source_files": "Source/**/*.{h,m}"
}
......@@ -17,7 +17,7 @@ DEPENDENCIES:
- LibComponentLogging-qlog (~> 1.1.1)
- "NSData+Base64 (= 1.0.0)"
- SDWebImage (~> 3.7.6)
- SlackTextViewController (= 1.9.6)
- SlackTextViewController (from `https://github.com/gitterHQ/SlackTextViewController`, branch `gitter`)
SPEC REPOS:
trunk:
......@@ -27,7 +27,16 @@ SPEC REPOS:
- LibComponentLogging-qlog
- "NSData+Base64"
- SDWebImage
- SlackTextViewController
EXTERNAL SOURCES:
SlackTextViewController:
:branch: gitter
:git: https://github.com/gitterHQ/SlackTextViewController
CHECKOUT OPTIONS:
SlackTextViewController:
:commit: 818c22c1c29d284726769d331f7d0a145f34dfbe
:git: https://github.com/gitterHQ/SlackTextViewController
SPEC CHECKSUMS:
CrittercismSDK: 1ba49c922528da3a21dbec6cde8e34c8170cdbb5
......@@ -36,8 +45,8 @@ SPEC CHECKSUMS:
LibComponentLogging-qlog: 60ef1090df3d98c575c1c8185ab3f52e67ef977c
"NSData+Base64": 4e84902c4db907a15673474677e57763ef3903e4
SDWebImage: c325cf02c30337336b95beff20a13df489ec0ec9
SlackTextViewController: b854e62c1c156336bc4fd409c6ca79b5773e8f9d
SlackTextViewController: 77bd984be710e7bb543d0e2ceff41a3b95ef935e
PODFILE CHECKSUM: 3ea346ec0a5cf9b66823985e3704c0e0adf951f2
PODFILE CHECKSUM: 17b5376a4eb84afd2008a24065bac4069dc1d6a2
COCOAPODS: 1.8.3
This diff is collapsed.
# Deprecation
We are no longer providing support for `SlackTextViewController`. This project satisfied all of our iOS messaging needs in the past and we are proud to have contributed it to the open-source community. Today, in order to delight our users with a solution that is highly tailored and rapidly iterated-upon, we have shifted focus to our internal projects. Unfortunately, this renders us lacking the capacity to support our past projects in addition to our newer, internal projects. This project has been deprecated as a result.
# SlackTextViewController
**IMPORTANT NOTICE: Please update to >= `1.9` to avoid any risk of app rejection.
......@@ -12,7 +16,7 @@ A drop-in UIViewController subclass with a growing text input view and other use
![Demo Gif](Screenshots/slacktextviewcontroller_demo.gif)
This library is used in Slack's iOS app. It was built to fit our needs, but is flexible enough to be reused by others wanting to build great messaging apps for iOS.
This library was historically used in our iOS app. At its inception, the library satisfied our product needs and was flexible enough to be reused by others wanting to build great messaging apps for iOS.
## Feature List
......@@ -289,7 +293,7 @@ If the user selects any autocompletion view cell on `tableView:didSelectRowAtInd
```swift
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
if tableView.isEqual(tableView) {
if tableView.isEqual(self.autoCompletionView) {
var item = self.searchResult[indexPath.row]
item += " " // Adding a space helps dismissing the auto-completion view
......
......@@ -506,18 +506,18 @@ SLKPastableMediaType SLKPastableMediaTypeFromNSString(NSString *string)
{
NSString *contentSizeCategory = [[UIApplication sharedApplication] preferredContentSizeCategory];
[self setFontName:font.fontName pointSize:font.pointSize withContentSizeCategory:contentSizeCategory];
[self setFont:font pointSize:font.pointSize withContentSizeCategory:contentSizeCategory];
self.initialFontSize = font.pointSize;
}
- (void)setFontName:(NSString *)fontName pointSize:(CGFloat)pointSize withContentSizeCategory:(NSString *)contentSizeCategory
- (void)setFont:(UIFont *)font pointSize:(CGFloat)pointSize withContentSizeCategory:(NSString *)contentSizeCategory
{
if (self.isDynamicTypeEnabled) {
pointSize += SLKPointSizeDifferenceForCategory(contentSizeCategory);
}
UIFont *dynamicFont = [UIFont fontWithName:fontName size:pointSize];
UIFont *dynamicFont = [font fontWithSize:pointSize];
[super setFont:dynamicFont];
......@@ -535,7 +535,7 @@ SLKPastableMediaType SLKPastableMediaTypeFromNSString(NSString *string)
NSString *contentSizeCategory = [[UIApplication sharedApplication] preferredContentSizeCategory];
[self setFontName:self.font.fontName pointSize:self.initialFontSize withContentSizeCategory:contentSizeCategory];
[self setFont:self.font pointSize:self.initialFontSize withContentSizeCategory:contentSizeCategory];
}
- (void)setTextAlignment:(NSTextAlignment)textAlignment
......@@ -906,7 +906,7 @@ SLKPastableMediaType SLKPastableMediaTypeFromNSString(NSString *string)
NSString *contentSizeCategory = notification.userInfo[UIContentSizeCategoryNewValueKey];
[self setFontName:self.font.fontName pointSize:self.initialFontSize withContentSizeCategory:contentSizeCategory];
[self setFont:self.font pointSize:self.initialFontSize withContentSizeCategory:contentSizeCategory];
NSString *text = [self.text copy];
......
......@@ -912,7 +912,7 @@ CGFloat const SLKAutoCompletionViewDefaultHeight = 140.0;
}
__weak typeof(self) weakSelf = self;
void (^animations)(void) = ^void(){
weakSelf.textInputbarHC.constant = hidden ? 0.0 : weakSelf.textInputbar.appropriateHeight;
......@@ -2276,7 +2276,7 @@ CGFloat const SLKAutoCompletionViewDefaultHeight = 140.0;
- (void)slk_updateViewConstraints
{
self.textInputbarHC.constant = self.textInputbar.minimumInputbarHeight;
self.textInputbarHC.constant = self.textInputbar.hidden ? 0.0 : self.textInputbar.minimumInputbarHeight;
self.scrollViewHC.constant = [self slk_appropriateScrollViewHeight];
self.keyboardHC.constant = [self slk_appropriateKeyboardHeightFromRect:CGRectNull];
......
......@@ -2,7 +2,7 @@ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ISO8601Da
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ISO8601DateFormatter/ISO8601DateFormatter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/LibComponentLogging-Core/LibComponentLogging_Core.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/NSData+Base64/NSData_Base64.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SlackTextViewController/SlackTextViewController.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/LibComponentLogging-qlog" "${PODS_ROOT}/.."
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_LDFLAGS = $(inherited) -ObjC -framework "Crittercism" -framework "ISO8601DateFormatter" -framework "ImageIO" -framework "LibComponentLogging_Core" -framework "NSData_Base64" -framework "SDWebImage" -framework "SlackTextViewController" -framework "SystemConfiguration"
OTHER_LDFLAGS = $(inherited) -ObjC -framework "CoreGraphics" -framework "Crittercism" -framework "ISO8601DateFormatter" -framework "ImageIO" -framework "LibComponentLogging_Core" -framework "NSData_Base64" -framework "SDWebImage" -framework "SlackTextViewController" -framework "SystemConfiguration" -framework "UIKit"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
......
......@@ -2,7 +2,7 @@ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ISO8601Da
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ISO8601DateFormatter/ISO8601DateFormatter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/LibComponentLogging-Core/LibComponentLogging_Core.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/NSData+Base64/NSData_Base64.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SlackTextViewController/SlackTextViewController.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/LibComponentLogging-qlog" "${PODS_ROOT}/.."
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_LDFLAGS = $(inherited) -ObjC -framework "Crittercism" -framework "ISO8601DateFormatter" -framework "ImageIO" -framework "LibComponentLogging_Core" -framework "NSData_Base64" -framework "SDWebImage" -framework "SlackTextViewController" -framework "SystemConfiguration"
OTHER_LDFLAGS = $(inherited) -ObjC -framework "CoreGraphics" -framework "Crittercism" -framework "ISO8601DateFormatter" -framework "ImageIO" -framework "LibComponentLogging_Core" -framework "NSData_Base64" -framework "SDWebImage" -framework "SlackTextViewController" -framework "SystemConfiguration" -framework "UIKit"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
......
......@@ -2,7 +2,7 @@ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ISO8601Da
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ISO8601DateFormatter/ISO8601DateFormatter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/LibComponentLogging-Core/LibComponentLogging_Core.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/NSData+Base64/NSData_Base64.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SlackTextViewController/SlackTextViewController.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/LibComponentLogging-qlog" "${PODS_ROOT}/.."
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_LDFLAGS = $(inherited) -ObjC -framework "Crittercism" -framework "ISO8601DateFormatter" -framework "ImageIO" -framework "LibComponentLogging_Core" -framework "NSData_Base64" -framework "SDWebImage" -framework "SlackTextViewController" -framework "SystemConfiguration"
OTHER_LDFLAGS = $(inherited) -ObjC -framework "CoreGraphics" -framework "Crittercism" -framework "ISO8601DateFormatter" -framework "ImageIO" -framework "LibComponentLogging_Core" -framework "NSData_Base64" -framework "SDWebImage" -framework "SlackTextViewController" -framework "SystemConfiguration" -framework "UIKit"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
......
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ISO8601DateFormatter" "${PODS_CONFIGURATION_BUILD_DIR}/LibComponentLogging-Core" "${PODS_CONFIGURATION_BUILD_DIR}/NSData+Base64" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SlackTextViewController" "${PODS_ROOT}/CrittercismSDK/iOS"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ISO8601DateFormatter/ISO8601DateFormatter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/LibComponentLogging-Core/LibComponentLogging_Core.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/NSData+Base64/NSData_Base64.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SlackTextViewController/SlackTextViewController.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/LibComponentLogging-qlog" "${PODS_ROOT}/.."
OTHER_LDFLAGS = $(inherited) -framework "ISO8601DateFormatter" -framework "ImageIO" -framework "LibComponentLogging_Core" -framework "NSData_Base64" -framework "SDWebImage" -framework "SlackTextViewController" -framework "SystemConfiguration"
OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "ISO8601DateFormatter" -framework "ImageIO" -framework "LibComponentLogging_Core" -framework "NSData_Base64" -framework "SDWebImage" -framework "SlackTextViewController" -framework "SystemConfiguration" -framework "UIKit"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
......
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ISO8601DateFormatter" "${PODS_CONFIGURATION_BUILD_DIR}/LibComponentLogging-Core" "${PODS_CONFIGURATION_BUILD_DIR}/NSData+Base64" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SlackTextViewController" "${PODS_ROOT}/CrittercismSDK/iOS"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ISO8601DateFormatter/ISO8601DateFormatter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/LibComponentLogging-Core/LibComponentLogging_Core.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/NSData+Base64/NSData_Base64.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SlackTextViewController/SlackTextViewController.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/LibComponentLogging-qlog" "${PODS_ROOT}/.."
OTHER_LDFLAGS = $(inherited) -framework "ISO8601DateFormatter" -framework "ImageIO" -framework "LibComponentLogging_Core" -framework "NSData_Base64" -framework "SDWebImage" -framework "SlackTextViewController" -framework "SystemConfiguration"
OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "ISO8601DateFormatter" -framework "ImageIO" -framework "LibComponentLogging_Core" -framework "NSData_Base64" -framework "SDWebImage" -framework "SlackTextViewController" -framework "SystemConfiguration" -framework "UIKit"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
......
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ISO8601DateFormatter" "${PODS_CONFIGURATION_BUILD_DIR}/LibComponentLogging-Core" "${PODS_CONFIGURATION_BUILD_DIR}/NSData+Base64" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SlackTextViewController" "${PODS_ROOT}/CrittercismSDK/iOS"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ISO8601DateFormatter/ISO8601DateFormatter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/LibComponentLogging-Core/LibComponentLogging_Core.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/NSData+Base64/NSData_Base64.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SlackTextViewController/SlackTextViewController.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/LibComponentLogging-qlog" "${PODS_ROOT}/.."
OTHER_LDFLAGS = $(inherited) -framework "ISO8601DateFormatter" -framework "ImageIO" -framework "LibComponentLogging_Core" -framework "NSData_Base64" -framework "SDWebImage" -framework "SlackTextViewController" -framework "SystemConfiguration"
OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "ISO8601DateFormatter" -framework "ImageIO" -framework "LibComponentLogging_Core" -framework "NSData_Base64" -framework "SDWebImage" -framework "SlackTextViewController" -framework "SystemConfiguration" -framework "UIKit"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
......
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SlackTextViewController
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "UIKit"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment