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
# Auto Increment Version Script | |
# This script will increment the build number by 1 | |
# when running a configuration other than Debug and Release | |
# while not on intel architecture | |
arch=${ARCHS:0:4} | |
conf=${CONFIGURATION} | |
if [ "$conf" != "Debug" ] && [ "$conf" != "Release" ] && [ "$arch" != "i386" ] | |
then | |
buildPlist=${INFOPLIST_FILE} | |
buildVersion=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" $buildPlist) |
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
<key>GDI Commands</key> | |
<dict> | |
<key>GDI Duplicate Current Line</key> | |
<string>selectLine:, copy:, moveToEndOfLine:, insertNewLine:, moveToBeginningOfLine:, paste:, moveUp:, moveToEndOfLine:</string> | |
<key>GDI Delete Current Line</key> | |
<string>moveToEndOfLine:, deleteToBeginningOfLine:, deleteBackward:, moveDown:, moveToEndOfLine:</string> | |
<key>GDI Move Current Line Up</key> | |
<string>selectLine:, cut:, moveUp:, moveToBeginningOfLine:, insertNewLine:, paste:, moveBackward:</string> | |
<key>GDI Move Current Line Down</key> | |
<string>selectLine:, cut:, moveDown:, moveToBeginningOfLine:, insertNewLine:, paste:, moveBackward:</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
In Xcode, go to the target for the app, Build Phases, and find the file you want to have ARC ignore in Compile Sources. Double-click the file, and in the popup add this compiler flag: | |
-fno-objc-arc | |
And when you compile Xcode will turn off ARC! Yay! |
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
#pragma mark - Phone Number Field Formatting | |
// Adopted from: http://stackoverflow.com/questions/6052966/phone-number-formatting | |
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string | |
{ | |
if (textField == self.mobileNumberField || textField == self.homeNumberField || textField == self.workNumberField) { | |
int length = [self getLength:textField.text]; | |
if(length == 10) { | |
if(range.length == 0) |
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
Create a Workspace | |
Under Xcode 4, go to File, New, Workspace. | |
From Finder you can then drag in the .xcodeproj projects for both the static library you want to use, and the new app you are building that uses the library. See Apple Docs for more info on setting up Workspaces: http://developer.apple.com/library/ios/#featuredarticles/XcodeConcepts/Concept-Workspace.html | |
Static Library Project Settings | |
Make sure all the static library's headers are set to copy to "Public". This is done under the settings for the static library target > Build Phases. In the "Copy Headers" phase, make sure all your headers are within the "Public" section. | |
Next go to Build Settings, find "Public Headers Folder Path" and type in a path for your library. I choose to use this: | |
include/LibraryName | |
I've adopted this from use with RestKit and found it works best with all my static libraries. What this does is tells Xcode to copy all the headers we moved to the "Public" headers section in step 1 to the folder we specify here which resides |
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
EDITOR=/usr/bin/nano crontab -e |
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
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField | |
{ | |
// prevent the start date from manually entering text. | |
// instead, we display a popover with a date picker | |
if (textField == self.startDateField && self.popover == nil) { | |
[self.view endEditing:NO]; | |
[self presentDatePickerFromField:textField pickerID:nil]; | |
return NO; | |
} | |
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
bundle exec rake assets:precompile |
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
postgres -D /usr/local/var/postgres |
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
<%= semantic_form_for [ :manage, resource ], :html => {:class => 'default-manage-form' } do |f| %> | |
<%= f.inputs do %> | |
<% attributes.each do |attr| %> | |
<% puts attr %> | |
<% case attr %> | |
<% when "q" %> | |
<% puts resource[attr] %> | |
<%= f.input :q, :selected => resource[attr], :collection => Ability.all, :include_blank => false %> | |
<% when "w" %> | |
<% puts resource[attr] %> |
OlderNewer