Skip to content

Swift incompatibility #24

@gholias

Description

@gholias

Im trying to use the TTAlertView in a Swift project.

The .h is imported in the ObjC Bridge file, but the xcode complains of a build time error when Im trying to use like this:
let alert:TTAlertView = TTAlertView(title: "Oops", message: "Something is missing:\n" + errorMsg, delegate: nil, cancelButtonTitle: "OK", otherButtonTitles:nil)

The only way I can build is by removing the otherButtonTitles parameter
let alert:TTAlertView = TTAlertView(title: "Oops", message: "Something is missing:\n" + errorMsg, delegate: nil, cancelButtonTitle: "OK")

but this causes a run time crash
-[TTAlertView initWithTitle:message:delegate:cancelButtonTitle:]: unrecognized selector sent to instance 0x7fdffd2b7a20

Any ideias what is wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions