Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion RTLabelProject/Classes/DemoTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
#import "DemoTableViewCell.h"
#import "RTLabel.h"

#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_6_0)
#define TextAlignmentCenter NSTextAlignmentCenter
#else
#define TextAlignmentCenter UITextAlignmentCenter
#endif

@implementation DemoTableViewController

#pragma mark -
Expand All @@ -57,7 +63,7 @@ - (id)initWithStyle:(UITableViewStyle)style
[titleLabel setFont:[UIFont fontWithName:@"HelveticaNeue-CondensedBold" size:20]];
[titleLabel setText:@"RTLabel"];
[self.navigationItem setTitleView:titleLabel];
[titleLabel setTextAlignment:UITextAlignmentCenter];
[titleLabel setTextAlignment:TextAlignmentCenter];

_dataArray = [NSMutableArray array];
NSMutableDictionary *row1 = [NSMutableDictionary dictionary];
Expand Down
2 changes: 1 addition & 1 deletion RTLabelProject/Classes/RTLabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ typedef enum
@property (nonatomic, assign) int componentIndex;
@property (nonatomic, copy) NSString *text;
@property (nonatomic, copy) NSString *tagLabel;
@property (nonatomic) NSMutableDictionary *attributes;
@property (nonatomic, strong) NSMutableDictionary *attributes;
@property (nonatomic, assign) int position;

- (id)initWithString:(NSString*)aText tag:(NSString*)aTagLabel attributes:(NSMutableDictionary*)theAttributes;
Expand Down