0

Kony アプリケーションの iOS FFI メソッドを作成しています。その中で、明確な背景色を持つビューコントローラーを提示しています。しかし、それは白い背景のビューを示しています。私はストーリーボードを使用していません。コードのみでビューを設計しています。newviewcontroller viewdidload で、self.view の背景色を clearcolor に設定しました。

これが私が試したことです、

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

KonyUIContext は初めてですが、どうすれば修正できますか?

誰でもこれについて私を助けることができますか?

4

2 に答える 2

1

このコードを試してください...それは私にとって完璧に機能します....

MyViewController *modalViewController = [[MyViewController alloc] init];
modalViewController.modalPresentationStyle = UIModalPresentationOverCurrentContext;           
[KonyUIContext presentViewController:modalViewController animated:YES completion:nil];
于 2016-06-28T05:33:11.833 に答える
0

これを試してください。viewcontrollerのビューの色をクリアするようにbackgroundcolorを設定するだけです。

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

お役に立てれば!

于 2016-06-28T05:32:35.790 に答える