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
@IBAction func mangoPressed(_ sender: UIButton) { | |
fruitButton = "mango" | |
Total = Total + 136.2 | |
TotalTextField.text = "\(Total)" | |
TotalTextField.text = String(format:"%.2f", Total) | |
} | |
@IBAction func guava(_ sender: UIButton) { | |
fruitButton = "guava" | |
Total = Total + 49.7 |
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
@IBAction func mangoPressed(_ sender: UIButton) { | |
fruitButton = "mango" | |
Total = Total + 136.2 | |
TotalTextField.text = "\(Total)" | |
TotalTextField.text = String(format:"%.2f", Total) | |
} | |
@IBAction func guava(_ sender: UIButton) { | |
fruitButton = "guava" | |
Total = Total + 49.7 |
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
@IBAction func mangoPressed(_ sender: UIButton) { | |
fruitButton = "mango" | |
Total = Total + 136.2 | |
TotalTextField.text = "\(Total)" | |
TotalTextField.text = String(format:"%.2f", Total) | |
} | |
@IBAction func guava(_ sender: UIButton) { | |
fruitButton = "guava" | |
Total = Total + 49.7 |
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
override func viewDidLoad() { | |
super.viewDidLoad() | |
self.page1ImageView.alpha = 0.0 | |
self.page2ImageView.alpha = 0.0 | |
self.page3ImageView.alpha = 0.0 | |
self.page4ImageView.alpha = 0.0 | |
self.page5ImageView.alpha = 0.0 | |
self.page6ImageView.alpha = 0.0 | |
self.page7ImageView.alpha = 0.0 | |
self.page8ImageView.alpha = 0.0 |
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
UIView.animate(withDuration: 3.5) { | |
self.coverImageView.center = CGPoint(x:750, y: self.coverImageView.center.y) | |
} |
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
if self.page1ImageView.alpha == 0 { | |
UIView.animate(withDuration: 2, delay: 0.5, options: .curveEaseIn, | |
animations: { | |
self.page1ImageView.alpha = 1.0 | |
}) | |
} else { | |
UIView.animate(withDuration: 2, delay: 0.5, options: .curveEaseIn, | |
animations: { | |
self.page1ImageView.alpha = 0.0 |
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
UIView.animate(withDuration: 3) { | |
self.dogfishImageView.frame = CGRect(origin: self.dogfishImageView.frame.origin, size: CGSize(width: 360, height: self.dogfishImageView.frame.height)) | |
self.kmImageView.frame = CGRect(origin: self.kmImageView.frame.origin, size: CGSize(width: 298, height: self.kmImageView.frame.height)) | |
self.kmLabel.text = String(format:"892,545" ) | |
self.dogfishLabel.text = String(format:"742,239") | |
} | |
} |
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
UIView.animate(withDuration: 3) { | |
self.dogfishImageView.frame = CGRect(origin: self.dogfishImageView.frame.origin, size: CGSize(width: 360, height: self.dogfishImageView.frame.height)) | |
self.kmImageView.frame = CGRect(origin: self.kmImageView.frame.origin, size: CGSize(width: 298, height: self.kmImageView.frame.height)) | |
self.kmLabel.text = String(format:"892,545" ) | |
self.dogfishLabel.text = String(format:"742,239") | |
} | |
} |
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
var books = [Information]() | |
@IBOutlet var bookLabels: [UILabel]! | |
@IBOutlet weak var imageView: UIImageView! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
initBooks() | |
} |
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
override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | |
let controller = segue.destination as? ViewController | |
if let row = tableView.indexPathForSelectedRow?.row { | |
controller?.bookName = books[row].name | |
controller?.explainText = books[row].explainText | |
controller?.imageName = books[row].imageName | |
} | |
} | |
} |
OlderNewer