Thursday, September 26, 2013

Why sub uitextview the frame output <UITextView: 0x91a4e00; frame = (0 0; 0 0)

Want subview (uitextview) height, but always output 0.000000

Thus the output of the frame
the uitextview
cgrect rect = [[self.view viewwithtag: 1] frame];
nslog (@ "% @", rect);

Then output
Why is 0 then?

Thank you
Reply:
If you do not set the size to TEXTVIEW, it naturally is 0, you set the size yet?
Reply:
I use a storyboard

uitextview use constraints to do the layout

But the size inspector also has height, width attributes of the class, but can not be modified (gray)

No comments:

Post a Comment