오른쪽에 탐색 단추가 있습니다 (탐색 용 화살표 + 공유 단추). 아이폰 시뮬레이터에서 나는 그것들을 잘 볼 수 있고 완벽하게 작동하고있다. 실제 아이폰 4 장치에 앱을 설치하면 단추가 전혀 표시되지 않습니다 !!! (내 시뮬레이터는 미터 인 경우 IPhone 3입니다.) 내 코드 :실제 장치에 탐색 모음 단추가 표시되지 않습니다.
UIToolbar *tools = [[UIToolbar alloc]
initWithFrame:CGRectMake(0, 0, 70.0f, 44.01f)]; // 44.01 shifts it up 1px for some reason
tools.clearsContextBeforeDrawing = NO;
tools.clipsToBounds = NO;
tools.tintColor = [UIColor colorWithWhite:0.305f alpha:0.0f]; // closest I could get by eye to black, translucent style.
// anyone know how to get it perfect?
tools.barStyle = -1; // clear background
NSMutableArray *buttons = [[NSMutableArray alloc] initWithCapacity:3];
// Create a standard refresh button.
UIBarButtonItem *bi = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"share.png"] style:UIBarButtonItemStylePlain target:self action:@selector(shareClicked)];
//initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(refresh:)];
[buttons addObject:bi];
[bi release];
// Create a spacer.
bi = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"scroll left.png"] style:UIBarButtonItemStylePlain target:self action:@selector(upClicked)];
//bi.width = 12.0f;
[buttons addObject:bi];
[bi release];
// Add profile button.
bi = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"scroll right.png"] style:UIBarButtonItemStylePlain target:self action:@selector(downClicked)];
//bi.style = UIBarButtonItemStyleBordered;
[buttons addObject:bi];
[bi release];
// Add buttons to toolbar and toolbar to nav bar.
[tools setItems:buttons animated:NO];
[buttons release];
UIBarButtonItem *twoButtons = [[UIBarButtonItem alloc] initWithCustomView:tools];
[tools release];
self.navigationItem.rightBarButtonItem = twoButtons;
[twoButtons release];
행운이 있었나요? – stan229
예, 이미지를 연 다음 저장 ("다른 이름으로 저장")하여 내 문제를 해결했습니다. –