-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFontCategoryItems.m
More file actions
40 lines (32 loc) · 1.17 KB
/
FontCategoryItems.m
File metadata and controls
40 lines (32 loc) · 1.17 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
//
// FontCategoryItems.m
// instatext
//
// Created by Varun Jain on 17/03/13.
// Copyright (c) 2013 Varun Jain. All rights reserved.
//
#import "FontCategoryItems.h"
@implementation FontCategoryItems
- (id) initWithFrame:(CGRect)frame fontName:(NSString *)fontName attribute:(NSString *)attribute;
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
[self setUserInteractionEnabled:YES];
self.pList = nil;
self.attribute = attribute;
self.fontName = fontName;
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"font_bg.png"]];
imageRect = CGRectMake(0, 0, 50, 32);
UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(5, 5, imageView.frame.size.width - 10, imageView.frame.size.height - 10)];
textView.text = @"Awe";
textView.font = [UIFont fontWithName:fontName size:12];
[imageView addSubview:textView];
//[title setFrame:textRect];
[imageView setFrame:imageRect];
//[self addSubview:title];
[self addSubview:imageView];
}
return self;
}
@end