Skip to content

Commit ee199a3

Browse files
committed
fix the message ui input text view bug.
1 parent 25d6393 commit ee199a3

5 files changed

Lines changed: 11 additions & 9 deletions

File tree

  • Example
    • MessageDisplayKitCoreDataExample/MessageDisplayKitCoreDataExample/Vendor/MessageDisplayKit.framework
    • MessageDisplayKitStoryBoradExample/MessageDisplayKitStoryBoradExample/Vendor/MessageDisplayKit.framework
    • MessageDisplayKitWeChatExample
  • MessageDisplayKit/Classes/Controllers/XHMessageTableViewController

Example/MessageDisplayKitWeChatExample/MessageDisplayKitWeChatExample.xcodeproj/project.pbxproj

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
/* Begin PBXBuildFile section */
1010
F7122EE61A4D33E200734F17 /* XHAlbum.m in Sources */ = {isa = PBXBuildFile; fileRef = F7122EE31A4D33E200734F17 /* XHAlbum.m */; };
1111
F7122EE71A4D33E200734F17 /* XHContact.m in Sources */ = {isa = PBXBuildFile; fileRef = F7122EE51A4D33E200734F17 /* XHContact.m */; };
12-
F7220AE31A52693400DBDEE7 /* MessageDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7E396021A4D42B2003AB670 /* MessageDisplayKit.framework */; };
13-
F7220AE41A52693400DBDEE7 /* MessageDisplayKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F7E396021A4D42B2003AB670 /* MessageDisplayKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12+
F785EE2A1A63C0FC006E695B /* MessageDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F785EE291A63C0FC006E695B /* MessageDisplayKit.framework */; };
1413
F7B9EB621A4D605B0072F81B /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = F7B9EB051A4D605B0072F81B /* [email protected] */; };
1514
F7B9EB631A4D605B0072F81B /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = F7B9EB061A4D605B0072F81B /* [email protected] */; };
1615
F7B9EB641A4D605B0072F81B /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = F7B9EB071A4D605B0072F81B /* [email protected] */; };
@@ -372,7 +371,6 @@
372371
dstPath = "";
373372
dstSubfolderSpec = 10;
374373
files = (
375-
F7220AE41A52693400DBDEE7 /* MessageDisplayKit.framework in Embed Frameworks */,
376374
);
377375
name = "Embed Frameworks";
378376
runOnlyForDeploymentPostprocessing = 0;
@@ -384,6 +382,7 @@
384382
F7122EE31A4D33E200734F17 /* XHAlbum.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XHAlbum.m; sourceTree = "<group>"; };
385383
F7122EE41A4D33E200734F17 /* XHContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XHContact.h; sourceTree = "<group>"; };
386384
F7122EE51A4D33E200734F17 /* XHContact.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XHContact.m; sourceTree = "<group>"; };
385+
F785EE291A63C0FC006E695B /* MessageDisplayKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = MessageDisplayKit.framework; sourceTree = "<group>"; };
387386
F7B9EB051A4D605B0072F81B /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
388387
F7B9EB061A4D605B0072F81B /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
389388
F7B9EB071A4D605B0072F81B /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
@@ -804,15 +803,14 @@
804803
F7D252F41A4D31F60015764B /* XHScanningView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XHScanningView.m; sourceTree = "<group>"; };
805804
F7D253411A4D327E0015764B /* XHStoreManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XHStoreManager.h; sourceTree = "<group>"; };
806805
F7D253421A4D327E0015764B /* XHStoreManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XHStoreManager.m; sourceTree = "<group>"; };
807-
F7E396021A4D42B2003AB670 /* MessageDisplayKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = MessageDisplayKit.framework; sourceTree = "<group>"; };
808806
/* End PBXFileReference section */
809807

810808
/* Begin PBXFrameworksBuildPhase section */
811809
F7D24A2A1A4D099F0015764B /* Frameworks */ = {
812810
isa = PBXFrameworksBuildPhase;
813811
buildActionMask = 2147483647;
814812
files = (
815-
F7220AE31A52693400DBDEE7 /* MessageDisplayKit.framework in Frameworks */,
813+
F785EE2A1A63C0FC006E695B /* MessageDisplayKit.framework in Frameworks */,
816814
);
817815
runOnlyForDeploymentPostprocessing = 0;
818816
};
@@ -1819,7 +1817,7 @@
18191817
F7E396011A4D42B2003AB670 /* MessageDisplayKit */ = {
18201818
isa = PBXGroup;
18211819
children = (
1822-
F7E396021A4D42B2003AB670 /* MessageDisplayKit.framework */,
1820+
F785EE291A63C0FC006E695B /* MessageDisplayKit.framework */,
18231821
F7B9EB611A4D605B0072F81B /* Resources */,
18241822
);
18251823
path = MessageDisplayKit;

MessageDisplayKit/Classes/Controllers/XHMessageTableViewController/XHMessageTableViewController.m

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -644,19 +644,23 @@ - (void)viewWillAppear:(BOOL)animated {
644644
forKeyPath:@"contentSize"
645645
options:NSKeyValueObservingOptionNew
646646
context:nil];
647+
648+
[self.messageInputView.inputTextView setEditable:YES];
647649
}
648650

649651
- (void)viewWillDisappear:(BOOL)animated {
650652
[super viewWillDisappear:animated];
651-
// 取消输入框
652-
[self.messageInputView.inputTextView resignFirstResponder];
653-
[self setEditing:NO animated:YES];
653+
654+
if (self.textViewInputViewType != XHInputViewTypeNormal) {
655+
[self layoutOtherMenuViewHiden:YES];
656+
}
654657

655658
// remove键盘通知或者手势
656659
[self.messageTableView disSetupPanGestureControlKeyboardHide:self.allowsPanToDismissKeyboard];
657660

658661
// remove KVO
659662
[self.messageInputView.inputTextView removeObserver:self forKeyPath:@"contentSize"];
663+
[self.messageInputView.inputTextView setEditable:NO];
660664
}
661665

662666
- (void)viewDidLoad {

0 commit comments

Comments
 (0)