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

objective-c - Xcode 4.2、UIAlertView 和 UIAlertButton?


                                            <p><p>在我将 Xcode 从 4.1 更新到 4.2 后,UIAlertView 的其他按钮无法正确显示。
<img src="/image/6pKL7.png" alt="UIAlertView in Xcode 4.2"/> </p>

<p>当我调试时,重命名按钮是 UIAlertButton 类,它的框架是 frame = (0 0; 0 0);
你能帮忙吗?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>UIAlertView 在被子类化时表现得非常糟糕。 Apple 似乎试图让子类化几乎成为不可能。</p>

<p>但有一些方法可以解决它。最好的一个:一个 UIAlertView 替代品——一个 View ,它重新创建了 UIAlertView 的功能,而不是一个。 <a href="https://github.com/TomSwift/TSAlertView" rel="noreferrer noopener nofollow">TSAlertView</a>是这样的替代品。</p>

<p>对于 iOS 5,<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAlertView_Class/UIAlertView/UIAlertView.html#//apple_ref/doc/uid/TP40006802-CH3-SW14" rel="noreferrer noopener nofollow"><code>alertViewStyle</code></a>可能会对你有所帮助。</p></p>
                                   
                                                <p style="font-size: 20px;">关于objective-c - Xcode 4.2、UIAlertView 和 UIAlertButton?,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/8267250/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/8267250/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: objective-c - Xcode 4.2、UIAlertView 和 UIAlertButton?