Reputation: 3956
For example: there is a tableView, when it is pulled down, the back view display. the effect is like this:
I tried like this but not working:
[self.view addSubview:logoView];
[self.view addSubview:tableView];
Upvotes: 1
Views: 380
Reputation: 1643
You set the tableView background as your logoview. Keep your UITableviewCell as what color you want.
Upvotes: 1
Reputation: 1079
You can achieve the same as the example image above by adding the view with a negative y offset.
UIView *header = [[UIView alloc] initWithFrame: CGRectMake(0.0f, 0.0f - self.view.bounds.size.height, self.view.bounds.size.width, self.view.bounds.size.height)];
header.backgroundColor = [UIColor lightGrayColor];
[self.tableView addSubview:header];
However if you have content in this view, such as a logo, it will appear to be pulled down from the top, rather than behind the table, I don't know if this is the effect you want or not.
Upvotes: 0
Reputation: 4345
You have to
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
or check for your self which delegate is best suited. set the logo image hidden to NOUpvotes: 1
Reputation: 163
I'm not sure if i recognize your problem but i think you want something like this:
you'll have to use:
[self.view insertSubview:aboveSubview: ];
[self.view insertSubview:belowSubview: ];
not [self.view addSubview: ];
Upvotes: 0