zoukankan      html  css  js  c++  java
  • where amazing happens

    - (void)didSelectCellRowFirstDo:(BOOL)firstDoInsert nextDo:(BOOL)nextDoInsert

    {

        self.isOpen = firstDoInsert;

        

        FlightListCell *cell1 = (FlightListCell *)[self.expansionTableViewcellForRowAtIndexPath:self.selectIndex];

        if (self.isOpen) {

            cell1.flightBottomLineImageView.hidden = YES;

            

        }else{

            cell1.flightBottomLineImageView.hidden = NO;

        }

       

        //FlightListCell *cell = (FlightListCell *)[self.expansionTableView cellForRowAtIndexPath:self.selectIndex];

        [self.expansionTableViewbeginUpdates];

        

        int section = self.selectIndex.section;

         HFFlight *flight  = (HFFlight *)[self.fListArray objectAtIndex:section];

        if (firstDoInsert && !nextDoInsert) {

            

            

            if (flight.tempCabins) {// 缓存中加载数据

                flight.cabins = flight.tempCabins;

                [self.expansionTableViewreloadData];

     

            }else{

                [self loadCabins:flight];

     

            }

        }

       

        int contentCount = flight.cabins.count;

    NSMutableArray* rowToInsert = [[NSMutableArrayalloc] init];

    for (NSUInteger i = 1; i < contentCount + 1; i++) {

    NSIndexPath* indexPathToInsert = [NSIndexPath indexPathForRow:i inSection:section];

    [rowToInsert addObject:indexPathToInsert];

    }

     

    if (firstDoInsert)

            

        {

                  [self.expansionTableViewinsertRowsAtIndexPaths:rowToInsert withRowAnimation:UITableViewRowAnimationTop];

        }

    else

        {

            [self.expansionTableViewdeleteRowsAtIndexPaths:rowToInsert withRowAnimation:UITableViewRowAnimationTop];

        }

        

    [self.expansionTableViewendUpdates];

        if (nextDoInsert) {

            self.isOpen = YES;

            self.selectIndex = currentIndexPath;

     

           // self.selectIndex = [self.expansionTableView indexPathForSelectedRow];

            [selfdidSelectCellRowFirstDo:YESnextDo:NO];

        }

        if (self.isOpen) {

            [self.expansionTableViewscrollToRowAtIndexPath:currentIndexPathatScrollPosition:UITableViewScrollPositionTopanimated:YES];

           // [self.expansionTableView scrollsToTop];

        }

        //if (self.isOpen) [self.expansionTableView scrollToNearestSelectedRowAtScrollPosition:UITableViewScrollPositionTop animated:YES];

    }

  • 相关阅读:
    单独下载克隆clone github中master 分支的文件夹
    caffe makefile.config anaconda2 python3 所有问题一种解决方式
    问题解决
    找不到cannot find -lpython3.5m caffe anaconda python3 ubuntu16.04
    bash./ autogen 没有这个文件 ubuntu16.04git安装glog报错
    cumulative match score
    【Python网络编程】复习
    【Python网络编程】爬取百度贴吧、小说内容、豆瓣小说、Ajax爬微博、多线程爬淘宝
    【Python网络编程】UDP聊天、TCP文件下载、多线程UDP聊天器、多进程拷贝文件
    【前端性能】网站性能优化
  • 原文地址:https://www.cnblogs.com/guligei/p/3095359.html
Copyright © 2011-2022 走看看