Re: Drawing text like Lion's Mail

2011-08-08 Thread Chase Latta
Andre, I was digging through some old code and found this method I wrote awhile ago. I remember basing this off of a blog post or email thread but I don't remember the original source. I used this for something real quick so the code is not perfect but may be a good starting point to get what

Re: Seeding random() randomly

2011-05-26 Thread Chase Latta
unsigned seed = (unsigned)([NSDate timeIntervalSinceReferenceDate] * 1.0); You are trying to set seed to a value that is something like 3,281,585,690,000; seed cannot handle this value so it will be set to 4294967295, at least on my machine. You are using the same seed each time you run the p

Re: The simplest way to fade out a view

2011-05-20 Thread Chase Latta
view not to blink. > > I understand (i hope i do :-) ) that i am actually changing the opaqueness > of the layer (i.e., of the temporary graphical representation) and not of the > view itself, but maybe i could get rid of blinking somehow. > Thank you! > > 2011/5/20 Chase La

Re: The simplest way to fade out a view

2011-05-20 Thread Chase Latta
> How could i force the animation to actually change the alpha value > from 1.0 to 0.0 and make it stay 0.0 unless i change it back? Change your code to look like this: CABasicAnimation * alphaAnimation = ... ... [[theView layer] setOpacity:0.0]; // Set your opacity here [[theView laye

Re: The simplest way to fade out a view

2011-05-19 Thread Chase Latta
What about using a timer. Something like this: - (IBAction)fadeOut:(id)sender; { [[NSAnimationContext currentContext] setDuration:5.0]; [[self.myView animator] setAlphaValue:0.0]; [NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(toggleMyViewState:) userInfo:n

Re: Localized sorting of a Core Data entity

2011-04-07 Thread Chase Latta
This is just a shot in the dark and I am not sure how feasible it is, but, could you have put a property on your entity that is non-transient and represents the current localized representation of the string. This way you could do something like this when fetching your values: if (storedLanguage

Re: Simulate touch event with cordinate?

2011-04-01 Thread Chase Latta
Are you trying to achieve something like, in the iBooks example, the user can swipe their finger to change the page or press a 'next page' button and have the same animation occur? If so then you need to write one function to handle the animation and call that in response to either a button push o

Re: Canceling NSInvocationOperation

2011-02-14 Thread Chase Latta
Jamie, I hadn't thought about that situation but I can see how that could lead to problems. I guess I will just need to rethink my code a little bit but I will probably do what you suggest and check if the operation has been cancelled in the callback. Thanks, Chase On Mon, Feb 14, 2011 at 9:18

Re: Canceling NSInvocationOperation

2011-02-14 Thread Chase Latta
Thanks Matt, > (1) Don't let go of the operation in the first place; keep a reference to it > when you create it (even though it is also being kept inside the > NSOperationQueue). This worked for me. Chase ___ Cocoa-dev mailing list (Cocoa-dev@lists

Canceling NSInvocationOperation

2011-02-12 Thread Chase Latta
Hello all, I have run into a situation that I don't quite have a solution for. I have a UIScrollView that holds a bunch of CALayers. My controller is set up to check and see if it can cache layers that are offscreen after the user scrolls a certain amount. I found that doing this on the main th