English 中文(简体)
An(移)观点
原标题:Detecting Touches on Animating(Moving) View

我正在检测一个<条码> 查询<>或<条码>上的触角,该密码是指在屏幕上穿透的信号。 我尝试了UITapGesture,touchesbegan,和UIbutton。 但是,我发现,问题是在使用消化装置。 观点的位置被定在终点,在移动时不能触及。 (你可以触及观点将停止的位置和线索读)。 我已尝试了<条码> 问讯号。 我还努力使用<条码>CAKeyframeAnimation,但结果相同。

    [UIView animateWithDuration:10 delay:1 options:(UIViewAnimationOptionCurveEaseInOut | UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction) animations:^{
    [testViewController.view setFrame:CGRectMake(900, 20, 100,  100)];

} completion:^(BOOL finished) {
    // Animate moving to another location
}];

这里是我所希望的简单例子。 我想有一幅环球的图像在屏幕上随意移动。 我想知道什么时候打了球。

最佳回答

我有机会就一个不同的项目作了回答。 问题在于,我正试图找到这一看法的基调。 而在估算期间,框架没有变化。 但有一层财产可以帮助。

[view.layer presentationLayer]

你们能够从这一层财产中获取目前令人厌恶的观点。 然后,我可以用介绍器框架来检测。

问题回答

暂无回答




相关问题
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, ...

热门标签