开发者

UIAlertView text formatting

开发者 https://www.devze.com 2023-02-16 18:18 出处:网络
Hi I was wondering if it is possible to change the text formatting of the uial开发者_JAVA百科ertview. i.e

Hi I was wondering if it is possible to change the text formatting of the uial开发者_JAVA百科ertview. i.e

The message "You have won" but with the "won" word in bold.

I looked around and it seems that the only solution is for me to create my own popup.

any ideas?

Thanks


This isn't possible at present. You'd have to create a custom UIAlertView. That's the only option as it is not to be subclassed.

From the Class Reference:

Subclassing Notes
The UIAlertView class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified.

There are open source versions out there though. Have a search on "Custom UIAlertView" and you'll easy find them. For example see this question for some links:

Custom UIAlertView?

0

精彩评论

暂无评论...
验证码 换一张
取 消