This file contains 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 { |
This file contains 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 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 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 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 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 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
// | |
// MockingServer.swift | |
// Frip | |
// | |
// Created by 최완복 on 2016. 1. 6.. | |
// Copyright © 2016년 Wanbok. All rights reserved. | |
// | |
import UIKit | |
import AMYServer |
This file contains 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
// | |
// CopyableLabel.swift | |
// | |
// Created by Wanbok Choi on 2016. 3. 17.. | |
// | |
import UIKit | |
final class CopyableLabel: UILabel { | |
This file contains 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 ViewController: UISearchControllerDelegate { | |
func willPresentSearchController(searchController: UISearchController) { | |
tabBarController?.tabBar.hidden = true | |
searchBarBackground(true) | |
dimmingBackground(true) | |
} | |
func willDismissSearchController(searchController: UISearchController) { | |
tabBarController?.tabBar.hidden = false | |
searchBarBackground(false) |
OlderNewer