Skip to content

Commit 02368e4

Browse files
authored
Merge pull request ChenYilong#146 from mddios/DDdev
TabBar的clipsToBounds情况:子view超出部分没有显示出来,则子view不应该得到响应
2 parents dae2bc4 + 9f9fe14 commit 02368e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CYLTabBarController/CYLTabBar.m

+4
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,10 @@ - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
259259

260260
//2. 优先处理 PlusButton (包括其突出的部分)、TabBarItems 未凸出的部分
261261
//这一步主要是在处理只有两个 TabBarItems 的场景。
262+
// 2.1先考虑clipsToBounds情况:子view超出部分没有显示出来
263+
if (self.clipsToBounds && ![self pointInside:point withEvent:event]) {
264+
return nil;
265+
}
262266

263267
if (CYLExternPlusButton) {
264268
CGRect plusButtonFrame = self.plusButton.frame;

0 commit comments

Comments
 (0)