Klasa GCKUIUtils
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Metody interfejsu użytkownika.
- Od
- 3,0
Dziedziczy NSObject.
+ (nullable UIViewController *) currentViewController |
|
|
|
Zwraca bieżący kontroler widoku aktywnego, przechodząc po hierarchii kontrolera widoków, zaczynając od kontrolera widoku głównego.
+ (NSString *) timeIntervalAsString: |
|
(NSTimeInterval) |
timeInterval |
|
Formatuje przedział czasu w formacie MM:SS lub H:MM:SS.
+ (NSString *) localTimeAsString: |
|
(NSTimeInterval) |
localTime |
|
Formatuje czas lokalny na podstawie bieżącego regionu.
- Od
- 4.3.4
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2023-12-01 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2023-12-01 UTC."],[[["`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"]]