使用FlatUIKit改变IBAction的颜色?

时间:2013-07-22 16:21:03

标签: ios uibutton

我正在尝试更改我的按钮的视觉方面,但是我正在尝试使用FlatUIKit的按钮方面,对于那些不知道那是什么,因为它无关紧要,在示例项目中他们提供了改变IBOutlet按钮的颜色,但是它与IBAction的工作方式不同,下面是他们的示例代码:

#import "ViewController.h"
#import "FUIButton.h"
#import "UIColor+FlatUI.h"

@interface ViewController () 

@property (weak, nonatomic) IBOutlet FUIButton *alertViewButton;

//as you can see its a FUIButton, and I'm not sure how to use that with an IBAction

@end

@implementation ViewController

- (void)viewDidLoad
{

 self.alertViewButton.buttonColor = [UIColor peterRiverColor];
self.alertViewButton.shadowColor = [UIColor silverColor];
self.alertViewButton.shadowHeight = 3.0f;
self.alertViewButton.cornerRadius = 6.0f;
self.alertViewButton.titleLabel.font = [UIFont boldFlatFontOfSize:16];
[self.alertViewButton setTitleColor:[UIColor cloudsColor] forState:UIControlStateNormal];
[self.alertViewButton setTitleColor:[UIColor cloudsColor] forState:UIControlStateHighlighted];

}

这是我的代码:

我的.h

#import <UIKit/UIKit.h>

@interface HomeViewController : UIViewController {


}
- (IBAction)start:(id)sender;


@end

我的.m:

#import "HomeViewController.h"
#import "UIColor+FlatUI.h"
#import "FUIButton.h"

@interface HomeViewController ()



@end

@implementation HomeViewController

- (IBAction)start:(id)sender {

//this is the button i want change the appearance of.
}

我坚持这个,我想使用FUIButton颜色效果的按钮是IBAction叫做start,有什么帮助吗?提前谢谢。

注意:如果有所不同,我正在使用故事板。

0 个答案:

没有答案