4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Xcode デバッガで break した瞬間の UIView の構成

Last updated at Posted at 2012-12-26

EDIT: 2014-09-26: video フルスクリーン再生中など復数 window がある場合に対応できるように更新

(lldb) expr -- for(UIWindow *w in [(UIApplication *)[UIApplication sharedApplication] windows]) { (int)printf("%s\n\n", [(NSString *)[w recursiveDescription] UTF8String]); }
<UIWindow: 0xbb25ae0; frame = (0 0; 768 1024); layer = <UIWindowLayer: 0xbb25a30>>
   | <UIView: 0xbb431a0; frame = (20 0; 748 1024); transform = [0, -1, 1, 0, 0, 0]; autoresize = W+H; layer = <CALayer: 0xbb43250>>
   |    | <UIView: 0xbb43ea0; frame = (0 0; 276 0); autoresize = W+H; layer = <CALayer: 0xbb43f00>>
   |    |    | <UIScrollView: 0xbb441f0; frame = (0 0; 276 0); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0xbb44b70>; layer = <CALayer: 0xbb44410>; contentOffset: {0, 0}>
   |    |    |    | <UILabel: 0xbb47cf0; frame = (70 90; 200 30); text = 'Stream 3 of 3 ...'; clipsToBounds = YES; 

EDIT: 2013-11-04: このコマンドを憶えられないで毎回このページを参照してるのがイヤになったので、~/.lldbinit に alias を作って view で同じことができるようにした。

~/.lldbinit
command alias view expr -- for(UIWindow *w in [(UIApplication *)[UIApplication sharedApplication] windows]) { (int)printf("%s\n\n", [(NSString *)[w recursiveDescription] UTF8String]); }
4
4
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
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?