I have tried to figure out how to change the tool mode of an IKImageView's View programmatically. I have a simple button setup to cause the change in Mode from the user interface, and at the moment, I'm just printing to the Console what the current mode is.

- (IBAction)rotateAction:(id)sender
{
         NSString *findTool = [imageViewOutletcurrentToolMode];
         NSLog(findTool);
        //NSString *rotateTool = @"IKToolModeRotate";
        
        //[imageViewOutlet currentToolMode:rotateTool];
        //IKToolModeRotate.currentToolMode;
}

I have tried to read the IKImageView.h header file to understand how to change the tool, but as I'm still quite new to cocoa, I can't figure it out. There must be a way to programmatically change the tool. This is what the IKImageView.h specifies:

extern NSString *const IKToolModeNone;
extern NSString *const IKToolModeMove;
extern NSString *const IKToolModeSelect;
extern NSString *const IKToolModeCrop;
extern NSString *const IKToolModeRotate;
extern NSString *const IKToolModeAnnotate;

I'm guessing these are constants which cannot be changed directly?? I have tried to do so in a number of ways and failed!

However, can I create a copy of these and then set a new value to them?

I did notice the @property NSString* currentToolMode; notation as specified in the IKImageView Class Reference. I still haven't fully understood the new Property notation usage as it applies to here, so I am asking for help with this. How do I programmatically change the currentToolMode from say "IKToolModeMove" to "IKToolModeRotate"?

Many thanks

Karl
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to