yankodimitrov / SwiftPasscodeLock

An iOS passcode lock with TouchID authentication written in Swift.
MIT License
680 stars 264 forks source link

Interface Builder couldn't/wouldn't recognize the PasscodeSignPlaceholderView or PasscodeSignButton classes #20

Closed gblotter closed 9 years ago

gblotter commented 9 years ago

I don't now if this is an Xcode 7 beta issue, or if I'm the only one... But when I tried implementing a custom xib file, as described here:

"PasscodeLock comes with two view components: PasscodeSignPlaceholderView and PasscodeSignButton that you can use to create your own custom designs. Both classes are @IBDesignable and @IBInspectable, so you can see their appearance and change their properties right inside the interface builder"

Interface Builder couldn't/wouldn't recognize the PasscodeSignPlaceholderView or PasscodeSignButton classes when I tried associating them with UIButtons, UIViews, etc.

ziogaschr commented 9 years ago

I think you just have to copy the .xib file in your project using the exact same name. Check also if the xib file, exists Build Phases -> Copy bundle resources.

yankodimitrov commented 9 years ago

You have to specify the module in the identity inspector: set it to PasscodeLock.

gblotter commented 9 years ago

@ziogaschr the xib file existed just fine, named it the same, ect. It would show up just fine on build, except for the buttons.

@yankodimitrov I tried specifying the module in the identity inspector. The drop down didn't have any modules to choose from, and I tried manually typing in 'PasscodeLock'.

Keep in mind I'm running Xcode 7 beta (most current). Have either of you tried it? I know in the demo that you made on the git repo, you didn't create a custom xib. Have you tried following those steps?

ziogaschr commented 9 years ago

@gblotter I haven't tried with Xcode 7 or with the Swift 2 code, but we used the above steps in an app with the previous version of code and it worked fine.

yankodimitrov commented 9 years ago

Yes I tried it on the demo project. It works fine on my side (Xcode 7 beta 6).