久久久精品一区ed2k-女人被男人叉到高潮的视频-中文字幕乱码一区久久麻豆樱花-俄罗斯熟妇真实视频

iOSUITableView的橫向滑動(dòng)-創(chuàng)新互聯(lián)

  在開發(fā)中橫向滑動(dòng)我們通常會(huì)想到用UICollectionView,確實(shí)這個(gè)好用,但有時(shí)候需求不太明確而且用UICollectionView的頭部需要自定義沒有UITableView簡(jiǎn)單,粽子看需求,根據(jù)需求決定,但是我們得會(huì)這種技能。

創(chuàng)新互聯(lián)公司是一家專注于網(wǎng)站制作、成都做網(wǎng)站與策劃設(shè)計(jì),花山網(wǎng)站建設(shè)哪家好?創(chuàng)新互聯(lián)公司做網(wǎng)站,專注于網(wǎng)站建設(shè)10年,網(wǎng)設(shè)計(jì)領(lǐng)域的專業(yè)建站公司;建站業(yè)務(wù)涵蓋:花山等地區(qū)?;ㄉ阶鼍W(wǎng)站價(jià)格咨詢:028-86922220@interface ViewController ()<UITableViewDelegate,UITableViewDataSource> @property(strong,nonatomic)UITableView *myTableView; @end @implementation ViewController - (UITableView *)myTableView{     if(!_myTableView){         CGRect tableViewRect = CGRectMake(0, 0,100, CGRectGetWidth(self.view.frame));         _myTableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];         _myTableView.dataSource = self;         _myTableView.delegate = self;         _myTableView.frame = tableViewRect;         _myTableView.separatorStyle = NO;         _myTableView.backgroundColor = [UIColor grayColor];         _myTableView.transform = CGAffineTransformMakeRotation(-M_PI / 2);         _myTableView.showsVerticalScrollIndicator = NO;         _myTableView.center = CGPointMake(self.view.frame.size.width / 2, 50);     }     return _myTableView; } - (void)viewDidLoad {     [super viewDidLoad];               //AppDelegate 進(jìn)行全局設(shè)置     if (@available(iOS 11.0, *)){         [[UIScrollView appearance] setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];     }          self.view.backgroundColor = [UIColor purpleColor];     [self.view addSubview:self.myTableView];     // Do any additional setup after loading the view, typically from a nib. } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{     return 100; } -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{     return  50; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{          FFTableViewCell *cell = [FFTableViewCell cellWithTableView:tableView];     return cell; } #pragma mark 選中的方法 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{     [tableView deselectRowAtIndexPath:indexPath animated:YES]; } #import "FFTableViewCell.h" @interface FFTableViewCell() @property(strong,nonatomic)UIButton *monthBtn; @end @implementation FFTableViewCell static NSString *cellID = @"FFTableViewCell"; - (UIButton *)monthBtn{     if(!_monthBtn){         _monthBtn = [UIButton buttonWithType:UIButtonTypeCustom];         _monthBtn.backgroundColor = [UIColor redColor];         _monthBtn.layer.cornerRadius = 30.0f;         _monthBtn.clipsToBounds = YES;         [_monthBtn setTitle:@"在干嘛" forState:UIControlStateNormal];     }     return _monthBtn; } - (void)awakeFromNib {     [super awakeFromNib];     // Initialization code } + (instancetype)cellWithTableView:(UITableView *)tableView {     FFTableViewCell *cell =  [tableView dequeueReusableCellWithIdentifier:cellID];     if (cell == nil) {         cell  = [[FFTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];     }     return cell; } - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{     self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];     if(self){                  self.contentView.transform = CGAffineTransformMakeRotation(M_PI / 2);         [self.contentView addSubview:self.monthBtn];     }     return self; } - (void)layoutSubviews{     [super layoutSubviews];     _monthBtn.frame = CGRectMake((CGRectGetWidth(self.contentView.frame)-60)/2, (CGRectGetHeight(self.contentView.frame)-60)/2, 60,60); } - (void)setSelected:(BOOL)selected animated:(BOOL)animated {     [super setSelected:selected animated:animated];     // Configure the view for the selected state } - (void)dealloc{     _monthBtn = nil; } @end

解決問題的方法不止一種,要多想想其他的解決辦法,這樣才能更好的掌握每個(gè)知識(shí)點(diǎn),說不定會(huì)更好,說不定就是面試題等待。

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。

新聞名稱:iOSUITableView的橫向滑動(dòng)-創(chuàng)新互聯(lián)
分享鏈接:http://sd-ha.com/article12/jjjgc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站維護(hù)、全網(wǎng)營(yíng)銷推廣網(wǎng)站內(nèi)鏈、網(wǎng)站排名品牌網(wǎng)站制作、品牌網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

小程序開發(fā)