Conversation
simplified code
simplified code
simplified code
made changes to work with simplified code.
made changes to work with simplified code.
added necessary code
re-added buttonTarget
added blocks
added blocks
remove because blocks are added
remove because blocks are added
removed toolbarButton subclass
added code to reflect block update
Simplified even further.
Simplified even further.
replaced setButtonPressedBlock to be only 1 method, and allow to specify control event. This simplifies things even further!
Simplified even further.
Updated ViewController.m to reflect simplification changes.
simplified code.
This is great! Can we maybe change the block name to [exampleButton addTarget:^{
[_textView insertText:@"You pressed a button!"];
} forControlEvents:UIControlEventTouchUpInside]; Thanks for your contributions! |
I think target would be confusing, because a target is who receives a message. [exampleButton addEventHandler:^{
[_textView insertText:@"You pressed a button!"];
} forControlEvents:UIControlEventTouchUpInside]; |
You're right - valid point. Event handler sounds great! |
renamed setButtonPressedBlock: to addEventHandler:
renamed setButtonPressedBlock: to addEventHandler:
changed setButtonPressedBlock: to use new addEventHandler: method
I have made the changes. You're right, it makes more sense then setButtonPressedBlock :P |
Ok, great! There are some conflicts, so I'm going to fix those. In fact, I think I'm going to delete my last 5 commits because something weird happened and they all have -m "message" for some reason... I'll then merge this. |
@Hackmodford can you squash this into one commit? By squashing your other commit, I think I messed up this Pull Request... If squashing this doesn't work, maybe open up another pR? Thanks - appreciate your work on this repo. |
I will create a new pull request |
I believe this is as simple as it can get. It removes the button having a textField/textView/searchBar property but I don't believe it should be the buttons job to know that. Let me know what you think.