ios - Issue in calling UIViewController view as subview in UIView -
ios - Issue in calling UIViewController view as subview in UIView -
i implementing mdspreadview, 3rd party controller, in 1 of projects. have included every file related including xib. calling subview.
the hierarchy of calling views this: there uiviewcontroller in adding uiview subview, , subview calling uiviewcontroller subview.
mdviewcontroller *mdvc = [[mdviewcontroller alloc]initwithnibname:@"mdviewcontroller_iphone" bundle:nil ]; [self addsubview:mdvc.view];
it appears fine when touch scroll or select or anything, thread 1:exc_bad_access
error occurs @ selection delegate. whereas delegates implemented in demo proj.
here image
i know there issue in calling subviews. how solve this?
the thought of taking view out of 1 controller , inserting subview in different controller mutual cause of crashes. if have it, create sure original controller (mdviewcontroller
in case) not released. can making strong property of object hijacking view or, better, @ documentation how implement container controller.
ios objective-c exc-bad-access addsubview
Comments
Post a Comment