diff --git a/VDSSample.xcodeproj/project.pbxproj b/VDSSample.xcodeproj/project.pbxproj index b4735ed..a3ed92e 100644 --- a/VDSSample.xcodeproj/project.pbxproj +++ b/VDSSample.xcodeproj/project.pbxproj @@ -717,7 +717,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 69; + CURRENT_PROJECT_VERSION = 70; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = FCMA4QKS77; GENERATE_INFOPLIST_FILE = YES; @@ -753,7 +753,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 69; + CURRENT_PROJECT_VERSION = 70; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = FCMA4QKS77; GENERATE_INFOPLIST_FILE = YES; diff --git a/VDSSample/Supporting Files/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/VDSSample/Supporting Files/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json index a99fe98..c1f4c01 100644 --- a/VDSSample/Supporting Files/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/VDSSample/Supporting Files/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "VZ-My-Verizon-iOS-1024x1024.png", + "filename" : "Icon on stone.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" diff --git a/VDSSample/Supporting Files/Resources/Assets.xcassets/AppIcon.appiconset/Icon on stone.png b/VDSSample/Supporting Files/Resources/Assets.xcassets/AppIcon.appiconset/Icon on stone.png new file mode 100644 index 0000000..94549cc Binary files /dev/null and b/VDSSample/Supporting Files/Resources/Assets.xcassets/AppIcon.appiconset/Icon on stone.png differ diff --git a/VDSSample/Supporting Files/Resources/Assets.xcassets/AppIcon.appiconset/VZ-My-Verizon-iOS-1024x1024.png b/VDSSample/Supporting Files/Resources/Assets.xcassets/AppIcon.appiconset/VZ-My-Verizon-iOS-1024x1024.png deleted file mode 100644 index 551ea67..0000000 Binary files a/VDSSample/Supporting Files/Resources/Assets.xcassets/AppIcon.appiconset/VZ-My-Verizon-iOS-1024x1024.png and /dev/null differ diff --git a/VDSSample/ViewControllers/BaseViewController.swift b/VDSSample/ViewControllers/BaseViewController.swift index 6048bac..3fb217d 100644 --- a/VDSSample/ViewControllers/BaseViewController.swift +++ b/VDSSample/ViewControllers/BaseViewController.swift @@ -252,8 +252,16 @@ public class BaseViewController: UIViewController, Initable , NotificationCenter.default.publisher(for: UIAccessibility.voiceOverStatusDidChangeNotification).sink { [weak self] _ in if UIAccessibility.isVoiceOverRunning { if let component = self?.component { - DispatchQueue.main.asyncAfter(deadline: .now() + 1) { - self?.loadCustomRotors() + DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in + guard let self else { return } + loadCustomRotors() + if let rotors = component.accessibilityCustomRotors { + if var accessibilityCustomRotors { + accessibilityCustomRotors.append(contentsOf: rotors) + } else { + accessibilityCustomRotors = rotors + } + } UIAccessibility.post(notification: .screenChanged, argument: component) } } diff --git a/VDSSample/ViewControllers/DatePickerViewController.swift b/VDSSample/ViewControllers/DatePickerViewController.swift index 7c48959..3ab8259 100644 --- a/VDSSample/ViewControllers/DatePickerViewController.swift +++ b/VDSSample/ViewControllers/DatePickerViewController.swift @@ -336,8 +336,7 @@ extension DatePickerViewController { } func updateCalendarModel() { - component.calendarModel = .init(surface: component.surface, - hideContainerBorder: containerBorderSwitch.isOn, + component.calendarModel = .init(hideContainerBorder: containerBorderSwitch.isOn, hideCurrentDateIndicator: hideCurrentDateIndicatorSwitch.isOn, activeDates: activeDates, inactiveDates: inactiveDates, diff --git a/VDSSample/ViewControllers/TileletViewController.swift b/VDSSample/ViewControllers/TileletViewController.swift index cbd35e7..756ebfe 100644 --- a/VDSSample/ViewControllers/TileletViewController.swift +++ b/VDSSample/ViewControllers/TileletViewController.swift @@ -311,6 +311,7 @@ class TileletViewController: BaseViewController { var backgroundColor: BackgroundColor = .black var maxWidthTextField = NumericField() var isLinkSwitch = Toggle() + var descriptionIconAccessibilityTextField = TextField() var gradientColorsFormStackView = FormSection().with { $0.isHidden = true } @@ -402,6 +403,7 @@ class TileletViewController: BaseViewController { })) append(section: descriptionIconFormStackView) descriptionIconFormStackView.addFormRow(label: "Icon", view: descriptionNamePickerSelectorView) + descriptionIconFormStackView.addFormRow(label: "Accessibility", view: descriptionIconAccessibilityTextField) descriptionIconFormStackView.addFormRow(label: "Size", view: descriptionIconSizePickerSelectorView) descriptionIconFormStackView.addFormRow(label: "Color", view: descriptionIconColorPickerSelectorView) descriptionIconTokenFormStackView.addFormRow(label: "Token", view: descriptionIconTokenColorView) @@ -516,6 +518,12 @@ class TileletViewController: BaseViewController { self.setDescriptionIconForm() } + descriptionIconAccessibilityTextField + .textPublisher + .sink { [weak self] text in + self?.setDescriptiveIconModel() + }.store(in: &subscribers) + showDirectionalIconSwitch.onChange = { [weak self] sender in guard let self else { return } self.setDirectionalIconForm() @@ -727,6 +735,11 @@ class TileletViewController: BaseViewController { let iconSize = descriptionIconSizePickerSelectorView.selectedItem let iconName = descriptionNamePickerSelectorView.selectedItem var iconColor: Tilelet.IconColor? = nil + var accessibleText: String? + if let at = descriptionIconAccessibilityTextField.text, !at.isEmpty { + accessibleText = at + } + switch descriptionIconColorPickerSelectorView.selectedItem { case .token: iconColor = .token(descriptionIconTokenColorView.selectedItem) @@ -735,7 +748,7 @@ class TileletViewController: BaseViewController { default: break } - component.descriptiveIconModel = .init(name: iconName, iconColor: iconColor, size: iconSize) + component.descriptiveIconModel = .init(name: iconName, iconColor: iconColor, size: iconSize, accessibleText: accessibleText ?? nil ) } func setDirectionalIconModel() {