forked from LemonCake/MSLabel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathViewController.m
More file actions
57 lines (44 loc) · 1.57 KB
/
ViewController.m
File metadata and controls
57 lines (44 loc) · 1.57 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
47
48
49
50
51
52
53
54
55
56
57
//
// ViewController.m
// MSLabelExample
//
// Created by Joshua Wu on 11/10/12.
// Copyright (c) 2012 Joshua Wu. All rights reserved.
//
#import "ViewController.h"
#import "MSLabel.h"
@interface ViewController ()
@property (nonatomic, retain) IBOutlet MSLabel *exampleLabel1;
@property (nonatomic, retain) IBOutlet MSLabel *exampleLabel2;
@property (nonatomic, retain) IBOutlet MSLabel *exampleLabel3;
@property (nonatomic, retain) IBOutlet MSLabel *exampleLabel4;
@end
@implementation ViewController
@synthesize exampleLabel1;
@synthesize exampleLabel2;
@synthesize exampleLabel3;
@synthesize exampleLabel4;
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
NSString *exampleString = @"some really long string that will fill up this label's dimensions and stuff :) :) :) :) :)";
exampleLabel1.lineHeight = 20;
exampleLabel1.verticalAlignment = MSLabelVerticalAlignmentTop;
exampleLabel1.text = exampleString;
exampleLabel1.font = [UIFont fontWithName:@"HelveticaNeue" size:22];
exampleLabel2.lineHeight = 15;
exampleLabel2.verticalAlignment = MSLabelVerticalAlignmentMiddle;
exampleLabel2.text = exampleString;
exampleLabel3.lineHeight = 30;
exampleLabel3.verticalAlignment = MSLabelVerticalAlignmentBottom;
exampleLabel3.text = exampleString;
exampleLabel4.text = exampleString;
exampleLabel4.numberOfLines = 3;
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end