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

Bubbleshowcase Screenshot #6

Open
invisibleBully opened this issue May 4, 2020 · 6 comments
Open

Bubbleshowcase Screenshot #6

invisibleBully opened this issue May 4, 2020 · 6 comments

Comments

@invisibleBully
Copy link

This weird behavior happens sometimes can't seem to put a finger on it..
Screenshot 2020-05-04 at 11 53 43 AM

@PrashantTiwari123
Copy link

This weird behavior happens sometimes can't seem to put a finger on it.

Screenshot 2020-05-18 at 11 46 37 PM

@invisibleBully
Copy link
Author

@PrashantTiwari123 you're experiencing this too I see

@PrashantTiwari123
Copy link

PrashantTiwari123 commented May 19, 2020 via email

@lohithkorp
Copy link

I have the same problem too... anyone seems to figure out the cause please?
I need some help.

@iamkenjobs
Copy link

Hi @invisibleBully @lohithkorp I fixed this by applying a nil checker making sure that the self.target is not nil, before executing the code. I hope this helps

        if let parent: UIView = self.target.superview {
            if let screenshot = parent.resizableSnapshotView(from: self.target.frame, afterScreenUpdates: false, withCapInsets: UIEdgeInsets.zero) {
                screenshot.backgroundColor = self.sreenshotContainerBackground
                screenshot.translatesAutoresizingMaskIntoConstraints = false
                screenshot.isUserInteractionEnabled = false
                screenshotShadow.addSubview(screenshot)
                
                let centerXImage = screenshot.centerXAnchor.constraint(equalTo: screenshotShadow.centerXAnchor)
                let centerYImage = screenshot.centerYAnchor.constraint(equalTo: screenshotShadow.centerYAnchor)
                let widthImage = screenshot.widthAnchor.constraint(equalToConstant: targetFrame.width)
                let heightImage = screenshot.heightAnchor.constraint(equalToConstant: targetFrame.height)
                screenshotShadow.addConstraints([centerXImage, centerYImage, heightImage, widthImage])
            }

        }

@Sukarma33
Copy link

@iamkenjobs @fermoya it doesn't work, I tried to add the effect of changing tabbar image when showing case, but it always force close in the code "let parent: UIView = self.target.superview ?? self.target", I don't know why

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

5 participants