ios - Xcode 6 UIView set width to zero causes height equals zero as well -



ios - Xcode 6 UIView set width to zero causes height equals zero as well -

i have next code below:

- (ibaction)ontappedaddvalue:(id)sender { cgrect rect = self.progressview.frame; rect.size.width = rect.size.width + 1; self.progressview.frame = rect; nslog(@"%@", [nsvalue valuewithcgrect:self.progressview.frame]); }

by pressing on button resize view, works if view has illustration rect (0, 0, 100, 10);

but if set width 0 in storyboard , heigh 10 points, reason sdk thinks height should equal 0 after pressing button , invocation code above.

please check video , sources if want see how works. when set uiview's width 0 in storyboard , seek increment pressing button, width incrementing reason height equal 0 in stroryboard has 10 pt.

ios uiview uikit xcode6 cgrect

Comments

Popular posts from this blog

c# - ASP.NET MVC Sequence contains no matching element -

java - Parsing XML, skip certain tags -

rest - How to invalidate user session on inactivity in a stateless server? -