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

Issue: failed on runtime #10

Open
ItsMeMIHIR opened this issue Dec 6, 2016 · 1 comment
Open

Issue: failed on runtime #10

ItsMeMIHIR opened this issue Dec 6, 2016 · 1 comment

Comments

@ItsMeMIHIR
Copy link

ItsMeMIHIR commented Dec 6, 2016

I tried to run . I followed both approach (the manual and the Pod) both were unsuccessful.

I use Xcode 8 and swift 3.

i got error in limitImageViewToSuperView() function about image height , width condition failure

this is Issue i found in stickerImageView.swift

public func limitImageViewToSuperView() {
        if self.superview == nil {
            return
        }
        self.translatesAutoresizingMaskIntoConstraints = true
        let imageSize = self.image?.size
        let aspectRatio = imageSize!.width / imageSize!.height // here i got error because of imageSize is nil
        if Float((imageSize?.width)!) > Float((imageSize?.height)!) {
            self.bounds.size.width = self.superview!.bounds.size.width
            self.bounds.size.height = self.superview!.bounds.size.width / aspectRatio
        }else {
            self.bounds.size.height = self.superview!.bounds.size.height
            self.bounds.size.width = self.superview!.bounds.size.height * aspectRatio
        }
    }

@ItsMeMIHIR ItsMeMIHIR changed the title failed on runtime Issue failed on runtime Dec 6, 2016
@ItsMeMIHIR ItsMeMIHIR changed the title Issue failed on runtime Issue: failed on runtime Dec 6, 2016
@ItsMeMIHIR ItsMeMIHIR reopened this Dec 7, 2016
@khushDesai
Copy link

Have you solved this issue ? @ItsMeMIHIR

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

2 participants