Search code examples
iphoneiosipaduialertviewretina-display

UIAlertView message too long


I have an alertView that pops up when reachability has detected wifi. I have both english and french translations of this. The problem is the french version's text is a bit longer, and I do have some line breaks in there.

When the text is too long, the alertView changes to a white background with a scrollable text view. Is there any way around this? The strange thing is that this only happens on retina devices (or non-retina when in landscape, but that makes more sense). Non-retina devices show the whole message normally. It seems like retina devices having more landscape shouldn't make this happen.

Help?

Thanks in advance.


Solution

  • First of all retina devices would produce the same results seeing as they have the same amount of screen real-estate. The difference is in pixel density, which means that an object on retina will be the same physical size but will actually be using 4 times the pixels which produces a much clearer and sharper image.

    Secondly, there is no way you can avoid this. UIAlertView is a class that Apple allows VERY little customization of, so you may be better off making a custom view and presenting it yourself. This is probably only happening in landscape mode because the alert gets less screen area under these circumstances.

    So overall, I would recommend that you either create your own custom pop-up or you trim down the amount of text you're displaying in the alert.