English 中文(简体)
• 为巴梅斯加普·托菲舍安排基础吗?
原标题:setBackgroundImage forBarMetrics + scaleToFill?

Since iOS5 you should set the backgroundimage of tool- or navigationbars via setBackgroundImage forBarMetrics.

在OS4中,我使用:

@implementation UINavigationBar (CustomImage)
- (void)drawRect:(CGRect)rect {
UIImage *image = [UIImage imageNamed: @"NavigationBar.png"];
[image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
}
@end

在OS4中,如果图像达到小点,就会重复“填表”。 在你为巴斯马克时,有没有办法将行为定为“ToFill”。

Thx!

问题回答

暂无回答




相关问题
UINavigationBar color changes unexpectedly

In my current UINavigationController, the viewControllers stack looks like this. 1 -> 2 -> 3. Before transitioning from the 2nd to the 3rd controller however, I pop the 2nd one first so that when the ...

Creating buttons for a Navigation bar

I have a button as the right button on my navigation bar: UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithTitle:@"Add" style:UIBarButtonItemStyleBordered target:self action:@selector(...

why viewWillDisAppear is not being called in detail view?

I think lot of people are facing the same problem . In detail view i.e tapping on cell in main view takes you to the detail when in navigation bar I tapp the back button the viewWillDisAppear is not ...

resize uinavigationbar push/pop viewcontroller size issue

i need to shrink the height of a UINavigationBar (attached to the UINavigationController) i ve done this via the UINavigationControllerDelegate s navigationController:didShowViewController method, ...

Tap navigation bar to scroll to top

I have a really long UIWebView, and I need to add a way for the user to tap the UINavigationBar to scroll to top (something like the Facebook app, where it s little glow when you tap). How can I do ...

Detecting Swipe In UINavigationBar

I am trying to get my view controller to detect swipes in the UINavigationBar that is automatically displayed by my app, but it refuses to detect swipes. Is there any way I can do it?

热门标签