This file contains 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
UITableViewCell *oldCell = [tableView cellForRowAtIndexPath:selectedIndexPath]; | |
UITableViewCell *newCell = [tableView cellForRowAtIndexPath:indexPath]; | |
//[UIView beginAnimations:nil context:nil]; | |
oldCell.accessoryType = UITableViewCellAccessoryNone; | |
newCell.accessoryType = UITableViewCellAccessoryCheckmark; | |
//[UIView commitAnimations]; | |
self.selectedIndexPath = indexPath; | |
[self performSelector:@selector(deselectRow) withObject:nil afterDelay:0.0]; |
This file contains 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
NSMutableArray *locations = [app.destLang locationsForCategoryId:category.id]; | |
if (locationsViewController == nil) { | |
locationsViewController = [[LocationsViewController alloc] initWithNibName:@"LocationsView" bundle:nil]; | |
} | |
locationsViewController.title = category.name; | |
locationsViewController.categoryId = category.id; | |
[[self navigationController] pushViewController:locationsViewController animated:YES]; | |
locationsViewController.locations = locations; |
This file contains 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 *assetsDir = [bundle pathForResource:@"assets" ofType:nil]; | |
NSArray *assets = [fileManager directoryContentsAtPath:assetsDir]; | |
for (NSString *asset in assets) { | |
NSString *bundleAsset = [assetsDir stringByAppendingPathComponent:asset]; |
This file contains 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
10/11/08 3:35:46 PM | Oct11 GitX[6822] Error loading /Library/InputManagers/GrowlSafari/GrowlSafariLoader.bundle/Contents/MacOS/GrowlSafariLoader: dlopen(/Library/InputManagers/GrowlSafari/GrowlSafariLoader.bundle/Contents/MacOS/GrowlSafariLoader, 265): no suitable image found. Did find: | |
/Library/InputManagers/GrowlSafari/GrowlSafariLoader.bundle/Contents/MacOS/GrowlSafariLoader: GC capability mismatch | |
10/11/08 3:35:46 PM | Oct11 GitX[6822] Error loading /Library/InputManagers/Inquisitor/Inquisitor.bundle/Contents/MacOS/Inquisitor: dlopen(/Library/InputManagers/Inquisitor/Inquisitor.bundle/Contents/MacOS/Inquisitor, 265): no suitable image found. Did find: | |
/Library/InputManagers/Inquisitor/Inquisitor.bundle/Contents/MacOS/Inquisitor: GC capability mismatch | |
10/11/08 3:35:46 PM | Oct11 GitX[6822] Error loading /Library/InputManagers/Safari AdBlock/Safari AdBlock.bundle/Contents/MacOS/Safari AdBlock: dlopen(/Library/InputManagers/Safari AdBlock/Safari AdBlock.bundle/Contents/MacOS/Safari AdBlock, 26 |
This file contains 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)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { | |
[super touchesEnded:touches withEvent:event]; | |
// only forward the event UP the responder chain if this touch | |
// is for a scroll view (self or a subview that inherits from | |
// UIScrollView); the default UIScrollView implementation deals | |
// with subview event handling above in the [super] invocation. | |
UITouch *touch = [touches anyObject]; | |
if ([touch.view isKindOfClass:[UIScrollView class]]) { | |
// stuff here |
This file contains 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 size = CGSizeMake(90.0, 90.0); | |
CGRect rect = CGRectMake(0, 0, size.width, size.height); | |
UIGraphicsBeginImageContext(size); | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGFloat radius = 5.0; | |
CGFloat minx = CGRectGetMinX(rect), midx = CGRectGetMidX(rect), maxx = CGRectGetMaxX(rect); | |
CGFloat miny = CGRectGetMinY(rect), midy = CGRectGetMidY(rect), maxy = CGRectGetMaxY(rect); | |
// Rounded rect path | |
CGMutablePathRef path = CGPathCreateMutable(); |
This file contains 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
>> h = {} | |
=> {} | |
>> h.class | |
=> NSMutableDictionary | |
>> h.setObject 'foo', forKey:42 | |
=> nil | |
>> h | |
=> {42=>"foo"} | |
>> h.description | |
=> "{\n 42 = foo;\n}" |
This file contains 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
NSASCIIStringEncoding = 1, | |
NSNEXTSTEPStringEncoding = 2, | |
NSJapaneseEUCStringEncoding = 3, | |
NSUTF8StringEncoding = 4, | |
NSISOLatin1StringEncoding = 5, | |
NSSymbolStringEncoding = 6, | |
NSNonLossyASCIIStringEncoding = 7, | |
NSShiftJISStringEncoding = 8, | |
NSISOLatin2StringEncoding = 9, | |
NSUnicodeStringEncoding = 10, |
This file contains 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
>>> td = 1224831600.0 | |
>>> tm = 1224918000.0 | |
>>> cal = calendar.open() | |
>>> e = cal.find_instances(td, tm) | |
>>> e | |
[{'id': 99, 'datetime': 1224774000.0}] | |
# datetime is less than td which is the start time |
This file contains 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
[UIView beginAnimations:@"FlipToBackView" context:NULL]; | |
[UIView setAnimationDuration:0.5]; | |
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:pageAndBackView cache:YES]; | |
[UIView setAnimationDelegate:self]; | |
[UIView setAnimationDidStopSelector:@selector(flipToBackViewDidStop:finished:context:)]; | |
pageView.hidden = YES; | |
backView.hidden = NO; | |
[UIView commitAnimations]; |
OlderNewer