기본적으로 내 UINavigationBar
의 배경색을 설정하려고하지만 아무 것도 표시하지 않습니다.UICavigation 표시 숨기기 UINavigationBar
제발, 어떻게 해결할 수 있습니까?! 대단히 감사합니다 !!
이것은 viewDidLoad
에 내 코드 :
[super viewDidLoad];
self.filteredContentList = [[NSMutableArray alloc] init];
// Do any additional setup after loading the view.
self.searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 50, CGRectGetWidth(self.collectionView.frame), 30)];
self.searchBar.autocorrectionType = UITextAutocorrectionTypeNo;
self.searchBar.placeholder = @"Search...";
[self.collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:CellIdentifier];
self.collectionView.backgroundColor = [UIColor whiteColor];
[self.collectionView addSubview:self.searchBar];
[self.view addSubview:self.searchBar];
[self.collectionView setContentOffset:CGPointMake(0, 44)];
[self.collectionView setContentInset:UIEdgeInsetsMake(80, 0, 0, 0)];
self.navigationController.navigationBar.backgroundColor = [UIColor greenColor];
사용하고있는 아이폰 OS 버전? – Winston
@Winston은 현재 iOS7을 사용합니다 – ipalibowhyte