-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTitleAndImageBtn.h
More file actions
33 lines (27 loc) · 852 Bytes
/
TitleAndImageBtn.h
File metadata and controls
33 lines (27 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
// TitleAndImageBtn.h
// test
//
// Created by xiaozhenyang on 14-10-8.
// Copyright (c) 2014年 mac iko. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface TitleAndImageBtn : UIButton
{
UIImage * _backGroundColor;
UIImage * _backGroundSelectColor;
}
@property(nonatomic,assign)CGRect titleCGrect;
@property(nonatomic,assign)CGRect imageCGrect;
- (CGRect)imageRectForContentRect:(CGRect)contentRect;
/**
UIButton的自定义
@param frame button 的 frame
@param titleFrame button 的 title frame
@param imageFrame button 的 image frame
@return 返回按钮
*/
- (id)initWithFrame:(CGRect)frame andTitleFrame:(CGRect)titleFrame andImageFrame:(CGRect)imageFrame;
-(void)setBackgroundColor:(UIColor *)backColor forState:(UIControlState)state;
- (void)setImageWithColor: (UIColor *) color frame:(CGRect)frame;
@end