A bug in the iOS10.3 system, when the uilable contains Chinese, the dash will fail
NSString *pricestr = [NSString stringwithformat:@ "%.2f Yuan", payinfo.originalprice];
1, the original added in the way (after iOS10.3 system failure)
Nsdictionary *attribtdic = @{nsstrikethroughstyleattributename: [NSNumber Numberwithinteger: Nsunderlinestylesingle]};
nsmutableattributedstring *attribtstr = [[nsmutableattributedstring alloc] initwithstring:pricestr attributes: Attribtdic];
2. Solutions
nsmutableattributedstring *attribtstr = [[Nsmutableattributedstring alloc] initwithstring:pricestr];
[Attribtstr setattributes:@{nsstrikethroughstyleattributename: [NSNumber numberwithinteger:nsunderlinestylesingle ], Nsbaselineoffsetattributename: @ (Nsunderlinestylesingle)} range:nsmakerange (0, pricestr.length)];
Self.originLable.attributedText = Attribtstr;
The failure of iOS10.3 uilable