mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-05-22 23:42:50 +08:00
* nified cell standardized cell style * Made swipe delete action generic * Fixed clear all button behavior * Added attributed string * Cleanup * Resolved merge conflicts
26 lines
763 B
Swift
26 lines
763 B
Swift
//
|
|
// RepositoryAttributedString.swift
|
|
// Freetime
|
|
//
|
|
// Created by Hesham Salman on 10/24/17.
|
|
// Copyright © 2017 Ryan Nystrom. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
func RepositoryAttributedString(owner: String, name: String) -> NSAttributedString {
|
|
let ownerAttributes: [NSAttributedStringKey: Any] = [
|
|
.font: Styles.Fonts.body,
|
|
.foregroundColor: Styles.Colors.Gray.dark.color
|
|
]
|
|
|
|
let nameAttributes: [NSAttributedStringKey: Any] = [
|
|
.font: Styles.Fonts.bodyBold,
|
|
.foregroundColor: Styles.Colors.Gray.dark.color
|
|
]
|
|
|
|
let text = NSMutableAttributedString(string: owner + "/", attributes: ownerAttributes)
|
|
text.append(NSAttributedString(string: name, attributes: nameAttributes))
|
|
return text
|
|
}
|