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
| // | |
| // XIBTemplateView.swift | |
| // JanuaryEffect | |
| // | |
| // Created by Wanbok on 2015. 11. 18.. | |
| // Copyright © 2015년 JanuaryEffect. All rights reserved. | |
| // | |
| import UIKit |
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
| extension String { | |
| func join(strings: String!... ) -> String { | |
| return self.join(strings.filter({ $0?.isEmpty == false }).map {$0 as String}) | |
| } | |
| } |
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 ViewController: UIViewController { | |
| @IBOutlet weak var tableView: UITableView! | |
| ... | |
| } | |
| // MARK: - NSFetchedResultsControllerDelegate | |
| extension ViewController: NSFetchedResultsControllerDelegate { | |
| func controllerWillChangeContent(controller: NSFetchedResultsController) { | |
| self.tableView.beginUpdates() |
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 CollectionViewController: UICollectionViewController { | |
| var sectionChanges: [[NSFetchedResultsChangeType: Int]]? = nil | |
| var itemChanges: [[NSFetchedResultsChangeType: AnyObject]]? = nil | |
| ... | |
| } | |
| // MARK: NSFetchedResultsControllerDelegate |
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
| UIBarButtonItem *cancelButton = createStoreViewController.cancelButton; | |
| XCTAssertEqual(cancelButton.target, createStoreViewController, @"UIBarButtonItem 검증"); | |
| XCTAssertTrue([NSStringFromSelector(cancelButton.action) isEqualToString:@"onCancel:"], @"UIBarButtonItem 검증"); |
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
| - (void)setUp { | |
| [super setUp]; | |
| [RKTestFactory setUp]; | |
| [RKManagedObjectStore setDefaultStore:[RKTestFactory managedObjectStore]]; | |
| appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; | |
| storeCollectionViewController = [(UINavigationController *)appDelegate.window.rootViewController viewControllers][0]; | |
| createStoreViewController = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"CreateStoreViewController"]; | |
| } | |
| - (void)tearDown { |
NewerOlder