Re: something I can't understand
Re: something I can't understand
- Subject: Re: something I can't understand
- From: Bill Bumgarner <email@hidden>
- Date: Wed, 29 Jul 2009 14:26:07 -0700
On Jul 29, 2009, at 2:18 PM, Agha Khan wrote:
Dear bbum:
Well After your email I started to write a small app to send you the
project for passing my point across.
AND FOUND THE PROBLEM.
Awesome -- happy to have helped (and happy you didn't take my email as
insulting... I sometimes find a bit of polite "causticism" is an
awesome motivator :).
@interface PngButton : UIButton
{
@public
CGPoint horizontalLoc;
CGPoint verticalLoc;
}
@property (assign) CGPoint horizontalLoc;
@property (assign) CGPoint verticalLoc;
@end
rotateRightBtn = [PngButton buttonWithType:UIButtonTypeInfoDark];
In 99.99% cases it is correct statement. But it is not correct for
my application, because it will create UIButton button but not
embedded other objects as I am holding other CGPoint objects.
NO wonder it was failing. :-)
Now my question how to create such object and set flags as
buttonWithType:UIButtonTypeInfoDark?
You might not be able to. I would file a bug via http://bugreport.apple.com/
asking for +buttonWithType: to use [self alloc] instead of
[UIButton alloc] as it is probably doing now. That'd fix your problem
sometime in the future.
For now, you'll probably need to create an instance of your button
class directly....
rotateRightBtn = [[PngButton alloc] init...]; (I don't remember what
the initializer is for UIButton)
... and then configure it manually with whatever configuration
UIButtonTypeInfoDark implies.
b.bum
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden