Re: Core Animation - Animation Sequence

2010-06-01 Thread David Duncan
; Besides, most of my attempts resulted in a EXC_BAD_ACCESS crash, and the rest > were not successful. Not sure what happened, but QA1620 <http://developer.apple.com/mac/library/qa/qa2008/qa1620.html> was recently updated to show this technique. -- David Duncan Apple DTS Animation and Printi

Re: I need float resolution bitmap data from a JPG using CIImage or similar helper

2010-06-01 Thread David Duncan
sPerComponent, bytesPerRow, colorSpace, kCGBitmapFloatComponents); Are you sure the context was actually created? Specifically for float contexts, you need the kCGImageAlpha[Premultilied | None]Last flag as well. -- David Duncan Apple DTS Animation and Printing

Re: [iPhone] more UIScrollView

2010-06-02 Thread David Duncan
le however scales down larger images, which may still be fuzzy in some cases (for example line art). Getting pixel perfect zooming however is difficult and to rather performance intensive for something like PDF. You could also try just using a UIWebView for displaying PDF if it does wh

Re: Problem with CGPDFPageRef

2010-06-02 Thread David Duncan
receiver gets some weird number like 345783653.0. What's the code look like here? Are you getting any warnings? More than likely this is something along the lines of a type mismatch on the message send, but without seeing the code it is hard to know how or why that might happen. -- Dav

Re: Problem with CGPDFPageRef

2010-06-02 Thread David Duncan
ow any objects or messages. Where are you getting the wrong value and where is that code being called from with the correct value? -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: CFAttributedString and NSDATA

2010-06-03 Thread David Duncan
re standard way of doing > it? (Or does the RTF import/export category on NSAttributedString not exist > in UIKit?) It doesn't exist in UIKit. -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.a

Re: va_list and unanticipated format specifiers

2010-06-03 Thread David Duncan
produced string. Any other format string errors are the client's to deal with. Yes, this would preclude the client logging objects, but from the sounds of your specification, any escaping you did would have the same effect. -- David Duncan Apple DTS Animation and Printing _

Re: [iPhone] Preprocessing events sent to UITableView

2010-06-06 Thread David Duncan
an asking how to do it the way you think you should. Then perhaps someone can recommend a better solution. -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moder

Re: Problem opening large files into NSDocument

2010-06-09 Thread David Duncan
Is your application 32-bit? Are you trying to load the entire file into memory if you are? If so that would be why you are getting that error. -- David Duncan On Jun 9, 2010, at 12:56 PM, Pascal Harris <45rpmli...@googlemail.com> wrote: > Weird one this - especially since I can&#

Re: Odd Behaviour with CALayer

2010-06-17 Thread David Duncan
ain-able this couldn't be declared in the property itself. > 2010-06-17 02:49:13.464 Revapp[4838:a0f] expecting model layer not copy: > MRWorkspaceItemLayer[(125,125)] What version of Mac OS X are you on? -- David Duncan Apple DTS Ani

Re: force rendering of views off screen

2010-06-24 Thread David Duncan
likely that you will take exactly 1.5s for all of it to display :). -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins

Re: Text rendered in NSImage is fuzzy

2010-06-27 Thread David Duncan
7; for the text to draw over, and thus you get no subpixel smoothing. You can get subpixel smoothing in CATextLayer by subclassing and overriding -drawInContext: to first draw an opaque color into the target context before calling -[super drawInCo

Re: iPhone simple 'cartoon' animation

2010-06-29 Thread David Duncan
by UIKit or the various animation classes). Otherwise it sounds like you are on pretty good footing. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact th

Re: UITableView.layer renderInContext: after setContentOffset ?

2010-07-05 Thread David Duncan
are pitfalls as renderInContext does not implement the full Core Animation compositing model. -- David Duncan On Jul 5, 2010, at 12:01 PM, Chaitanya Pandit wrote: > Hi, List > I'm trying to create an image out of a UITableView using the layer's > renderInContext Method, ho

Re: Adding an image to a project

2010-07-14 Thread David Duncan
e UTF8String], ...); Where does it crash? Without knowing what is going wrong it is difficult to advise... -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Con

Re: autoresizingMask and transformation

2011-08-01 Thread David Duncan
ault is to resize with respect for aspect ratio. If you want the view to resize but stay square, then you will have to resize it yourself. You can use the willAnimateAutorotation… method on UIViewController to do this with animation – see the docs f

Re: ARC and Singletons

2011-08-01 Thread David Duncan
ther, just remove all the shenanigans that were defined to ensure that there was only one instance. In the majority of cases it was likely overkill and potentially masking memory management bugs. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev

Re: Debugging "CGImageCreate: invalid image provider: NULL"?

2011-08-02 Thread David Duncan
release the data. Leaks should give you a stack trace showing where that function was called. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mo

Re: Debugging "CGImageCreate: invalid image provider: NULL"?

2011-08-02 Thread David Duncan
On Aug 2, 2011, at 3:34 PM, Izak van Langevelde wrote: > > On 2011-08-02, at 6:02 PM, David Duncan wrote: > >> On Aug 2, 2011, at 2:52 PM, Izak van Langevelde wrote: >> >>> However, Instruments shows a leaked Malloc of 236K with as responsible >>> Caller

Re: How to Identify if the device is used in iAD supported Regions

2011-08-04 Thread David Duncan
d:) is not getting invoked for iAD not > supported regions. But thats not the case, if Appstore supports iAD, > it Displays real ad. otherwise it will display "Test Ad". Either case > your delegate method would be invoked. > > Any one can confirm the

Re: Drawing text like Lion's Mail

2011-08-08 Thread David Duncan
typically a rectangle, not a path that describes the text therein. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lis

Re: Drawing text like Lion's Mail

2011-08-08 Thread David Duncan
On Aug 8, 2011, at 10:21 AM, Jean-Daniel Dupas wrote: > Le 8 août 2011 à 18:50, David Duncan a écrit : > >> On Aug 8, 2011, at 8:16 AM, Jean-Daniel Dupas wrote: >> >>> >>> I think you can create a CGPath from some text using CTFrameGetPath(). >>> O

Re: Subclassing UIWebview a show-stopper?

2011-08-09 Thread David Duncan
were two ways to do something, and one involved subclassing UIWebView and the other did not, I would nearly always choose the method that didn't involved subclassing. So the question to you becomes what problem are you trying to solve that you believe you need to overr

Re: blocks and retaining CoreFoundation objects

2011-08-09 Thread David Duncan
RC The ARC specification defines a "retainable pointer" as including those pointers that have the __attribute__((NSObject)) decoration, so this should behave as expected under ARC. <http://clang.llvm.org/docs/AutomaticReferenceCounting.html#objects> -- David Duncan ___

Re: Saving a rotated image

2011-08-11 Thread David Duncan
image. On Aug 11, 2011, at 5:44 AM, charisse napeÿf1as wrote: > I can already rotate an image. But I don't know how to save it in that > current state. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: Drawing Chinese text to PDF

2011-08-11 Thread David Duncan
be recommended. There are platform specific methods for making a CGContextRef current. For more complex needs, NSLayoutManager (Mac OS X only) or Core Text (both) can be used as well. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.co

Re: compiling app for 10.6 and 10.7

2011-08-15 Thread David Duncan
o stuff with popovers */ } else { /* do stuff without */ }" In GCC you should use Class nsPopover = NSClassFromString(@"NSPopover"); if (nsPopover) ... -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Re: compiling app for 10.6 and 10.7

2011-08-15 Thread David Duncan
On Aug 15, 2011, at 10:47 AM, Kyle Sluder wrote: > On Mon, Aug 15, 2011 at 10:45 AM, David Duncan wrote: >> In either case, the best general way to determine availability of >> weak-linked implementations is to test for them directly rather than using a >> system versio

Re: compiling app for 10.6 and 10.7

2011-08-15 Thread David Duncan
, but I get the same error when running on 10.6.8. I'll try some more in > case I made a mistake, but…. But again, are you building with Clang? :). -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admi

Re: compiling app for 10.6 and 10.7

2011-08-15 Thread David Duncan
On Aug 15, 2011, at 11:19 AM, Martin Hewitson wrote: > > On Aug 15, 2011, at 08:13 PM, David Duncan wrote: > >> On Aug 15, 2011, at 10:56 AM, Martin Hewitson wrote: >> >>> Is it ok to declare a property to be NSPopover, even if that class doesn't >>&g

Re: clipping and scrolling

2011-08-16 Thread David Duncan
iple image views rather than drawing the subsection you need manually. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-ad

Re: clipping and scrolling

2011-08-16 Thread David Duncan
oot. You may find the UIScrollView model easier to manage – YMMV – but if there is a chance that this non-interactive view could become interactive, I would just go with with UIScrollView and not look back. -- David Duncan ___ Cocoa-dev mailing list (

Re: Safe way to convert C String to NSString

2011-08-18 Thread David Duncan
C String and them convert to NSString will be fine for me. Thats not always viable. Consider that in MacRoman most of the accented characters use code points in the range of 128-255, and just removing them can make the text look incredibly wrong. -- David Duncan _

Re: altering an NSImage by access to pixels

2011-08-18 Thread David Duncan
t Draw your NSImageRep using -draw (or -drawAtPoint: or -drawInRect:) to draw into the current graphics context. You now have an NSBitmapImageRep with your image contents. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: altering an NSImage by access to pixels

2011-08-18 Thread David Duncan
y 10.6 will appear there soon. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/

Re: altering an NSImage by access to pixels

2011-08-18 Thread David Duncan
ed it to remain in that format. Core Graphics can't provide you with non-premultiplied alpha pixels via drawing, so thats the only route if you need them. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admi

Re: Representation of strings with special chars

2011-08-24 Thread David Duncan
getting composed characters in this case (your second NSLog should use %C not %@ btw). The best I can figure is that your SQL backend is expecting decomposed characters (which would represent this string as UA etc). I would try -decomposedStringWi

Re: NSDate description in Lion shows GMT instead of local time

2011-08-26 Thread David Duncan
one information when it does not. This change is to (hopefully) ensure the understanding that an NSDate is not something you can display to a user simply by asking for its description. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Ple

Re: ARC + CF types

2011-08-29 Thread David Duncan
in foo – replaces foo = (id)bar; [foo release]; foo = (__bridge_transfer id)bar; // retain foo and manage it as a non-ARC reference – replaces bar = (CFTypeRef)[foo retain]; bar = (__bridge_retain CFTypeRef)foo; -- David Duncan ___ Cocoa-dev mailing

Re: NSURLConnection: "Greedy Memory Eater" and Error 303

2011-09-09 Thread David Duncan
struments, it can be viewed quite > easily. Try setting the memory size of the NSURLCache, something like [[NSURLCache sharedURLCache] setMemoryCapacity:0]. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not po

Re: UISplitViewController + UIView on UIWindow

2011-09-14 Thread David Duncan
ow's content area. Essentially, what you want to do is not possible in the scope of the 4.3 SDK. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact t

Re: UISplitViewController + UIView on UIWindow

2011-09-14 Thread David Duncan
Check the WWDC videos from this year, specifically the ones on View controllers. On Sep 14, 2011, at 10:44 AM, Flavio ceolin wrote: > Thanks for the reply David. > > So, do you know if there is another way to do something like that ? > > On Wed, Sep 14, 2011 at 2:31 PM, Davi

Re: FSCopyObjectAsync() under ARC

2011-09-20 Thread David Duncan
ifically says "don't do anything with ownership for this object". -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at coc

Re: Does an iOS app's UI freeze when going into background?

2011-09-21 Thread David Duncan
he foreground. It remains until your UI has had a chance to redraw itself. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-

Re: Why does Xcode define IBOutlet with @synthesize?

2011-09-27 Thread David Duncan
oesn't do this on Mac OS X is that nib loading there doesn't use KVC, but rather then Obj-C runtime directly. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: creating multiple NSTimers

2011-09-29 Thread David Duncan
googled for a while now trying to find example code but have come up empty > (plenty of finite examples). I see there are timer applications out there > that seem to handle an infinite number of timers. Have you looked into NSMutableArra

Re: creating multiple NSTimers

2011-09-29 Thread David Duncan
ive timer and > reordering of the array according to times. But i have run into problems > when two or more timers are set to fire at the same time. > > Tom > > On Sep 29, 2011, at 4:51 PM, David Duncan wrote: > >> On Sep 29, 2011, at 2:47 PM, Tom Hohensee wrote: &

Re: Retain/Release and Properties clarification

2011-10-11 Thread David Duncan
mentation details (the ivar). As such, subclasses can't get at synthesized ivars, precisely because the @synthesize declaration is hidden from them. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reques

Re: Retain/Release and Properties clarification

2011-10-12 Thread David Duncan
primary issue is that the compiler doesn't actually know for certain that other code in your application or the frameworks it links against haven't changed the implementation of your accessor and thus require it to be called for correct operation. -- David Duncan _

Re: Arcs and Bridges

2011-10-17 Thread David Duncan
gingRetain(nsString)" to get an owning reference to an NSString as a CFString. And you write "NSString *nsString = CFBridgingRelease(cfString);" to get an ARC managed reference of a CFString as an NSString. -- David Duncan ___ Cocoa-dev

Re: Arc and performSelector

2011-10-17 Thread David Duncan
op to do something like this: [self setValue: ^(id value) { [aTable setTitle:value]; } fromTable: tableName withKey: ^ { return [aTable title]; }]; Note there is no need to pass in 'aTable' now because the blocks capture it instead, which can also provide you with additional flexibil

Re: Arc and performSelector

2011-10-17 Thread David Duncan
. > Is this a bug? No, its the compiler admitting that it has no way to verify that what is happening will have the behavior you expect. Thats why this is a warning and not an error. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists

Re: Font problem: iOS5 NSString's sizeWithFont returns integral values unlike drawAtPoint

2011-10-21 Thread David Duncan
5.0 only or on previous versions of iOS? There were some text changes that (for a time) leaked out non-integral values, but we thought we caught them – if you have a new one please file a bug with a simple example of what you've found. -- David Duncan _

Re: CAShapeLayer as a mask for CALayer: rounded corners are stretched

2011-10-24 Thread David Duncan
r you can assign an NSImage directly as the contents of a layer, so your CGImageForProposedRect::: call is unnecessary here. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Re: Font problem: iOS5 NSString's sizeWithFont returns integral values unlike drawAtPoint

2011-10-28 Thread David Duncan
On Oct 22, 2011, at 1:21 PM, Jens Alfke wrote: > > On Oct 21, 2011, at 10:47 AM, David Duncan wrote: > >> Are you seeing this on iOS 5.0 only or on previous versions of iOS? There >> were some text changes that (for a time) leaked out non-integral values, but >>

Re: minor ARC casting question

2011-11-01 Thread David Duncan
dge id)foo) works fine. If you need to to manage ownership, then CFBridgingRetain() or CFBridgingRelease() should be used. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments t

Re: minor ARC casting question

2011-11-01 Thread David Duncan
On Nov 1, 2011, at 6:38 PM, Matt Neuburg wrote: > > On Nov 1, 2011, at 5:21 PM, David Duncan wrote: > >> This compiles for me under ARC: >> NSArray *array = [NSArray arrayWithObject:[[UIColor greenColor] CGColor]]; >> > > > Well, not for me. I get: "

Re: NSAssert no longer displaying reason in console

2011-11-02 Thread David Duncan
frames for an exception and logged that, but it no longer does. You would find the same behavior using iOS 5 with an older version of Xcode, and you would find the old behavior using any previous version of iOS with Xcode 4.2. -- David Duncan ___ Cocoa

Re: Private Method?

2011-11-07 Thread David Duncan
efinition of a private method in Obj-C (see class_copyMethodList) -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)l

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-09 Thread David Duncan
8K not a big enough max grid size? -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsu

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-10 Thread David Duncan
ust as much as touches are. What that means is that if your application is consuming memory slowly and returning to the event loop often, you will get memory warnings. But if your application is in a tight loop on the main thread forcing the allocation of lots of physical p

Re: About iVars declaration and property

2011-11-15 Thread David Duncan
- (void)setWindow:(NSWindow *)window { [_internalDictionary setObject:window forKey:@"window"]; } And thus not increase the size of the object at all (i.e. all properties could in theory be entries in a _internalDictionary if the class decided to). Properties are only interfaces. -- Dav

Re: Angle of touch point from center of view?

2012-01-05 Thread David Duncan
gain. This is basically just the theta calculation of a convert to polar coordinates. man atan2 should give you what you need to know. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or m

Re: Angle of touch point from center of view?

2012-01-05 Thread David Duncan
around from right to bottom -0 to -90 then around to left side 90 to 0 and > then back to top from left side -0 to -90. > As Marco's code showed, you want to use atan2() not atan(), as atan() doesn't know which quadrant to use (you could do the work yourself, bu

Re: iOS: Adding pinch-zoom to UIImageView

2012-01-17 Thread David Duncan
sent to edole...@gmail.com >> > ___ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.appl

Re: Confusing CALayer Transform/Frame/Bounds Behavior

2012-01-24 Thread David Duncan
bounds size. Moral of the story is that when a layer is transformed (or may be) you should only manipulate its position and bounds. Stay far far away from the frame property, as its just a bag of hurt. -- David Duncan ___ Cocoa-dev mailing lis

Re: Confusing CALayer Transform/Frame/Bounds Behavior

2012-01-25 Thread David Duncan
On Jan 25, 2012, at 11:24 AM, Seth Willits wrote: > On Jan 24, 2012, at 5:52 PM, David Duncan wrote: > >>> Can anyone explain what's going on? >> >> >> The frame is an entirely synthesized property, based on the bounds, >> position, anchorPoint

Re: ARC and blocks

2012-01-26 Thread David Duncan
for a cycle. What is the second one? > Excuse me if I'm being dumb. myController retains/copies the block. Then the block retains myController (under ARC __block variables are strong references, so they get retained). Thus you are left with myController r

Re: ARC and blocks

2012-01-26 Thread David Duncan
On Jan 26, 2012, at 2:44 PM, Conrad Shultz wrote: > However, __block variables are NOT retained automatically by a block > during capture, so this breaks the retain cycle. This is not true under ARC, where __block variables also retain. -- David

Re: initFileURLWithPath run on emulator, not run on device

2012-01-30 Thread David Duncan
ion (which would be the permissions required to replace the 'Documents' folder). As a rule, anything related to the hardware (such as the file system) is unlikely to be authoritative when working with the Simulator. The other common gotcha related to the file system is that typ

Re: How do you run an app on the device with Instruments?

2012-01-31 Thread David Duncan
On Jan 31, 2012, at 1:39 AM, Alex Zavatone wrote: > Is 4.2.1 this Lion only? Or are those of us who hate Lion in luck? Lion only. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or modera

Re: Block Confusion...

2012-01-31 Thread David Duncan
ere are probably better ways for you to put the whole thing together, primarily as it seems you are trying to setup a producer-consumer pattern. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reque

Re: Calling an Objective-C function from C++?

2012-01-31 Thread David Duncan
.m/.mm or flagged to be compiled as Objective-C[++]. If you want to avoid Objective-C syntax in your .cpp file, you can either export a C[++] API to wrap the Objective-C code (the .mm's header would only export C[++] functionality when __OBJC__ is not defined), otherwise you should p

Re: Block Confusion...

2012-01-31 Thread David Duncan
On Jan 31, 2012, at 3:49 PM, R wrote: > I chose this approach rather than delegation. > > Thoughts? Use Delegation instead. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: Block Confusion...

2012-02-01 Thread David Duncan
FYI, using weak references doesn't necessarily avoid retain/release pairs. At best it returns to you nil when you would have otherwise gotten an object that was invalid instead. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.co

Re: iOS: "This application needs location services / Allow / Don't Allow" alert

2012-02-01 Thread David Duncan
ation services are enabled, then check your authorization status and act appropriately based on the status. kCLAuthorizationStatusNotDetermined means we haven't asked the user yet, kCLAuthorizationStatusRestricted means that the user cannot change t

Re: Clipping a CAGradientLayer with a duplicated CAShapeLayer (don't)

2012-02-09 Thread David Duncan
may explain why you didn't get your stroke – the mask applies to a layer and all of its sublayers. As such, the shape layer would have at least partially masked the stroke (its possible Core Animation simply rejected rendering the shape layer entirely, as its path rendering emp

Re: Clipping a CAGradientLayer with a duplicated CAShapeLayer (don't)

2012-02-09 Thread David Duncan
reason why it shouldn't work. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscri

Re: Clipping a CAGradientLayer with a duplicated CAShapeLayer (don't)

2012-02-09 Thread David Duncan
match shapeL (except for the fill), gradL was drawn as expected. > > I assume this is what you just said — or are you getting at a different way > to duplicate the layer? Nope, using +layer or -init and copying appropriate properties is an appropriately acceptable way to du

Re: CGContextSaveGState

2012-02-15 Thread David Duncan
k that is associated with a CGContextRef. This is not the same stack as the call stack. This is discussed in the documentation for this function (and its associated function CGContextRestoreGState). -- David Duncan ___ Cocoa-dev mailing list (

Re: Block Behavior

2012-02-15 Thread David Duncan
> > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com > > This email se

Re: Determining user's clock preference on iOS

2012-02-23 Thread David Duncan
priately. Alternatively, I can use the "short" format style, and then > parse out the AM/PM, but that seems more fragile across locales (are there > locales that use something other than "am" and "pm"?). > > Any suggestions? I think this is what +[NSDa

Re: [Obj-C] if (self) vs. if (self != nil)

2012-02-24 Thread David Duncan
quot; alone is of type > "pointer" and so when it is tested by the "if" statement, it's > implicitly cast to the type "boolean". In C any non-zero value is 'true', as such if (self) vs if (self != nil) is a p

Re: How are views supposed to reload after being nillified by memory warnings?

2012-02-29 Thread David Duncan
oaded and displayed. Do you do anything special inside of -viewDidLoad? -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-ad

Re: How are views supposed to reload after being nillified by memory warnings?

2012-03-02 Thread David Duncan
mage. If this does turn out to be the case, then lesson learned is "never store critical data in my views". -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the l

Re: How are views supposed to reload after being nillified by memory warnings?

2012-03-05 Thread David Duncan
On Mar 3, 2012, at 8:57 AM, Matt Neuburg wrote: > On Fri, 02 Mar 2012 10:17:43 -0800, David Duncan > said: >> On Mar 2, 2012, at 1:28 AM, G S wrote: >> >> In the vast majority of cases where I've seen this behavior, it is because >> in your delegate hand

Re: How are views supposed to reload after being nillified by memory warnings?

2012-03-05 Thread David Duncan
bove refers to what happens to self.subview, not to self.view (hence why I used self.view the first time, then view reference the second time). -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin request

Re: UIKit-additions and class references

2012-03-08 Thread David Duncan
ain class. For example, UIKit's NSString additions are in NSString(UIStringDrawing) (which you can search for in the documetnation). -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or modera

Re: Finding object array index when iterating through array

2012-03-08 Thread David Duncan
on or do I > have to add a counter? You have to add a counter. Alternatively you can use the -enumerateObjects* APIs on NSArray which give you an index as well as the object, and allow you to stop the iteration early (if you need that capability). -- David Duncan

Re: -[CALayer setContents:] slower in iOS 4.2?

2011-02-01 Thread David Duncan
plausible explanation, although it probably couldn't hurt to file a bug with something that demonstrates the behavior. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments t

Re: layer contents briefly appearing stretched when resizing

2011-02-01 Thread David Duncan
ntirely certain what is happening, but it sounds like you have a timing issue, possibly one where the view's are resized on one runloop invocation and their contents replaced on the next. Instead of overriding -setFrame: you should override -layoutSubViews: which should catch more cases

Re: NSBitmapImageRep with floating point values

2011-02-03 Thread David Duncan
iately sized buffer and typecasting to (unsigned char **)? The type cast doesn't change the data, just the compiler's interpretation of it (and since this is a pointer that won't affect the data itself in anyway). -- David Duncan ___ Cocoa-de

Re: Best Approach in displaying the Image in Core Animation Layer - During the animation

2011-02-04 Thread David Duncan
g the image into the center of that layer (to make a 1 pixel border) will likely give you the effect that you desire, although at the cost of additional rendering time since your layers will no longer be opaque. -- David Duncan ___ Cocoa-dev mail

Re: Best text rendering settings?

2011-02-04 Thread David Duncan
ext that doesn't look as good as text drawn over a background. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)li

Re: Best Approach in displaying the Image in Core Animation Layer - During the animation

2011-02-04 Thread David Duncan
slightly larger layer as I mentioned, using the very same APIs that you mentioned :). -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

Re: Best text rendering settings?

2011-02-04 Thread David Duncan
but the major difference between the first and third image looks like layout metrics (which is above Quartz) and so the question there might be what is Cocoa Text doing differently (which is beyond my knowledge). The first and second look like identical metrics with the issue

Re: UILabel contentView is 'left' out of IB but the default should be 'redraw'

2011-02-08 Thread David Duncan
label would require such behavior (such as setting auto sizing text). Since it sounds like you want the redraw behavior, I would probably just make that change in IB and go from there. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.ap

Re: why does UIScrollView call layoutSubviews every time it scrolls?

2011-02-08 Thread David Duncan
> view quietly. Technically scrolling is a geometry change, since it is accomplished by changing the layer's bounds.origin (basically the change is coming from Core Animation). If your layout is expensive, it is likely that you will need to maintain a separate "layout is dirty&qu

Re: CATransformLayer doesn't support implicit animation?

2011-02-09 Thread David Duncan
o I'm assuming it does. Had you just added the layer to the layer tree on the current runloop iteration? If so, there was no "from" to animate from, so there is no animation. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists

Re: How to create a CGColorSpaceRef with DeviceN model?

2011-02-28 Thread David Duncan
recollection from having investigated this pathway in the past. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.app

<    1   2   3   4   5   6   7   8   9   10   >