Sumi-Interactive / SIAlertView

An UIAlertView replacement with block syntax and fancy transition styles.
MIT License
2.51k stars 424 forks source link

Long text gets cut off even if MAX_LINE_COUNT is set to a high number #85

Open PhillipApps opened 10 years ago

PhillipApps commented 10 years ago

I'm having this issue. The min line count iss 5, the max is 15. Nevertheless, long messages gets cut off. I don't want a textview, i would like the text to be shown as it should. Any workaround for this?

onmyway133 commented 10 years ago

+1

iambatoan commented 10 years ago

+1

bartsidee commented 9 years ago

replace line 846-861in SIAlertView.m with

    #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_7_0
        CGRect rect = [self.message boundingRectWithSize:CGSizeMake(CONTAINER_WIDTH - CONTENT_PADDING_LEFT * 2, maxHeight)
                                                     options:NSStringDrawingUsesLineFragmentOrigin
                                                  attributes:@{NSFontAttributeName:self.messageLabel.font}
                                                     context:nil];
        return MAX(minHeight, ceil(rect.size.height));
    #else

https://github.com/Sumi-Interactive/SIAlertView/blob/master/SIAlertView/SIAlertView.m#L846-L861

PhillipApps commented 9 years ago

Worked amazing!