In Objective-C,I can use the following command to view the properties of some view objects:
// 1. Sending messages directly to memory addresses
po [0x10daab000 contentInset]
// 2. or convert to the corresponding type and then send the message.
po [((UITableView *)0x10daab000) contentInset]
But when I develop projects with Swift, I can't do that. When I use this command, Xcode only prints the 0x10daab000
object, as if I were using po 0x10daab000
.
Also, I can't access
contentInset
here using swift-like syntax, i.e.0x10daab000.contentInset
. But I think this is normal.
I think it should be possible to do the same in a Swift project as in an Objective-C project, right? So if anyone knows how to do it, then I would appreciate it.