Browse Source

pod updated

pull/1/head
gme_2 6 years ago
parent
commit
d9661f9a87
  1. 20
      Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Anvil.swift
  2. 4
      Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Burn.swift
  3. 6
      Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Fall.swift
  4. 4
      Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Pixelate.swift
  5. 4
      Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Sparkle.swift
  6. 12
      Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel.swift

20
Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Anvil.swift

@ -203,8 +203,8 @@ extension LTMorphingLabel {
self.emitterView.createEmitter( self.emitterView.createEmitter(
"fragments", "fragments",
particleName: "Fragment", particleName: "Fragment",
duration: 0.6
) {_ in}.update { (layer, _) in
duration: 0.6,
configureClosure: nil ).update { (layer, _) in
if progress > end { if progress > end {
layer.birthRate = 0 layer.birthRate = 0
} }
@ -212,8 +212,8 @@ extension LTMorphingLabel {
self.emitterView.createEmitter( self.emitterView.createEmitter(
"leftFragments", "leftFragments",
particleName: "Fragment", particleName: "Fragment",
duration: 0.6
) {_ in}.update { (layer, _) in
duration: 0.6,
configureClosure: nil).update { (layer, _) in
if progress > end { if progress > end {
layer.birthRate = 0 layer.birthRate = 0
} }
@ -221,8 +221,8 @@ extension LTMorphingLabel {
self.emitterView.createEmitter( self.emitterView.createEmitter(
"rightFragments", "rightFragments",
particleName: "Fragment", particleName: "Fragment",
duration: 0.6
) {_ in}.update { (layer, _) in
duration: 0.6,
configureClosure: nil).update { (layer, _) in
if progress > end { if progress > end {
layer.birthRate = 0 layer.birthRate = 0
} }
@ -234,8 +234,8 @@ extension LTMorphingLabel {
self.emitterView.createEmitter( self.emitterView.createEmitter(
"leftSmoke", "leftSmoke",
particleName: "Smoke", particleName: "Smoke",
duration: 0.6
) {_ in}.update { (layer, _) in
duration: 0.6,
configureClosure: nil).update { (layer, _) in
if progress > end { if progress > end {
layer.birthRate = 0 layer.birthRate = 0
} }
@ -243,8 +243,8 @@ extension LTMorphingLabel {
self.emitterView.createEmitter( self.emitterView.createEmitter(
"rightSmoke", "rightSmoke",
particleName: "Smoke", particleName: "Smoke",
duration: 0.6
) {_ in}.update { (layer, _) in
duration: 0.6,
configureClosure: nil).update { (layer, _) in
if progress > end { if progress > end {
layer.birthRate = 0 layer.birthRate = 0
} }

4
Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Burn.swift

@ -50,8 +50,8 @@ extension LTMorphingLabel {
height: maskedHeight height: maskedHeight
) )
String(charLimbo.char).draw(in: rect, withAttributes: [ String(charLimbo.char).draw(in: rect, withAttributes: [
NSFontAttributeName: self.font,
NSForegroundColorAttributeName: self.textColor
NSAttributedStringKey.font: self.font,
NSAttributedStringKey.foregroundColor: self.textColor
]) ])
let newImage = UIGraphicsGetImageFromCurrentImageContext() let newImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext() UIGraphicsEndImageContext()

6
Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Fall.swift

@ -132,9 +132,9 @@ extension LTMorphingLabel {
) )
context!.rotate(by: rotation * CGFloat(Double.pi) / 180.0) context!.rotate(by: rotation * CGFloat(Double.pi) / 180.0)
let s = String(limbo.char) let s = String(limbo.char)
let attributes: [String: Any] = [
NSFontAttributeName: self.font.withSize(limbo.size),
NSForegroundColorAttributeName: charColor
let attributes: [NSAttributedStringKey: Any] = [
NSAttributedStringKey.font: self.font.withSize(limbo.size),
NSAttributedStringKey.foregroundColor: charColor
] ]
s.draw(in: charRect, withAttributes: attributes) s.draw(in: charRect, withAttributes: attributes)
context!.restoreGState() context!.restoreGState()

4
Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Pixelate.swift

@ -87,9 +87,9 @@ extension LTMorphingLabel {
height: charLimbo.rect.size.height height: charLimbo.rect.size.height
) )
String(charLimbo.char).draw(in: rect, withAttributes: [ String(charLimbo.char).draw(in: rect, withAttributes: [
NSFontAttributeName:
NSAttributedStringKey.font:
self.font, self.font,
NSForegroundColorAttributeName:
NSAttributedStringKey.foregroundColor:
self.textColor.withAlphaComponent(fadeOutAlpha) self.textColor.withAlphaComponent(fadeOutAlpha)
]) ])
let newImage = UIGraphicsGetImageFromCurrentImageContext() let newImage = UIGraphicsGetImageFromCurrentImageContext()

4
Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Sparkle.swift

@ -50,8 +50,8 @@ extension LTMorphingLabel {
height: maskedHeight height: maskedHeight
) )
String(charLimbo.char).draw(in: rect, withAttributes: [ String(charLimbo.char).draw(in: rect, withAttributes: [
NSFontAttributeName: self.font,
NSForegroundColorAttributeName: self.textColor
NSAttributedStringKey.font: self.font,
NSAttributedStringKey.foregroundColor: self.textColor
]) ])
guard let newImage = UIGraphicsGetImageFromCurrentImageContext() else { guard let newImage = UIGraphicsGetImageFromCurrentImageContext() else {
return (UIImage(), CGRect.zero) return (UIImage(), CGRect.zero)

12
Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel.swift

@ -205,7 +205,7 @@ typealias LTMorphingSkipFramesClosure =
// MARK: - Animation extension // MARK: - Animation extension
extension LTMorphingLabel { extension LTMorphingLabel {
func displayFrameTick() {
@objc func displayFrameTick() {
if displayLink.duration > 0.0 && totalFrames == 0 { if displayLink.duration > 0.0 && totalFrames == 0 {
var frameRate = Float(0) var frameRate = Float(0)
if #available(iOS 10.0, tvOS 10.0, *) { if #available(iOS 10.0, tvOS 10.0, *) {
@ -259,12 +259,12 @@ extension LTMorphingLabel {
var charRects = [CGRect]() var charRects = [CGRect]()
var leftOffset: CGFloat = 0.0 var leftOffset: CGFloat = 0.0
charHeight = "Leg".size(attributes: [NSFontAttributeName: font]).height
charHeight = "Leg".size(withAttributes: [NSAttributedStringKey.font: font]).height
let topOffset = (bounds.size.height - charHeight) / 2.0 let topOffset = (bounds.size.height - charHeight) / 2.0
for char in textToDraw.characters { for char in textToDraw.characters {
let charSize = String(char).size(attributes: [NSFontAttributeName: font])
let charSize = String(char).size(withAttributes: [NSAttributedStringKey.font: font])
charRects.append( charRects.append(
CGRect( CGRect(
origin: CGPoint( origin: CGPoint(
@ -491,12 +491,12 @@ extension LTMorphingLabel {
}(charLimbo) }(charLimbo)
if !willAvoidDefaultDrawing { if !willAvoidDefaultDrawing {
var attrs: [String: Any] = [
NSForegroundColorAttributeName: textColor.withAlphaComponent(charLimbo.alpha)
var attrs: [NSAttributedStringKey: Any] = [
NSAttributedStringKey.foregroundColor: textColor.withAlphaComponent(charLimbo.alpha)
] ]
if let font = UIFont(name: font.fontName, size: charLimbo.size) { if let font = UIFont(name: font.fontName, size: charLimbo.size) {
attrs[NSFontAttributeName] = font
attrs[NSAttributedStringKey.font] = font
} }
let s = String(charLimbo.char) let s = String(charLimbo.char)
s.draw(in: charRect, withAttributes: attrs) s.draw(in: charRect, withAttributes: attrs)

Loading…
Cancel
Save