gpt4 book ai didi

ios - 我需要检测某个 View 上的触摸

转载 作者:行者123 更新时间:2023-11-29 13:01:16 25 4
gpt4 key购买 nike

<分区>

我有这个 grayView 可以禁用 Controller 并使其看起来不活动,这是对我之前提出的问题的礼貌,但我需要检测 grayView 是否被触摸以及它是否被触摸touched 去掉 grayView。如果有人可以帮助我找出解决方案,我将不胜感激。我尝试使用 UITouchedBegan 和许多其他 stackoverflow 解决方案,但每一个都不起作用。任何帮助将不胜感激。

grayView 是一个 UIView

-(void)ViewDidLoad
{
grayView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
grayView.backgroundColor = [UIColor colorWithWhite:0.5 alpha:0.5];
[self.navigationController.view addSubview:grayView];
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com