File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,25 @@ - (void)layoutIfNeeded
111111 [super layoutIfNeeded ];
112112}
113113
114+ // Compensate for toolbarContentView layout bug in iOS 11.2
115+ // https://github.com/slackhq/SlackTextViewController/issues/604
116+ - (void )layoutSubviews
117+ {
118+ [super layoutSubviews ];
119+
120+ static BOOL toolbarContentViewEnabled = YES ;
121+
122+ if (toolbarContentViewEnabled) {
123+ for (id view in self.subviews ) {
124+ if ([view isKindOfClass: (NSClassFromString (@" _UIToolbarContentView" ))]) {
125+ UIView *toolbarContentView = view;
126+ toolbarContentView.userInteractionEnabled = NO ;
127+ }
128+ }
129+ toolbarContentViewEnabled = NO ;
130+ }
131+ }
132+
114133- (CGSize)intrinsicContentSize
115134{
116135 return CGSizeMake (UIViewNoIntrinsicMetric, [self minimumInputbarHeight ]);
You can’t perform that action at this time.
0 commit comments