Skip to content

Commit 79b6561

Browse files
64bit support has been implemented.
1 parent 1a59b0b commit 79b6561

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

OHAttributedLabel/OHAttributedLabel.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@
292292
09E159F7160F573A003025B4 /* Debug */ = {
293293
isa = XCBuildConfiguration;
294294
buildSettings = {
295+
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
295296
CLANG_ENABLE_OBJC_ARC = YES;
296297
CLANG_WARN_CONSTANT_CONVERSION = YES;
297298
CLANG_WARN_ENUM_CONVERSION = YES;
@@ -314,6 +315,7 @@
314315
09E159F8160F573A003025B4 /* Release */ = {
315316
isa = XCBuildConfiguration;
316317
buildSettings = {
318+
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
317319
CLANG_ENABLE_OBJC_ARC = YES;
318320
CLANG_WARN_CONSTANT_CONVERSION = YES;
319321
CLANG_WARN_ENUM_CONVERSION = YES;

OHAttributedLabel/Source/NSAttributedString+Attributes.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ -(CGSize)sizeConstrainedToSize:(CGSize)maxSize fitRange:(NSRange*)fitRange
7171
{
7272
CFRange fitCFRange = CFRangeMake(0,0);
7373
sz = CTFramesetterSuggestFrameSizeWithConstraints(framesetter,CFRangeMake(0,0),NULL,maxSize,&fitCFRange);
74-
sz = CGSizeMake( floorf(sz.width+1) , floorf(sz.height+1) ); // take 1pt of margin for security
74+
sz = CGSizeMake( floor(sz.width+1) , floor(sz.height+1) ); // take 1pt of margin for security
7575
CFRelease(framesetter);
7676

7777
if (fitRange)
@@ -348,7 +348,7 @@ -(void)setCharacterSpacing:(CGFloat)chracterSpacing
348348
}
349349
-(void)setCharacterSpacing:(CGFloat)chracterSpacing range:(NSRange)range
350350
{
351-
[self addAttribute:(NSString *)kCTKernAttributeName value:[NSNumber numberWithFloat:chracterSpacing] range:range];
351+
[self addAttribute:(NSString *)kCTKernAttributeName value:[NSNumber numberWithDouble:chracterSpacing] range:range];
352352
}
353353

354354
-(void)modifyParagraphStylesWithBlock:(void(^)(OHParagraphStyle* paragraphStyle))block

OHAttributedLabel/Source/OHAttributedLabel.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ - (void)drawTextInRect:(CGRect)aRect
556556
CGSize sz = CTFramesetterSuggestFrameSizeWithConstraints(framesetter,CFRangeMake(0,0),NULL,CGSizeMake(drawingRect.size.width,CGFLOAT_MAX),NULL);
557557
if (self.extendBottomToFit)
558558
{
559-
CGFloat delta = MAX(0.f , ceilf(sz.height - drawingRect.size.height)) + 10 /* Security margin */;
559+
CGFloat delta = MAX(0.f , ceil(sz.height - drawingRect.size.height)) + 10 /* Security margin */;
560560
drawingRect.origin.y -= delta;
561561
drawingRect.size.height += delta;
562562
}

OHAttributedLabel/Source/OHTouchesGestureRecognizer.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
4949
CGPoint currentPoint = [touch locationInView:self.view];
5050
CGFloat distanceX = (currentPoint.x - _startPoint.x);
5151
CGFloat distanceY = (currentPoint.y - _startPoint.y);
52-
CGFloat distance = sqrtf(distanceX * distanceX + distanceY * distanceY);
52+
CGFloat distance = sqrt(distanceX * distanceX + distanceY * distanceY);
5353
if (distance > 10.0f) {
5454
self.state = UIGestureRecognizerStateCancelled;
5555
} else {

0 commit comments

Comments
 (0)