prolificinteractive / Caishen

A Payment Card UI & Validator for iOS
MIT License
766 stars 119 forks source link

IB Designables Error on Swift 2.3 #92

Closed monshipouri closed 7 years ago

monshipouri commented 8 years ago

Hi,

When I add CardTextField class to my UITextField, I get IB Designable errors.

errors

DannyVancura commented 8 years ago

Hi, thanks for letting us know about this issue! From what I can find online, this seems to be an issue with Xcode 8 and IBDesignable in Swift 2.3 in general: https://forums.developer.apple.com/thread/63237 Will look more into this in the coming week.

monshipouri commented 8 years ago

The way I fixed it was to create another class and Inherit from CardTextField, Like:

import Foundation
import Caishen
class SMCardTextField: CardTextField {
 ...
}

I hope it can help. Thanks

DannyVancura commented 7 years ago

Closed with #102

monshipouri commented 7 years ago

Thanks