| Index: ios/chrome/browser/ui/util/label_observer.h
|
| diff --git a/ios/chrome/browser/ui/util/label_observer.h b/ios/chrome/browser/ui/util/label_observer.h
|
| index f102efbd012807f71646bde9815bf505ea59b726..198c620caddc9afbd2b50c3e8c550cc7382fb507 100644
|
| --- a/ios/chrome/browser/ui/util/label_observer.h
|
| +++ b/ios/chrome/browser/ui/util/label_observer.h
|
| @@ -16,13 +16,21 @@
|
| @interface LabelObserver : NSObject
|
|
|
| // Returns the LabelObserver for |label|, laziliy instantiating one if
|
| -// necessary. LabelObservers are associated with the label, and will be
|
| -// deallocated upon |label|'s deallocation.
|
| +// necessary. LabelObservers are associated with label but must be kept alive by
|
| +// the caller. |-startObserving| must be called before the |label| is observed.
|
| + (instancetype)observerForLabel:(UILabel*)label;
|
|
|
| // LabelObservers should be created via |+observerForLabel:|.
|
| - (instancetype)init NS_UNAVAILABLE;
|
|
|
| +// Starts observing the label. For each call to this function, |-stopObserving|
|
| +// should be called before |label| is deallocated.
|
| +- (void)startObserving;
|
| +
|
| +// Stops observing the label. The label stop being observed once the number of
|
| +// call to this function match the number of call to |-startObserving|.
|
| +- (void)stopObserving;
|
| +
|
| // Block type that takes a label. Blocks registered for a label will be called
|
| // when property values are updated.
|
| typedef void (^LabelObserverAction)(UILabel* label);
|
|
|