Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXC_BAD_ACCESS when setting properties on GrowingTextView referenced from Storyboard (IBOutlet) #33

Open
edulpn opened this issue May 16, 2018 · 2 comments

Comments

@edulpn
Copy link

edulpn commented May 16, 2018

Code looks like this:

import UIKit
import GrowingTextView

class CommentsViewController: UIViewController {
    @IBOutlet var commentTextView: GrowingTextView!
    
    // MARK:- View lifecycle
    override func viewDidLoad() {
        super.viewDidLoad()
        
        customizeCommentTextView()
    }
    
    func customizeCommentTextView() {
        commentTextView.maxLength = 255
        commentTextView.trimWhiteSpaceWhenEndEditing = true
        commentTextView.minHeight = 40.0
        commentTextView.delegate = self
    }
}

when trying to run any of the lines inside customizeCommentTextView() it gives me Thread 1: EXC_BAD_ACCESS (code=257, address=0x1d4474082).

Any idea what might be happening? I followed the README instructions for Storyboard usage and I am using Carthage 0.29.0 to install GrowingTextView 0.5.

Thanks!

@KennethTsang
Copy link
Owner

I think you might not set the textview's class to GrowingTextView? Try this:
Go to storyboard, select the textview, open identity inspector, clear the "class" textbox, then input "GrowingTextView" again.

@Misa-s
Copy link

Misa-s commented Feb 10, 2022

I could solve this problem!
Thanks.

#14 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants