Skip to content

Commit

Permalink
fixed OS X warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
raspu committed May 6, 2016
1 parent 19474cc commit 51768ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Highlightr.podspec
Expand Up @@ -21,7 +21,7 @@ s.screenshots = "http://raw.githubusercontent.com/raspu/Highlightr/master/th
s.author = { "J.P. Illanes" => "jpillaness@gmail.com" }
s.source = { :git => "https://github.com/raspu/Highlightr.git", :tag => s.version.to_s, :submodules => true}

s.osx.deployment_target = '10.9'
s.osx.deployment_target = '10.11'
s.ios.deployment_target = '8.0'

s.requires_arc = true
Expand Down
20 changes: 6 additions & 14 deletions Pod/Classes/Theme.swift
Expand Up @@ -12,18 +12,10 @@ import Foundation
import UIKit
public typealias RPColor = UIColor
public typealias RPFont = UIFont
private typealias RPFontDescriptor = UIFontDescriptor
var RPFontDescriptorNameAttribute = UIFontDescriptorNameAttribute
var RPBoldTrait = UIFontDescriptorSymbolicTraits.TraitBold
var RPItalicTrait = UIFontDescriptorSymbolicTraits.TraitItalic
#else
import Cocoa
import AppKit
public typealias RPColor = NSColor
public typealias RPFont = NSFont
private typealias RPFontDescriptor = NSFontDescriptor
private typealias RPFontDescriptorNameAttribute = NSFontNameAttribute
private typealias RPBoldTrait = NSFontBoldTrait
private typealias RPItalicTrait = NSFontItalicTrait

#endif

Expand All @@ -42,7 +34,7 @@ public class Theme {
private var strippedTheme : RPThemeStringDict!

/// Default background color for the current theme.
public var themeBackgroundColor : UIColor!
public var themeBackgroundColor : RPColor!

init(themeString: String)
{
Expand All @@ -68,7 +60,7 @@ public class Theme {
}
}else
{
themeBackgroundColor = UIColor.whiteColor()
themeBackgroundColor = RPColor.whiteColor()
}
}

Expand All @@ -89,11 +81,11 @@ public class Theme {
let obliqueDescriptor = UIFontDescriptor(fontAttributes: [UIFontDescriptorFamilyAttribute:font.familyName,
UIFontDescriptorFaceAttribute:"Oblique"])
#else
let boldDescriptor = NSFontDescriptor(fontAttributes: [NSFontFamilyAttribute:font.familyName,
let boldDescriptor = NSFontDescriptor(fontAttributes: [NSFontFamilyAttribute:font.familyName!,
NSFontFaceAttribute:"Bold"])
let italicDescriptor = NSFontDescriptor(fontAttributes: [NSFontFamilyAttribute:font.familyName,
let italicDescriptor = NSFontDescriptor(fontAttributes: [NSFontFamilyAttribute:font.familyName!,
NSFontFaceAttribute:"Italic"])
let obliqueDescriptor = NSFontDescriptor(fontAttributes: [NSFontFamilyAttribute:font.familyName,
let obliqueDescriptor = NSFontDescriptor(fontAttributes: [NSFontFamilyAttribute:font.familyName!,
NSFontFaceAttribute:"Oblique"])
#endif

Expand Down

0 comments on commit 51768ea

Please sign in to comment.