IOS

UIPopoverController

 * http://www.raywenderlich.com/1056/ipad-for-iphone-developers-101-uipopovercontroller-tutorial
 * http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIPopoverController_class/Reference/Reference.html

UITableViewCell

 * http://stackoverflow.com/questions/460014/can-you-animate-a-height-change-on-a-uitableviewcell-when-selected
 * http://stackoverflow.com/questions/4347163/change-height-of-uitableviewcell-from-within-the-uitableviewcell-inherited-class
 * http://stackoverflow.com/questions/5322735/how-to-change-uitableviewcells-height-after-tableview-reloaddata
 * http://stackoverflow.com/questions/1704997/uitextview-content-moves-up-when-textview-is-selected
 * http://davemeehan.com/technology/moving-uitableviewcell-between-sections-in-grouped-uitableview

Example

 * https://developer.apple.com/library/mac/#samplecode/AudioDataOutputToAudioUnit/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007766
 * https://developer.apple.com/library/ios/#samplecode/aurioTouch/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007770

Objective C

 * http://www.apeth.com/iOSBook/ch01.html
 * http://oreilly.com/catalog/0636920010258/

Padding UITextField

 * http://stackoverflow.com/questions/3727068/set-padding-for-uitextfield-with-uitextborderstylenone

Translucent

 * http://stackoverflow.com/questions/1499298/how-can-i-create-a-translucent-modal-uiviewcontroller
 * http://stackoverflow.com/questions/2578614/transparent-background-with-a-modal-uiviewcontroller

Orientation and Rotation

 * http://stackoverflow.com/questions/560016/rotation-affecting-navigation-bar-unpredictably
 * http://developer.apple.com/library/ios/#documentation/uikit/reference/UIKitFunctionReference/Reference/reference.html
 * http://www.bytesizecreations.com/2009/05/working-with-orientation-changes-on/
 * http://www.ifans.com/forums/showthread.php?t=136590
 * http://www.cocos2d-iphone.org/forum/topic/2588

UIKeyboard

 * http://stackoverflow.com/questions/3798409/how-to-set-the-position-of-the-uikeyboard
 * http://unsolicitedfeedback.com/?p=44
 * http://stackoverflow.com/questions/4635261/iphone-sdk-how-to-determine-keyboard-type-within-a-uikeyboarddidshownotification
 * http://stackoverflow.com/questions/1490573/how-to-programatically-check-whether-a-keyboard-is-present-in-iphone-app
 * http://stackoverflow.com/questions/2434290/custom-keyboard-iphone-uikeyboarddidshownotification-and-uitableviewcontroller
 * http://iphonedevelopertips.com/user-interface/adjust-textfield-hidden-by-keyboard.html
 * http://developer.apple.com/library/ios/#samplecode/KeyboardAccessory/Listings/Classes_ViewController_m.html
 * http://stackoverflow.com/questions/3121037/ipad-dismiss-keyboard-button-lower-right-how-do-i-detect-when-this-occurs-w

Notifications

 * http://blog.martinreichart.com/2010/01/getting-iphone-push-notifications-to-work/

Game

 * http://maniacdev.com/2010/02/great-insight-into-doom-iphone-source-code/
 * http://fabiensanglard.net/doomIphone/index.php
 * http://www.raywenderlich.com/3325/how-to-make-a-simple-multiplayer-game-with-game-center-tutorial-part-22

Info.plist

 * http://cocoawithlove.com/2009/08/control-and-configuration-of.html
 * http://blog.joshschumacher.com/2009/02/19/reading-common-and-custom-values-from-your-infoplist/
 * http://iphoneincubator.com/blog/data-management/how-to-read-a-file-from-your-application-bundle
 * http://www.iphonedevsdk.com/forum/iphone-sdk-development/4340-reading-info-plist-file-app.html

General

 * http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Introduction/Introduction.html

Core Text

 * http://www.cocoanetics.com/2011/01/befriending-core-text/

Streaming Video

 * http://geobray.com/2010/03/26/live-tv-streaming-to-iphone-with-http/

Alert View

 * http://www.icodeblog.com/2009/11/09/iphone-coding-tutorial-inserting-a-uitextfield-in-a-uialertview/

Modal Views
540x620 MyModalViewController *targetController = [[[MyModalViewController alloc] init] autorelease]; targetController.modalPresentationStyle = UIModalPresentationFormSheet; targetController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; //transition shouldn't matter [self presentModalViewController:targetController animated:YES]; targetController.view.superview.frame = CGRectMake(0, 0, 200, 200);//it's important to do this after presentModalViewController targetController.view.superview.center = self.view.center;  MyModalViewController *targetController = [[[MyModalViewController alloc] init] autorelease];
 * http://commanigy.com/blog/2010/11/18/uimodalpresentationformsheet-width-and-height-for-an-ipad-in-landscape-mode
 * http://stackoverflow.com/questions/2246871/ipad-resizing-a-modal-uiviewcontroller
 * http://stackoverflow.com/questions/2457947/how-to-resize-a-uipresentationformsheet
 * http://stackoverflow.com/questions/4266581/uimodalpresentationformsheet-resizing-view

targetController.modalPresentationStyle = UIModalPresentationFormSheet; targetController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; //transition shouldn't matter [self presentModalViewController:targetController animated:YES];

targetController.view.superview.frame = CGRectMake(0, 0, 200, 200);//it's important to do this after

presentModalViewController targetController.view.superview.center = self.view.center; // Add this view to superview, and slide it in from the bottom - (void)presentWithSuperview:(UIView *)superview { // Set initial location at bottom of superview CGRect frame = self.view.frame; frame.origin = CGPointMake(0.0, superview.bounds.size.height); self.view.frame = frame; [superview addSubview:self.view];
 * http://stackoverflow.com/questions/2246871/ipad-resizing-a-modal-uiviewcontroller
 * http://stackoverflow.com/questions/587681/how-to-use-presentmodalviewcontroller-to-create-a-transparent-view

// Animate to new location [UIView beginAnimations:@"presentWithSuperview" context:nil]; frame.origin = CGPointZero; self.view.frame = frame; [UIView commitAnimations]; }

// Method called when removeFromSuperviewWithAnimation's animation completes - (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context { if ([animationID isEqualToString:@"removeFromSuperviewWithAnimation"]) { [self.view removeFromSuperview]; } }

// Slide this view to bottom of superview, then remove from superview - (void)removeFromSuperviewWithAnimation { [UIView beginAnimations:@"removeFromSuperviewWithAnimation" context:nil];

// Set delegate and selector to remove from superview when animation completes [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];

// Move this view to bottom of superview CGRect frame = self.view.frame; frame.origin = CGPointMake(0.0, self.view.superview.bounds.size.height); self.view.frame = frame;

[UIView commitAnimations]; }

Unit Testing
This is probably obvious, but in the interest of saving someone else the few minutes I spent scratching my head on this one... Your app probably has some code that looks like managedObjectModel = NSManagedObjectModel mergedModelFromBundles:nil] retain] If you pass nil then the main bundle is searched. When your an iphone app, that is the app itself - no surprises there. But when you are a unit test bundle, you are no longer the main bundle (the test rig application is). You need to tell CoreData to look inside your unit test bundle, with something along the lines of managedObjectModel = [[NSManagedObjectModel mergedModelFromBundles: [NSArray arrayWithObject:[NSBundle bundleWithIdentifier:@"com.yourcompany.unittests"] retain]; For this to work you also need your data model to be present in your unit test bundle. For some reason, unlike your .m files the inspector doesn't show you a list of targets the model should be included in - you need to drag the data model file into the compile source build phase of your unit test target.
 * https://github.com/gabriel/gh-unit
 * http://gabriel.github.com/gh-unit/_installing.html
 * http://stackoverflow.com/questions/33207/what-is-the-best-way-to-unit-test-objective-c-code
 * http://www.mulle-kybernetik.com/software/OCMock/
 * http://spacevatican.org/2009/9/10/unit-testing-core-data-iphone-apps
 * http://stackoverflow.com/questions/3241175/unit-testing-core-data-exited-abnormally-with-code-134
 * https://github.com/mbrugger/CoreDataDependentProperties/blob/master/LPAutomatedObserving/Tests/ManagedObjectSenTestCase.m
 * http://stackoverflow.com/questions/3249966/error-building-core-data-stack-in-unit-tests
 * http://logiccolony.com/2011/01/30/How-I-do-Unit-Testing-with-Core-Data.html
 * http://denizdemir.com/2011/03/24/ios-unit-testing-with-xcode-4-and-core-data/
 * http://iamleeg.blogspot.com/2010/01/unit-testing-core-data-driven-apps-fit.html

plists
// Path to the plist (in the application bundle) NSString *path = [[NSBundle mainBundle] pathForResource:   @"DrinkArray" ofType:@"plist"]; // Build the array from the plist  NSMutableArray *array2 = ; // Show the string values  for (NSString *str in array2)  NSLog(@"--%@", str);
 * http://iphonedevelopertips.com/data-file-management/reading-a-plist-into-an-nsarray.html
 * http://www.ifans.com/forums/showthread.php?t=64679
 * http://www.iphonedevsdk.com/forum/iphone-sdk-development/32002-load-plist-into-array.html
 * http://stackoverflow.com/questions/4409344/reading-plist-into-tableview
 * http://stackoverflow.com/questions/1067167/reading-data-from-a-plist-file
 * http://discussions.apple.com/message.jspa?messageID=8815074
 * http://iphoneincubator.com/blog/data-management/how-to-read-a-file-from-your-application-bundle

UIFont

 * http://www.cocoanetics.com/2010/02/understanding-uifont/
 * https://github.com/kballard/FontLabel
 * iPad Fonts

UITextView
@interface BCZeroEdgeTextView : UITextView @end
 * http://iphoneincubator.com/blog/windows-views/handling-the-return-key-in-a-uitextview
 * http://www.hanspinckaers.com/multi-line-uitextview-similar-to-sms
 * http://stackoverflow.com/questions/50467/how-do-i-size-a-uitextview-to-its-content
 * http://stackoverflow.com/questions/1582554/iphone-uitextview-leaves-room-for-2-lines-at-the-bottom
 * http://stackoverflow.com/questions/1178010/how-to-stop-uitextview-from-scrolling-up-when-entering-it

@implementation BCZeroEdgeTextView

- (UIEdgeInsets) contentInset { return UIEdgeInsetsZero; }

@end // replace "hi" with "hello" - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text {
 * http://stackoverflow.com/tags/uitextview/hot?filter=all
 * http://stackoverflow.com/questions/1628422/replacing-text-in-a-uitextview

// create final version of textView after the current text has been inserted NSMutableString *updatedText = [[NSMutableString alloc] initWithString:textView.text];   [updatedText insertString:text atIndex:range.location];

NSRange replaceRange = range, endRange = range;

if (text.length > 1) { // handle paste replaceRange.length = text.length; } else { // handle normal typing replaceRange.length = 2; // length of "hi" is two characters replaceRange.location -= 1; // look back one characters (length of "hi" minus one) }

// replace "hi" with "hello" for the inserted range int replaceCount = [updatedText replaceOccurrencesOfString:@"hi" withString:@"hello" options:NSCaseInsensitiveSearch range:replaceRange];

if (replaceCount > 0) { // update the textView's text textView.text = updatedText;

// leave cursor at end of inserted text endRange.location += text.length + replaceCount * 3; // length diff of "hello" and "hi" is 3 characters textView.selectedRange = endRange;

[updatedText release];

// let the textView know that it should ingore the inserted text return NO; }

[updatedText release];

// let the textView know that it should handle the inserted text return YES; }

UIMenuController
UILongPressGestureRecognizer* gr = [[[UILongPressGestureRecognizer alloc] initWithTarget: self action: @selector( onShowMenu: ) ] autorelease];  [_myview addGestureRecognizer: gr];
 * http://intridea.com/2010/12/22/developers-notes-for-uimenucontroller?blog=company
 * http://stackoverflow.com/questions/1604716/customize-uimenucontroller

- (void) onShowMenu: (UIGestureRecognizer*) sender {   [sender.view becomeFirstResponder];

UIMenuController* mc = [UIMenuController sharedMenuController];

CGRect bounds = sender.view.bounds;

[mc setTargetRect: sender.view.frame inView: sender.view.superview]; [mc setMenuVisible: YES animated: YES]; }
 * http://developer.apple.com/library/ios/#documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/AddingCustomEditMenuItems/AddingCustomEditMenuItems.html%23//apple_ref/doc/uid/TP40009542-CH13-SW1
 * http://stackoverflow.com/questions/4598456/updating-uimenucontroller-on-the-fly

Text
NSRange range = [txtView selectedRange]; NSString *str = [txtView.text substringWithRange:range]; // Get a reference to the system pasteboard UIPasteboard* lPasteBoard = [UIPasteboard generalPasteboard];
 * http://developer.apple.com/library/ios/#documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/AddingCustomEditMenuItems/AddingCustomEditMenuItems.html%23//apple_ref/doc/uid/TP40009542-CH13-SW1
 * http://stackoverflow.com/questions/3007911/how-to-simulate-the-delete-key-on-uitextfield
 * http://developer.apple.com/library/ios/#documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/AddingCustomEditMenuItems/AddingCustomEditMenuItems.html%23//apple_ref/doc/uid/TP40009542-CH13-SW1
 * http://developer.apple.com/library/ios/#documentation/uikit/reference/UIResponderStandardEditActions_Protocol/UIResponderStandardEditActions.html
 * * http://stackoverflow.com/questions/2634327/grab-selected-text-on-uitextview
 * http://stackoverflow.com/questions/1317929/insert-string-at-cursor-position-of-uitextfield

// Save the current pasteboard contents so we can restore them later NSArray* lPasteBoardItems = [lPasteBoard.items copy];

// Update the system pasteboard with my string lPasteBoard.string = @"-";

// Paste the pasteboard contents at current cursor location [myUIField paste:self];

// Restore original pasteboard contents lPasteBoard.items = lPasteBoardItems;

[lPasteBoardItems release];
 * http://dev.ragfield.com/2009/09/insert-text-at-current-cursor-location.html
 * http://stackoverflow.com/questions/864069/stop-uitextview-from-jumping-when-programatically-setting-text
 * http://stackoverflow.com/questions/1708608/uitextview-selectedrange-not-displaying-when-set-programatically

UITableVIew
/* UITableViewRowAnimationFade, UITableViewRowAnimationRight, UITableViewRowAnimationLeft, UITableViewRowAnimationTop, UITableViewRowAnimationBottom, UITableViewRowAnimationNone, UITableViewRowAnimationMiddle */
 * http://davemeehan.com/technology/moving-uitableviewcell-between-sections-in-grouped-uitableview
 * http://stackoverflow.com/questions/419472/have-a-reloaddata-for-a-uitableview-animate-when-changing

UITableViewRowAnimation anim = UITableViewRowAnimationFade; [tableView beginUpdates]; [tableView deleteSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:anim]; [tableView insertSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:anim]; [tableView endUpdates]; // Also, the "withRowAnimation" is not exactly a boolean, but an animation style:

UITableViewCell

 * http://www.abstractec.co.uk/blog/iPhone.php?itemid=74
 * http://www.bdunagan.com/2009/06/28/custom-uitableviewcell-from-a-xib-in-interface-builder/
 * http://stackoverflow.com/questions/540345/how-do-you-load-custom-uitableviewcells-from-xib-files

View Controllers

 * http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/ModalViewControllers/ModalViewControllers.html

Videos

 * https://developer.apple.com/videos/wwdc/2010/
 * http://developer.apple.com/itunes/?destination=adc.apple.com.4092414566

UIToolbar
; - (void)drawRect:(CGRect)rect { UIImage *image = [UIImage imageNamed: @"nm010400.png"]; [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; } UIImage *myImage = [UIImage imageNamed:@"ToolBar_background.png"]; UIImageView *anImageView = ; [aToolBar insertSubview:anImageView atIndex:0]; [anImageView release];
 * http://devinsheaven.com/creating-uitabbar-uitoolbar-icons-in-adobe-illustrator/
 * http://steveweller.com/articles/toolbar-icons/
 * http://stackoverflow.com/questions/1941103/can-i-give-a-uitoolbar-a-custom-background-in-my-iphone-app
 * http://stackoverflow.com/questions/333441/adding-a-uilabel-to-a-uitoolbar

drawRect

 * http://stackoverflow.com/questions/2734860/uiview-drawrect-when-you-draw-a-line-the-rect-area-will-be-clear-so-the-previou

Hold and Copy

 * Hold and Copy in UIKit Hold and Copy in UIKit

UTI

 * http://developer.apple.com/library/ios/#documentation/FileManagement/Conceptual/understanding_utis/understand_utis_declare/understand_utis_declare.html

Animation

 * http://stackoverflow.com/questions/630265/iphone-uiview-animation-best-practice
 * http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/AnimatingViews/AnimatingViews.html#//apple_ref/doc/uid/TP40009503-CH6-SW1
 * http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40004514
 * http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/CoreAnimation_Cookbook/Introduction/Introduction.html#//apple_ref/doc/uid/TP40005406
 * http://dudek.mobi/?p=51

UILabel

 * http://stackoverflow.com/questions/2312899/how-to-add-line-break-for-uilabel

File IO

 * http://www.servin.com/iphone/iPhone-File-IO.html

Make a phone call
UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:1-000-0000-";

UISplitViewController

 * http://mikebluestein.wordpress.com/2010/04/03/using-a-uisplitviewcontroller-to-create-a-master-detail-ipad-app-with-monotouch/
 * http://www.cimgf.com/2010/05/24/fixing-the-uisplitviewcontroller-template/
 * Creating your own?
 * 1) Drag into a XIB
 * 2) Connect IBOutlet from the app delegate
 * 3) delegate ... [window addSubview:split.view];
 * 4) Create and connect a UITableViewController and UIDetailViewController to the UISplitViewController (detail view likely implements 
 * 5) Make sure that both view controllers return YES from "shouldAutorotateToInterfaceOrientation"
 * 6) The delegate can also implement something along the lines of the following:


 * 1) pragma mark -
 * 2) pragma mark Split view support

- (void)splitViewController:(UISplitViewController*)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem*)barButtonItem forPopoverController:(UIPopoverController*)pc { barButtonItem.title = @"Events"; NSMutableArray *items = [[toolbar items] mutableCopy];   [items insertObject:barButtonItem atIndex:0];    [toolbar setItems:items animated:YES];    [items release];    self.popoverController = pc; }

// Called when the view is shown again in the split view, invalidating the button and popover controller. - (void)splitViewController: (UISplitViewController*)svc willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem { NSMutableArray *items = [[toolbar items] mutableCopy];   [items removeObjectAtIndex:0];    [toolbar setItems:items animated:YES];    [items release];    self.popoverController = nil; }

Logging
"Right-click on your target and click Get Info. Select the Build tab. Make sure Configuration is set to Debug. Add -DDEBUG to the Other C Flags of your target." // DLog is almost a drop-in replacement for NSLog // DLog; // DLog(@"here"); // DLog(@"value: %d", x); // Unfortunately this doesn't work DLog(aStringVariable); you have to do this instead DLog(@"%@", aStringVariable);
 * http://www.cimgf.com/2009/01/24/dropping-nslog-in-release-builds/
 * http://iphoneincubator.com/blog/debugging/the-evolution-of-a-replacement-for-nslog
 * 1) ifdef DEBUG
 * 2) 	define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
 * 3) else
 * 4) 	define DLog(...)
 * 5) endif

// ALog always displays output regardless of the DEBUG setting
 * 1) define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);

// DLOG takes a format argument and 0 or more args: // DLOG(@""); // DLOG(@"%d", x);
 * http://kuoi.com/~kamikaze/read.php?id=158
 * 1) ifdef DEBUG
 * 1) define DLOG(fmt, ...) NSLog(@"%s: " fmt, __PRETTY_FUNCTION__, ##__VA_ARGS__)
 * 2) else
 * 3) define DLOG(...)
 * 4) endif
 * http://www.dribin.org/dave/blog/archives/2006/04/22/tracing_objc/
 * http://blog.mbcharbonneau.com/2008/10/27/better-logging-in-objective-c/
 * http://www.cocoadev.com/index.pl?NSLog