objective c - ARC and UIView instance variables -
if have uiview instance variable add view subview;
does calling removefromsuperview dealloc instance variable when using arc? or can add again different view?
if have strong pointer view you're adding/removing, calling removefromsupeview
not cause object deallocated. can have strong pointer either declaring uiview ivar, or declaring strong property (preferred).
however, if have no other strong pointer view, deallocated arc if remove superview. (the superview keeping strong pointer, , breaking connection.)
Comments
Post a Comment