diff --git a/VDSSample.xcodeproj/project.pbxproj b/VDSSample.xcodeproj/project.pbxproj index 65dcdbb..aaf032c 100644 --- a/VDSSample.xcodeproj/project.pbxproj +++ b/VDSSample.xcodeproj/project.pbxproj @@ -333,8 +333,8 @@ EA985C24296E06EA00F2FF2E /* TextAreaViewController.swift */, EAC9257F29119FC400091998 /* TextLinkViewController.swift */, EA5E304F294D11540082B959 /* TileContainerViewController.swift */, - EA5E305B295111050082B959 /* TileletViewController.swift */, EA5E30542950EA6E0082B959 /* TitleLockupViewController.swift */, + EA5E305B295111050082B959 /* TileletViewController.swift */, EA3C3BB328996775000CA526 /* ToggleViewController.swift */, EAB2375F29E88D5D00AABE9A /* TooltipViewController.swift */, EAB2376B29E9E74900AABE9A /* TrailingTooltipLabelViewController.swift */, @@ -679,7 +679,7 @@ ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 40; + CURRENT_PROJECT_VERSION = 41; DEVELOPMENT_TEAM = FCMA4QKS77; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = VDSSample/Info.plist; @@ -711,7 +711,7 @@ ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 40; + CURRENT_PROJECT_VERSION = 41; DEVELOPMENT_TEAM = FCMA4QKS77; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = VDSSample/Info.plist; diff --git a/VDSSample/ViewControllers/BadgeIndicatorViewController.swift b/VDSSample/ViewControllers/BadgeIndicatorViewController.swift index b9336a5..8eaf61e 100644 --- a/VDSSample/ViewControllers/BadgeIndicatorViewController.swift +++ b/VDSSample/ViewControllers/BadgeIndicatorViewController.swift @@ -138,7 +138,7 @@ class BadgeIndicatorViewController: BaseViewController { horizontalPaddingTextField .numberPublisher .sink { [weak self] number in - self?.component.horitonalPadding = number?.cgFloatValue + self?.component.horizontalPadding = number?.cgFloatValue }.store(in: &subscribers) verticalPaddingTextField diff --git a/VDSSample/ViewControllers/BaseViewController.swift b/VDSSample/ViewControllers/BaseViewController.swift index 910b407..dbe9d2f 100644 --- a/VDSSample/ViewControllers/BaseViewController.swift +++ b/VDSSample/ViewControllers/BaseViewController.swift @@ -236,7 +236,23 @@ public class BaseViewController: UIViewController, Initable , self?.activeTextField = nil }.store(in: &subscribers) - loadCustomRotors() + + 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() + UIAccessibility.post(notification: .screenChanged, argument: component) + } + } + } + }.store(in: &subscribers) + + // Initially register the custom rotor if VoiceOver is on + if UIAccessibility.isVoiceOverRunning { + loadCustomRotors() + UIAccessibility.post(notification: .screenChanged, argument: component) + } } func isViewHiddenByKeyboard(view: UIView, keyboardFrame: CGRect) -> Bool { @@ -286,7 +302,7 @@ public class BaseViewController: UIViewController, Initable , open func addContentTopView(view: UIView, edgeSpacing: CGFloat = 16.0) { view.translatesAutoresizingMaskIntoConstraints = false contentTopView.addSubview(view) - view.pinToSuperView(.init(top: edgeSpacing, left: edgeSpacing, bottom: edgeSpacing, right: edgeSpacing)) + view.pinToSuperView(.uniform(edgeSpacing)) } open func append(section: FormSection) { diff --git a/VDSSample/ViewControllers/MenuViewController.swift b/VDSSample/ViewControllers/MenuViewController.swift index 2400592..05e0909 100644 --- a/VDSSample/ViewControllers/MenuViewController.swift +++ b/VDSSample/ViewControllers/MenuViewController.swift @@ -63,10 +63,11 @@ class MenuCell: UITableViewCell { } } + class MenuViewController: UITableViewController, TooltipLaunchable { static let items: [MenuComponent] = [ MenuComponent(title: "DropShadow Tester", completed: true, viewController: DropShadowViewController.self), -// MenuComponent(title: "TableView Tester", completed: true, viewController: TableViewTestController.self), + MenuComponent(title: "TableView Tester", completed: true, viewController: TableViewTestController.self), MenuComponent(title: "Badge", completed: true, viewController: BadgeViewController.self), MenuComponent(title: "Badge Indicator", completed: true, viewController: BadgeIndicatorViewController.self), MenuComponent(title: "Button", completed: true, viewController: ButtonViewController.self), @@ -85,7 +86,7 @@ class MenuViewController: UITableViewController, TooltipLaunchable { MenuComponent(title: "RadioButton", completed: true, viewController: RadioButtonViewController.self), MenuComponent(title: "RadioButtonItem", completed: true, viewController: RadioButtonItemViewController.self), MenuComponent(title: "RadioButtonGroup", completed: true, viewController: RadioButtonGroupViewController.self), - //MenuComponent(title: "TabsContainer", completed: false, viewController: TabsContainerViewController.self), +// //MenuComponent(title: "TabsContainer", completed: false, viewController: TabsContainerViewController.self), MenuComponent(title: "Tabs", completed: true, viewController: TabsViewController.self), MenuComponent(title: "TextArea", completed: false, viewController: TextAreaViewController.self), MenuComponent(title: "TextLink", completed: true, viewController: TextLinkViewController.self), diff --git a/VDSSample/ViewControllers/TableViewTestController.swift b/VDSSample/ViewControllers/TableViewTestController.swift index 12eef86..236be47 100644 --- a/VDSSample/ViewControllers/TableViewTestController.swift +++ b/VDSSample/ViewControllers/TableViewTestController.swift @@ -172,7 +172,7 @@ public class TableViewTestController: UIViewController, Initable, Surfaceable { } var items: [MenuComponent] { - batch1 + all } var all: [MenuComponent] { @@ -193,6 +193,7 @@ public class TableViewTestController: UIViewController, Initable, Surfaceable { MenuComponent(title: "TextLinkCaret", completed: true, viewController: TextLinkCaretViewController.self), MenuComponent(title: "TitleLockup", completed: true, viewController: TitleLockupViewController.self), MenuComponent(title: "Tooltip", completed: true, viewController: TooltipViewController.self), + MenuComponent(title: "TrailingTooltip", completed: true, viewController: TrailingTooltipLabelViewController.self), ] } } @@ -214,7 +215,7 @@ extension TableViewTestController : UITableViewDelegate, UITableViewDataSource { let cell = UITableViewCell() cell.contentView.addSubview(component) - sample.pin(edgeInset: .init(top: 16, left: 16, bottom: 16, right: 16)) + sample.pin(edgeInset: .uniform(16)) cell.backgroundColor = surface.color cell.layoutIfNeeded() return cell