Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated for Swift 5 #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 56 additions & 21 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
4 changes: 2 additions & 2 deletions Snowflake.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'Snowflake'
s.version = '0.3.0'
s.version = '0.5.0'
s.summary = 'Let it snow, let it snow, let it snow ❄️'

# This description is used to generate tags and improve search results.
Expand All @@ -28,7 +28,7 @@ This is a short description of what this pod will do
s.source = { :git => 'https://github.com/julp04/Snowflake.git', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

s.ios.deployment_target = '8.0'
s.ios.deployment_target = '14.0'

s.source_files = 'Snowflake/Classes/**/*'

Expand Down
16 changes: 12 additions & 4 deletions Snowflake/Classes/SnowFlake.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// Created by Panucci, Julian R on 3/17/17.
// Copyright © 2017 Panucci, Julian R. All rights reserved.
//

import Foundation
import UIKit

Expand Down Expand Up @@ -40,11 +39,11 @@ public class Snowflake: CAEmitterLayer {
}
}

override public var emitterShape: String {
override public var emitterShape: CAEmitterLayerEmitterShape {
get {
return kCAEmitterLayerLine
return CAEmitterLayerEmitterShape(rawValue: convertFromCAEmitterLayerEmitterShape(CAEmitterLayerEmitterShape.line))
}set {
self.emitterShape = newValue
self.emitterShape = convertToCAEmitterLayerEmitterShape(newValue.rawValue)
}
}

Expand Down Expand Up @@ -182,3 +181,12 @@ public class Snowflake: CAEmitterLayer {

}

// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertFromCAEmitterLayerEmitterShape(_ input: CAEmitterLayerEmitterShape) -> String {
return input.rawValue
}

// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertToCAEmitterLayerEmitterShape(_ input: String) -> CAEmitterLayerEmitterShape {
return CAEmitterLayerEmitterShape(rawValue: input)
}