English 中文(简体)
我有两个按钮, 在这两个按钮的顶部有多个视图 。 调整 zPoposition = 1000 它们是可见的, 但无法点击 。
原标题:I have two button and there are multiple views at the top of those two buttons. adjusting zPosition = 1000 they are visible but not clickable

我有两个按钮, 在这两个按钮的顶部有多个视图。 所以在使用 vwButtons. layer. zPopstion = 1000 之后, 它们是可见的, 但无法点击 。

我尝试使用 vwButtons.layer.zPostposition = 1000 和 self.view.bringSubview ToFront(vwButtons), 但仍无法工作, 但它们是可见的, 但点击事件没有被启动 。 请检查附于 < a href=" https:// i. static. net/ JOgNOa2C. png" rel = " no follown noreferr" > details image

问题回答

您可以在模拟器中运行应用程序, 当程序运行时按 Xcode 中的“ 调试视图等级” 按钮时运行 。

它会显示您是否被其他透明视图的按钮重叠 。

您也可以使用此方法

self.view.bringSubviewToFront(vwButtons)




相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签