Archived
1

Started to Implement Evaluation

Corrected Some Errors
Cleaned Code
This commit is contained in:
Kim Wittenburg
2014-09-06 01:53:22 +02:00
parent 4a3ea0cede
commit a69b5273ee
13 changed files with 112 additions and 107 deletions

View File

@@ -16,7 +16,6 @@
@interface MPExpressionLayout (MPLineGeneration)
- (CTLineRef)lineForElementAtIndex:(NSUInteger)index;
- (CTLineRef)createLineForString:(NSString *)aString;
@end
@@ -36,16 +35,6 @@
return (__bridge CTLineRef)lineObject;
}
- (CTLineRef)createLineForString:(NSString *)aString
{
NSAttributedString *text = [[NSAttributedString alloc] initWithString:aString
attributes:@{NSFontAttributeName: self.font}];
CFAttributedStringRef attributedString = CFBridgingRetain(text);
CTLineRef line = CTLineCreateWithAttributedString(attributedString);
CFRelease(attributedString); // TODO: Is this release appropriate?
return line;
}
@end
@implementation MPExpressionLayout