iosobjective-cuiviewcontrollerpresentmodalviewcontrollertemenos-quantum

Presenting UIViewController with clear background


I'm writing iOS FFI methods for Kony application. In that, I'm presenting a viewcontroller with clear backgroundcolor. But, it's showing a white background view. I'm not using storyboars, I'm designing views in code only. In the newviewcontroller viewdidload, I set the self.view background color to clearcolor.

Here's what I have tried,

NewViewController *newVC = [[NewViewController alloc]init];
newVC.providesPresentationContextTransitionStyle = YES;
newVC.definesPresentationContext = YES;
self.modalPresentationStyle = UIModalPresentationCurrentContext;
[KonyUIContext onCurrentFormControllerPresentModalViewController:newVC animated:YES];

I'm new to KonyUIContext, how can I fix this?

Can anyone help me on this?


Solution

  • Try this code... It works perfectly for me....

    MyViewController *modalViewController = [[MyViewController alloc] init];
    modalViewController.modalPresentationStyle = UIModalPresentationOverCurrentContext;           
    [KonyUIContext presentViewController:modalViewController animated:YES completion:nil];