The problem of setting other styles after iOS loads html

load a html with attributedString of UILabel, for example:

<p style="text-align: center;">aaa

<p style="text-align: right;">bbb

there is no problem with loading

< hr >

use NSMutableParagraphStyle to add other styles:

NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStyle new];
paragraphStyle.minimumLineHeight = 20; // 

[attributedString addAttribute:NSParagraphStyleAttributeName
                             value:paragraphStyle
                             range:NSMakeRange(0, attributedString.length)];
< hr >

this new style (row height) can be set successfully, but the text-align will be reset to left . What the heck is this?

Ios
Mar.20,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e58e9d-454cb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e58e9d-454cb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?