zoukankan      html  css  js  c++  java
  • UIAlertView的使用注意事项

    1、当button 小于等于两个时,只会平行的显示button,除非标题特长,这样不方便展示
    当button大于等于3个的时候,每行显示一个button,这样平行显示,界面统一

    2、为了使UIAlertView的message显得有调理,不能用 在每个想换行的位置直接使用\n的方式。
    要使用如下方式,stringWithFormat的方式构建

    NSString
    *string1=@"total time played:30\n";
       
    NSString*string2=@"total score :90\n";
       
    NSString*string3=@"19/2/20010 12:00:77\n";
       
    NSString*string=[NSString stringWithFormat:@"%@%@%@",string1,string2,string3];
       
    UIAlertView*progressAlert =[[UIAlertView alloc] initWithTitle:@"Hello" message:string delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil];
       
    [progressAlert show];
       
    [progressAlert release];

    http://stackoverflow.com/questions/5787020/uialertview-show-multiple-message
  • 相关阅读:
    ES6中的基础语法
    let和const、var
    iframe框架
    ajax
    面试题
    移动端的点击延迟事件
    移动端如何设置字体
    swiper插件以及简介
    第十二章 systemctl管理脚本
    第十一章 awk命令
  • 原文地址:https://www.cnblogs.com/easonoutlook/p/2642787.html
Copyright © 2011-2022 走看看