-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainCategoryItem.m
More file actions
46 lines (37 loc) · 1.27 KB
/
MainCategoryItem.m
File metadata and controls
46 lines (37 loc) · 1.27 KB
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
43
44
45
46
//
// MainCategoryItem.m
// instatext
//
// Created by Varun Jain on 12/03/13.
// Copyright (c) 2013 Varun Jain. All rights reserved.
//
#import "MainCategoryItem.h"
@implementation MainCategoryItem
- (id)initWithFrame:(CGRect)frame image:(UIImage *)image text:(NSString *)imageTitle pList:(NSString *)pList attribute:(NSString *)attribute
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
[self setUserInteractionEnabled:YES];
self.image = image;
self.imageTitle = imageTitle;
self.pList = pList;
self.attribute = attribute;
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
/**
UILabel *title = [[UILabel alloc] init];
[title setBackgroundColor:[UIColor clearColor]];
[title setFont:[UIFont boldSystemFontOfSize:12.0]];
[title setOpaque: NO];
[title setText:imageTitle];
**/
imageRect = CGRectMake(0, 0, 32, 32);
//textRect = CGRectMake(0, imageRect.origin.y + imageRect.size.height + 10, 80, 20);
//[title setFrame:textRect];
[imageView setFrame:imageRect];
//[self addSubview:title];
[self addSubview:imageView];
}
return self;
}
@end