#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (
void
)viewDidLoad {
[super viewDidLoad];
NSMutableArray *fOntarray= [NSMutableArray arrayWithCapacity:10];
for
(id x in [UIFont familyNames]) {
NSLog(@
"%@"
,x);
[fontarray addObject:x];
}
NSArray *fontarrauy2 = [UIFont familyNames];
NSLog(@
"%@"
,fontarrauy2);
UILabel *mylab1 = [[UILabel alloc]initWithFrame:CGRectMake(100, 100, 200, 50)];
mylab1.fOnt= [UIFont systemFontOfSize:20];
mylab1.fOnt= [UIFont fontWithName:@
"Zapfino"
size:18];
mylab1.fOnt= [UIFont fontWithName:[fontarray objectAtIndex:10] size:18];
mylab1.text = @
"HelloWorld"
;
[self.view addSubview:mylab1];
NSMutableArray *labarr = [NSMutableArray arrayWithCapacity:100];
for
(
int
x=0; x<24; x++) {
for
(
int
y=0; y<3; y++) {
UILabel *lab = [[UILabel alloc]initWithFrame:CGRectMake(y*135+7, x*30+20, 130, 28)];
lab.backgroundColor = [UIColor colorWithRed:0.820 green:0.971 blue:1.000 alpha:1.000];
lab.text = @
"HelloWorld"
;
[labarr addObject:lab];
}
}
for
(
int
i=0; i<72; i++) {
UILabel *lab = [labarr objectAtIndex:i];
NSString *fOntstring= [fontarray objectAtIndex:i];
lab.fOnt= [UIFont fontWithName:fontstring size:18];
[self.view addSubview:[labarr objectAtIndex:i]];
}
}
- (
void
)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
@end