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
/// <summary> | |
/// Determines whether the specified object is an instance of the current Type. | |
/// </summary> | |
/// <param name="type">The type.</param> | |
/// <param name="o">The object to compare with the current type.</param> | |
/// <returns>true if the current Type is in the inheritance hierarchy of the | |
/// object represented by o, or if the current Type is an interface that o | |
/// supports. false if neither of these conditions is the case, or if o is | |
/// null, or if the current Type is an open generic type (that is, | |
/// ContainsGenericParameters returns true).</returns> |
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
# Exclude the build directory | |
build/* | |
# Exclude temp nibs and swap files | |
*~.nib | |
*.swp | |
# Exclude OS X folder attributes | |
.DS_Store | |
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
################### | |
# compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.pdb | |
*.dll.config | |
*.cache |
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
*.doc diff=astextplain | |
*.DOC diff=astextplain | |
*.docx diff=astextplain | |
*.DOCX diff=astextplain | |
*.dot diff=astextplain | |
*.DOT diff=astextplain | |
*.pdf diff=astextplain | |
*.PDF diff=astextplain | |
*.rtf diff=astextplain | |
*.RTF diff=astextplain |
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
## Ignore Visual Studio temporary files, build results, and | |
## files generated by popular Visual Studio add-ons. | |
# User-specific files | |
*.suo | |
*.user | |
*.gitignore | |
*.gitattributes | |
# Build results |
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
# Auto detect text files and perform LF normalization | |
[attr]utf16 diff merge -crlf | |
* text=auto | |
*.ico binary | |
*.snk binary | |
*.xls binary |
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
CGSize iOSDeviceScreenSize = [[UIScreen mainScreen] bounds].size; | |
if (iOSDeviceScreenSize.height == 480){ | |
UIStoryboard *iPhone35Storyboard = [UIStoryboard storyboardWithName:@"Storyboard_iPhone4" bundle:nil]; | |
UIViewController *initialViewController = [iPhone35Storyboard instantiateInitialViewController]; | |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
self.window.rootViewController = initialViewController; | |
} | |
if (iOSDeviceScreenSize.height == 568){ // iPhone 5 | |
UIStoryboard *iPhone4Storyboard = [UIStoryboard storyboardWithName:@"Storyboard_iPhone5" bundle: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
// Code from Wordpress iOS App [File: SidebarViewController.m, - (void)showWelcomeScreenIfNeeded; ] | |
GeneralWalkthroughViewController *welcomeViewController = [[GeneralWalkthroughViewController alloc] init]; | |
UINavigationController *aNavigationController = [[UINavigationController alloc] initWithRootViewController:welcomeViewController]; | |
aNavigationController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; | |
aNavigationController.modalPresentationStyle = UIModalPresentationFormSheet; | |
[self.panelNavigationController presentModalViewController:aNavigationController animated:YES]; |
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
// Check if an item is in a NSMutableArray | |
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"pubDate = %@", tumblrPost.pubDate]; | |
NSArray *filteredArray = [favoriteItems filteredArrayUsingPredicate:predicate]; | |
if (filteredArray.count > 0) { | |
// item found! | |
} | |
// Remove an item from a NSMutableArray | |
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"createdAt = %@", facebookPost.createdAt]; |
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
// From http://stackoverflow.com/questions/12648129/uiimageview-programmilly-manage-for-iphone5-and-iphone4/12774544#12774544 | |
[self resizeImageView:self.backgroundImageView intoFrame:self.view.frame]; | |
- (void)resizeImageView:(UIImageView *)imageView intoFrame:(CGRect)frame { | |
// resizing is not needed if the height is already the same | |
if (frame.size.height == imageView.frame.size.height) { | |
return; | |
} |
OlderNewer