<commit_before>//
//  ViewController.swift
//  SAStickyHeaderExample
//
//  Created by <NAME> on 18/10/2015.
//  Copyright © 2015 SA. All rights reserved.
//

import UIKit

/**
Github example images from: https://octodex.github.com
*/
enum SAGithubImage: String {
    case Gracehoppertocat
    case Hipster
    case Mountietocat
    case Octoliberty
    case ProfessortocatV2
}

class ViewController: UITableViewController {
    
    // list of github images for example, for DEMO purposes i've loaded everything first but can easily be added afterworld with images.append()
    let images = [UIImage(named: SAGithubImage.Gracehoppertocat.rawValue), UIImage(named: SAGithubImage.Hipster.rawValue), UIImage(named: SAGithubImage.Mountietocat.rawValue), UIImage(named: SAGithubImage.Octoliberty.rawValue), UIImage(named: SAGithubImage.ProfessortocatV2.rawValue)]
    
    // MARK:
    // MARK: Lifecycle
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        setupView()
    }
    
    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated)
    }
    
    override func viewDidAppear(animated: Bool) {
        super.viewDidAppear(animated)
    }
    
    // MARK:
    // MARK: TableViewDelegate

    // EXAMPLE 2: Using Delegate
//    override func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
//        return SAStickyHeaderView(table: tableView, image: images)
//    }
    
    // MARK:
    // MARK: Setup
    
    func setupView() {
        // EXAMPLE 1: SAStickyHeaderView with a frame and optional image array.
        tableView.tableHeaderView = SAStickyHeaderView(frame: CGRectMake(0, 0, CGRectGetWidth(view.frame), 400), table: tableView, image: images)
    }
}<commit_msg>fixed objective-c styled code for swift<commit_after>//
//  ViewController.swift
//  SAStickyHeaderExample
//
//  Created by <NAME> on 18/10/2015.
//  Copyright © 2015 SA. All rights reserved.
//

import UIKit

/**
Github example images from: https://octodex.github.com
*/
enum SAGithubImage: String {
    case Gracehoppertocat
    case Hipster
    case Mountietocat
    case Octoliberty
    case ProfessortocatV2
}

class ViewController: UITableViewController {
    
    // list of github images for example, for DEMO purposes i've loaded everything first but can easily be added afterworld with images.append()
    let images = [UIImage(named: SAGithubImage.Gracehoppertocat.rawValue), UIImage(named: SAGithubImage.Hipster.rawValue), UIImage(named: SAGithubImage.Mountietocat.rawValue), UIImage(named: SAGithubImage.Octoliberty.rawValue), UIImage(named: SAGithubImage.ProfessortocatV2.rawValue)]
    
    // MARK:
    // MARK: Lifecycle
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        setupView()
    }
    
    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated)
    }
    
    override func viewDidAppear(animated: Bool) {
        super.viewDidAppear(animated)
    }
    
    // MARK:
    // MARK: TableViewDelegate

    // EXAMPLE 2: Using Delegate
//    override func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
//        return SAStickyHeaderView(table: tableView, image: images)
//    }
    
    // MARK:
    // MARK: Setup
    
    func setupView() {
        // EXAMPLE 1: SAStickyHeaderView with a frame and optional image array.
        
        tableView.tableHeaderView = SAStickyHeaderView(frame: CGRect(x: 0, y: 0, width: CGRectGetWidth(view.frame), height: 400), table: tableView, image: images)
    }
}
{'fraction_non_alphanumeric': 0.09789240155296727, 'fraction_numerical': 0.011647254575707155, 'mean_word_length': 2.9724669603524227, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '5520357', 'n_tokens_mistral': 1190, 'n_tokens_neox': 1109, 'n_words': 277}