Anildhara
Anildhara

Reputation: 197

Getting zero width and height of view?

I have a main view and inside that I have drag and drop another view which is named firstview.

I am getting zero width and height of view like the below exmple.

NSLog(@"  WIDTH =%d",firstview.frame.size.width);
NSLog(@"  HEIGHT =%d",firstview.frame.size.height);

What may be the reason?

Upvotes: 1

Views: 91

Answers (2)

Srikanth
Srikanth

Reputation: 1930

I agree with @waheeda, I guess you have not connected IBOutlet of firstview.

Upvotes: 1

Rahul Patel
Rahul Patel

Reputation: 5886

you have drag and drop another view.. so there may be problem of view connect in interface builder

Upvotes: 0

Related Questions