Swift 3,Xcode 8 seems no work anymore
SLboat opened this issue · 2 comments
SLboat commented
i temp change here,and it seems work:
// Limit the length of text
func textDidChange(notification: NSNotification) {
if notification.object === self {
if maxLength > 0 && text.characters.count > maxLength {
let endIndex = text.startIndex.advancedBy(maxLength)
text = text.substringToIndex(endIndex)
undoManager?.removeAllActions()
}
setNeedsLayout() //For Xcode 8,works
}
}
KennethTsang commented
The master branch has been migrated to Swift 3.
KennethTsang commented
Swift 2.3 is also available in "swift2" branch.
pod 'GrowingTextView', :git => 'https://github.com/KennethTsang/GrowingTextView.git', :branch => 'swift2'