zoukankan      html  css  js  c++  java
  • UIAlertView弹出框

    <Alert弹出框提示用户信息>
        1.遵循代理方法<UIAlertViewDelete>
        2.调用方法UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"恭喜通关!" message:@"更多精彩,请购买下一关~~" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"购买",@"购买1",@"购买2",nil];
            alert.tag = 10;
            [alert show];
        3.点击第几个按钮根据ButtonIndex 传值  调用代理方法(设置tag就是有多个alertView ,根据这个判断)
        - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
        {     NSLog(@"%d",alertView.tag);
               NSLog(@"%d",buttonIndex);
                if (buttonIndex == 1) { // 点击了购买按钮
                        NSLog(@"点击了购买按钮");   }
        }

  • 相关阅读:
    TCP协议
    各相机品牌型号分类
    思科华为命令对比
    网工笔记(一)
    数学笔记
    word快捷键汇总
    请个假
    word笔记
    ScrollView不能到顶部的解决方法
    Gridview 显示成正方形
  • 原文地址:https://www.cnblogs.com/mawenqiangios/p/4999320.html
Copyright © 2011-2022 走看看