OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_FANCY_UI_COLORED_BUTTON_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_FANCY_UI_COLORED_BUTTON_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 // Subclass of UIButton whose tint and background colors can changes depending |
| 11 // on the button's state. |
| 12 // If a color is not specified for a state, uses the UIControlStateNormal |
| 13 // value. If the UIControlStateNormal value is not set, defaults to the system's |
| 14 // value. |
| 15 @interface ColoredButton : UIButton |
| 16 |
| 17 // Sets the tint color of a button to use for the specified state. |
| 18 // Currently only supports |UIControlStateNormal| and |
| 19 // |UIControlStateHighlighted|. |
| 20 - (void)setTintColor:(UIColor*)color forState:(UIControlState)state; |
| 21 |
| 22 // Sets the background color of a button to use for the specified state. |
| 23 // Currently only supports |UIControlStateNormal| and |
| 24 // |UIControlStateHighlighted|. |
| 25 - (void)setBackgroundColor:(UIColor*)color forState:(UIControlState)state; |
| 26 |
| 27 @end |
| 28 |
| 29 #endif // IOS_CHROME_BROWSER_UI_FANCY_UI_COLORED_BUTTON_H_ |
OLD | NEW |