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
#import "Kiwi.h" | |
#import "MyController.h" | |
#import "Record.h" | |
#import "MyModel.h" | |
// Category on class under test to expose private properties / methods | |
@interface MyController(MyTest) | |
@property (nonatomic, strong) NSDictionary *aDictionary; | |
@property (weak, nonatomic) IBOutlet UIButton *aButton; |
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
#import "Kiwi.h" | |
#import "MyController.h" | |
#import "Record.h" | |
#import "MyModel.h" | |
// Category on class under test to expose private properties / methods | |
@interface MyController(MyTest) | |
@property (nonatomic, strong) NSDictionary *aDictionary; | |
@property (weak, nonatomic) IBOutlet UIButton *aButton; |
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
#!/bin/env ruby | |
# encoding: utf-8 | |
require "faker" | |
require 'random_data' | |
require 'json' | |
randomPostcode = Random.uk_post_code | |
randomAddress = Random.address_line_1 + " " + Random.address_line_2 + " " + randomPostcode |
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
# Assumes that you tag versions with the version number (e.g., "1.1") and then the build number is | |
# that plus the number of commits since the tag (e.g., "1.1.17") | |
echo "Updating version/build number from git..." | |
plist=${PROJECT_DIR}/${INFOPLIST_FILE} | |
# increment the build number (ie 115 to 116) | |
versionnum=`git describe | awk '{split($0,a,"-"); print a[1]}'` | |
buildnum=`git describe | awk '{split($0,a,"-"); print a[1] "." a[2]}'` |
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
# build data file that is included in the source | |
# so we can automatically report Git repo information | |
# in the application. | |
cd ${PROJECT_DIR} | |
gitDataFile="gitDataAutoGenerated.h" | |
buildDate=`date "+%F %H:%M:%S"` | |
currentBranch=`git rev-parse --abbrev-ref HEAD` | |
lastCommitHash=`git log --pretty=format:"%h" -1` | |
lastCommitDate=`git log --pretty=format:"%ad" --date=short -1` |
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
Add gesture recognizer to UIWebView: | |
UITapGestureRecognizer *tapCatcher = [[UITapGestureRecognizer alloc] init]; | |
[tapCatcher setNumberOfTapsRequired:1]; | |
[tapCatcher setNumberOfTouchesRequired:1]; | |
[tapCatcher setDelegate:self]; | |
[tapCatcher addTarget:self action:@selector(didTapOnView)]; | |
[self.webView addGestureRecognizer:tapCatcher]; |
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
Thonburi | |
"Thonburi-Bold", | |
Thonburi | |
Snell Roundhand | |
"SnellRoundhand-Bold", | |
"SnellRoundhand-Black", | |
SnellRoundhand | |
Academy Engraved LET |
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
# Mac OS X | |
*.DS_Store | |
# Xcode | |
*.pbxuser | |
*.mode1v3 | |
*.mode2v3 | |
*.perspectivev3 | |
*.xcuserstate | |
project.xcworkspace/ |
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)takeSimulatorSafePhotoWithPopoverFrame:(GCRect)popoverFrame { | |
// Prerequisites: | |
// | |
// Class requires two properties to be defined: | |
// | |
// @property (nonatomic, strong) UIImagePickerController *imagePicker; | |
// @property (nonatomic) BOOL usingPopover; | |
// Load the imagePicker |
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)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate { | |
CGFloat contentOffsetY = scrollView.contentOffset.y; | |
if (contentOffsetY < -60.0) { | |
[self displayActivitySpinner]; | |
} | |
} |