Skip to content
New issue

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

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

Already on GitHub? # to your account

Button in custom view causes EXC_BAD_ACCESS when pressed #16

Open
raphneve opened this issue Jun 4, 2013 · 1 comment
Open

Button in custom view causes EXC_BAD_ACCESS when pressed #16

raphneve opened this issue Jun 4, 2013 · 1 comment
Labels

Comments

@raphneve
Copy link

raphneve commented Jun 4, 2013

Hi there, and thanks for a nifty component.
I am using the following code to present a custom view :

    AproposView *apropos = [[AproposView alloc] initWithNibName:@"AproposView" bundle:nil];
    RNBlurModal *blurModal = [[RNBlurModalView alloc] initWithViewController:self view:apropos.view];
    [blurModal show];

In the AproposView, I have a button, which when I press generates an EXC_BAD_ACCESS message. I also tried other methods such as putting a tapgesture on an UIImageView but the result was the same.

Any pointers appreciated !

@rnystrom
Copy link
Owner

rnystrom commented Jun 5, 2013

More than likely it's because the apropos object is autoreleased. I'd try to either create a property of type AproposView of your class that you're calling this code, or better yet, abstract your view to its own class so you can initialize it without needing to create a VC object.

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

No branches or pull requests

2 participants