Files
GitHawk/Classes/Utility/RepositoryAttributedString.swift
Hesham Salman 51a76fc50c Unified deletion swipes (#720)
* nified cell

standardized cell style

* Made swipe delete action generic

* Fixed clear all button behavior

* Added attributed string

* Cleanup

* Resolved merge conflicts
2017-10-24 23:08:49 -04:00

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
}