LMDropdownView
LMDropdownView copied to clipboard
Black background bizarre when use showInView
Hi,
Problem using:
- (void)showInView:(UIView *)containerView withContentView:(UIView *)contentView atOrigin:(CGPoint)origin;
Init dropdown view with default style and show in UITableView. When we scroll in the table and then show 'LMDropdownView' the problem arises.
Scroll on point zero working fine:
Congratulations for the project. Thank you very much.
hi @Quadram ,
With this method
- (void)showInView:(UIView *)containerView withContentView:(UIView *)contentView atOrigin:(CGPoint)origin;
The 'containerView' should be the view of your view controller (self.view) or navigation controller (self.navigationController.view). If the problem still occurs, please post some code so I can find the way to fix it.
Thank you.
Hi @lminhtm , thank you for your response.
I want to display the view on my table, I don't want display on the view of my view controller (self.view) or navigation controller (self.navigationController.view).
Then attached capture as I want to show my containerView:
And so it would show as you say to me:
I use the following code:
`- (void)showDropDownViewFromDirection:(LMDropdownViewDirection)direction {
// Init dropdown view
if (!self.dropdownView) {
self.dropdownView = [LMDropdownView dropdownView];
self.dropdownView.delegate = self;
// Customize Dropdown style
self.dropdownView.closedScale = 1;
self.dropdownView.animationDuration = 0.4;
self.dropdownView.animationBounceHeight = 10;
}
self.dropdownView.direction = direction;
// Show/hide dropdown view
if ([self.dropdownView isOpen]) {
[self.dropdownView hide];
}
else {
self.dropdownView.contentBackgroundColor = [UIColor customGreenLightLight];
if(![self.tableViewPointsNear isHidden]) {
[self.dropdownView showInView:self.tableViewPointsNear withContentView:self.tableViewSectors atOrigin:CGPointZero];
}
else {
[self.dropdownView showInView:self.mapViewPointsNear withContentView:self.tableViewSectors atOrigin:CGPointZero];
}
}
}`
Thanks for your help and sorry for my English.
hi @Quadram,
The dropdown view was't designed for displaying inside a tableview at the beginning, so I think you should try to display it in your view controller and modify the origin and your bottom buttons.
Thanks for your report 👍
@Quadram how do you control the origin of the dropdown menu?