首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Uialertview中的Uistepper

Uialertview中的Uistepper
EN

Stack Overflow用户
提问于 2013-02-14 14:31:07
回答 2查看 698关注 0票数 0

如何在UIAlertView中显示UIStepper?还建议我任何其他替代方案,以显示弹出窗口中的UIStepper

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2013-02-14 14:47:49

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

请尝试以下操作

代码语言:javascript
复制
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];
票数 2
EN

Stack Overflow用户

发布于 2013-02-14 14:45:58

试试这个..。希望能对你有所帮助

代码语言:javascript
复制
 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];
票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14869020

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档