0
votes

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?

2
Are you using storyboard? - Bhavin Ramani
@BhavinRamani, no, I'm designing view in code only. in the newviewcontroller viewdidload, I set the self.view background color to clearcolor - Nazik
Ok. Then please edit your question with above comment. - Bhavin Ramani
@BhavinRamani, Edited... - Nazik
try newVC.modalPresentationStyle = UIModalPresentationOverCurrentContext; - Saraswati

2 Answers

1
votes

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

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

try this , You just need to set backgroundcolor to clear color of your viewcontroller's view .

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

Hope this Helps!