[group setValue:viewForAnimation forKey: kTrashItemAnimation];
[viewForAnimation.layer addAnimation:group forKey:@"savingAnimation"];
[group setValue:viewForAnimation forKey: kTrashItemAnimation];
[viewForAnimation.layer addAnimation:group forKey:@"savingAnimation"];
[self.tableView deleteSections: [NSIndexSet indexSetWithIndex: section] withRowAnimation: UITableViewRowAnimationLeft];
SELECT * FROM Individual
ORDER BY FirstName, LastName
2. We want to sort files by name - when two files have the same name we sort them by the date time:
NSString * sql = [NSString stringWithFormat: @"SELECT arts.*, tags.name FROM arts, tags WHERE category_id = %d and arts.tag_1 = tags.tag_id and ((tags.name = '%@' and arts.date_touched > '%@') or tags.name > '%@') ORDER BY tags.name LIMIT 1", cur_art.category_id_, cur_name, cur_art.date_touched_, cur_name];
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(textFieldTextDidChange:) name: @"UITextFieldTextDidChangeNotification" object: nil];
UIKIT_EXTERN NSString *const UITextFieldTextDidBeginEditingNotification;
UIKIT_EXTERN NSString *const UITextFieldTextDidEndEditingNotification;
UIKIT_EXTERN NSString *const UITextFieldTextDidChangeNotification;
// UITextField.h
// UIKit
//
// Copyright 2005-2009 Apple Inc. All rights reserved.
A UINavigationBar object uses a stack to manage navigation items (instances of UINavigationItem) that represent a state of the navigation bar. You change the navigation bar by pushing navigation items using the pushNavigationItem:animated: method or popping navigation items using thepopNavigationItemAnimated: method. Methods with an animated: argument allow you to animate the changes to the display.
2009-11-26 07:45:11.742 Flip[404:20b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot call pushNavigationItem:animated: directly on a UINavigationBar managed by a controller.'
from stackoverflow:
Your IBOutlets are probably @properties. If they are, and you have retain as an attribute, then you do need to release in -dealloc
A best practice:
self.myoutlet = nil; in dealloc
This works for both the retained and assigned IBOutlet. The retained will release and the assigned will do nothing.
from here:
NSZombieEnabled creates leaks ON PURPOSE so you can track down calls to objects that are released prematurely. When you run with NSZombieEnabled, objects are never dealloced. When it's time to dealloc the object, NSZombieEnabled tells the runtime to turn the object into an instance of NSZombie. Any attempt to message an NSZombie will result in a runtime exception. Always remember to remove the NSZombieEnabled flag before sending an app into production! Due to the fact that dealloc is overridden, your app will never free any memory - it will just grow and grow. It's for testing and debugging only.
1. Drawing NSString in unusual direction : limited to ascii string and have effect like this:
use CGContextShowText(ctxt, tbuf.c_str(), tbuf.length()); and CGAffineTransform
2. CGFontGetGlyphsForUnichars
to draw unichar we need this function to get glyph out of a unichar. Then core graphic has a set of function for showing glyph like this one:
void CGContextShowGlyphsAtPoint (
CGContextRef c,
CGFloat x,
CGFloat y,
const CGGlyph glyphs[],
size_t count
);
but CGFontGetGlyphsForUnichars is a private API for iPhone. So we got:
3. A replacement for CGFontGetGlyphsForUnichars
on github
-----
4. bonus: draw gradient filled UILabel.
also uses: extern void CGFontGetGlyphsForUnichars(CGFontRef, const UniChar[], const CGGlyph[], size_t);