简体   繁体   English

UITouch不适用于ios8

[英]UITouch is not working with ios8

I am working on one app. 我正在开发一个应用程序。 Which capture images continuously, there is one button to stop capturing. 连续拍摄图像时,有一个按钮可以停止拍摄。 But the problem is that button targeted method is not being called. 但是问题是没有调用以按钮为目标的方法。 Even when I clicked on the screen anywhere it didn't detect touch or gesture. 即使当我在屏幕上的任何位置单击时,也没有检测到触摸或手势。 I have implemented gesture and touch delegate methods to check. 我已经实现了手势和触摸委托方法进行检查。 Capturing image is not on main thread so main thread is free. 捕获图像不在主线程上,因此主线程是空闲的。 So I am not able to find the reason why view not able to detect the touch. 因此,我无法找到视图无法检测到触摸的原因。 There are almost 6-7 button on that particular view, none of them trigger their method. 在该特定视图上几乎有6-7个按钮,没有一个触发其方法。 While working with ios7 its running properly, It will detect touch and button targeted method trigger also. 在ios7正常运行的情况下,它将同时检测触摸和按按钮的方法触发。

I have thought that there should be any-view that will be overlap those button so i print the stake of subview , which is as below.Button which stop capturing is with text "START". 我以为应该有一个与这些按钮重叠的视图,所以我打印了subview的内容,如下所示。停止捕获的按钮带有文本“ START”。 I have just share stake after START button only as i think in stake the last item will be on top in view. 我只是在“开始”按钮之后才分享股份,因为我认为在股份中,最后一项将位于最前面。

<UIButtonLabel: 0x15dfb0d0; frame = (5 14; 41 16); text = 'START';
 opaque = NO; userInteractionEnabled = NO; layer = <_UILabelLayer:
 0x15dfb190>>

 <UIButton: 0x15e8c590; frame = (63 7; 36 32); opaque = NO; autoresize
 = RM+BM; layer = <CALayer: 0x15e8c690>>

 <UIButtonLabel: 0x15df0400; frame = (15 10; 6 12); text = '0'; opaque
 = NO; userInteractionEnabled = NO; layer = <_UILabelLayer: 0x15d98db0>>

 <UIImageView: 0x15e97c00; frame = (-295 -272; 1557 1568);
 clipsToBounds = YES; hidden = YES; autoresize = W+H;
 autoresizesSubviews = NO; layer = <CALayer: 0x15ea2920>>

 <_UILayoutGuide: 0x15e90ba0; frame = (0 0; 0 0); hidden = YES; layer =
 <CALayer: 0x15ea2b10>>

 <_UILayoutGuide: 0x15e86120; frame = (0 1024; 0 0); hidden = YES;
 layer = <CALayer: 0x15e6fc40>>

 <MPVolumeView: 0x15db7840; frame = (18 340; 284 23); alpha = 0; opaque
 = NO; layer = <CALayer: 0x15dbd2e0>>

 <UILabel: 0x15daee40; frame = (0 0; 0 0); text = 'No Volume
 Available'; opaque = NO; autoresize = W+BM; userInteractionEnabled =
 NO; layer = <_UILabelLayer: 0x15dd5be0>>

 <MPButton: 0x15dd5e00; baseClass = UIButton; frame = (131.5 2.5; 21.5
 18); alpha = 0; opaque = NO; autoresize = LM+BM; layer = <CALayer:
 0x15dd6030>>

 <UIImageView: 0x15de0c30; frame = (-39.25 -41; 100 100); alpha = 0;
 opaque = NO; userInteractionEnabled = NO; tag = 1886548836; layer =
 <CALayer: 0x15ea5330>>

 <UIImageView: 0x15ea5790; frame = (0 0; 21.5 18); clipsToBounds = YES;
 opaque = NO; userInteractionEnabled = NO; layer = <CALayer:
 0x15ea5810>>

I am using auto-layout. 我正在使用自动布局。 Please can you help me to handle this problem. 请您能帮我解决这个问题。 I am new with auto-layout. 我是自动布局的新手。 so anything that i can change in storyboard get this problem solved please let me know. 所以我可以在情节提要中进行任何更改都可以解决此问题,请让我知道。 Thanks in advance. 提前致谢。

Thanks for all your answers. 感谢您的所有答复。 I got solution by moving irate code from +initialize method of AppDelegate to didFinishLaunchingWithOptions method. 通过将Irate代码从AppDelegate的+ initialize方法移动到didFinishLaunchingWithOptions方法,得到了解决方案。 My iRate get initialized and configure but don't show popup. 我的iRate已初始化并配置,但不显示弹出窗口。 May be that's why i was not able to perform any touch on screen. 也许这就是为什么我无法在屏幕上执行任何触摸的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM