//
//  ViewController.swift
//  WhereDidFocusMove
//
//  Created by Christian Leonhard Corsten on 22.01.16.
//  Copyright © 2016 Christian Corsten. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    @IBOutlet weak var btnFour: UIButton!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    override func shouldUpdateFocusInContext(context: UIFocusUpdateContext) -> Bool {
        
    
        if let  nextButton = context.nextFocusedView as! UIButton? {
            
        NSLog("The focus will move to Button %@", nextButton.titleLabel!.text!)
        }

        return true
    }


}

