菜鸟教程小白 发表于 2022-12-13 09:07:20

iphone - 在另一个 UIImageView 上注册一个 UIImageView


                                            <p><p>我现在已经让它能够在我的应用程序上移动图像,缩放它,捏它..你的名字。但我的问题是,当一个 UIImageView 位于另一个 UIImageView 时,我怎样才能让应用程序能够注册?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>您不妨看看<a href="http://developer.apple.com/library/ios/#DOCUMENTATION/GraphicsImaging/Reference/CGGeometry/Reference/reference.html" rel="noreferrer noopener nofollow">CGGeometry Reference</a> .</p>

<p>具体看<code>CGRectIntersectsRect</code>,看两个<code>UIImageView</code>的frame是否相交。</p>

<pre><code>BOOL isImageViewOverlapping = CGRectIntersectsRect(imageViewOne.frame, imageViewTwo.frame);
</code></pre></p>
                                   
                                                <p style="font-size: 20px;">关于iphone - 在另一个 UIImageView 上注册一个 UIImageView,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/7407247/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/7407247/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: iphone - 在另一个 UIImageView 上注册一个 UIImageView