Skip to content

Conversation

@kastiglione
Copy link
Contributor

I've been meaning to add a pactions command for a while. It's pretty basic. It would be nice to print out which control event the action observes, but this covers probably 90+% of the cases. In #59, I mentioned it might be nice to have a bactions command too, but I'm thinking that's a wait and see enhancement.

For a view controller, an example of the output is:

<XXXViewController: 0xdddddddd>: didTapButton:

and if there are multiple actions:

<XXXViewController: 0xdddddddd>: didTapButton:, didTouchButton:

cc @arigrant

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this look like when it prints?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, I meant to include an example output, thanks for asking!

For a view controller, something like:

<XXXViewController: 0xdddddddd>: didTapButton:

If there are multiple actions:

<XXXViewController: 0xdddddddd>: didTapButton:, didTouchButton:

The output would be messier if the target provides a verbose -description method. Perhaps this shouldn't rely on the built in -description and should instead manually format the <Class: 0xdddddddd> string.

arigrant added a commit that referenced this pull request May 27, 2015
Add `pactions` command to print the target/actions of a UIControl
@arigrant arigrant merged commit bd12c6a into master May 27, 2015
@kastiglione kastiglione deleted the pactions branch May 27, 2015 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants