iOSアプリ開発のメモ置き場

ささたつがiOSアプリ開発で知ったObjective-Cのtipsなどを書いていく所存

lldb で frame とか bounds の値を確認したい。

そんなことってあると思います。でも普通に見ようとすると、

(lldb) p tableView.bounds
error: unsupported expression with unknown type
error: unsupported expression with unknown type
error: 2 errors parsing expression

となってしまって見れません。これを見るにはこんな風にする必要があるようです。

(lldb) p (CGRect)[tableView bounds]
CGRect) $1 = origin=(x=0, y=0) size=(width=320, height=480)

参考:Why can't LLDB print view.bounds?

ここから追記。

NSStringFromCGRect というメソッドがあるらしいですね。メモメモ。

NSLogをちょっと便利にするTips