Hide UITableViewCell content under translucent UINavigationBar
I would like to have translucent UINavigationBar. Which I have achieved with,
self.navigationController.navigationBar.translucent = YES;
const float colorMask[6] = {222, 255, 222, 255, 222, 255};
UIImage *img = [[UIImage alloc] init];
UIImage *maskedImage = [UIImage imageWithCGImage:
CGImageCreateWithMaskingColors(img.CGImage, colorMask)];
[self.navigationController.navigationBar setBackgroundImage:maskedImage
forBarMetrics:UIBarMetricsDefault];
self.navigationController.navigationBar.shadowImage = [[UIImage alloc] init];
However, when I scroll my UITableView all the content of UITableViewCell
shows up underneath UINavigationBar.
Goal: I would like to have an effect such as new Yahoo Weather App.
translucent UINavigationBar yet the table view content disappears
underneath navigation bar.
What I have tried so far:
I tried to set the content inset of UITableView. However, No luck.
self.tableView.contentInset =
UIEdgeInsetsMake(self.navigationController.navigationBar.frame.size.height,
0,0,0);
No comments:
Post a Comment