1.3 mostly finished update
TODO: Still fix the update incompatibility
BIN
.DS_Store
vendored
|
@ -7,7 +7,14 @@
|
|||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
BD3D00D026BCCF490044E90C /* icons8-winter-100.png in Resources */ = {isa = PBXBuildFile; fileRef = BD3D00CD26BCCF490044E90C /* icons8-winter-100.png */; };
|
||||
BD3D00D126BCCF490044E90C /* icons8-winter-80.png in Resources */ = {isa = PBXBuildFile; fileRef = BD3D00CE26BCCF490044E90C /* icons8-winter-80.png */; };
|
||||
BD3D00D226BCCF490044E90C /* particle.png in Resources */ = {isa = PBXBuildFile; fileRef = BD3D00CF26BCCF490044E90C /* particle.png */; };
|
||||
BD3D00D426BCD3D00044E90C /* rain.png in Resources */ = {isa = PBXBuildFile; fileRef = BD3D00D326BCD3D00044E90C /* rain.png */; };
|
||||
BD3D00D626BCD4400044E90C /* rain2.png in Resources */ = {isa = PBXBuildFile; fileRef = BD3D00D526BCD4400044E90C /* rain2.png */; };
|
||||
BD555AF02518A159006E0058 /* FourthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD555AEF2518A159006E0058 /* FourthViewController.swift */; };
|
||||
BD61739226BCE0CE00DF38B4 /* day snow.gif in Resources */ = {isa = PBXBuildFile; fileRef = BD61739026BCE0CE00DF38B4 /* day snow.gif */; };
|
||||
BD61739326BCE0CE00DF38B4 /* night snow.gif in Resources */ = {isa = PBXBuildFile; fileRef = BD61739126BCE0CE00DF38B4 /* night snow.gif */; };
|
||||
BD7A5E342510173A003E992C /* day.gif in Resources */ = {isa = PBXBuildFile; fileRef = BD7A5E332510173A003E992C /* day.gif */; };
|
||||
BD7A5E39251034D7003E992C /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BD7A5E38251034D7003E992C /* StoreKit.framework */; };
|
||||
BD7D35D72510042D00A61B6B /* night.gif in Resources */ = {isa = PBXBuildFile; fileRef = BD7D35D52510042D00A61B6B /* night.gif */; };
|
||||
|
@ -72,8 +79,15 @@
|
|||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
BD3D00CD26BCCF490044E90C /* icons8-winter-100.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icons8-winter-100.png"; sourceTree = "<group>"; };
|
||||
BD3D00CE26BCCF490044E90C /* icons8-winter-80.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icons8-winter-80.png"; sourceTree = "<group>"; };
|
||||
BD3D00CF26BCCF490044E90C /* particle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = particle.png; sourceTree = "<group>"; };
|
||||
BD3D00D326BCD3D00044E90C /* rain.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rain.png; sourceTree = "<group>"; };
|
||||
BD3D00D526BCD4400044E90C /* rain2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rain2.png; sourceTree = "<group>"; };
|
||||
BD555AEF2518A159006E0058 /* FourthViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FourthViewController.swift; sourceTree = "<group>"; };
|
||||
BD58E8C325145778008D1E8E /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; };
|
||||
BD61739026BCE0CE00DF38B4 /* day snow.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "day snow.gif"; sourceTree = "<group>"; };
|
||||
BD61739126BCE0CE00DF38B4 /* night snow.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "night snow.gif"; sourceTree = "<group>"; };
|
||||
BD7A5E332510173A003E992C /* day.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = day.gif; sourceTree = "<group>"; };
|
||||
BD7A5E38251034D7003E992C /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
|
||||
BD7D35D52510042D00A61B6B /* night.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = night.gif; sourceTree = "<group>"; };
|
||||
|
@ -141,6 +155,18 @@
|
|||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
BD3D00CC26BCCF490044E90C /* images */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BD3D00CD26BCCF490044E90C /* icons8-winter-100.png */,
|
||||
BD3D00CE26BCCF490044E90C /* icons8-winter-80.png */,
|
||||
BD3D00CF26BCCF490044E90C /* particle.png */,
|
||||
BD3D00D326BCD3D00044E90C /* rain.png */,
|
||||
BD3D00D526BCD4400044E90C /* rain2.png */,
|
||||
);
|
||||
path = images;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BD7A5E37251034D7003E992C /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -155,6 +181,8 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
BD7A5E332510173A003E992C /* day.gif */,
|
||||
BD61739026BCE0CE00DF38B4 /* day snow.gif */,
|
||||
BD61739126BCE0CE00DF38B4 /* night snow.gif */,
|
||||
BD7D35D52510042D00A61B6B /* night.gif */,
|
||||
);
|
||||
path = gifs;
|
||||
|
@ -187,6 +215,7 @@
|
|||
BDA060F82447F3E6009C72CE /* grandfatherrock */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BD3D00CC26BCCF490044E90C /* images */,
|
||||
BDA0618A244826DB009C72CE /* grandfatherrock.entitlements */,
|
||||
BDA060F92447F3E6009C72CE /* AppDelegate.swift */,
|
||||
BDA060FB2447F3E6009C72CE /* SceneDelegate.swift */,
|
||||
|
@ -378,11 +407,18 @@
|
|||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
BDA061082447F3F2009C72CE /* LaunchScreen.storyboard in Resources */,
|
||||
BD61739226BCE0CE00DF38B4 /* day snow.gif in Resources */,
|
||||
BD3D00D426BCD3D00044E90C /* rain.png in Resources */,
|
||||
BDA061052447F3F2009C72CE /* Assets.xcassets in Resources */,
|
||||
BD7D35D72510042D00A61B6B /* night.gif in Resources */,
|
||||
BD7A5E342510173A003E992C /* day.gif in Resources */,
|
||||
BD3D00D026BCCF490044E90C /* icons8-winter-100.png in Resources */,
|
||||
BD3D00D226BCCF490044E90C /* particle.png in Resources */,
|
||||
BDA061032447F3E6009C72CE /* Main.storyboard in Resources */,
|
||||
BD3D00D126BCCF490044E90C /* icons8-winter-80.png in Resources */,
|
||||
BD3D00D626BCD4400044E90C /* rain2.png in Resources */,
|
||||
BDB53FCE250765A2004E9788 /* FinkHeavy.ttf in Resources */,
|
||||
BD61739326BCE0CE00DF38B4 /* night snow.gif in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
@ -49,12 +49,12 @@
|
|||
<key>grandfatherrock.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>hssceneExtension.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>hswidgetExtension.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
|
|
BIN
grandfatherrock/.DS_Store
vendored
|
@ -1,17 +1,17 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "grasssnow.png",
|
||||
"filename" : "grasssnow1.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "grasssnow-1.png",
|
||||
"filename" : "grasssnow1-1.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "grasssnow-2.png",
|
||||
"filename" : "grasssnow1-2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 17 KiB |
BIN
grandfatherrock/Assets.xcassets/grasssnow.imageset/grasssnow1-1.png
vendored
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
grandfatherrock/Assets.xcassets/grasssnow.imageset/grasssnow1-2.png
vendored
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
grandfatherrock/Assets.xcassets/grasssnow.imageset/grasssnow1.png
vendored
Normal file
After Width: | Height: | Size: 19 KiB |
|
@ -49,6 +49,78 @@ extension UserDefaults: ObjectSavable {
|
|||
}
|
||||
}
|
||||
|
||||
extension UIViewController {
|
||||
|
||||
func addSnowflakes() {
|
||||
self.view.backgroundColor = UIColor.white
|
||||
let particleEmitter = CAEmitterLayer()
|
||||
particleEmitter.emitterPosition = CGPoint(x: view.center.x, y: -96)
|
||||
particleEmitter.emitterShape = .line
|
||||
particleEmitter.emitterSize = CGSize(width: view.frame.size.width, height: 1)
|
||||
let white = makeEmitterCell(color: UIColor.white)
|
||||
particleEmitter.emitterCells = [white]
|
||||
view.layer.addSublayer(particleEmitter)
|
||||
}
|
||||
|
||||
private func makeEmitterCell(color: UIColor) -> CAEmitterCell {
|
||||
let cell = CAEmitterCell()
|
||||
cell.birthRate = 25
|
||||
cell.lifetime = 15.0
|
||||
cell.lifetimeRange = 0
|
||||
cell.color = color.cgColor
|
||||
cell.velocity = 100
|
||||
cell.velocityRange = 50
|
||||
cell.emissionLatitude = CGFloat.pi
|
||||
cell.emissionRange = CGFloat.pi / 4
|
||||
//cell.spin = 2
|
||||
//cell.spinRange = 3
|
||||
cell.scaleRange = 1
|
||||
cell.scale = 0.1
|
||||
cell.scaleSpeed = -0.05
|
||||
cell.contents = UIImage(named: "particle.png")?.cgImage
|
||||
return cell
|
||||
}
|
||||
|
||||
func addRain() {
|
||||
self.view.backgroundColor = UIColor.white
|
||||
let particleEmitter = CAEmitterLayer()
|
||||
particleEmitter.emitterPosition = CGPoint(x: view.center.x, y: -96)
|
||||
particleEmitter.emitterShape = .line
|
||||
particleEmitter.emitterSize = CGSize(width: view.frame.size.width, height: 1)
|
||||
let white = makeEmitterCellRain(color: UIColor.white)
|
||||
particleEmitter.emitterCells = [white]
|
||||
view.layer.addSublayer(particleEmitter)
|
||||
}
|
||||
|
||||
private func makeEmitterCellRain(color: UIColor) -> CAEmitterCell {
|
||||
let cell = CAEmitterCell()
|
||||
cell.birthRate = 100
|
||||
cell.lifetime = 7.0
|
||||
cell.lifetimeRange = 0
|
||||
cell.color = color.cgColor
|
||||
cell.velocity = 500
|
||||
cell.velocityRange = 250
|
||||
cell.emissionLatitude = CGFloat.pi
|
||||
//cell.emissionRange = CGFloat.pi / 4
|
||||
//cell.spin = 2
|
||||
//cell.spinRange = 3
|
||||
cell.scaleRange = 1
|
||||
cell.scale = 0.1
|
||||
cell.scaleSpeed = -0.05
|
||||
cell.contents = UIImage(named: "rain2.png")?.cgImage
|
||||
return cell
|
||||
}
|
||||
|
||||
func removeEffects() {
|
||||
self.view.layer.sublayers?.forEach {
|
||||
if let item: CAEmitterLayer = $0 as? CAEmitterLayer {
|
||||
item.removeFromSuperlayer()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var audioPlayer = AVAudioPlayer()
|
||||
var musicPlayer = MPMusicPlayerController.applicationMusicPlayer
|
||||
|
||||
|
@ -148,6 +220,8 @@ public class musicHandler{
|
|||
if(GlobalVars.musicStarted){
|
||||
|
||||
musicPlayer.play()
|
||||
} else {
|
||||
musicPlayer.stop()
|
||||
}
|
||||
} else {
|
||||
audioPlayer.prepareToPlay()
|
||||
|
@ -610,7 +684,10 @@ class FirstViewController: UIViewController{
|
|||
if((GlobalVars.hour >= 8) && (GlobalVars.hour <= 19)){ //Daytime
|
||||
//print("day")
|
||||
do{
|
||||
let gif = try UIImage(gifName: "day.gif")
|
||||
var gif = try UIImage(gifName: "day.gif")
|
||||
if GlobalVars.weatherList == 2 {
|
||||
gif = try UIImage(gifName: "day snow.gif")
|
||||
}
|
||||
sceneryImageView.setGifImage(gif, loopCount: -1)
|
||||
}catch{print(error)}
|
||||
//sceneryImageView.image = UIImage(named: "ACBackgroundDay", in: Bundle(for: type(of: self)), compatibleWith: nil)
|
||||
|
@ -618,7 +695,10 @@ class FirstViewController: UIViewController{
|
|||
} else if((GlobalVars.hour >= 20) && (GlobalVars.hour <= 21)){//Sunset
|
||||
//print("sunset")
|
||||
do{
|
||||
let gif = try UIImage(gifName: "day.gif")
|
||||
var gif = try UIImage(gifName: "day.gif")
|
||||
if GlobalVars.weatherList == 2 {
|
||||
gif = try UIImage(gifName: "day snow.gif")
|
||||
}
|
||||
sceneryImageView.setGifImage(gif, loopCount: -1)
|
||||
}catch{print(error)}
|
||||
//sceneryImageView.image = UIImage(named: "ACBackgroundDay", in: Bundle(for: type(of: self)), compatibleWith: nil)
|
||||
|
@ -626,7 +706,10 @@ class FirstViewController: UIViewController{
|
|||
} else if((GlobalVars.hour >= 22) || (GlobalVars.hour <= 5)){//Night
|
||||
//print("night")
|
||||
do{
|
||||
let gif = try UIImage(gifName: "night.gif")
|
||||
var gif = try UIImage(gifName: "night.gif")
|
||||
if GlobalVars.weatherList == 2 {
|
||||
gif = try UIImage(gifName: "night snow.gif")
|
||||
}
|
||||
sceneryImageView.setGifImage(gif, loopCount: -1)
|
||||
}catch{print(error)}
|
||||
//sceneryImageView.image = UIImage(named: "ACBackgroundNight", in: Bundle(for: type(of: self)), compatibleWith: nil)
|
||||
|
@ -634,7 +717,10 @@ class FirstViewController: UIViewController{
|
|||
} else if((GlobalVars.hour >= 6) && (GlobalVars.hour <= 7)){//Sunrise
|
||||
//print("sunrise")
|
||||
do{
|
||||
let gif = try UIImage(gifName: "day.gif")
|
||||
var gif = try UIImage(gifName: "day.gif")
|
||||
if GlobalVars.weatherList == 2 {
|
||||
gif = try UIImage(gifName: "day snow.gif")
|
||||
}
|
||||
sceneryImageView.setGifImage(gif, loopCount: -1)
|
||||
}catch{print(error)}
|
||||
//sceneryImageView.image = UIImage(named: "ACBackgroundDay", in: Bundle(for: type(of: self)), compatibleWith: nil)
|
||||
|
@ -656,14 +742,17 @@ class FirstViewController: UIViewController{
|
|||
let backImg: UIImage = UIImage(named: "grass")!
|
||||
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.86, green: 0.69, blue: 0.24, alpha: 1.00)
|
||||
removeAllEffects()
|
||||
} else if GlobalVars.weatherList == 1 {
|
||||
let backImg: UIImage = UIImage(named: "grass")!
|
||||
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.86, green: 0.69, blue: 0.24, alpha: 1.00)
|
||||
showRain()
|
||||
} else if GlobalVars.weatherList == 2 {
|
||||
let backImg: UIImage = UIImage(named: "grasssnow")!
|
||||
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.12, green: 0.54, blue: 0.61, alpha: 1.00)
|
||||
showSnowflakes()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -703,11 +792,13 @@ class FirstViewController: UIViewController{
|
|||
audioPlayer.stop()
|
||||
musicPlayer.stop()
|
||||
|
||||
|
||||
controlButton.accessibilityLabel = "Play Button"
|
||||
controlButton.setBackgroundImage(UIImage(systemName: "play.circle"), for: UIControl.State.normal)
|
||||
UIView.animate(withDuration: 0.4, delay: 0,usingSpringWithDamping: 0.5,initialSpringVelocity: 0,animations: {self.PlayButtonSize.constant = 90;self.view.layoutIfNeeded()}, completion: nil)
|
||||
print("Music started: \(GlobalVars.musicStarted)")
|
||||
}
|
||||
musicHandler.updateMusic()
|
||||
var nowPlayingString:String = "Now Playing: "
|
||||
if (musicPlayer.playbackState == MPMusicPlaybackState.playing) {
|
||||
|
||||
|
@ -921,22 +1012,60 @@ class FirstViewController: UIViewController{
|
|||
let backImg: UIImage = UIImage(named: "grass")!
|
||||
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.86, green: 0.69, blue: 0.24, alpha: 1.00)
|
||||
removeAllEffects()
|
||||
} else if weatherControl.selectedSegmentIndex == 1 {
|
||||
list = list + 5
|
||||
let backImg: UIImage = UIImage(named: "grass")!
|
||||
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.86, green: 0.69, blue: 0.24, alpha: 1.00)
|
||||
showRain()
|
||||
} else if weatherControl.selectedSegmentIndex == 2 {
|
||||
list = list + 10
|
||||
|
||||
let backImg: UIImage = UIImage(named: "grasssnow")!
|
||||
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.12, green: 0.54, blue: 0.61, alpha: 1.00)
|
||||
showSnowflakes()
|
||||
}
|
||||
|
||||
GlobalVars.selectedMusicList = list
|
||||
GlobalVars.weatherList = weatherControl.selectedSegmentIndex
|
||||
|
||||
if((GlobalVars.hour >= 8) && (GlobalVars.hour <= 19)){ //Daytime
|
||||
//print("day")
|
||||
do{
|
||||
var gif = try UIImage(gifName: "day.gif")
|
||||
if GlobalVars.weatherList == 2 {
|
||||
gif = try UIImage(gifName: "day snow.gif")
|
||||
}
|
||||
sceneryImageView.setGifImage(gif, loopCount: -1)
|
||||
}catch{print(error)}
|
||||
} else if((GlobalVars.hour >= 20) && (GlobalVars.hour <= 21)){//Sunset
|
||||
do{
|
||||
var gif = try UIImage(gifName: "day.gif")
|
||||
if GlobalVars.weatherList == 2 {
|
||||
gif = try UIImage(gifName: "day snow.gif")
|
||||
}
|
||||
sceneryImageView.setGifImage(gif, loopCount: -1)
|
||||
}catch{print(error)}
|
||||
} else if((GlobalVars.hour >= 22) || (GlobalVars.hour <= 5)){//Night
|
||||
//print("night")
|
||||
do{
|
||||
var gif = try UIImage(gifName: "night.gif")
|
||||
if GlobalVars.weatherList == 2 {
|
||||
gif = try UIImage(gifName: "night snow.gif")
|
||||
}
|
||||
sceneryImageView.setGifImage(gif, loopCount: -1)
|
||||
}catch{print(error)}
|
||||
} else if((GlobalVars.hour >= 6) && (GlobalVars.hour <= 7)){//Sunrise
|
||||
do{
|
||||
var gif = try UIImage(gifName: "day.gif")
|
||||
if GlobalVars.weatherList == 2 {
|
||||
gif = try UIImage(gifName: "day snow.gif")
|
||||
}
|
||||
sceneryImageView.setGifImage(gif, loopCount: -1)
|
||||
}catch{print(error)}
|
||||
}
|
||||
|
||||
print("selected playlist is \(list)")
|
||||
|
||||
//defaults.set(list, forKey: "savedSelectedList")
|
||||
|
@ -946,6 +1075,20 @@ class FirstViewController: UIViewController{
|
|||
//print("updating")
|
||||
}
|
||||
|
||||
@objc func showSnowflakes() {
|
||||
self.removeEffects()
|
||||
self.addSnowflakes()
|
||||
}
|
||||
|
||||
@objc func showRain() {
|
||||
self.removeEffects()
|
||||
self.addRain()
|
||||
}
|
||||
|
||||
@objc func removeAllEffects() {
|
||||
self.removeEffects()
|
||||
}
|
||||
|
||||
|
||||
/*@objc func updateMusic(){
|
||||
|
||||
|
|
|
@ -331,16 +331,19 @@ class SecondViewController: UIViewController, UITableViewDelegate, UITableViewDa
|
|||
let backImg: UIImage = UIImage(named: "grass")!
|
||||
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.86, green: 0.69, blue: 0.24, alpha: 1.00)
|
||||
removeAllEffects()
|
||||
} else if selectListWeatherControl.selectedSegmentIndex == 1 {
|
||||
list = list + 5
|
||||
let backImg: UIImage = UIImage(named: "grass")!
|
||||
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.86, green: 0.69, blue: 0.24, alpha: 1.00)
|
||||
showRain()
|
||||
} else if selectListWeatherControl.selectedSegmentIndex == 2 {
|
||||
list = list + 10
|
||||
let backImg: UIImage = UIImage(named: "grasssnow")!
|
||||
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.12, green: 0.54, blue: 0.61, alpha: 1.00)
|
||||
showSnowflakes()
|
||||
}
|
||||
|
||||
GlobalVars.selectedMusicList = list
|
||||
|
@ -422,14 +425,17 @@ class SecondViewController: UIViewController, UITableViewDelegate, UITableViewDa
|
|||
let backImg: UIImage = UIImage(named: "grass")!
|
||||
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.86, green: 0.69, blue: 0.24, alpha: 1.00)
|
||||
removeAllEffects()
|
||||
} else if GlobalVars.weatherList == 1 {
|
||||
let backImg: UIImage = UIImage(named: "grass")!
|
||||
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.86, green: 0.69, blue: 0.24, alpha: 1.00)
|
||||
showRain()
|
||||
} else if GlobalVars.weatherList == 2 {
|
||||
let backImg: UIImage = UIImage(named: "grasssnow")!
|
||||
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.12, green: 0.54, blue: 0.61, alpha: 1.00)
|
||||
showSnowflakes()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -453,6 +459,19 @@ class SecondViewController: UIViewController, UITableViewDelegate, UITableViewDa
|
|||
|
||||
}
|
||||
|
||||
@objc func showSnowflakes() {
|
||||
self.removeEffects()
|
||||
self.addSnowflakes()
|
||||
}
|
||||
|
||||
@objc func showRain() {
|
||||
self.removeEffects()
|
||||
self.addRain()
|
||||
}
|
||||
|
||||
@objc func removeAllEffects() {
|
||||
self.removeEffects()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
BIN
grandfatherrock/gifs/day snow.gif
Executable file
After Width: | Height: | Size: 233 KiB |
BIN
grandfatherrock/gifs/night snow.gif
Executable file
After Width: | Height: | Size: 185 KiB |
BIN
grandfatherrock/images/icons8-winter-100.png
Normal file
After Width: | Height: | Size: 3 KiB |
BIN
grandfatherrock/images/icons8-winter-80.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
grandfatherrock/images/particle.png
Executable file
After Width: | Height: | Size: 944 B |
BIN
grandfatherrock/images/rain.png
Executable file
After Width: | Height: | Size: 7.3 KiB |
BIN
grandfatherrock/images/rain2.png
Normal file
After Width: | Height: | Size: 6.9 KiB |