<commit_before>//
//  ViewController.swift
//  begining-animations
//
//  Created by <NAME> on 10/6/15.
//  Copyright © 2015 HashRocket. All rights reserved.
//

import UIKit

class ViewController: UIViewController {
    
    var filename:String = "Camel_3-1.png"

    @IBOutlet weak var camelImage: UIImageView!
    
    
    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.
    }

    @IBAction func updateImage(sender: AnyObject) {
        
        filename = filename == "Camel_3-1.png" ? "Camel_3-2.png" : "Camel_3-1.png"
        
        
        camelImage.image = UIImage(named: filename)
    }
    
    // begin animating the image in from the left.
    
    override func viewDidLayoutSubviews() {
        camelImage.center = CGPointMake(camelImage.center.x - 400, camelImage.center.y)
    }
    
    override func viewDidAppear(animated: Bool) {
        UIView.animateWithDuration(1) { () -> Void in
            self.camelImage.center = CGPointMake(self.camelImage.center.x + 400, self.camelImage.center.y)
        }
    }
    
    // end animating the image in from the left.

}
<commit_msg>fading the image in when the app starts<commit_after>//
//  ViewController.swift
//  begining-animations
//
//  Created by <NAME> on 10/6/15.
//  Copyright © 2015 HashRocket. All rights reserved.
//

import UIKit

class ViewController: UIViewController {
    
    var filename:String = "Camel_3-1.png"

    @IBOutlet weak var camelImage: UIImageView!
    
    
    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.
    }

    @IBAction func updateImage(sender: AnyObject) {
        
        filename = filename == "Camel_3-1.png" ? "Camel_3-2.png" : "Camel_3-1.png"
        
        
        camelImage.image = UIImage(named: filename)
    }
    
    // begin animating the image in from the left.
    
//    override func viewDidLayoutSubviews() {
//        camelImage.center = CGPointMake(camelImage.center.x - 400, camelImage.center.y)
//    }
//    
//    override func viewDidAppear(animated: Bool) {
//        UIView.animateWithDuration(1) { () -> Void in
//            self.camelImage.center = CGPointMake(self.camelImage.center.x + 400, self.camelImage.center.y)
//        }
//    }
    
    // end animating the image in from the left.
    
    // begin fading the image in
    
        override func viewDidLayoutSubviews() {
            camelImage.alpha = 0
        }
    
        override func viewDidAppear(animated: Bool) {
            UIView.animateWithDuration(1) { () -> Void in
                self.camelImage.alpha = 1
            }
        }
    
    // end fading the image in.

}

{'fraction_non_alphanumeric': 0.10233160621761658, 'fraction_numerical': 0.016515544041450777, 'mean_word_length': 2.0766932270916336, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2259103', 'n_tokens_mistral': 1004, 'n_tokens_neox': 937, 'n_words': 235}