• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29

まだGDB初心者です。
忘れてしまったのでちゃんと書いておきます。

rails>>
print (CGRect) [myView frame]
print (CGSize) [myView frame].size
print (CGFloat) [myView frame].size.width
<<--

出典元:

GDB and Displaying Property values
http://www.iphonedevsdk.com/forum/iphone-sdk-development/37083-gdb-displaying-property-values.html

  • メソッド?として呼んでやる
  • CGRectにキャストする

というのがポイントなんですね。
ちなみにprintの代わりに、pでも下記でもOKです:

rails>>
p (CGRect)[view frame]
<<--

  • p:print
  • po:print object

これでおしまい

posted by satoko satoko on Wed 15 Feb 2012 at 14:10 with 0 comments