|
289 | 289 | UIAccessibility.shouldDifferentiateWithoutColor |
290 | 290 | }, |
291 | 291 | configureForGuidedAccess: |
292 | | - .init { |
293 | | - { features, enabled in |
294 | | - try await withUnsafeThrowingContinuation { continuation in |
295 | | - UIAccessibility.configureForGuidedAccess(features: features, enabled: enabled) { |
296 | | - enabled, error in |
297 | | - if let error { |
298 | | - continuation.resume(with: .failure(error)) |
299 | | - } else { |
300 | | - continuation.resume(with: .success(enabled)) |
301 | | - } |
| 292 | + .init { features, enabled in |
| 293 | + try await withUnsafeThrowingContinuation { continuation in |
| 294 | + UIAccessibility.configureForGuidedAccess(features: features, enabled: enabled) { |
| 295 | + enabled, error in |
| 296 | + if let error { |
| 297 | + continuation.resume(with: .failure(error)) |
| 298 | + } else { |
| 299 | + continuation.resume(with: .success(enabled)) |
302 | 300 | } |
303 | 301 | } |
304 | 302 | } |
305 | 303 | }, |
306 | 304 | convertToScreenCoordinatesUsingUIBezierPath: |
307 | | - .init { { UIAccessibility.convertToScreenCoordinates($0, in: $1) } }, |
| 305 | + .init { UIAccessibility.convertToScreenCoordinates($0, in: $1) }, |
308 | 306 | convertToScreenCoordinatesUsingUIView: |
309 | | - .init { { UIAccessibility.convertToScreenCoordinates($0, in: $1) } }, |
| 307 | + .init { UIAccessibility.convertToScreenCoordinates($0, in: $1) }, |
310 | 308 | focusedElement: |
311 | | - .init { { UIAccessibility.focusedElement(using: $0) } }, |
| 309 | + .init { UIAccessibility.focusedElement(using: $0) }, |
312 | 310 | guidedAccessRestrictionState: |
313 | | - .init { { UIAccessibility.guidedAccessRestrictionState(forIdentifier: $0) } }, |
314 | | - post: .init { { UIAccessibility.post(notification: $0, argument: $1) } }, |
| 311 | + .init { UIAccessibility.guidedAccessRestrictionState(forIdentifier: $0) }, |
| 312 | + post: .init { UIAccessibility.post(notification: $0, argument: $1) }, |
315 | 313 | registerGestureConflictWithZoom: .init { |
316 | | - { UIAccessibility.registerGestureConflictWithZoom() } |
| 314 | + UIAccessibility.registerGestureConflictWithZoom() |
317 | 315 | }, |
318 | 316 | requestGuidedAccessSession: .init { |
319 | | - { enabled in |
320 | | - await withUnsafeContinuation { continuation in |
321 | | - UIAccessibility.requestGuidedAccessSession(enabled: enabled) { |
322 | | - continuation.resume(returning: $0) |
323 | | - } |
| 317 | + enabled in |
| 318 | + await withUnsafeContinuation { continuation in |
| 319 | + UIAccessibility.requestGuidedAccessSession(enabled: enabled) { |
| 320 | + continuation.resume(returning: $0) |
324 | 321 | } |
325 | 322 | } |
| 323 | + |
326 | 324 | }, |
327 | 325 | zoomFocusChanged: .init { |
328 | | - { |
329 | | - UIAccessibility.zoomFocusChanged(zoomType: $0, toFrame: $1, in: $2) |
330 | | - } |
| 326 | + UIAccessibility.zoomFocusChanged(zoomType: $0, toFrame: $1, in: $2) |
331 | 327 | } |
332 | 328 | ) |
333 | 329 | ) |
|
369 | 365 | UIAccessibility.shouldDifferentiateWithoutColor |
370 | 366 | }, |
371 | 367 | convertToScreenCoordinatesUsingUIBezierPath: |
372 | | - .init { { UIAccessibility.convertToScreenCoordinates($0, in: $1) } }, |
| 368 | + .init { UIAccessibility.convertToScreenCoordinates($0, in: $1) }, |
373 | 369 | convertToScreenCoordinatesUsingUIView: |
374 | | - .init { { UIAccessibility.convertToScreenCoordinates($0, in: $1) } }, |
| 370 | + .init { UIAccessibility.convertToScreenCoordinates($0, in: $1) }, |
375 | 371 | focusedElement: |
376 | | - .init { { UIAccessibility.focusedElement(using: $0) } }, |
| 372 | + .init { UIAccessibility.focusedElement(using: $0) }, |
377 | 373 | guidedAccessRestrictionState: |
378 | | - .init { { UIAccessibility.guidedAccessRestrictionState(forIdentifier: $0) } }, |
379 | | - post: .init { { UIAccessibility.post(notification: $0, argument: $1) } }, |
| 374 | + .init { UIAccessibility.guidedAccessRestrictionState(forIdentifier: $0) }, |
| 375 | + post: .init { UIAccessibility.post(notification: $0, argument: $1) }, |
380 | 376 | registerGestureConflictWithZoom: .init { |
381 | 377 | { UIAccessibility.registerGestureConflictWithZoom() } |
382 | 378 | }, |
|
460 | 456 | #"@Dependency(\.accessibility.guidedAccessRestrictionState)"#, |
461 | 457 | placeholder: { _ in .deny }), |
462 | 458 | post: .unimplemented( |
463 | | - #"@Dependency(\.accessibility.post)"#, placeholder: { _, _ in () }), |
| 459 | + #"@Dependency(\.accessibility.post)"#), |
464 | 460 | registerGestureConflictWithZoom: .unimplemented( |
465 | 461 | #"@Dependency(\.accessibility.registerGestureConflictWithZoom)"#), |
466 | 462 | requestGuidedAccessSession: .unimplemented( |
|
525 | 521 | #"@Dependency(\.accessibility.guidedAccessRestrictionState)"#, |
526 | 522 | placeholder: { _ in .deny }), |
527 | 523 | post: .unimplemented( |
528 | | - #"@Dependency(\.accessibility.post)"#, placeholder: { _, _ in () }), |
| 524 | + #"@Dependency(\.accessibility.post)"#), |
529 | 525 | registerGestureConflictWithZoom: .unimplemented( |
530 | 526 | #"@Dependency(\.accessibility.registerGestureConflictWithZoom)"#), |
531 | 527 | requestGuidedAccessSession: .unimplemented( |
|
0 commit comments