Skip to content

Commit

Permalink
Merge pull request #25 from deliveryhero/Feature/AddingAccessibilityI…
Browse files Browse the repository at this point in the history
…DToTabView

added default value to accessibility id of tabView and tabConfig.
  • Loading branch information
Islam-Metwally authored Mar 27, 2020
2 parents c5b861a + 5e35008 commit 393756d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Example/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ class ViewController: UIViewController {
normalColor: .black,
selectedColor: .black,
normalFont: UIFont.systemFont(ofSize: 15.0),
selectedFont: UIFont.boldSystemFont(ofSize: 15.0),
accessibilityID: "accessibilityID"
selectedFont: UIFont.boldSystemFont(ofSize: 15.0)
)
)
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/TabsConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public struct TabTitle {
let selected: NSAttributedString
let accessibilityID: String

public init(normal: NSAttributedString, selected: NSAttributedString, accessibilityID: String) {
public init(normal: NSAttributedString, selected: NSAttributedString, accessibilityID: String = "") {
self.normal = normal
self.selected = selected
self.accessibilityID = accessibilityID
Expand All @@ -26,7 +26,7 @@ public struct TabTitle {
selectedColor: UIColor,
normalFont: UIFont,
selectedFont: UIFont,
accessibilityID: String
accessibilityID: String = ""
) {
let normalAttribute: [NSAttributedString.Key : Any] = [
.font: normalFont,
Expand Down Expand Up @@ -62,7 +62,7 @@ public struct TabsConfig {
horizontalTabTitleInsets: CGFloat,
selectionIndicatorHeight: CGFloat,
selectionIndicatorColor: UIColor,
accessibilityID: String
accessibilityID: String = ""
) {
self.titles = titles
self.height = height
Expand Down

0 comments on commit 393756d

Please sign in to comment.