0

我怎样才能UIStepper显示UIAlertViewUIStepper还建议我在弹出窗口中显示任何其他替代方案。

4

2 回答 2

4

试试这个..希望它会帮助你

 UIStepper *stepper = [[UIStepper alloc] initWithFrame:CGRectMake(120, 20, 0, 0)];

    UIAlertView *alert =[[UIAlertView alloc]init];// you can set your frame according to ypur requirment
    [alert addSubview:stepper];
    [alert show];
于 2013-02-14T06:45:57.800 回答
2

插入视图的更好方法是将UIAlertView它们添加为子视图

尝试以下

UIAlertView *alert = [[UIAlertView alloc]initWithTitle:nil message:@"\n\n" delegate:nil  cancelButtonTitle:@"OK" otherButtonTitles: nil];
    UIStepper* stepper = [[UIStepper alloc] init];
    stepper.frame = CGRectMake(12.0, 5.0, 100, 10);
    [alert addSubview:stepper];
    [alert show];
于 2013-02-14T06:47:49.073 回答