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-06 18:01:13 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4951618c9a62edd854c97b997abbeb1f73d98e9d
4951618c
1 parent
f64f3157
Market History accessibilities
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
1 deletions
SwiftWarplyFramework/SwiftWarplyFramework/AnalysisHeaderMessageViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/AnalysisMoreViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
SwiftWarplyFramework/SwiftWarplyFramework/MarketAnalysisItemViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/MarketLoyaltyAnalysisViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/AnalysisHeaderMessageViewCell.swift
View file @
4951618
...
...
@@ -126,5 +126,16 @@ extension AnalysisHeaderMessageViewCell {
messageLabel
.
attributedText
=
coupAttributedString
}
setupAccessibilty
()
}
func
setupAccessibilty
()
{
// Disable accessibility for the whole cell
self
.
isAccessibilityElement
=
false
messageLabelView
.
isAccessibilityElement
=
true
messageLabelView
.
accessibilityLabel
=
messageLabel
.
text
emptyLabel
.
isAccessibilityElement
=
true
}
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/AnalysisMoreViewCell.swift
View file @
4951618
...
...
@@ -10,6 +10,7 @@ import UIKit
@objc
public
class
AnalysisMoreViewCell
:
UITableViewCell
{
@IBOutlet
weak
var
titleLabel
:
UILabel
!
@IBOutlet
weak
var
arrowImage
:
UIImageView
!
@IBOutlet
weak
var
stackView
:
UIStackView
!
// lifecycle
public
override
func
awakeFromNib
()
{
...
...
@@ -21,5 +22,15 @@ import UIKit
titleLabel
.
text
=
"Δες Περισσότερα"
arrowImage
.
image
=
UIImage
(
named
:
"ic_down_dark_2"
,
in
:
MyEmptyClass
.
resourceBundle
(),
compatibleWith
:
nil
)
}
setupAccessibilty
()
}
func
setupAccessibilty
()
{
// Disable accessibility for the whole cell
self
.
isAccessibilityElement
=
false
stackView
.
isAccessibilityElement
=
true
stackView
.
accessibilityLabel
=
titleLabel
.
text
}
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
View file @
4951618
...
...
@@ -1671,6 +1671,7 @@
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<connections>
<outlet
property=
"arrowImage"
destination=
"UAb-LB-dY7"
id=
"nKr-Gk-SgS"
/>
<outlet
property=
"stackView"
destination=
"ctP-ye-yIH"
id=
"1c9-eW-SMf"
/>
<outlet
property=
"titleLabel"
destination=
"t7D-IM-UwS"
id=
"nZ6-Nf-utE"
/>
</connections>
</tableViewCell>
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MarketAnalysisItemViewCell.swift
View file @
4951618
...
...
@@ -106,6 +106,7 @@ extension MarketAnalysisItemViewCell {
let
htmlText
=
couponSetData
?
.
inner_text
??
""
productTitleLabel
.
text
=
htmlText
.
htmlToString
setupAccessibilty
(
item
:
item
)
}
func
configureCell
(
item
:
swiftApi
.
CouponItemModel
,
isMarket
:
Bool
)
{
...
...
@@ -149,6 +150,26 @@ extension MarketAnalysisItemViewCell {
// let htmlText = couponSetData?.inner_text ?? ""
// subtitleLabel.text = htmlText.htmlToString
setupAccessibilty
(
item
:
item
)
}
func
setupAccessibilty
(
item
:
swiftApi
.
CouponItemModel
)
{
var
formatedDate
=
""
let
dateFormatter
=
DateFormatter
()
dateFormatter
.
locale
=
Locale
(
identifier
:
"en_US_POSIX"
)
if
let
date
=
item
.
redeemed_date
{
// Set output format in Greek
dateFormatter
.
locale
=
Locale
(
identifier
:
"el_GR"
)
// Greek locale
dateFormatter
.
dateFormat
=
"d MMMM yyyy"
let
resultString
=
dateFormatter
.
string
(
from
:
date
)
formatedDate
=
resultString
}
else
{
formatedDate
=
dateLabel
.
text
??
""
}
let
accessibilityLabel
=
formatedDate
+
", "
+
(
titleLabel
.
text
??
""
)
+
", "
+
(
productTitleLabel
.
text
??
""
)
+
", "
+
(
subtitleLabel
.
text
??
""
)
+
", "
+
(
priceLabel
.
text
??
""
)
self
.
isAccessibilityElement
=
true
self
.
accessibilityLabel
=
accessibilityLabel
}
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MarketLoyaltyAnalysisViewController.swift
View file @
4951618
...
...
@@ -32,6 +32,8 @@ import SwiftEventBus
setBackButton
()
setNavigationTitle
(
"Ανάλυση"
)
contentView
.
accessibilityElementsHidden
=
false
// TODO: DELETE if tabs needed again
contentViewHeight
.
constant
=
0
...
...
@@ -90,6 +92,8 @@ import SwiftEventBus
// Notify the child view controller that it has been moved to the parent
childVC
.
didMove
(
toParent
:
self
)
// <==
setupAccessibilty
()
}
public
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
...
...
@@ -107,8 +111,33 @@ 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
rightButton
.
isAccessibilityElement
=
true
rightButton
.
accessibilityLabel
=
rightButton
.
title
(
for
:
.
normal
)
rightButton
.
accessibilityHint
=
"Διπλό πάτημα για άνοιγμα"
rightButton
.
accessibilityTraits
=
.
button
}
func
startTimer
()
{
print
(
"========= GiftsCalculator Timer Started! ========="
)
...
...
Please
register
or
login
to post a comment