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

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

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

      iOS單元格高度計算

      //  Created by mac on 16/6/29.
      //  Copyright ? 2016年 zcc. All rights reserved.
      //
      
      #import "HotCellHeight.h"
      #import "UIViewExt.h"
      #import "CommonalityH.h"
      #define kTextWidth (kScreenWidth-20) //文字寬度
      #define GAP 5
      
      @implementation HotCellHeight
      - (void)setHotModel:(HotModel *)hotModel{
      
          _hotModel = hotModel;
          //計算高度
          
          [self countHeight];
      
      
      }
      #pragma mark 計算高度
      - (void)countHeight{
          CGFloat audiofloat = 0;
          CGFloat imgfloat = 0;
          CGFloat countHeight = 0;
          _Height = 0;
          
          //計算頭像 位置
          
          _avatarFrame = CGRectMake(GAP, GAP, 30, 30);
          countHeight += _avatarFrame.size.height + GAP * 2 ;
          //用戶名稱位置
          _user_NameFrame = CGRectMake(CGRectGetMaxX(_avatarFrame)+GAP, GAP, kScreenWidth - 30 - GAP * 2, 30);
          
      
          
          //計算線的位置
          
          _wireFrame = CGRectMake(GAP, CGRectGetMaxY(_avatarFrame) + GAP,kScreenWidth - GAP*2 , 6);
          
          countHeight += _wireFrame.size.height + GAP;
          
          
          
          //計算圖片位置
          if(_hotModel.post_img == nil){
              
              imgfloat = CGRectGetMaxY(_wireFrame);
          }else{
          
          
              _imgFrame = CGRectMake(GAP, CGRectGetMaxY(_wireFrame)+ GAP, kScreenWidth - GAP*2 ,kScreenWidth - GAP*2);
              
              countHeight += _imgFrame.size.height + GAP;
          
          imgfloat =  CGRectGetMaxY(_imgFrame);
          }
          //計算文本位置
          
              NSDictionary *dic = @{
                                    NSFontAttributeName :
                                    [UIFont fontWithName:@"FZLTCXHJW--GB1-0" size:15]
                                    ,
                                    NSForegroundColorAttributeName :[UIColor blackColor]
                                    
                                    };
           CGSize maximumLabelSize = CGSizeMake(kTextWidth, 120);
          CGRect zFrame = [_hotModel.content boundingRectWithSize:maximumLabelSize options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
          
          _contentFrame = CGRectMake(10, imgfloat + GAP, kTextWidth, zFrame.size.height);
          
          countHeight += _contentFrame.size.height + GAP ;
          
          //計算歌曲(背景)區(qū)域圖片
          
          if(_hotModel.post_audio == nil){
       
              audiofloat = CGRectGetMaxY(_contentFrame);
              
          }else{
          
          
              _backAudioFrame = CGRectMake(GAP, CGRectGetMaxY(_contentFrame)+ GAP, kScreenWidth-GAP*2, 36);
              
              //計算歌曲圖片
              _audioFrame = CGRectMake(GAP+3, CGRectGetMinY(_backAudioFrame)+3, 30, 30);
              
              audiofloat = CGRectGetMaxY(_backAudioFrame);
              countHeight += _backAudioFrame.size.height + GAP ;
              
              
              //歌曲名稱位置
              _song_nameFrame = CGRectMake(CGRectGetMaxX(_audioFrame)+3, CGRectGetMinY(_backAudioFrame)+3,kScreenWidth - GAP + 3 + 3 + 30, 15);
             
              _artistFrame = CGRectMake(CGRectGetMaxX(_audioFrame)+3, CGRectGetMinY(_backAudioFrame)+3 + 15, kScreenWidth - GAP + 3 + 3 + 30, 15);
              _countSongFrame = CGRectMake(CGRectGetMaxX(_backAudioFrame) - 40, CGRectGetMinY(_backAudioFrame)+3, 40, 30);
              
              _buttonLucencyFrame = _backAudioFrame;
          }
          
          
          
          //計算更新時間位置
          
          _downFrame = CGRectMake(GAP*2, audiofloat + GAP, kScreenWidth/2, 20);
          
          countHeight += _downFrame.size.height + GAP * 2;
          
          
          //背景大小位置
          
          _backFrame = CGRectMake(0, 0, kScreenWidth, countHeight);
          
          _Height = countHeight;
          
          //不計算高度  計算位置
          
          CGFloat wfloat = kScreenWidth/7;
          //點贊圖片位置
          _vote_countImgFrame = CGRectMake(wfloat * 4.0 , audiofloat + GAP, 20, 20);
          //評論圖片
          _comment_countImgFrame = CGRectMake(wfloat * 5.0 , audiofloat + GAP, 20, 20);
          //分享圖片
          _shareImgFrame = CGRectMake(wfloat * 6.0 +10 , audiofloat + GAP, 20, 20);
          //點贊數(shù)量
          _vote_countFrame = CGRectMake(wfloat * 4.0 +25 , audiofloat + GAP, 30, 20);
          //評論數(shù)量
          _comment_countFrame = CGRectMake(wfloat * 5.0  +25  , audiofloat + GAP, 30, 20);
      }
      @end
      

        .h

      //
      //  Created by mac on 16/6/29.
      //  Copyright ? 2016年 zcc. All rights reserved.
      //
      
      #import <Foundation/Foundation.h>
      #import <UIKit/UIKit.h>
      #import "HotModel.h"
      @interface HotCellHeight : NSObject
      @property(nonatomic,assign)CGRect avatarFrame;//頭像
      @property(nonatomic,assign)CGRect wireFrame;//
      @property(nonatomic,assign)CGRect imgFrame;//700
      @property(nonatomic,assign)CGRect contentFrame;//文本
      @property(nonatomic,assign)CGRect audioFrame;//音樂圖片高度
      @property(nonatomic,assign)CGRect backAudioFrame;//區(qū)域音樂圖片高度
      @property(nonatomic,assign)CGRect downFrame;//更新時間
      @property(nonatomic,assign)CGRect backFrame;//背景圖片大小
      
      @property(nonatomic,assign)CGFloat Height;//單元格總高度
      @property(nonatomic,copy)HotModel *hotModel;//數(shù)據(jù)
      
      @property(nonatomic,assign)CGRect user_NameFrame;//用戶名
      @property(nonatomic,assign)CGRect song_nameFrame;//歌名
      @property(nonatomic,assign)CGRect artistFrame;//藝術家名稱
      @property(nonatomic,assign)CGRect countSongFrame;//歌曲數(shù)量
      @property(nonatomic,assign)CGRect vote_countImgFrame;//點贊圖片
      @property(nonatomic,assign)CGRect comment_countImgFrame;//評論圖片
      @property(nonatomic,assign)CGRect shareImgFrame;//分享
      @property(nonatomic,assign)CGRect vote_countFrame;//點贊數(shù)量
      @property(nonatomic,assign)CGRect comment_countFrame;//評論數(shù)量
      
      @property(nonatomic,assign)CGRect buttonLucencyFrame;//透明button的大小
      @end
      posted @ 2016-08-19 10:06  SessionOne  閱讀(309)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 加勒比亚洲天堂午夜中文| 亚洲国产精品久久久久4婷婷| 国产精品无码制服丝袜| 人人澡超碰碰97碰碰碰| 国产成人精品一区二区三| 久久人妻无码一区二区三区av| 中文国产不卡一区二区| 国产精品中文字幕av| 欧美性xxxxx极品少妇| 久久涩综合一区二区三区| 精品视频在线观看免费观看| 好硬好湿好爽好深视频| 国产69精品久久久久久| 亚洲精品视频免费| 免费看欧美全黄成人片| 国产毛片精品一区二区色| 东京热人妻无码一区二区AV| 欧洲精品免费一区二区三区| 国产精品爆乳奶水无码视频免费| 国产一国产看免费高清片| 欧美三级不卡在线观线看高清| 国产午夜精品理论大片| 精品一区二区三区不卡| 久久se精品一区精品二区国产| 亚洲AV无码破坏版在线观看| 精品国产成人国产在线视| 亚洲综合91社区精品福利| 一区二区三区四区高清自拍| 2021国产精品视频网站| 久久精品国产蜜臀av| 日本边添边摸边做边爱| 中文字幕久久久久人妻| 国产精品夜夜春夜夜爽久久小说| 四虎永久免费精品视频| 隆昌县| 国产jizzjizz视频| 精品久久人人做爽综合| 亚洲中文无码手机永久| 人与禽交av在线播放| 亚洲视频免费一区二区三区| 中文字幕久久国产精品|