What I do after I do a fresh install. Things are sorta grouped by type.
- Start downloading Xcode
- Disable auto-bright and turn brightness all the way up
- Turn up trackpad tracking
- Disable trackpad pinch open & close
#import <UIKit/UIKit.h> | |
#import <AVFoundation/AVFoundation.h> | |
#import <CoreGraphics/CoreGraphics.h> | |
#import <CoreVideo/CoreVideo.h> | |
#import <CoreMedia/CoreMedia.h> | |
/*! | |
@class AVController | |
@author Benjamin Loulier |
a: AM/PM | |
A: 0~86399999 (Millisecond of Day) | |
c/cc: 1~7 (Day of Week) | |
ccc: Sun/Mon/Tue/Wed/Thu/Fri/Sat | |
cccc: Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday | |
d: 1~31 (0 padded Day of Month) | |
D: 1~366 (0 padded Day of Year) | |
fb -[NSException raise] | |
fb -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] | |
fb -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] | |
define NSZombies | |
this will give you help messages. Set to NO to turn them off. | |
set env MallocHelp=YES | |
# might also be set in launch arguments. | |
set env NSAutoreleaseFreedObjectCheckEnabled=YES |
What I do after I do a fresh install. Things are sorta grouped by type.
//Throw this on your UITableViewDelegate (probably your UITableViewController) to achieve the "keyboard dismisses when I tap away" effect. | |
//Your users will thank you. A lot. | |
- (void) scrollViewWillBeginDragging:(UIScrollView *)scrollView { | |
[self.view endEditing:YES]; | |
} | |
//The endEditing: method on UIView comes to us from a category that UITextField adds to UIKit that makes the view or any subview that is the first responder resign (optionally force), that's what the "YES" bit is. |
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; | |
NSEntityDescription *entity = [NSEntityDescription entityForName:@"PKScan" inManagedObjectContext:self.managedObjectContext]; | |
[fetchRequest setEntity:entity]; | |
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"scanTimestamp" ascending:NO]; | |
NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil]; | |
[fetchRequest setSortDescriptors:sortDescriptors]; |
#import <Foundation/Foundation.h> | |
@interface NSDate (PrettySectionHeaderAdditions) | |
- (NSString *) prettySectionHeaderDateSring; | |
@end | |
@implementation NSDate (PrettySectionHeaderAdditions) |
[oldBlog release]; | |
JMBlog *newBlog = [[JMBlog alloc] initWithAwesomeLevel:JMAwesomeLevelLegendary]; |
<Response> | |
<Product> | |
<Title>Toothbrush ABC</Title> | |
<Image>http://www.acme.com/pic1.jpg</Image> | |
<Image>http://www.acme.com/pic2.jpg</Image> | |
<Image>http://www.acme.com/pic3.jpg</Image> | |
</Product> | |
<Offers> | |
<Offer> | |
<Merchant>ACME</Merchant> |
//Author: https://github.com/TouchCode | |
//Code File: https://github.com/TouchCode/TouchUI/blob/master/Source/Views/CBetterAlertView.m | |
#import <UIKit/UIKit.h> | |
@interface CBetterAlertView : UIAlertView { | |
id userInfo; | |
} | |
@property (readwrite, nonatomic, retain) id userInfo; |