Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black background bizarre when use showInView #12

Open
Quadram opened this issue Sep 7, 2016 · 4 comments
Open

Black background bizarre when use showInView #12

Quadram opened this issue Sep 7, 2016 · 4 comments

Comments

@Quadram
Copy link

Quadram commented Sep 7, 2016

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.

simulator screen shot 7 sept 2016 12 58 59

Scroll on point zero working fine:

simulator screen shot 7 sept 2016 12 59 07

Congratulations for the project.
Thank you very much.

@lminhtm
Copy link
Owner

lminhtm commented Sep 8, 2016

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.

@Quadram
Copy link
Author

Quadram commented Sep 13, 2016

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:

simulator screen shot 13 sept 2016 11 36 37

And so it would show as you say to me:

simulator screen shot 13 sept 2016 11 37 25

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.

@lminhtm
Copy link
Owner

lminhtm commented Sep 14, 2016

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 👍

@famictech2000
Copy link

@Quadram how do you control the origin of the dropdown menu?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants