Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
1
1weather
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
1weather
Commits
17daef8a
Commit
17daef8a
authored
Apr 26, 2021
by
Demid Merzlyakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NWSAlertCell: (semi)bold highlight.
parent
b2a14a06
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
1Weather/UI/View controllers/Notifications/Cells/NWSAlertCell.swift
+13
-2
No files found.
1Weather/UI/View controllers/Notifications/Cells/NWSAlertCell.swift
View file @
17daef8a
...
...
@@ -74,7 +74,18 @@ class NWSAlertCell: UITableViewCell {
}
headerActiveExpiredLabel
.
isHidden
=
false
let
expiryString
=
expiryDateFormatter
(
timeZone
:
alert
.
timeZone
)
.
string
(
from
:
alert
.
expires
)
alertTextLabel
.
text
=
"
\(
alert
.
description
)
\(
"notifications.nwsCell.remainsInEffectUntil"
.
localized
()
)
\(
expiryString
)
"
let
attributedText
=
NSMutableAttributedString
(
string
:
"
\(
alert
.
description
)
\(
"notifications.nwsCell.remainsInEffectUntil"
.
localized
()
)
\(
expiryString
)
"
,
attributes
:
[
.
font
:
AppFont
.
SFPro
.
regular
(
size
:
14
),
.
foregroundColor
:
primaryTextColor
as
Any
])
let
nsText
=
attributedText
.
string
as
NSString
let
boldRange
=
nsText
.
range
(
of
:
alert
.
description
)
if
boldRange
.
location
!=
NSNotFound
{
attributedText
.
addAttribute
(
.
font
,
value
:
AppFont
.
SFPro
.
semibold
(
size
:
14
),
range
:
boldRange
)
}
alertTextLabel
.
attributedText
=
attributedText
if
let
issueDate
=
alert
.
extendedInfo
?
.
issueDate
{
let
issueDateString
=
issueDateFormatter
(
timeZone
:
alert
.
timeZone
)
.
string
(
from
:
issueDate
)
...
...
@@ -87,7 +98,7 @@ class NWSAlertCell: UITableViewCell {
}
private
extension
NWSAlertCell
{
var
primaryTextColor
:
UIColor
?
{
var
primaryTextColor
:
UIColor
!
{
UIColor
(
named
:
"notifications_primary_text"
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment