| | |
| | | -(void)viewWillAppear:(BOOL)animated{ |
| | | [super viewWillAppear:animated]; |
| | | |
| | | if(!_isExpand&&self.lastJudgeContentOffset!=0){ |
| | | _TopToLength.constant=0.0f; |
| | | if(!_isExpand && self.lastJudgeContentOffset!=0){ |
| | | _TopToLength.constant = 0.0f; |
| | | _searchConstaint.constant = 0.0; |
| | | |
| | | if (IsiPhoneX) { |
| | | _searchConstaint.constant = 20.0; |
| | | } |
| | | self.youhuiquanImageview.hidden = YES; |
| | | //[self.view layoutIfNeeded]; |
| | | |
| | | } else { |
| | | self.youhuiquanImageview.hidden = NO; |
| | |
| | | |
| | | if ([self.plist readFile][0]) { |
| | | |
| | | // æç¼å页æ°ç´æ¥æ¹æ2 |
| | | self.page = 2; |
| | | |
| | | self.GoodsData = [self.plist readFile][0]; |
| | | [self.RecommendCouponTableView reloadData]; |
| | | |
| | |
| | | [[YTHNetInterface startInterface] getCouponListWithPage:[NSString stringWithFormat:@"%ld",(long)self.page] Withblock:^(BOOL isSuccessful, id result, NSString *error) { |
| | | if (isSuccessful) { |
| | | |
| | | self.adviceTableview.hidden = NO; |
| | | self.youhuiquanImageview.hidden = NO; |
| | | //self.adviceTableview.hidden = NO; |
| | | |
| | | NSDictionary *tempDic=(NSDictionary *)result; |
| | | |
| | |
| | | NSArray *tempArr=[[tempDic objectForKey:@"data"] objectForKey:@"taoBaoCoupons"]; |
| | | [self.GoodsData addObjectsFromArray:tempArr]; |
| | | } |
| | | [self.RecommendCouponTableView reloadData]; |
| | | self.page++; |
| | | |
| | | [self.RecommendCouponTableView.mj_header endRefreshing]; |
| | | [self.RecommendCouponTableView.mj_footer endRefreshing]; |
| | | |
| | | [self.RecommendCouponTableView reloadData]; |
| | | |
| | | } else { |
| | | |
| | |
| | | |
| | | if (self.GoodsData.count != 0) { |
| | | |
| | | self.adviceTableview.hidden = NO; |
| | | self.youhuiquanImageview.hidden = NO; |
| | | //self.adviceTableview.hidden = NO; |
| | | |
| | | [CustomProgressHUD showNormal:@"ç½ç»æªè¿æ¥ï¼è¯·æ£æµç½ç»è®¾ç½®"]; |
| | | } |
| | |
| | | |
| | | if (self.GoodsData.count != 0) { |
| | | |
| | | self.adviceTableview.hidden = NO; |
| | | self.youhuiquanImageview.hidden = NO; |
| | | // self.adviceTableview.hidden = NO; |
| | | |
| | | [CustomProgressHUD showNormal:@"ç½ç»è¿æ¥å¼å¸¸ï¼è¯·æ£æµç½ç»è®¾ç½®"]; |
| | | } |
| | |
| | | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ |
| | | SJCouponCollectionViewCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:@"SJCouponCollectionViewCell" forIndexPath:indexPath]; |
| | | if (indexPath.row == 0) { |
| | | // [cell setSelected:YES]; |
| | | // [cell setSelected:YES]; |
| | | } |
| | | return cell; |
| | | } |
| | |
| | | _adviceTableview.estimatedRowHeight = 0; |
| | | _adviceTableview.estimatedSectionFooterHeight = 0; |
| | | _adviceTableview.estimatedSectionHeaderHeight = 0; |
| | | _adviceTableview.hidden = YES; |
| | | self.youhuiquanImageview.hidden = YES; |
| | | _adviceTableview.rowHeight = UITableViewAutomaticDimension; |
| | | |
| | | if (@available(iOS 11.0, *)) { |
| | | _adviceTableview.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; |
| | | _adviceTableview.contentInsetAdjustmentBehavior= UIScrollViewContentInsetAdjustmentNever; |
| | | } else { |
| | | // Fallback on earlier versions |
| | | } |
| | | |
| | | _adviceTableview.hidden = YES; |
| | | // _adviceTableview.hidden = YES; |
| | | _adviceTableview.separatorStyle = UITableViewCellSeparatorStyleNone; |
| | | return _adviceTableview; |
| | | } |