<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      IOS對話框UIAlertView

       1 //修改彈出對話框的樣式
       2 alertView.alertViewStyle = UIAlertViewStylePlainTextInput;
       3 
       4 //根據(jù)索引獲取指定的某個(gè)文本框
       5 [alertView textFieldAtIndex :0]
       6 [alertView textFieldAtIndex :0].text = her.name;
       7 
       8 //通過UIAlertView的代理來監(jiān)聽對話框中的按鈕的點(diǎn)擊事件
       9 //實(shí)現(xiàn)UIAlertView的 
      10 -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex 代理方法

      實(shí)例代碼:

       1 -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
       2     CZHero *hero = self.heros[indexPath.row];
       3     UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"提示" message:nil delegate:self cancelButtonTitle:@"取消" otherButtonTitels:@"確定",nil];
       4 
       5     alertView.alertViewStyle = UIAlertViewStylePlainTextInput;
       6     [alertView textFieldAtIndex:0].text = hero.name;
       7 
       8     //記錄當(dāng)前點(diǎn)擊行的行號
       9     alertView.tag = indexPath.row;
      10     [alertView show]
      11 }
      12 
      13 #pragma mark - alertView的代理方法
      14 -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger) buttonIndex{
      15     //判斷點(diǎn)擊的是哪個(gè)按鈕
      16     if(buttonIndex ==1){
      17         //獲取文本框中的數(shù)據(jù)
      18         NSString *name = [alertView textFieldAtIndex:0].text;
      19 
      20         //修改模型數(shù)據(jù)
      21         //根據(jù)行號,獲取當(dāng)前點(diǎn)擊行的模型數(shù)據(jù)
      22         CZHero *hero = self.heros[alertView.tag];
      23         hero.name = name;
      24 
      25         //重新刷新TableView數(shù)據(jù)
      26         //重新刷新整個(gè)TableView,UITableView會重新向 datasource請求數(shù)據(jù)
      27         //重新調(diào)用數(shù)據(jù)源方法
      28         //[self.tableView reloadData];//不好重新刷新整個(gè)TableView
      29        
      30         //局部刷新
      31         //創(chuàng)建一個(gè)indexPath對象
      32         NSIndexPath *path = [NSIndexPath indexPathForRow:alertView.tag inSection:0];
      33 
      34         [self.tableView reloadRowsAtIndexPaths:@[path] withRowAnimation:UITableViewRowAnimationLeft];
      35     }
      36 }

       

      posted @ 2015-05-26 09:22  王世楨  閱讀(508)  評論(0)    收藏  舉報(bào)
      主站蜘蛛池模板: 精品免费看国产一区二区| 男人添女人下部高潮视频| 亚洲av首页在线| 日本一区二区不卡精品| 国产一区二区亚洲精品| 久久人人97超碰爱香蕉| 中文字幕日韩有码av| 亚洲欧洲日产国产av无码| 少妇无码AV无码专区| 亚洲色欲色欱WWW在线| 国产目拍亚洲精品区一区| 日韩国产av一区二区三区精品| 欧洲精品色在线观看| 美日韩不卡一区二区三区| 亚洲精品久荜中文字幕| 变态另类视频一区二区三区| 久爱www人成免费网站| 久久一区二区中文字幕| 老王亚洲AV综合在线观看| 粉嫩国产av一区二区三区| 狂躁女人双腿流白色液体| www亚洲精品| 国产成人无码网站| 亚洲av综合色一区二区| 婷婷综合亚洲| 亚洲18禁一区二区三区| 国产精品v片在线观看不卡| 国产真实露脸乱子伦原著| 伊人久久大香线蕉综合观| 换着玩人妻中文字幕| 一本av高清一区二区三区| 99久久亚洲综合精品网| 少妇宾馆粉嫩10p| 久久综合婷婷成人网站| 日本福利一区二区精品| 精品无码一区二区三区在线| 亚洲第一国产综合| 国产情侣激情在线对白| 极品少妇无套内射视频| 亚洲国产精品无码一区二区三区| 日韩精品一二三黄色一级|