When I use the Chinese UITableview cell, the color will be mixed

When I turn on my debugging version of the "Color Shale" simulator, then we show the following result:

Sorry I can not send images:

http://i.imgur.com/LYiPCfy.jpg?1

http://i.imgur.com/t7hArne.jpg?1

0
source share
2 answers

It seems that labels with Chinese characters will have an additional sublevel (not a subspecies).

When I add two kinds of UILabel to the view, one with English characters and one with Chinese, there are slightly different hierarchies.

0x7fd3b972c020 is a UILabel with English characters:

 (lldb) po [[0x7fd3b972c020 layer] sublayers] nil (lldb) po [0x7fd3b972c020 layer] <_UILabelLayer:0x7fd3b972c2b0; position = CGPoint (187.5 333.75); bounds = CGRect (0 0; 133 20.5); delegate = <UILabel: 0x7fd3b972c020; frame = (121 323.5; 133 20.5); text = 'This is just a test.'; autoresize = RM+BM; userInteractionEnabled = NO; layer = <_UILabelLayer: 0x7fd3b972c2b0>>; contents = <CABackingStore 0x7fd3bb0e1530 (buffer [266 41] BGRX8888)>; opaque = YES; allowsGroupOpacity = YES; rasterizationScale = 2; contentsScale = 2> 

0x7fd3b95208f0 is a UILabel with Chinese characters:

 (lldb) po [[0x7fd3b95208f0 layer] sublayers] <CALayerArray 0x7fd3bb0e0c90>( <_UILabelContentLayer:0x7fd3bb0e0a60; position = CGPoint (68.25 11); bounds = CGRect (0 0; 140.5 29); contents = <CABackingStore 0x7fd3bb0e1180 (buffer [281 58] BGRA8888)>; allowsGroupOpacity = YES; rasterizationScale = 2; contentsScale = 2> ) (lldb) po [0x7fd3b95208f0 layer] <_UILabelLayer:0x7fd3b950ba70; position = CGPoint (187.5 361.75); bounds = CGRect (0 0; 136 20.5); delegate = <UILabel: 0x7fd3b95208f0; frame = (119.5 351.5; 136 20.5); text = 'θΏ™εͺζ˜―δΈ€δΈͺ桋试。'; autoresize = RM+BM; userInteractionEnabled = NO; layer = <_UILabelLayer: 0x7fd3b950ba70>>; sublayers = (<_UILabelContentLayer: 0x7fd3bb0e0a60>); opaque = YES; allowsGroupOpacity = YES; rasterizationScale = 2; contentsScale = 2> 

Each species has an opaque with white background colors.

+1
source

Chinese character solution for red:

label.layer.maskToBounds = true

0
source

All Articles