Skip to content

Commit

Permalink
Update cell accessibility before configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
amkomatz committed Nov 13, 2019
1 parent ae8dd66 commit bc26b7d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion EXTable.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pod::Spec.new do |spec|

spec.name = "EXTable"
spec.version = "1.2.1"
spec.version = "1.2.2"
spec.summary = "A declarative table view controller."
spec.homepage = "https://github.com/amkomatz/EXTable"
spec.license = { :type => "MIT", :file => "LICENSE" }
Expand Down
2 changes: 2 additions & 0 deletions EXTable.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.2.2;
PRODUCT_BUNDLE_IDENTIFIER = com.amkomatz.EXTable;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -458,6 +459,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.2.2;
PRODUCT_BUNDLE_IDENTIFIER = com.amkomatz.EXTable;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand Down
Binary file not shown.
12 changes: 12 additions & 0 deletions EXTable/DataSource/Row.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,19 @@ extension Row {
for: indexPath
) as! CellType

if let accessibilityContainer = self as? AccessibilityContaining {
cell.accessibilityHint = accessibilityContainer.accessibilityHint
cell.accessibilityLabel = accessibilityContainer.accessibilityLabel
cell.accessibilityValue = accessibilityContainer.accessibilityValue
cell.accessibilityIdentifier = accessibilityContainer.accessibilityIdentifier

if let accessibilityTraits = accessibilityContainer.accessibilityTraits {
cell.accessibilityTraits = accessibilityTraits
}
}

cell.configure(for: data)

return cell
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ extension EXTableViewController {

let cell = row.configuredCell(for: tableView, at: indexPath)!

if let accessibilityContainer = row.base as? AccessibilityContaining {
cell.accessibilityHint = accessibilityContainer.accessibilityHint
cell.accessibilityLabel = accessibilityContainer.accessibilityLabel
cell.accessibilityValue = accessibilityContainer.accessibilityValue
cell.accessibilityIdentifier = accessibilityContainer.accessibilityIdentifier

if let accessibilityTraits = accessibilityContainer.accessibilityTraits {
cell.accessibilityTraits = accessibilityTraits
}
}

return cell
}

Expand Down
2 changes: 1 addition & 1 deletion EXTable/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.2.1</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
Expand Down

0 comments on commit bc26b7d

Please sign in to comment.