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 UIStoryboard { | |
class func storyboard(storyboard: StoryboardRepresentable, bundle: NSBundle? = nil) -> UIStoryboard { | |
return UIStoryboard(name: storyboard.storyboardName, bundle: bundle) | |
} | |
} | |
protocol StoryboardRepresentable { | |
var storyboardName: String { get } | |
} |
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
language: objective-c | |
notifications: | |
slack: | |
on_success: always | |
on_failure: change | |
rooms: | |
secure: generated-secret | |
xcode_project: YourProjectName.xcodeproj | |
xcode_scheme: YourSharedSchemeName |
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
@interface CounterLayer : CALayer | |
@property (nonatomic, assign) NSInteger count; | |
@end | |
@interface MovingCounterView : UIView | |
@property (nonatomic, strong) CounterLayer *counterLayer; | |
@end |
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
@implementation DocumentsBrowserTest | |
{ | |
BOOL _isPad; | |
SEL realPrepareForSegue, testPrepareForSegue; | |
} | |
- (void)setUp | |
{ | |
[super setUp]; | |
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
static const char *storyboardSegueKey = "TestAssociatedStoryboardKey"; | |
static const char *senderKey = "TestAssociatedSenderKey"; | |
@implementation YourViewController (Testing) | |
- (void)documentsBrowserTest_prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender | |
{ | |
objc_setAssociatedObject(self, storyboardSegueKey, segue, OBJC_ASSOCIATION_RETAIN); | |
objc_setAssociatedObject(self, senderKey, sender, OBJC_ASSOCIATION_RETAIN); | |
} |
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)swapInstanceMethodsForClass:(Class)cls selector:(SEL)sel1 andSelector:(SEL)sel2 | |
{ | |
Method method1 = class_getInstanceMethod(cls, sel1); | |
Method method2 = class_getInstanceMethod(cls, sel2); | |
method_exchangeImplementations(method1, method2); | |
} |
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)test_ExamplesVCSegueConnected | |
{ | |
STAssertNoThrow([self.sut performSegueWithIdentifier:[[self appDelegate] segueIdentifierForClass:[ExamplesVC class]] sender:self], @"ExamplesVC should be connected"); | |
} |
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
// | |
// GistCommunicationManager.h | |
// GistExplorer | |
// | |
// Created by Bernd Rabe on 28.05.13. | |
// Copyright (c) 2013 RABE_IT Services. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import "OperationDelegate.h" |
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
// | |
// | |
// | |
// | |
// Created by Bernd Rabe on 07.08.12. | |
// Copyright (c) 2012 RABE_IT Services. All rights reserved. | |
// | |
#pragma mark - TabBarController Sequence |
NewerOlder