아래 그림과 같이 표의 배경과 다른 스타일을 설정했습니다. 빨간색으로 강조 표시된 색인은 투명합니다. 나머지 셀과 같이 흰색으로 설정하려면 어떻게해야합니까?iOS UITableView 색인이 투명합니다.
2
A
답변
-1
its too much easy dude.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
for(UIView *view in [tableView subviews])
{
if([[[view class] description] isEqualToString:@"UITableViewIndex"])
{
[view performSelector:@selector(setIndexColor:) withObject:[UIColor whiteColor]];
//give color which you want
}
}
static NSString *MyIdentifier = @"MyIdentifier";
//go further with table cell design...
}
+0
이것은 잘못된 방법이며 Apple에서 거부 할 수 있습니다. Apple이 새로운 iOS 버전에서 TableView의 내부 구현을 변경하면 실패합니다. – Vlad
1
당신은 지정 jQuery과 속성을 사용할 수 있습니다
tableView.sectionIndexColor = [UIColor brownColor];
tableView.sectionIndexBackgroundColor = [UIColor whiteColor];
tableView.sectionIndexTrackingBackgroundColor = [UIColor blueColor];
기본의 TableView의 레이어와 장난이 가능성이 응용 프로그램을 거부하고 애플이 자신의 jQuery과 구현을 변경하는 경우 중단 될 수 있습니다.
관련 문제
- 1. 14 번째 문자 뒤에 UITableView 색인이 반복됩니다.
- 2. UITableView iOS
- 3. iOS : 다른 UITableView 내부 가로 UITableView 문제
- 4. UITableView 스크롤하지 않음 (iOS)
- 5. iOS 틀린 UITableView 크기
- 6. UITableview 다시로드 문제 iOS
- 7. iOS : UITableView 설명
- 8. iOS UITableView 동적 너비
- 9. iOS - UITableView 팬 제스처
- 10. iOS SDK : UITableView 스타일링
- 11. iOS - UITableView Crash
- 12. iOS iterate UITableView
- 13. IOS - UISablement in UITableview
- 14. iOS UITableView 인스턴스 변수?
- 15. ListView SectionIndexer의 상자가 투명합니다
- 16. UIColor groupTableViewBackgroundColor는 투명합니다.
- 17. iOS UITableView 셀 레이아웃 질문
- 18. iOS : 스택에 UITableview 셀 생성
- 19. Xcode IOS 고급 링크 UITableView
- 20. plist 사전의 UITableView KEYS, iOS
- 21. iOS uitableview reloadData가 작동하지 않습니다.
- 22. iOS : UITableView 애니메이션 새로 고침
- 23. iOS 개발 - 무한 레벨의 uitableview
- 24. iOS UIBable in UITableView Header
- 25. IOS uitableview 셀 선택한 배경
- 26. Facebook 앨범으로 UITableView 채우기 | IOS
- 27. UITableView 섹션 헤더 iOS 5
- 28. iOS UITableView Facebook App Style
- 29. Android ListView iOS Like UITableView
- 30. ios push array to uitableview
액세서리 뷰를 UITableViewCellAccessoryNone으로 설정하면 어떻게됩니까? 액세서리가 사라지나요? –
오른쪽의 색인 글자는 여전히 단색의 흰색이 아닌 테이블의 배경색을 가지고 있습니다. –