私はIOSフレームワーク(目的C)を開発し、Konyプロジェクトに統合したいと考えています。 呼び出されるFramework関数は、UIViewを表示します。KonyプロジェクトにIOSフレームワーク(Objective C)を統合
この機能は、UIをロードするためにコニープロジェクトで使用された:それは、このラインになると
- (void)viewDidLoad {
[super viewDidLoad];
GlobalVariables = [GlobalVars sharedInstance];
CameraBioselfie *cam;
cam =[[CameraBioselfie alloc] init];
[self presentViewController:cam animated:YES completion:nil];
[self.view addSubview:[cam window]];
dispatch_group_t group = dispatch_group_create(); dispatch_group_async(group,dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0),^{
while (GlobalVariables.response.length==0 && GlobalVariables.error.length==0){
}
if(GlobalVariables.response.length==0){
self.result =GlobalVariables.error;
}
else if([GlobalVariables.response containsString:GlobalVariables.username]){
self.result = @"Recognized";
}
else{
self.result = GlobalVariables.response;
}
NSArray *status = @[self.result];
[self.callbackfunction executeWithArguments:status];
dispatch_sync(dispatch_get_main_queue(), ^{
[self dismissViewControllerAnimated:YES completion:nil];
});
});
}
は:
[self.view addSubview:[cam window]];
私は、次のエラーが表示されます
このアプリケーションはエンジンがメインスレッドからアクセスされた後、バックグラウンドスレッドから自動レイアウトエンジンを変更するステップとを含む。これは、エンジンの破損や奇妙なクラッシュにつながる可能性があります。
、フレームワークは、XcodeのObjective Cのプロジェクトに統合され、同じように呼び出された場合、私はこの問題一度
私はこの問題が[self presentViewController:cam animated:YES completion:nil]であると思います。 [self.view addサブビュー:[カムウィンドウ]];これらの行。 1行目でcamを提示していて、次の行に追加しています。 – user4261201
実際には、このように使用したときに動作しました:dispatch_async(dispatch_get_main_queue()、^ { [self presentViewController:cam animated:YES completion:nil]; } [self.view addSubview:[カムウィンドウ]]; –