Created
March 28, 2015 16:39
-
-
Save masakid/fbd54d4ea230d2520912 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| class CommonProcess { | |
| //他のタブから遷移したときにデータを移すメソッド | |
| class func settingOtherTabData(label:UILabel, slider:UISlider){ | |
| let appDelegate = UIApplication.sharedApplication().delegate as AppDelegate | |
| if let value = appDelegate.commonSliderValue { | |
| label.text = "\(appDelegate.commonSliderValue!)" | |
| slider.value = appDelegate.commonSliderValue! | |
| } | |
| } | |
| //スライダーを動かした時のメソッド | |
| class func commonMoveSlider(label:UILabel, slider:UISlider){ | |
| let sliderValue = slider.value | |
| label.text = "\(sliderValue)" | |
| let appDelegate = UIApplication.sharedApplication().delegate as AppDelegate | |
| appDelegate.commonSliderValue = sliderValue | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment