Re: Protocols and the +initialize class method

2013-08-23 Thread David Duncan
to achieve by doing this? -- 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/Update

Re: Drawing after CGContextClosePath() still appends line

2013-08-21 Thread David Duncan
On Aug 19, 2013, at 6:08 PM, zou tian zoutia...@icloud.com wrote: may be you can try CGContextSaveState and CGContextRestoreState ~~ These functions don’t save and restore the current path. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev

Re: Thread safety, some basic questions about accessing mutable objects across threads

2013-08-06 Thread David Duncan
/tn2109/_index.html -- 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/Update your

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread David Duncan
) a NSMutableString instead of the more classical [[NSMutableString alloc] init]? Yes. Thanks! (No side effect?) Why would there be? Your just asking for a mutable copy of an empty string. It should be equivalent to [[NSMutableString alloc] initWithString:@] -- David Duncan

Re: UIButton events on a CALayer

2013-07-30 Thread David Duncan
this issue? You should follow Kyle's advice, but at the heart of your problem is that CALayers don't understand events in any way shape or form, thats what UIView adds. By interposing a CALayer, you've effectively broken the event handling and thus broken your button. -- David Duncan

Re: UIScrollView to UIImage

2013-07-28 Thread David Duncan
your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com This email sent to david.dun...@apple.com -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: iOS OpenGL ES woes

2013-07-03 Thread David Duncan
(override +layerClass), then you can add subviews to that view to your hearts content. -- 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

Re: iOS OpenGL ES woes

2013-07-02 Thread David Duncan
/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com This email sent to david.dun...@apple.com -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: iOS OpenGL ES woes

2013-07-02 Thread David Duncan
On Jul 2, 2013, at 1:15 PM, Vincent Habchi vi...@macports.org wrote: Just a further question: on a CAEAGLLayer backed view, [view setNeedDisplay] does nothing, doesn’t it? Correct. You'll get a log along the lines of -display does nothing in the console. -- David Duncan

Re: private redeclaration of an instance variable

2013-06-29 Thread David Duncan
is that if you type case to the super class you can still access the hidden ivar. In general I would avoid this (as I would avoid declaring ivars in a public interface). -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Combining pan, zoom, and rotate gestures into one?

2013-06-15 Thread David Duncan
for direct manipulation you likely don't want the translation scaled or rotated). -- 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: CALayer -displayLayer:inContext: never called during frame/bounds animation

2013-06-10 Thread David Duncan
into performance problems from all the redrawing first. -- 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

Re: Handling [super init] returning nil

2013-05-29 Thread David Duncan
object is returned (typically as an additional parameter). If you search for methods that use NSError you'll find copious examples of this. But again how you actually handle the error is entirely context dependent. -- David Duncan ___ Cocoa-dev mailing

Re: My App refuses to rotate

2013-05-28 Thread David Duncan
/david.duncan%40apple.com This email sent to david.dun...@apple.com -- 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: UIView embedded in UIScrollView hides scroll indicators ?

2013-05-18 Thread David Duncan
/david.duncan%40apple.com This email sent to david.dun...@apple.com -- 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: UIView drawRect will update whole bounds

2013-05-16 Thread David Duncan
/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com This email sent to david.dun...@apple.com -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: UIView drawRect will update whole bounds

2013-05-15 Thread David Duncan
/options/cocoa-dev/david.duncan%40apple.com This email sent to david.dun...@apple.com -- 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

Re: UICollectionView

2013-05-08 Thread David Duncan
finished loading all of the images. -- 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: What am I looking for in the documentation?

2013-05-06 Thread David Duncan
, I would recommend against using it (basically Quartz is bad at drawing strings, and you should use a higher level library to do that). NSString has simple methods available on both OS X and iOS for drawing strings into the current graphics context, I would highly recommend them instead. -- David

Re: Rotated CALayer and issues with coordinates (should I convert them manually?)

2013-04-29 Thread David Duncan
(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com This email sent to david.dun...@apple.com -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: Third time I ask - please help. How to trace visible change in a UIView (UIWebView)

2013-04-22 Thread David Duncan
, if not impossible, unless you are acting as the render server itself, which you aren't. Your probably better off doing a timed read and sending diffs to the client instead. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Setting position of CALayer doesn't animate

2013-04-02 Thread David Duncan
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 sent to david.dun...@apple.com -- David Duncan ___ Cocoa-dev mailing list

Re: UIView final frame after device rotation

2013-04-02 Thread David Duncan
/mailman/options/cocoa-dev/david.duncan%40apple.com This email sent to david.dun...@apple.com -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: Setting position of CALayer doesn't animate

2013-04-02 Thread David Duncan
On Apr 2, 2013, at 11:43 AM, Steve Mills sjmi...@mac.com wrote: On Apr 2, 2013, at 13:35, David Duncan david.dun...@apple.com wrote: What class is acting as the layer's delegate? My ScreenSaverView is the delegate. By default a UIView will disable animations on its layer via the CALayer

Re: Setting position of CALayer doesn't animate

2013-04-02 Thread David Duncan
On Apr 2, 2013, at 12:04 PM, Steve Mills sjmi...@mac.com wrote: On Apr 2, 2013, at 13:49, David Duncan david.dun...@apple.com wrote: By default a UIView will disable animations on its layer via the CALayer informal delegate protocol (if you are creating this layer yourself, you should

Re: UIView final frame after device rotation

2013-04-02 Thread David Duncan
On Apr 2, 2013, at 1:25 PM, Markus Spoettl ms_li...@shiftoption.com wrote: On 4/2/13 8:37 PM, David Duncan wrote: I have a hard time figuring out how to get the frame (in the window coordinate system) a view will rotate to, when the rotation has just begun. What are you trying to do

Re: CoreAnimation: rendering error 506

2013-03-24 Thread David Duncan
is that an error occurred, not where it happened. On Mar 24, 2013, at 9:59 PM, David Duncan david.dun...@apple.com wrote: On Mar 23, 2013, at 5:00 AM, Oleg Krupnov oleg.krup...@gmail.com wrote: I get many repetitive messages in the console: CoreAnimation: rendering error 506 This is a GL

Re: CoreAnimation: rendering error 506

2013-03-24 Thread David Duncan
no, but it would be useful information to put in the bug report. (I'm not familiar enough to know why the implementation would trigger this, I was just aware of what this message meant due to other reasons). On Mar 24, 2013, at 10:58 PM, David Duncan david.dun...@apple.com wrote: On Mar 24

Re: accessing notification center programatically

2013-03-20 Thread David Duncan
/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com This email sent to david.dun...@apple.com -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Objective-C Question

2013-03-11 Thread David Duncan
as returning an owned reference. -- 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/Update

Re: iPad hide keyboard button for iphone

2013-02-28 Thread David Duncan
/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com This email sent to david.dun...@apple.com -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: CALayer's backgrounds filters having effect only on immediate parent?

2013-02-20 Thread David Duncan
-- 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/Update your Subscription: https

Re: Breaking on nil context

2013-02-12 Thread David Duncan
string use an NSColor to specify the stroke color? -- 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: Do CALayer filters apply to non-image drawing?

2013-02-05 Thread David Duncan
, on OS X where they do work, the way you get content into the layer does not matter. -- 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

Re: How can I get rid of this warning message?

2013-01-22 Thread David Duncan
]; }); Just note that the template has a bug – if you want to delay for a fractional number of seconds, be certain to change the type of 'delayInSeconds' to a floating point type. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: How to avoid warning?

2013-01-21 Thread David Duncan
a warning on the initWithManager: statement (Obviously), how to avoid the warning or otherwise fix it? What warning do you get? (Its not obvious from context). -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Could somebody please fix NSTimer?

2013-01-14 Thread David Duncan
different for each environment) as well as support existing applications of each of these flavors that wouldn't know about this new behavior. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Printing layer-based view

2013-01-08 Thread David Duncan
have to implement tiling yourself and your basically doing raster rendering (since its via OpenGL). Overall not the greatest experience. As Kyle mentioned, doing this yourself, rather than relying upon CA, is probably for the best at this time. -- David Duncan

Re: Duplicating display UITable scrolling, etc. in two apps

2013-01-05 Thread David Duncan
the UIScrollViewDelegate protocol. -- 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/Update your

Re: CALayer renderInContext changes zPosition of some child layers

2013-01-05 Thread David Duncan
to do so. -- 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/Update your

Re: Guidance on CATiledLayer

2012-12-31 Thread David Duncan
grid 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)lists.apple.com Help/Unsubscribe/Update your

Re: touch position for UITableView

2012-12-20 Thread David Duncan
On Dec 20, 2012, at 11:28 AM, Eric E. Dolecki edole...@gmail.com wrote: over time though or only when it's triggered? Depends on which gesture recognizer you use. You probably want a pan recognizer for this. -- David Duncan ___ Cocoa-dev mailing

Re: touch position for UITableView

2012-12-20 Thread David Duncan
. Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki Imagineric On Thu, Dec 20, 2012 at 2:40 PM, David Duncan david.dun...@apple.com wrote: On Dec 20, 2012, at 11:28 AM, Eric E. Dolecki edole...@gmail.com wrote: over time though or only when

Re: CALayer UIImage rendered on top of content instead of below

2012-12-14 Thread David Duncan
: method looks like (primarily because you are using the UIKit methods that expect an implicit context). -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: leak in AVAudioPlayer ?

2012-12-07 Thread David Duncan
On Dec 7, 2012, at 6:23 AM, Ariel Feinerman arielfap...@gmail.com wrote: I have seen in leaks profiler the AVAudioPlayer make three retain and only two release of NSURL Could you share a minimal amount of code that reproduces this leak? -- David Duncan

Re: iOS 6 built-in view controller save-and-restore disappointing

2012-11-09 Thread David Duncan
On Nov 9, 2012, at 11:30 AM, Matt Neuburg m...@tidbits.com wrote: It turns out that the new iOS 6 UIViewController/UIView state restoration does not work through a restart of the device! How was the device restarted? -- David Duncan ___ Cocoa

Re: Looping CAKeyframeAnimation stop in place?

2012-11-09 Thread David Duncan
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 sent to david.dun...@apple.com -- David Duncan

Re: iOS 6 built-in view controller save-and-restore disappointing

2012-11-09 Thread David Duncan
On Nov 9, 2012, at 1:45 PM, Matt Neuburg m...@tidbits.com wrote: On Nov 9, 2012, at 1:29 PM, David Duncan wrote: On Nov 9, 2012, at 11:30 AM, Matt Neuburg m...@tidbits.com wrote: It turns out that the new iOS 6 UIViewController/UIView state restoration does not work through a restart

Re: iOS 6 built-in view controller save-and-restore disappointing

2012-11-09 Thread David Duncan
by the reboot process). -- 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/Update

Re: iOS 6 built-in view controller save-and-restore disappointing

2012-11-09 Thread David Duncan
On Nov 9, 2012, at 5:04 PM, Matt Neuburg m...@tidbits.com wrote: On Nov 9, 2012, at 4:21 PM, David Duncan wrote: On Nov 9, 2012, at 3:48 PM, Matt Neuburg m...@tidbits.com wrote: Why - are you suggesting it *is* supposed to work through a restart??? m. Yes it is. Well, it doesn't

Re: Plan for persisting preferences on iOS applications

2012-10-24 Thread David Duncan
the application your application's signature would break and would no longer launch). Nothing except deleting the application (nee its sandbox) should delete existing preferences. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: Plan for persisting preferences on iOS applications

2012-10-24 Thread David Duncan
On Oct 24, 2012, at 10:25 AM, Alex Zavatone z...@mac.com wrote: On Oct 24, 2012, at 1:13 PM, David Duncan wrote: On Oct 24, 2012, at 10:03 AM, Alex Zavatone z...@mac.com wrote: On Oct 24, 2012, at 12:40 PM, Mike Abdullah wrote: On 24 Oct 2012, at 16:24, Alex Zavatone wrote

Re: sync drawing an ever-increasing path

2012-10-23 Thread David Duncan
more sense to break it into pieces and use multiple shape layers animated sequentially. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: sync drawing an ever-increasing path

2012-10-23 Thread David Duncan
the animation duration on the current CATransaction and setting the strokeEnd directly. That seems to be all that is needed. David On Oct 23, 2012, at 11:37 AM, David Duncan david.dun...@apple.com wrote: On Oct 23, 2012, at 4:37 AM, Roland King r...@rols.org wrote: I want to animate

Re: sync drawing an ever-increasing path

2012-10-23 Thread David Duncan
method that you call instead of -setNeedsDisplay without the overhead. thanks for pointing to didMoveToWindow. David On Oct 23, 2012, at 1:25 PM, David Duncan david.dun...@apple.com wrote: On Oct 23, 2012, at 12:34 PM, David Rowland rowla...@sbcglobal.net wrote: This worked

Re: iOS; how to connect to 3G

2012-10-18 Thread David Duncan
the callback to know when to retry any previously failed connections, and once you get a callback that says that connection is possible, then you should try to make the connection, while continuing plan for possible failure. -- David Duncan ___ Cocoa

Re: iOS 6 changes in CATextLayer text drawing

2012-10-11 Thread David Duncan
on your CATextLayer (or wrap it in a UIView)? By default CALayers never change their contentsScale, so if you are just using a plain CATextLayer without anything else to manage it, the contentsScale will be 1 regardless of the screen's density, making for fairly ugly text on Retina displays. -- David

Re: iOS 6 changes in CATextLayer text drawing

2012-10-11 Thread David Duncan
On Oct 11, 2012, at 1:25 PM, Matt Neuburg m...@tidbits.com wrote: On Oct 11, 2012, at 10:54 AM, David Duncan david.dun...@apple.com wrote: On Oct 11, 2012, at 10:27 AM, Matt Neuburg m...@tidbits.com wrote: (1) CATextLayer in iOS 6 requires an opaque background in order to antialias

Re: app developed for iPhone is compatible with iPad

2012-09-26 Thread David Duncan
on the screen with an option for double sizing). If you create a Universal application, then you can provide a native UI for both device idioms. You will need to take some care there, but the templates should manage the very basic bits for you (i.e. the aforementioned window resizing). -- David Duncan

Re: iPad drawing and screen rotation

2012-09-23 Thread David Duncan
of your view? The default is (if I recall correctly) UIViewContentModeResize, which will not redraw when the view's bounds changes, but rather stretch the contents to match. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: Local Properties

2012-09-03 Thread David Duncan
broken down to [self myStruct].something = 7, but the LHS of that is not assignable (its an R-value, not an L-value, and only L-values are assignable). -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Finder Info

2012-08-27 Thread David Duncan
, but should give you a framework for finding ones that do. -- 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

Re: #warning 64BIT: Inspect use of sizeof

2012-08-15 Thread David Duncan
as being a great thing which should be used liberally. And that makes sense to me. What am I supposed to inspect for? The only thing I can imagine is if you have code that expects sizeof(int) == sizeof(long) == sizeof(void*) or something along those lines. -- David Duncan

Re: How do I get memory usage numbers?

2012-08-13 Thread David Duncan
but with all of the programs out there that include these numbers there must be a better way to find out how it's done. What are you trying to debug? -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: rotating UIView without changing size

2012-08-03 Thread David Duncan
superview (if nothing else ensuring the subview remains at the correct size and position should be much easier than what it seems you are trying to do above). -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: rotating UIView without changing size

2012-08-03 Thread David Duncan
. -- 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/Update your Subscription: https

Re: loading UIView in correct orientation

2012-08-03 Thread David Duncan
the proper rotation when it is initially loaded? This is basically the same problem as your other question – your not using view controller containment, so the behavior is very different. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev

Re: rotating UIView without changing size

2012-08-03 Thread David Duncan
) Don't try to get away with not having a view controller (that is explicitly set as the window's rootViewController). Its simply not worth it. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: UIScrollView insertSubview:atIndex: problem

2012-07-31 Thread David Duncan
you want the views to be visually in a particular position, and you should thus ensure that each view has the correct frame.origin or center to place them that way. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: UIScrollView insertSubview:atIndex: problem

2012-07-30 Thread David Duncan
that a scroll view has other implicit subviews you would need to be more careful if you need an exact location. It may make more sense to use an intermediate subview that you place content into and which is a child of the scroll view in that case. -- David Duncan

Re: Custom UITableView cell label with ARC and storyboards

2012-07-29 Thread David Duncan
in cellForRowAtIndexPath when you've already created a subclass of UITableViewCell? Have your subclass create (and maintain a reference) to these labels and never recreate them again. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: Custom UITableView cell label with ARC and storyboards

2012-07-29 Thread David Duncan
On Jul 29, 2012, at 7:38 PM, Alex Zavatone z...@mac.com wrote: On Jul 29, 2012, at 10:30 PM, David Duncan wrote: On Jul 29, 2012, at 7:02 PM, Alex Zavatone z...@mac.com wrote: I've put together a TVC with a custom TVC cell class consisting mainly of UILabels, but have the problem where

Re: Custom UITableView cell label with ARC and storyboards

2012-07-29 Thread David Duncan
On Jul 29, 2012, at 7:55 PM, Alex Zavatone z...@mac.com wrote: On Jul 29, 2012, at 10:48 PM, David Duncan wrote: On Jul 29, 2012, at 7:38 PM, Alex Zavatone z...@mac.com wrote: On Jul 29, 2012, at 10:30 PM, David Duncan wrote: On Jul 29, 2012, at 7:02 PM, Alex Zavatone z...@mac.com

Re: iOS Rendering PDFs on a Background Thread

2012-07-26 Thread David Duncan
these methods can only be called on the Main Thread. Is this correct? No, these methods are fine as long as you use the context only within the same invocation (that is, don't try to share the context between threads or split the begin/end between threads). -- David Duncan

Re: iOS Rendering PDFs on a Background Thread

2012-07-26 Thread David Duncan
. UIGraphicsGetImageFromCurrentImageContext UIGraphicsEndImageContext This is all in one method that runs in one thread, are you saying this will work ok? Should be fine. If you find an issue, please report a bug. This was a recent topic at WWDC2012 as well, see session 211 Building Concurrent User Interfaces on iOS -- David

Re: Profound UITableView rendering-performance problem, but only at certain positions?

2012-07-24 Thread David Duncan
relatively strange with -drawRect:'d drawing, but given what you've described implementing this functionality via -drawRect: would be a lot more work than is necessary. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Given NSString containing a letter like Ç, how do I convert that to a C?

2012-07-21 Thread David Duncan
get the letter C when the string starts with Ç? You will probably want to do your comparisons based on strings that you've folded via -stringByFoldingWithOptions:locale:, and i fyou fold with diacritic insensitivity then you should fold out the cedillas. -- David Duncan

Re: Save photo taken by UIImagePickerController

2012-07-18 Thread David Duncan
, and if that happens to be the case here then your image will always be nil. UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil); } -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev

Re: СoreGraphics text drawing performance

2012-07-18 Thread David Duncan
set the text drawing mode to both fill stroke at the same time. -- 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: How can I convince an NSBigMutableString to become a mere NSAttributedString ?

2012-07-17 Thread David Duncan
declare that you are receiving an NSString, and as such you should be treating the value you get as an NSString. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: How can I convince an NSBigMutableString to become a mere NSAttributedString ?

2012-07-17 Thread David Duncan
-isKindOfClass: is for. -- 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/Update your

Re: +bundleForClass: category question

2012-07-15 Thread David Duncan
will be the framework bundle. -- 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/Update

Re: +bundleForClass: category question

2012-07-15 Thread David Duncan
On Jul 15, 2012, at 9:07 PM, Graham Cox graham@bigpond.com wrote: On 16/07/2012, at 1:29 PM, David Duncan wrote: In this case, it means your bundle will be the framework bundle. Just to be clear, you mean the bundle for the *original* framework (AppKit, say) and not my framework

Re: Capturing 'self' strongly in this block is likely to lead to a retain cycle

2012-07-10 Thread David Duncan
be exceptionally long. Basic rule of thumb thus is to create your own autorelease pool for such blocks or operations to ensure that your autoreleases are carried out in a timely manner. This is not unlike how you create your own autorelease pools when creating a new NSThread. -- David Duncan

Re: NSInteger vs int vs int32_t

2012-07-02 Thread David Duncan
at a time. Your both correct, but your looking at different parts of the same problem. -- 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

Re: CALayer coordinates question

2012-06-25 Thread David Duncan
in the lower left corner of the parent NSView. Is that normal? No, it isn't. Can you share a brief example that triggers the issue? -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: CALayer contentScale initialization, where to do it?

2012-06-17 Thread David Duncan
contentsScale won't matter until you the layer into a window, so why not just assign it when you add the layer as a sublayer? -- David Duncan @ My iPhone On Jun 16, 2012, at 10:57 PM, Markus Spoettl ms_li...@shiftoption.com wrote: On 6/16/12 11:59 PM, Kyle Sluder wrote: That's the same

Re: CALayer contentScale initialization, where to do it?

2012-06-17 Thread David Duncan
Same concept applies. Set it when you assign the layer or add the view. -- David Duncan @ My iPhone On Jun 17, 2012, at 12:55 AM, Markus Spoettl ms_li...@shiftoption.com wrote: On 6/17/12 9:15 AM, David Duncan wrote: contentsScale won't matter until you the layer into a window, so why

Re: Transforming UIImage (rotate, translate, scale) and then crop to constant size

2012-05-30 Thread David Duncan
at 6:49 PM, David Duncan david.dun...@apple.com wrote: On May 24, 2012, at 12:19 AM, Gustavo Adolfo Pizano wrote: For the transformation I'm using gesture recognizers. when I want to compose the image this is are the steps I'm doing UIGraphicsBeginImageContext(size) //size is a CGSize

Re: Transforming UIImage (rotate, translate, scale) and then crop to constant size

2012-05-24 Thread David Duncan
image to this code via a UIImageView. Instead from an architecture POV you should should model this as an image and a transform, and the UIImageView and this code just happen to share these two components. -- David Duncan ___ Cocoa-dev mailing list

Re: Page number in UIWebView

2012-05-24 Thread David Duncan
On May 24, 2012, at 4:05 AM, Takeichi Kanzaki Cabrera wrote: Hello everyone, I'm displaying a PDF in an UIWebView object, is there a way to access the page number displayed when scrolling? Nope. -- David Duncan ___ Cocoa-dev mailing list (Cocoa

Re: Arc and autorelease

2012-05-24 Thread David Duncan
usually succeed at that even when working with code that is not itself compiled under ARC. I would use whichever method makes sense to you and only worry about high watermark issues if you discover a performance issue. -- David Duncan ___ Cocoa-dev

Re: ARC apps - loading non-ARC bundles

2012-05-18 Thread David Duncan
-retain and over-release bugs at the boundaries. -- 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

Re: CurrentAddress on iPad

2012-05-16 Thread David Duncan
to have the window be resized when unarchived. -- 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

Re: iOS launch Music app?

2012-05-09 Thread David Duncan
...@apple.com -- 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/Update your

Re: Basic Question

2012-05-09 Thread David Duncan
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 sent to david.dun...@apple.com -- David Duncan

Re: Array annotation strangeness

2012-05-09 Thread David Duncan
' is) does not implement the method you are trying to call on it. -- 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: My app thinks it is a phone. Why?

2012-05-08 Thread David Duncan
On May 7, 2012, at 7:14 PM, Gerriet M. Denkmann wrote: On 8 May 2012, at 01:08, David Duncan wrote: On May 5, 2012, at 10:15 PM, Gerriet M. Denkmann wrote: My app (iOS 5.1) has a xib called MainWindow.xib which does NOT contain a window, just two objects, one

Re: My app thinks it is a phone. Why?

2012-05-07 Thread David Duncan
to make universal). Are you sure you've configured your application to target both iPhone and iPad? Check that the Project and Target levels match and say the same thing. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: CALayer compositingFilter trouble

2012-04-26 Thread David Duncan
are underflowing. 1/255 = ~0.0039. 0.004 * 255 = 1, 0.003 * 255 = 0. Since the saturation determines how much of the hue contributes to the final color, if it is 0 you end up with a grayscale color based on brightness. -- David Duncan ___ Cocoa-dev

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