я создаю пользовательский правый элемент кнопки бара для моей навигационной панели не используя следующий код:заказа прямо пункт панель кнопок в iOS6 не является прозрачным
// create a toolbar
UIToolbar* tools = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 50, 44.01)];
// create the array to hold the button, which then gets added to the toolbar
NSMutableArray* buttons = [[NSMutableArray alloc] initWithCapacity:1];
// create a toolbar item with image
NSString* pathToSettingsResourceFile = [[NSBundle mainBundle] pathForResource:@"19-gear" ofType:@"png"];
UIImage* settingsImage = [[[UIImage alloc] initWithContentsOfFile:pathToSettingsResourceFile] autorelease];
settings = [[UIBarButtonItem alloc]initWithImage:settingsImage style:UIBarButtonItemStylePlain target:self action:@selector(showSettings:)];
settings.enabled = FALSE;
// add button to toolbar
[buttons addObject:settings];
[tools setItems:buttons animated:NO];
[buttons release];
// add toolbar as a right bar button item
self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithCustomView:tools] autorelease];
[tools release];
до ИОС 6 это работает, как и следовало ожидать, от КСНА 6 я нахожусь получать этот странный фон прямоугольник
и добавление
tools.opaque = NO;
tools.backgroundColor = [UIColor clearColor];
не помогает,
пожалуйста, помогите мне избавиться от этого фона
Спасибо заранее, Amit