From 8775f448199e7dbff3254386852dbeb4c3dcc3d8 Mon Sep 17 00:00:00 2001 From: Nathan Tannar Date: Fri, 20 Oct 2017 20:12:13 -0700 Subject: [PATCH] Changes Proposed in PR #273 --- CHANGELOG.md | 10 ++++++++++ Example/ChatExample.xcodeproj/project.pbxproj | 7 ++++--- MessageKit.xcodeproj/project.pbxproj | 8 ++++++++ Sources/Views/MessageInputBar.swift | 2 +- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 288cff08..82bd6741 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ The changelog for `MessageKit`. Also see the [releases](https://github.com/Messa ## Upcoming release +### Added + +- Created `SeparatorLine` and `InputStackView` as their own subclass of `UIView` and `UIStackView` respectively. This just improves reusability +[#273](https://github.com/MessageKit/MessageKit/pull/273) by [@nathantannar4](https://github.com/nathantannar4). + +### Changed + +- **Breaking Change** The properties `leftStackView`, `rightStackView` and `bottomStackView` in `MessageInputBar` are now of type `InputStackView`. The property `separatorLine` is also now of type `SeparatorLine` in `MessageInputBar` +[#273](https://github.com/MessageKit/MessageKit/pull/273) by [@nathantannar4](https://github.com/nathantannar4). + ### Fixed - Fixed a bug that prevented the `textAllignment` property of `InputTextView`'s `placeholderLabel` from having noticable differences when changed to `.center` or `.right` diff --git a/Example/ChatExample.xcodeproj/project.pbxproj b/Example/ChatExample.xcodeproj/project.pbxproj index 46066c9d..8954f335 100644 --- a/Example/ChatExample.xcodeproj/project.pbxproj +++ b/Example/ChatExample.xcodeproj/project.pbxproj @@ -270,6 +270,7 @@ TargetAttributes = { 882B5E321CF7D4B900B6E160 = { CreatedOnToolsVersion = 7.3.1; + DevelopmentTeam = 9EUCWD26TP; LastSwiftMigration = 0800; }; 882B5E481CF7D4B900B6E160 = { @@ -470,7 +471,7 @@ ); inputPaths = ( "${SRCROOT}/Pods/Target Support Files/Pods-ChatExample/Pods-ChatExample-resources.sh", - "$PODS_CONFIGURATION_BUILD_DIR/MessageKit/MessageKitAssets.bundle", + $PODS_CONFIGURATION_BUILD_DIR/MessageKit/MessageKitAssets.bundle, ); name = "[CP] Copy Pods Resources"; outputPaths = ( @@ -657,7 +658,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = 9EUCWD26TP; INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.messagekit.ChatExample; @@ -672,7 +673,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = 9EUCWD26TP; INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.messagekit.ChatExample; diff --git a/MessageKit.xcodeproj/project.pbxproj b/MessageKit.xcodeproj/project.pbxproj index e0ccf530..282f8d13 100644 --- a/MessageKit.xcodeproj/project.pbxproj +++ b/MessageKit.xcodeproj/project.pbxproj @@ -9,6 +9,8 @@ /* Begin PBXBuildFile section */ 372F6AEF1F36C61000B57FBD /* AvatarViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 372F6AEE1F36C61000B57FBD /* AvatarViewTests.swift */; }; 376AD1861F4259270083072A /* MessagesDisplayDataSourceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 376AD1851F4259270083072A /* MessagesDisplayDataSourceTests.swift */; }; + 38C57C791F9AE3E50043CC03 /* SeparatorLine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38C57C781F9AE3E50043CC03 /* SeparatorLine.swift */; }; + 38C57C7C1F9AE4890043CC03 /* InputStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38C57C7B1F9AE4870043CC03 /* InputStackView.swift */; }; 88916B2D1CF0DF2F00469F91 /* MessageKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 88916B221CF0DF2F00469F91 /* MessageKit.framework */; }; 88916B451CF0DF5900469F91 /* MessageKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88916B431CF0DF5900469F91 /* MessageKitTests.swift */; }; B0C8D99B1F73076B000A86E4 /* MessageKitAssets.bundle in Resources */ = {isa = PBXBuildFile; fileRef = B0C8D99A1F73076B000A86E4 /* MessageKitAssets.bundle */; }; @@ -76,6 +78,8 @@ /* Begin PBXFileReference section */ 372F6AEE1F36C61000B57FBD /* AvatarViewTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AvatarViewTests.swift; sourceTree = ""; }; 376AD1851F4259270083072A /* MessagesDisplayDataSourceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessagesDisplayDataSourceTests.swift; sourceTree = ""; }; + 38C57C781F9AE3E50043CC03 /* SeparatorLine.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SeparatorLine.swift; sourceTree = ""; }; + 38C57C7B1F9AE4870043CC03 /* InputStackView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InputStackView.swift; sourceTree = ""; }; 88916B221CF0DF2F00469F91 /* MessageKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MessageKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 88916B2C1CF0DF2F00469F91 /* MessageKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MessageKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 88916B421CF0DF5900469F91 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -276,11 +280,13 @@ B7A03F3E1F86694F006AEF79 /* AvatarView.swift */, B7A03F411F86694F006AEF79 /* InputBarItem.swift */, B7A03F401F86694F006AEF79 /* InputTextView.swift */, + 38C57C7B1F9AE4870043CC03 /* InputStackView.swift */, B7A03F431F86694F006AEF79 /* MessageContainerView.swift */, B7A03F421F86694F006AEF79 /* MessageInputBar.swift */, B7A03F3F1F86694F006AEF79 /* MessageLabel.swift */, B7A03F451F86694F006AEF79 /* MessagesCollectionView.swift */, B7A03F441F86694F006AEF79 /* PlayButtonView.swift */, + 38C57C781F9AE3E50043CC03 /* SeparatorLine.swift */, ); path = Views; sourceTree = ""; @@ -458,6 +464,7 @@ files = ( B7A03F2B1F866895006AEF79 /* AvatarHorizontalAlignment.swift in Sources */, B7A03F3C1F866946006AEF79 /* LocationMessageCell.swift in Sources */, + 38C57C7C1F9AE4890043CC03 /* InputStackView.swift in Sources */, B7A03F5B1F8669CA006AEF79 /* MessageType.swift in Sources */, B7A03F6F1F8669EB006AEF79 /* String+Extensions.swift in Sources */, B7A03F491F86694F006AEF79 /* InputBarItem.swift in Sources */, @@ -501,6 +508,7 @@ B7A03F351F866940006AEF79 /* MessageHeaderView.swift in Sources */, B7A03F731F866A06006AEF79 /* MessageKit+Availability.swift in Sources */, B7A03F2D1F866895006AEF79 /* LabelAlignment.swift in Sources */, + 38C57C791F9AE3E50043CC03 /* SeparatorLine.swift in Sources */, B7A03F2C1F866895006AEF79 /* DetectorType.swift in Sources */, B7A03F271F866895006AEF79 /* Avatar.swift in Sources */, B7A03F2F1F866895006AEF79 /* AvatarAlignment.swift in Sources */, diff --git a/Sources/Views/MessageInputBar.swift b/Sources/Views/MessageInputBar.swift index 1531a70d..c7b34e49 100644 --- a/Sources/Views/MessageInputBar.swift +++ b/Sources/Views/MessageInputBar.swift @@ -78,7 +78,7 @@ open class MessageInputBar: UIView { 2. It's spacing is initially set to 15 */ open let bottomStackView = InputStackView(axis: .horizontal, spacing: 15) - + open lazy var inputTextView: InputTextView = { [weak self] in let textView = InputTextView() textView.translatesAutoresizingMaskIntoConstraints = false