mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-06-12 00:14:44 +08:00
* 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
25 lines
720 B
Swift
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)
|
|
}
|