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
static void clipApplier(void *info, const CGPathElement *element) | |
{ | |
NSMutableArray *a = (NSMutableArray*)info; | |
int nPoints; | |
switch (element->type) | |
{ | |
case kCGPathElementMoveToPoint: | |
nPoints = 1; | |
break; |
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
- (void)doLayout | |
{ | |
if (_data) | |
{ | |
NSMutableArray *frameArray = [[_data objectForKey:@"rects"] mutableCopy]; | |
id toRemove = nil; | |
for (NSMutableDictionary *info in frameArray) | |
{ | |
if (![[info objectForKey:@"selectable"] boolValue]) |
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
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 15 16:03:10 UTC 2011) | |
Copyright 2004 Free Software Foundation, Inc. | |
GDB is free software, covered by the GNU General Public License, and you are | |
welcome to change it and/or distribute copies of it under certain conditions. | |
Type "show copying" to see the conditions. | |
There is absolutely no warranty for GDB. Type "show warranty" for details. | |
This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all | |
Attaching to process 25246. | |
2011-12-19 13:26:41.435 CTRenderer[25246:207] returning | |
2011-12-19 13:26:41.436 CTRenderer[25246:207] {{0, 436.74}, {3, 23.6}} |
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
- (void)drawRect:(CGRect)rect | |
{ | |
CGRect f = [self frame]; | |
CGContextRef ctx = UIGraphicsGetCurrentContext(); | |
CGContextSetFillColorWithColor(ctx, [UIColor clearColor].CGColor); | |
CGContextFillRect(ctx, rect); | |
CGContextScaleCTM(ctx, 1.3, 1.3); | |
CGContextTranslateCTM(ctx, -f.origin.x, -f.origin.y+80); | |
if (self.superview) |
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
if (self.superview) | |
{ | |
[self.superview.layer drawInContext:ctx]; | |
for (UIView *view in [self.superview subviews]) | |
{ | |
if (![view isEqual:self]) | |
{ | |
[view.layer drawInContext:ctx]; | |
} |
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
@implementation EGOLoupeView | |
+ (CFTimeInterval)fadeDuration | |
{ | |
return 0.0; | |
} | |
+ (Class)layerClass | |
{ | |
return [CATiledLayer class]; |
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
@interface MWViewController () | |
{ | |
UIScrollView *scrollView; | |
UIView *toHit; | |
} | |
@end | |
@implementation MWViewController | |
- (void)didReceiveMemoryWarning |
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
NSMutableData *data = [NSMutableData data]; | |
NSKeyedArchiver *archiver = [[[NSKeyedArchiver alloc] initForWritingWithMutableData:data] autorelease]; | |
[archiver setOutputFormat:kCFPropertyListXMLFormat_v1_0]; | |
[archiver encodeObject:self.attributedString]; | |
// Sanity check | |
NSMutableDictionary *dict = [NSPropertyListSerialization propertyListFromData:data | |
mutabilityOption:NSPropertyListMutableContainersAndLeaves | |
format: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
-[__NSCFType encodeWithCoder:]: unrecognized selector sent to instance 0x6a53e70 | |
(gdb) bt | |
#0 0x97c95c5a in __kill () | |
#1 0x97c95c4c in kill$UNIX2003 () | |
#2 0x97d285a5 in raise () | |
#3 0x97d3e6e4 in abort () | |
#4 0x97cbab1b in _Unwind_Resume () | |
#5 0x011bce39 in CFRunLoopRunSpecific () | |
#6 0x011bcccb in CFRunLoopRunInMode () | |
#7 0x0174a879 in GSEventRunModal () |
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
@interface MWPersistableAttributedString : NSMutableAttributedString <NSCoding> | |
@end | |
@implementation MWPersistableAttributedString | |
- (void)encodeWithCoder:(NSCoder *)aCoder | |
{ | |
[aCoder encodeObject:[self string] forKey:@"string"]; | |
NSMutableArray *attributes = [NSMutableArray array]; |
OlderNewer