Skip to content

Commit caab04c

Browse files
committed
Fixed autoCompletion background view layout
1 parent 93b2c38 commit caab04c

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

CHSlackTextViewController.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@version = "1.10.10"
1+
@version = "1.10.11"
22

33
Pod::Spec.new do |s|
44
s.name = "CHSlackTextViewController"

Source/SLKTextViewController.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ NS_CLASS_AVAILABLE_IOS(7_0) @interface SLKTextViewController : UIViewController
418418

419419
/** The table view used to display autocompletion results. */
420420
@property (nonatomic, readonly) UITableView *autoCompletionView;
421+
@property (nonatomic, strong) UIColor *autoCompletionHairColor;
421422

422423
/** YES if the autocompletion mode is active. */
423424
@property (nonatomic, readonly, getter = isAutoCompleting) BOOL autoCompleting;

Source/SLKTextViewController.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ @implementation SLKTextViewController
7474
@synthesize presentedInPopover = _presentedInPopover;
7575
@synthesize autoCompletionBackgroundView = _autoCompletionBackgroundView;
7676
@synthesize menuAccesoryView = _menuAccesoryView;
77+
@synthesize autoCompletionHairColor = _autoCompletionHairColor;
7778

7879
#pragma mark - Initializer
7980

@@ -338,6 +339,14 @@ - (UIView *)autoCompletionBackgroundView
338339
return _autoCompletionBackgroundView;
339340
}
340341

342+
- (void)setAutoCompletionHairColor:(UIColor *)autoCompletionHairColor
343+
{
344+
if (_autoCompletionHairline) {
345+
_autoCompletionHairline.backgroundColor = autoCompletionHairColor;
346+
}
347+
_autoCompletionHairColor = autoCompletionHairColor;
348+
}
349+
341350
- (SLKTextInputbar *)textInputbar
342351
{
343352
if (!_textInputbar) {
@@ -2368,6 +2377,7 @@ - (void)slk_setupViewConstraints
23682377
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[backgroundView(>=0)][autoCompletionView(0)][typingIndicatorView]" options:0 metrics:nil views:views]];
23692378
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(>=0)-[autoCompletionView(0@750)][typingIndicatorView]" options:0 metrics:nil views:views]];
23702379
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[scrollView]|" options:0 metrics:nil views:views]];
2380+
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[backgroundView]|" options:0 metrics:nil views:views]];
23712381
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[autoCompletionView]|" options:0 metrics:nil views:views]];
23722382
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[typingIndicatorView]|" options:0 metrics:nil views:views]];
23732383
NSString *format = [NSString stringWithFormat:@"H:|-%f-[textInputbar]-%f-|", self.textInputBarLRC, self.textInputBarLRC];

0 commit comments

Comments
 (0)