CustomView (UIView)


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
34
35
36
37
38
39
40
41
42
#import "MainHeaderViewRow.h"
 
@implementation MainHeaderViewRow
 
- (id)init {
    self = [super init];
    if(self) {
        NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"MainHeaderViewRow" owner:self options:nil];
        self = [nib objectAtIndex:0];
    }
    
    return self;
}
 
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if ( self )
    {
        NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"MainHeaderViewRow" owner:self options:nil];
        self = [nib objectAtIndex:0];
        
        self.iv_product = [[UIImageView allocinit];
        self.titleLabel = [[UILabel allocinit];
        self.btn_all = [[UIButton allocinit];
        
        [self addSubview: self.iv_product];
    }
    return self;
}
 
- (void)addUpTarget:(id)target action:(SEL)action
{
    [self.btn_all addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
}
 
- (void)addDownTarget:(id)target action:(SEL)action
{
    [self.btn_all addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
}
 
@end
cs


'Developer > iOS - Objective-C' 카테고리의 다른 글

Protocol  (0) 2017.12.29
ImageDownload  (0) 2017.03.21
CustomView (UIView)  (0) 2017.03.21
NavigationController 내 TabbarController 자식의 부모 컴포넌트 사용  (0) 2017.01.09
viewController 에서 NavigationController 쓰기  (0) 2016.11.21
Interface Struct  (0) 2016.10.19

이 글을 공유하기


댓글(0)

Designed by CMSFactory.NET