Skip to content

Instantly share code, notes, and snippets.

static void clipApplier(void *info, const CGPathElement *element)
{
NSMutableArray *a = (NSMutableArray*)info;
int nPoints;
switch (element->type)
{
case kCGPathElementMoveToPoint:
nPoints = 1;
break;
- (void)doLayout
{
if (_data)
{
NSMutableArray *frameArray = [[_data objectForKey:@"rects"] mutableCopy];
id toRemove = nil;
for (NSMutableDictionary *info in frameArray)
{
if (![[info objectForKey:@"selectable"] boolValue])
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}}
- (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)
if (self.superview)
{
[self.superview.layer drawInContext:ctx];
for (UIView *view in [self.superview subviews])
{
if (![view isEqual:self])
{
[view.layer drawInContext:ctx];
}
@implementation EGOLoupeView
+ (CFTimeInterval)fadeDuration
{
return 0.0;
}
+ (Class)layerClass
{
return [CATiledLayer class];
@interface MWViewController ()
{
UIScrollView *scrollView;
UIView *toHit;
}
@end
@implementation MWViewController
- (void)didReceiveMemoryWarning
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
-[__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 ()
@interface MWPersistableAttributedString : NSMutableAttributedString <NSCoding>
@end
@implementation MWPersistableAttributedString
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:[self string] forKey:@"string"];
NSMutableArray *attributes = [NSMutableArray array];