// #ifdef APP-IOS /** * iOS平台声明文件 * 用于声明 SafariServices 模块和相关类 */ declare namespace UTSiOS { namespace SafariServices { /** * SFSafariViewController 类 * 用于在App内显示网页内容 */ class SFSafariViewController { constructor(url: UTSiOS.URL); // 设置配置 static configuration: any; // 设置代理 setDelegate(delegate: any): void; // 设置首选的条形颜色 setPreferredBarTintColor(color: any): void; // 设置首选的控制颜色 setPreferredControlTintColor(color: any): void; // 设置模态展示样式 setModalPresentationStyle(style: number): void; } } // URL类 class URL { static URLWithString(string: string): URL; } namespace UIKit { class DispatchQueue { static readonly main: DispatchQueue; async(closure: () => void): void; } } // 获取当前视图控制器 function getCurrentViewController(): any; } // #endif