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
class A: NSViewController { | |
var bgMovie: AVPlayerView = AVPlayerView() | |
var fileName: String = "Water_Demand_Forecasting" | |
@IBOutlet var player: AVPlayerView! | |
@IBOutlet var ZButton: NSButton! | |
override func viewDidLoad() { |
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
class A: NSViewController { | |
var bgMovie: AVPlayerView = AVPlayerView() | |
var fileName: String = "Water_Demand_Forecasting" | |
@IBOutlet var player: AVPlayerView! | |
@IBOutlet var ZButton: NSButton! | |
extension NSView { |
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
class A: NSViewController { | |
extension NSView { | |
func bringSubviewToFront(view: NSView) { | |
view.removeFromSuperview() | |
self.addSubview(view) | |
} | |
} | |
var bgMovie: AVPlayerView = AVPlayerView() |
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 Cocoa | |
import AVFoundation | |
import AVKit | |
class A: NSViewController { | |
var bgMovie: AVPlayerView = AVPlayerView() | |
var fileName: String = "Water_Demand_Forecasting" | |
@IBOutlet var player: AVPlayerView! |
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 viewWillAppear() { | |
player.bringSubviewToFront(ZButton) | |
ZButton.layer!.zPosition = 1000 | |
} |
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 | |
let reuseIdentifier = "Cell" | |
class PortfolioCollectionViewController: UICollectionViewController { | |
var icon: ProductCellCollectionViewCell! | |
var imageFileNames = [String]() | |
override func viewDidLoad() { |
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 ProductCellCollectionViewCell: UICollectionViewCell { | |
// The collection view cell's objects | |
var imageView: UIImageView! | |
var caption: UILabel! | |
// This init function prevent the compiler from complaining | |
required init(coder aDecoder: NSCoder) { | |
super.init(coder: aDecoder) |
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 | |
let reuseIdentifier = "Cell" | |
class PortfolioCollectionViewController: UICollectionViewController { | |
var icon: ProductCellCollectionViewCell! | |
var imageFileNames = [String]() | |
override func viewDidLoad() { |
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 FilterAction(sender: AnyObject) { | |
let deleteIndexPath = PortfolioView!.indexPathsForSelectedItems()[1] as! NSIndexPath | |
PortfolioView!.deleteItemsAtIndexPaths([deleteIndexPath]) | |
} |
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 FilterAction(sender: AnyObject) { | |
let deleteIndexPath = PortfolioView!.indexPathsForSelectedItems()[1] as! NSIndexPath | |
PortfolioView!.allowsMultipleSelection = true | |
PortfolioView!.deleteItemsAtIndexPaths([deleteIndexPath]) | |
self.PortfolioView!.reloadData() | |