Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2025-02-07 11:13:51 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f294a52c2a1f93d209c38bd5045230bda55acf06
f294a52c
1 parent
4951618c
LoyaltyAnalysisViewController accessibilities
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/LoyaltyAnalysisViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/LoyaltyAnalysisViewController.swift
View file @
f294a52
...
...
@@ -30,6 +30,8 @@ import SwiftEventBus
setBackButton
()
setNavigationTitle
(
"Ανάλυση"
)
contentView
.
accessibilityElementsHidden
=
false
// tab
leftButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PeridotPE-Bold"
,
size
:
15
)
leftButton
.
setTitle
(
"Εξαργυρωμένα"
,
for
:
.
normal
)
...
...
@@ -59,6 +61,8 @@ import SwiftEventBus
let
analysisVC
=
self
.
viewControllerAt
(
0
)
pageController
.
setViewControllers
([
analysisVC
!
],
direction
:
.
forward
,
animated
:
false
)
setupAccessibilty
()
}
public
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
...
...
@@ -77,7 +81,34 @@ import SwiftEventBus
self
.
stopTimer
()
}
public
override
func
viewDidAppear
(
_
animated
:
Bool
)
{
super
.
viewDidAppear
(
animated
)
// DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
UIAccessibility
.
post
(
notification
:
.
screenChanged
,
argument
:
self
.
navigationItem
.
titleView
)
// }
// Re-enable table view accessibility after the announcement
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1.0
)
{
self
.
contentView
.
accessibilityElementsHidden
=
false
}
}
// MARK: - Functions
func
setupAccessibilty
()
{
leftButton
.
isAccessibilityElement
=
true
leftButton
.
accessibilityLabel
=
leftButton
.
title
(
for
:
.
normal
)
leftButton
.
accessibilityHint
=
"Διπλό πάτημα για άνοιγμα"
leftButton
.
accessibilityTraits
=
.
button
leftButton
.
accessibilityValue
=
"Επιλεγμένο"
rightButton
.
isAccessibilityElement
=
true
rightButton
.
accessibilityLabel
=
rightButton
.
title
(
for
:
.
normal
)
rightButton
.
accessibilityHint
=
"Διπλό πάτημα για άνοιγμα"
rightButton
.
accessibilityTraits
=
.
button
rightButton
.
accessibilityValue
=
"Μη επιλεγμένο"
}
func
startTimer
()
{
print
(
"========= GiftsCalculator Timer Started! ========="
)
...
...
@@ -151,6 +182,9 @@ import SwiftEventBus
}
let
analysisVC
=
self
.
viewControllerAt
(
0
)
pageController
.
setViewControllers
([
analysisVC
!
],
direction
:
.
reverse
,
animated
:
true
)
self
.
leftButton
.
accessibilityValue
=
"Επιλεγμένο"
self
.
rightButton
.
accessibilityValue
=
"Μη επιλεγμένο"
}
}
...
...
@@ -171,6 +205,9 @@ import SwiftEventBus
}
let
analysisVC
=
self
.
viewControllerAt
(
1
)
pageController
.
setViewControllers
([
analysisVC
!
],
direction
:
.
forward
,
animated
:
true
)
self
.
leftButton
.
accessibilityValue
=
"Μη επιλεγμένο"
self
.
rightButton
.
accessibilityValue
=
"Επιλεγμένο"
}
}
}
...
...
@@ -226,6 +263,10 @@ extension LoyaltyAnalysisViewController: UIPageViewControllerDataSource, UIPageV
self
.
leftLineView
.
isHidden
=
false
self
.
rightLineView
.
isHidden
=
true
self
.
leftButton
.
accessibilityValue
=
"Επιλεγμένο"
self
.
rightButton
.
accessibilityValue
=
"Μη επιλεγμένο"
UIAccessibility
.
post
(
notification
:
.
screenChanged
,
argument
:
self
.
leftButton
)
}
else
{
self
.
leftButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PeridotPE-SBold"
,
size
:
15
)
self
.
rightButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PeridotPE-Bold"
,
size
:
15
)
...
...
@@ -234,6 +275,10 @@ extension LoyaltyAnalysisViewController: UIPageViewControllerDataSource, UIPageV
self
.
tabSelected
=
1
self
.
leftLineView
.
isHidden
=
true
self
.
rightLineView
.
isHidden
=
false
self
.
leftButton
.
accessibilityValue
=
"Μη επιλεγμένο"
self
.
rightButton
.
accessibilityValue
=
"Επιλεγμένο"
UIAccessibility
.
post
(
notification
:
.
screenChanged
,
argument
:
self
.
rightButton
)
}
}
}
...
...
Please
register
or
login
to post a comment