ChrisXu / CXAlertView

Custom alert-view which allow you to add view as main content.
MIT License
323 stars 81 forks source link

Add access to alertview buttons #5

Closed delebedev closed 10 years ago

delebedev commented 10 years ago

In my project I use -[UIView accessibilityLabel] for ui testing. But, unfortunately, I cannot set the label for alertView buttons.

I see two possible solutions:

  1. Add @property (nonatomic, readonly) NSArray *buttons to the class interface.
  2. Change return type of - (void)addButton... to - (void)addButton.... But default button options will be still unavailable.

What do you think?

ChrisXu commented 10 years ago

@garnett

I take your suggestion to move buttons to the class interface. You should able to access CXAlertButtonItem now. I hope this is useful for you. Thanks.