ios - Setting frame for subview's subview -
i have view controller defined xib.
in view controller add subclassed uiview. on subclassed uiview want add uiview.
i have variable nextround of custom view data type. init like:
nsarray *subviewarray = [[nsbundle mainbundle] loadnibnamed:@"fdcostaticnextround" owner:self options:nil]; nextround = [subviewarray objectatindex:0]; nextround.frame = cgrectzero; nextround.alpha = 0.8; [self addsubview:nextround];
after putting breakpoints, nextround's frame indeed 0,0,0,0 however, added it's xib's frame (0,0,320,91).
i try animate when reaching next rounds (so presented couple of seconds, , dismissed rollup/down animation). changing frame there seems nothing. breakpoint-wise, frame changes, actual view on screen doesn't anything.
autolayout turned off, size inspector - autosizing set top left. i've got similar feature right in view controller, , there, works flawlessly, guess has being added custom view.
i managed figure out. in xib(attribute inspector), didn't have option clip subviews enabled :-/
Comments
Post a Comment