Possible Duplicate:
Way to make a UIButton continuously fire during a press-and-hold situation?
i have two custom button in camera view, one is zoom in and other one is zoom out both the buttons are pressed value will increase 1,2...
, but i want when i press the zoom in or zoom out button the value will increasing automatically and release the button value will stopped,how? please any one help me
I tried the code
zoomin=[UIButton buttonWithType:UIButtonTypeCustom];
zoomin.frame=CGRectMake(60, 410, 60, 60);
[zoomin setBackgroundImage:[UIImage imageNamed:@"zoomplus.png"] forState:UIControlStateNormal];
[zoomin addTarget:self action:@selector(CameraZoomIn) forControlEvents:UIControlEventTouchUpInside];
[buttonView addSubview:zoomin];
-(void)CameraZoomIn
{
x=x+0.090253;
y=y+0.090253;
NSLog(@"X : %f, Y : %f",x,y);
imgpicker.cameraViewTransform = CGAffineTransformMakeScale(x,y);
}