MZFormSheetPresentationController icon indicating copy to clipboard operation
MZFormSheetPresentationController copied to clipboard

called viewDidLoad Earlier than prepareForSegue called for contentViewController

Open farshadmb opened this issue 8 years ago • 0 comments

Hi Dear When Use MZFormSheetPresentationViewControllerSegue in the storyboard, The bug will appear. when called -performSegueWithIdentifier: sender: but the bug did not appear when assigning triggedSegue

your library called initWithContentViewController:(UIViewController *)viewController from CustomSegue. This constructor will assign viewController to contentViewController, After that you instance appearance to call applyInvocationTo with self-arguments. So, Problem appear when [targetInvocation setTarget:target]; [targetInvocation invoke]; called. Then targetInvocation invoke -setContentViewCornerRadius:. You use code lines which I mention blow _contentViewCornerRadius = contentViewCornerRadius; if (_contentViewCornerRadius > 0) { self.contentViewController.view.layer.masksToBounds = YES; } self.contentViewController.view.layer.cornerRadius = _contentViewCornerRadius;

when you called self.contentViewController.view, UIkit framework called UIViewController.view and -viewDidLoad methods.

If any program uses this Library and passes any property to any ViewController will be nil for any additional setup after loading the view in viewDidLoad method. The app must uses viewWillAppear: method to do any other configuration.

screen shot 2017-06-13 at 10 18 18 pm

farshadmb avatar Jun 13 '17 18:06 farshadmb