ios - Programmatically set UIButton action throws exception -


I removed the action defined buttons in a framework and set it in a custom method and it seems that throw exception is . Here is my expulsion and additional code:

  [_ loginView.logInView.signUpButton removeTarget: no action: NULL forControlEvents: UIControlEventTouchUpInside]; [_loginView.logInView.signUpButton addTarget: Self-action: @selector for control (custom widget): EIControlEventTouchUpInside];  

customViewMethod:

  - (minus) Kstmwumpath {[_loginView.view Nikalnapromsepiwu]; [Self.view addSubview: _signUpView.view]; }  

Here's an exception:

- [__ Anssifpshn Kstmwumisn]: unrecognized selector sent to instance 0x15691730

Given that you pass itself as a button target of another category There are, and given that button handler is trying to call the methodology at the wrong target (a NSDictionary ), it's a good bet that indicates error Himself was removed after making the goal of the button. And now some random objects are in the same storage space.

This is in your post which can be validated by implementing the dealloc method on self class code.

If so, then you know that itself is being canceled soon, then check that it has reached dealloc . You need to keep a strong context for this, so it will not be canceled too soon.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -