Skip to content

Commit 44d6cb2

Browse files
author
Fumito Nakazawa
authored
Merge pull request #7 from cats-oss/fix-crash-bag
Change OBJC_ASSOCIATION_ASSIGN to .OBJC_ASSOCIATION_RETAIN_NONATOMIC
2 parents a7ff795 + d162ae0 commit 44d6cb2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Sica.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = "Sica"
11-
s.version = "0.3.0"
11+
s.version = "0.3.1"
1212
s.summary = "Sica can execute various animations sequentially or parallely"
1313
s.homepage = "https://github.com/cats-oss/Sica"
1414
s.license = { :type => "MIT", :file => "LICENSE" }

Sica/Source/CALayer+Sica.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ private let _animatorAssociatedKey = UnsafeMutablePointer<UInt>.allocate(capacit
1313
extension CALayer {
1414
public var sica: Animator {
1515
set {
16-
objc_setAssociatedObject(self, _animatorAssociatedKey, newValue, .OBJC_ASSOCIATION_ASSIGN)
16+
objc_setAssociatedObject(self, _animatorAssociatedKey, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
1717
}
1818
get {
1919
guard let animator = objc_getAssociatedObject(self, _animatorAssociatedKey) as? Animator else {
2020
let animator = Animator(layer: self)
21-
objc_setAssociatedObject(self, _animatorAssociatedKey, animator, .OBJC_ASSOCIATION_ASSIGN)
21+
objc_setAssociatedObject(self, _animatorAssociatedKey, animator, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
2222
return animator
2323
}
2424
return animator

Sica/Source/View+Sica.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ private let _animatorAssociatedKey = UnsafeMutablePointer<UInt>.allocate(capacit
1313
extension View {
1414
public var sica: Animator {
1515
set {
16-
objc_setAssociatedObject(self, _animatorAssociatedKey, newValue, .OBJC_ASSOCIATION_ASSIGN)
16+
objc_setAssociatedObject(self, _animatorAssociatedKey, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
1717
}
1818
get {
1919
guard let animator = objc_getAssociatedObject(self, _animatorAssociatedKey) as? Animator else {
2020
let animator = Animator(view: self)
21-
objc_setAssociatedObject(self, _animatorAssociatedKey, animator, .OBJC_ASSOCIATION_ASSIGN)
21+
objc_setAssociatedObject(self, _animatorAssociatedKey, animator, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
2222
return animator
2323
}
2424
return animator

0 commit comments

Comments
 (0)