문제

내비게이션 막대와보기를 분리하는 라인의 색상을 어떻게 변경할 수 있습니까? 예를 들어 Flickr가 회색으로 변경했습니다 (http://www.geardiary.com/wp-content/uploads/2009/09/Screen-Shot-2009-09-AT-8.00.06-AM.png)

기본적으로 광산은 항상 검은 색입니다 ...

도움을 주셔서 감사합니다, Nico

도움이 되었습니까?

해결책

그들은 Apple이 제공 한 Apple이 아닌 커스텀 하단 막대를 사용했습니다. 나는 당신의 설정을 알지 못하지만 원하는대로 자신의 사용자 정의보기를 만들거나 그릴 수 있다면 (당신은 이것을 할 수 있습니다), 그것을 할 수 있습니다 (이것도 할 수 있습니다).

#define TOOLBAR_HEIGHT 44

CGRect frame = CGRectMake(self.view.bounds.size.height - TOOLBAR_HEIGHT, 0.0, self.view.bounds.size.width, TOOLBAR_HEIGHT);
UIView *customBottomBar = [[UIView alloc] initWithFrame:frame];
[customBottomBar setBackgroundColor: [UIColor grayColor]];

UIButton *button = [[UIButton alloc] initWithFrame:<frame goes here>]
... <button setup>
[customBottomBar addSubview:button];
[button release];

...<more buttons>
...<more buttons>

[self.view addSubview:customBottomBar];
[customBottomBar release];

그리고 질문에 답하기 위해, 당신은 당신이 원하는 모든 것을 추가 할 수 있으므로, 내가 제안하는 방식은 가장 사용자 정의 할 수 있지만, 1pixel High Colored Bar를 올바른 지점 (기존 도구 모음 위에 놓을 수 있습니다. )이 작업을 수행함으로써 :

CGRect frame = CGRectMake(self.view.bounds.size.height - TOOLBAR_HEIGHT, 0.0, self.view.bounds.size.width, 1);
UIView *customLine = [[UIView alloc] initWithFrame:frame];
[customLine setBackgroundColor: [UIColor grayColor]];
[self.view addSubview:customLine];
[customLine release];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top