LoginSignup
7
7

More than 5 years have passed since last update.

Retina HDディスプレイのUITableViewCellのセパレータの高さはどうなっているのか調べてみた

Posted at

Retina HDディスプレイになって、1pxの線を描画するのに割り切れなくなってしまったので
UITableViewのView構造をログ出力してみました。

<UITableView: 0x7f9fc481c600; frame = (0 0; 414 736); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x7f9fc3f1d300>; layer = <CALayer: 0x7f9fc3f15580>; contentOffset: {0, 0}; contentSize: {414, 0}>
   | <UITableViewWrapperView: 0x7f9fc3f1e490; frame = (0 0; 414 736); gestureRecognizers = <NSArray: 0x7f9fc3f1ef00>; layer = <CALayer: 0x7f9fc3f1ea00>; contentOffset: {0, 0}; contentSize: {414, 736}>
   | <UIImageView: 0x7f9fc3e11530; frame = (0 729; 414 7); alpha = 0; opaque = NO; autoresize = TM; userInteractionEnabled = NO; layer = <CALayer: 0x7f9fc3e114b0>>
   | <_UITableViewCellSeparatorView: 0x7f9fc3c0eea0; frame = (20 43.6667; 394 0.333333); autoresize = W; layer = <CALayer: 0x7f9fc3c0ef90>>
   | <_UITableViewCellSeparatorView: 0x7f9fc3c18050; frame = (20 87.6667; 394 0.333333); autoresize = W; layer = <CALayer: 0x7f9fc3c09e20>>
   | <_UITableViewCellSeparatorView: 0x7f9fc3c6a000; frame = (20 131.667; 394 0.333333); autoresize = W; layer = <CALayer: 0x7f9fc3c17090>>
    ・
    ・
    省略
    ・
    ・
   | <UIImageView: 0x7f9fc3e11e00; frame = (407 729; 7 7); alpha = 0; opaque = NO; autoresize = LM; userInteractionEnabled = NO; layer = <CALayer: 0x7f9fc3e11cc0>>

ログを見てみると、UITableViewCellSeparatorViewのHeightは 0.333333 となっていました。

7
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7