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 UIKit | |
@objc protocol TransitionInfoProtocol { | |
var view: UIView! { get set } | |
func viewsToAnimate() -> [UIView] | |
func copyForView(subView: UIView) -> UIView | |
optional func frameForView(subView: UIView) -> CGRect | |
} |
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 AddressBookUI | |
let picker = ABPeoplePickerNavigationController() | |
picker.peoplePickerDelegate = self | |
presentViewController(picker, animated: true, completion: nil) |
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
#!/usr/bin/perl -w | |
use strict; | |
if (not defined($ARGV[1])) { | |
die "usage: $0 <class name> <file with property names>\n"; | |
} | |
open(PROP, $ARGV[1]) || die "could not open property names file: $!\n"; | |
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)panHappend:(UIPanGestureRecognizer*)sender | |
{ | |
if (sender.state == UIGestureRecognizerStateBegan) | |
{ | |
self.startRange = self.postTextView.selectedRange; | |
} | |
NSRange selectedRange = {MAX(self.startRange.location+(NSInteger)([sender translationInView:self.view].x/8.0f), 0), 0}; | |
self.postTextView.selectedRange = selectedRange; | |
} |
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
NSString *languageGuessedString; | |
if (postString.length < 60) { | |
languageGuessedString = nil; | |
} else { | |
NSArray *componentsArray = [postString componentsSeparatedByString:@" "]; | |
NSMutableString *mutablePostString = [NSMutableString string]; | |
for (NSString *string in componentsArray) { | |
if ([string rangeOfString:@"@"].location != NSNotFound) { | |
continue; |
NewerOlder