GCKUIUtils 类
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
此类继承 NSObject。
+ (nullable UIViewController *) currentViewController |
|
|
|
通过从根视图控制器开始浏览视图控制器层次结构,返回当前处于活动状态的视图控制器。
+ (NSString *) timeIntervalAsString: |
|
(NSTimeInterval) |
timeInterval |
|
将时间间隔设置为 MM:SS 或 H:MM:SS 格式。
+ (NSString *) localTimeAsString: |
|
(NSTimeInterval) |
localTime |
|
根据当前的语言区域设置当地时间的格式。
- 开始时间
- 4.3.4
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-12-01。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2023-12-01。"],[[["`GCKUIUtils` provides user interface utility methods for iOS development, available since version 3.0."],["It offers methods to access the current view controller within the hierarchy."],["It includes functionalities for formatting time intervals and local times into readable strings."]]],["The `GCKUIUtils` class provides static utility methods for user interface operations. It can retrieve the currently active `UIViewController` by traversing the view controller hierarchy. Additionally, it offers methods to format time: `timeIntervalAsString:` formats a given time interval into MM:SS or H:MM:SS format, and `localTimeAsString:` formats local time based on the user's current locale.\n"]]