//
//  SHInputTextView.swift
//  ShorthandMaster
//
//  Created by 张哲 on 2020/9/24.
//  Copyright © 2020 明津李. All rights reserved.
//

import UIKit

@objc protocol SHInputTextViewDelegate: NSObjectProtocol
{
    @objc optional func textViewDidDelete(textView : SHInputTextView)
}

class SHInputTextView: UITextView {

    // MARK: - property
    weak var shDelegate : SHInputTextViewDelegate?

    // MARK: - func
    // MARK: 点击删除按钮事件
    override func deleteBackward() {
        
        super.deleteBackward()
        
        if let delegateOK = self.shDelegate
        {
            delegateOK.textViewDidDelete?(textView: self)
        }
    }
}
