objective c - Modal View Controller making background black -
i launching modal view controller view controller. in modal view controller displayed fine, except parent view controller goes black. when modal view controller dismissed, parent drawn. can point me going wrong? here code using:
modalvc.modalpresentationstyle = uimodalpresentationformsheet; self.navigationcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller: modalvc]; [currentviewcontroller presentmodalviewcontroller: self.navigationcontroller animated: yes]; self.navigationcontroller.view.frame = cgrectmake(200, 200, 320, 540);
i found problem finally. mistake.
this culprit:
self.navigationcontroller.view.frame = cgrectmake(200, 200, 320, 540); it should be:
self.navigationcontroller.view.superview.frame = cgrect(200,200,320, 540);
Comments
Post a Comment