mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-06-05 06:49:56 +08:00
add animations back to empty cell on foreground. fixes #108
This commit is contained in:
@@ -43,6 +43,14 @@ final class NoNewNotificationsCell: UICollectionViewCell {
|
||||
}
|
||||
|
||||
resetAnimations()
|
||||
|
||||
// CAAnimations will be removed from layers on background. restore when foregrounding.
|
||||
NotificationCenter.default
|
||||
.addObserver(self,
|
||||
selector: #selector(NoNewNotificationsCell.resetAnimations),
|
||||
name: NSNotification.Name.UIApplicationWillEnterForeground,
|
||||
object: nil
|
||||
)
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
@@ -65,7 +73,7 @@ final class NoNewNotificationsCell: UICollectionViewCell {
|
||||
|
||||
// MARK: Private API
|
||||
|
||||
private func resetAnimations() {
|
||||
@objc private func resetAnimations() {
|
||||
let timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
|
||||
let duration: TimeInterval = 1
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>733</string>
|
||||
<string>735</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
|
||||
Reference in New Issue
Block a user