Search code examples
iphoneobjective-ciosipad

Change the size of UIStepper?


Is it possible to change the size of a UIStepper? When i try to set the size of a stepper it seems to get ignored.

UIStepper *stepper = [[UIStepper alloc] initWithFrame:CGRectMake(50,50,100,100)];
[self.view addSubview:stepper];
NSLog(@"%@",stepper);
CGRect r = CGRectMake(50,50,100,100);
stepper.frame = r;
NSLog(@"%@",stepper);

Log says the frame is (50 50; 94 27)

Is it possible to change the size from 94, 27?


Solution

  • i agree with bani uppal . the size of the stepper can not be changed, you cannot implement the same functionality with the help of two custom buttons and can set the background images of the your buttons to give the impression of stepper.