File tree Expand file tree Collapse file tree 4 files changed +9
-3
lines changed
Expand file tree Collapse file tree 4 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ NS_ASSUME_NONNULL_BEGIN
6464@property (nonatomic , readonly ) CGFloat appropriateHeight;
6565
6666
67+ - (void )slk_updateConstraintConstants ;
68+
6769#pragma mark - Initialization
6870// /------------------------------------------------
6971// / @name Initialization
@@ -98,6 +100,9 @@ NS_ASSUME_NONNULL_BEGIN
98100/* * The accessory view's maximum height. Default is 38 pts. */
99101@property (nonatomic , assign ) CGFloat editorContentViewHeight;
100102
103+ /* * The content views height */
104+ @property (nonatomic , strong , readonly ) NSLayoutConstraint *contentViewHC;
105+
101106/* * A Boolean value indicating whether the control is in edit mode. */
102107@property (nonatomic , getter = isEditing) BOOL editing;
103108
Original file line number Diff line number Diff line change @@ -663,10 +663,9 @@ - (void)slk_setupViewConstraints
663663 [self addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @" V:|-(>=0)-[leftButton(0)]-(0@750)-|" options: 0 metrics: metrics views: views]];
664664 [self addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @" V:|-(>=0)-[rightButton]-(<=0)-|" options: 0 metrics: metrics views: views]];
665665 [self addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @" H:|-(left@250)-[charCountLabel(<=50@1000)]-(right@750)-|" options: 0 metrics: metrics views: views]];
666- [self addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @" V:|-0-[editorContentView(0)]-(<=top)-[textView(0@999)]-(0)-|" options: 0 metrics: metrics views: views]];
666+ [self addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @" V:|[contentView(0)] -0-[editorContentView(0)]-(<=top)-[textView(0@999)]-(0)-|" options: 0 metrics: metrics views: views]];
667667 [self addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @" H:|[editorContentView]|" options: 0 metrics: metrics views: views]];
668668 [self addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @" H:|[contentView]|" options: 0 metrics: metrics views: views]];
669- [self addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @" V:[contentView(0)]|" options: 0 metrics: metrics views: views]];
670669
671670 self.textViewBottomMarginC = [self slk_constraintForAttribute: NSLayoutAttributeBottom firstItem: self secondItem: self .textView];
672671 self.editorContentViewHC = [self slk_constraintForAttribute: NSLayoutAttributeHeight firstItem: self .editorContentView secondItem: nil ];
Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ NS_CLASS_AVAILABLE_IOS(7_0) @interface SLKTextViewController : UIViewController
122122@property (nonatomic, readonly) UIButton *leftButton;
123123@property (nonatomic, readonly) UIButton *rightButton;
124124
125+ - (void )slk_updateViewConstraints;
125126
126127#pragma mark - Initialization
127128// /------------------------------------------------
Original file line number Diff line number Diff line change @@ -1153,7 +1153,7 @@ - (void)slk_performRightAction
11531153{
11541154 NSArray *actions = [self .rightButton actionsForTarget: self forControlEvent: UIControlEventTouchUpInside];
11551155
1156- if (actions.count > 0 && [ self canPressRightButton ] ) {
1156+ if (actions.count > 0 ) {
11571157 [self .rightButton sendActionsForControlEvents: UIControlEventTouchUpInside];
11581158 }
11591159}
@@ -2213,6 +2213,7 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView
22132213 _keyboardHeightBeforeDragging = self.keyboardHC .constant ;
22142214 }
22152215 }
2216+ [self dismissKeyboard: YES ];
22162217}
22172218
22182219
You can’t perform that action at this time.
0 commit comments