mirror of
https://github.com/firebase/firebase-ios-sdk
synced 2026-11-09 22:36:01 +05:45
Limit Swift line lengths to 100 (#5315)
This commit is contained in:
1 parent
ee5f8a37f4
commit
b90ddf1339
36 files changed
+561
-261
No files matched your search
@@ -17,42 +17,59 @@ import ClockKit
|
||||
class ComplicationController: NSObject, CLKComplicationDataSource {
|
||||
// MARK: - Timeline Configuration
|
||||
|
||||
func getSupportedTimeTravelDirections(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTimeTravelDirections) -> Void) {
|
||||
func getSupportedTimeTravelDirections(for complication: CLKComplication,
|
||||
withHandler handler: @escaping (CLKComplicationTimeTravelDirections)
|
||||
-> Void) {
|
||||
handler([.forward, .backward])
|
||||
}
|
||||
|
||||
func getTimelineStartDate(for complication: CLKComplication, withHandler handler: @escaping (Date?) -> Void) {
|
||||
func getTimelineStartDate(for complication: CLKComplication,
|
||||
withHandler handler: @escaping (Date?) -> Void) {
|
||||
handler(nil)
|
||||
}
|
||||
|
||||
func getTimelineEndDate(for complication: CLKComplication, withHandler handler: @escaping (Date?) -> Void) {
|
||||
func getTimelineEndDate(for complication: CLKComplication,
|
||||
withHandler handler: @escaping (Date?) -> Void) {
|
||||
handler(nil)
|
||||
}
|
||||
|
||||
func getPrivacyBehavior(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationPrivacyBehavior) -> Void) {
|
||||
func getPrivacyBehavior(for complication: CLKComplication,
|
||||
withHandler handler: @escaping (CLKComplicationPrivacyBehavior) -> Void) {
|
||||
handler(.showOnLockScreen)
|
||||
}
|
||||
|
||||
// MARK: - Timeline Population
|
||||
|
||||
func getCurrentTimelineEntry(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTimelineEntry?) -> Void) {
|
||||
func getCurrentTimelineEntry(for complication: CLKComplication,
|
||||
withHandler handler: @escaping (CLKComplicationTimelineEntry?)
|
||||
-> Void) {
|
||||
// Call the handler with the current timeline entry
|
||||
handler(nil)
|
||||
}
|
||||
|
||||
func getTimelineEntries(for complication: CLKComplication, before date: Date, limit: Int, withHandler handler: @escaping ([CLKComplicationTimelineEntry]?) -> Void) {
|
||||
func getTimelineEntries(for complication: CLKComplication,
|
||||
before date: Date,
|
||||
limit: Int,
|
||||
withHandler handler: @escaping ([CLKComplicationTimelineEntry]?)
|
||||
-> Void) {
|
||||
// Call the handler with the timeline entries prior to the given date
|
||||
handler(nil)
|
||||
}
|
||||
|
||||
func getTimelineEntries(for complication: CLKComplication, after date: Date, limit: Int, withHandler handler: @escaping ([CLKComplicationTimelineEntry]?) -> Void) {
|
||||
func getTimelineEntries(for complication: CLKComplication,
|
||||
after date: Date,
|
||||
limit: Int,
|
||||
withHandler handler: @escaping ([CLKComplicationTimelineEntry]?)
|
||||
-> Void) {
|
||||
// Call the handler with the timeline entries after to the given date
|
||||
handler(nil)
|
||||
}
|
||||
|
||||
// MARK: - Placeholder Templates
|
||||
|
||||
func getLocalizableSampleTemplate(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTemplate?) -> Void) {
|
||||
func getLocalizableSampleTemplate(for complication: CLKComplication,
|
||||
withHandler handler: @escaping (CLKComplicationTemplate?)
|
||||
-> Void) {
|
||||
// This method will be called once per supported complication, and the results will be cached
|
||||
handler(nil)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user