Skip to content

Coachmark runs out of the screen on iOS 10 #8

@PrinceManpreet

Description

@PrinceManpreet

FIX: Change the method "sizeWithFont:" in DDBubble.m to:

-(CGSize)sizeWithFont:(UIFont*)font
{
    NSAttributedString *attributedText =
    [[NSAttributedString alloc] initWithString:_title
                                    attributes:@{NSFontAttributeName: font}];
    CGRect rect = [attributedText boundingRectWithSize:(CGSize){[[UIScreen mainScreen] bounds].size.width - (PADDING*3), CGFLOAT_MAX}
                                               options:NSStringDrawingUsesLineFragmentOrigin
                                               context:nil];
    CGSize result = rect.size;

    return CGSizeMake(result.width + (PADDING*3), result.height + (PADDING*2.5));
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions