菜鸟教程小白 发表于 2022-12-11 22:41:52

iphone - 将 UINavigationBar 背景图像更改为默认值 - iOS 4.3


                                            <p><p>我用重载方法改变<code>UINavigationBar</code>背景图片</p>

<pre><code>@implementation UINavigationBar (Background)
-(void) drawRect:(CGRect)rect
{
    UIImage *image = ;
    ;
}

@end
</code></pre>

<p>但在某些 UIViewControllers 中,我需要删除此背景图像。我该怎么做?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>你可以看看 <a href="http://sebastiancelis.com/2009/12/21/adding-background-image-uinavigationbar/" rel="noreferrer noopener nofollow">this blog post from Sebastian Celis</a> .它完全解决了您面临的问题。</p>

<p>也许还要检查 <a href="https://stackoverflow.com/questions/3483921/how-can-i-change-the-background-image-for-my-navigationbar-on-a-per-page-basis" rel="noreferrer noopener nofollow">this</a> .</p></p>
                                   
                                                <p style="font-size: 20px;">关于iphone - 将 UINavigationBar 背景图像更改为默认值 - iOS 4.3,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/10163047/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/10163047/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: iphone - 将 UINavigationBar 背景图像更改为默认值 - iOS 4.3