Files
GitHawk/Classes/Notifications/CreateNotificationTitle.swift
Ryan Nystrom faca5497a8 New Inbox design (#1870)
* New Inbox design

* rename ident to number

* use ax animation

* building with old notifications removed

* remove "2" suffix

* use latest IGLK+Swift

* apply IGLK perf fixes

* fix build

* Update with IGLK binding bug fix
2018-06-17 14:47:59 -04:00

25 lines
720 B
Swift

//
// CreateNotificationTitle.swift
// Freetime
//
// Created by Ryan Nystrom on 6/9/18.
// Copyright © 2018 Ryan Nystrom. All rights reserved.
//
import Foundation
import StyledTextKit
func CreateNotification(title: String, width: CGFloat, contentSizeCategory: UIContentSizeCategory) -> StyledTextRenderer {
// TODO add owner/repo #
let builder = StyledTextBuilder(styledText: StyledText(
text: title,
style: Styles.Text.body
))
.add(attributes: [.foregroundColor: Styles.Colors.Gray.dark.color])
return StyledTextRenderer(
string: builder.build(),
contentSizeCategory: contentSizeCategory,
inset: NotificationCell.inset
).warm(width: width)
}