Kalai
Kalai

Reputation: 467

iOS app crashes when set UITextfield delegates

I dont know why the iPhone app crashes and it gives lldb error only.I tried to add the exception break point too.

.h file:

 IBOutlet UITextField *etCountry;

.m file:

etCountry.delegate=self;///

This is the line i am getting the crash.Please give me the solution for me

enter image description here

Upvotes: 1

Views: 956

Answers (3)

Geri Borbás
Geri Borbás

Reputation: 16588

You may check other threads, and their stack. My guess is that there is everything is fine with text field. Seemingly there seems a network call also in the background, maybe a callback block is not in the right format. That caused similar "hidden" crashes to me.

enter image description here

Upvotes: 0

Ramdhas
Ramdhas

Reputation: 1765

Make sure your textfield has connection like this below images,

enter image description here

enter image description here

Upvotes: 1

Ricky
Ricky

Reputation: 10505

This is how

 self.etCountry.delegate=self;

And add

 @interface YourViewController ()<UITextFieldDelegate>
 @end

Upvotes: 0

Related Questions