MatthewYork / MYBlurIntroductionView

A super-charged version of MYIntroductionView for building custom app introductions and tutorials.
MIT License
1.53k stars 195 forks source link

Unrecognized selector sent to instance #28

Open panzerdp opened 9 years ago

panzerdp commented 9 years ago

Hi, thanks for the great pod. I'm using this in a Swift project, built on Xcode 6.2 beta. But I'm having this error [UIView setIsCustomPanel:]: unrecognized selector sent to instance 0x7fdfba507250 when trying to display the view. My controller code:

class TourViewController: UIViewController, MYIntroductionDelegate {

    override func viewDidLoad() {     
        super.viewDidLoad()
        let frame = CGRectMake(0, 0, view.frame.size.width, view.frame.size.height),
        introductionPanels = [
            MYIntroductionPanel(frame: frame, nibNamed: "WelcomeTour1"),
            MYIntroductionPanel(frame: frame, nibNamed: "WelcomeTour2"),
            MYIntroductionPanel(frame: frame, nibNamed: "WelcomeTour3"),
            MYIntroductionPanel(frame: frame, nibNamed: "WelcomeTour4")
        ],
        introductionView = MYBlurIntroductionView(frame: frame)
        introductionView.buildIntroductionWithPanels(introductionPanels)
        introductionView.delegate = self
        view.addSubview(introductionView)
    }

}

What could be the problem?

howardhou commented 9 years ago

I have the same issue.

panzerdp commented 9 years ago

@howardhou It is something that author needs to update objective-c code to be compatible with Swift. In the end I used this solution, which works correct and has almost the same functions. Thanks.

ezefranca commented 9 years ago

any progress?

brisling commented 9 years ago

it seems nothing to do with swift, i have the same problem in a obj-c projects...