美文网首页
首页-- EliteSchoolTableViewCell

首页-- EliteSchoolTableViewCell

作者: 云兮77 | 来源:发表于2018-01-31 14:14 被阅读0次

#import

@interface  EliteSchoolTableViewCell : UITableViewCell

@end

#import "EliteSchoolTableViewCell.h"

@implementationEliteSchoolTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)reuseIdentifier

{

    self= [superinitWithStyle:stylereuseIdentifier:reuseIdentifier];

    if(self) {

        self.selectionStyle = UITableViewCellSelectionStyleNone;

        UIScreen* mainScreen = [UIScreenmainScreen];

        CGFloatwidth = mainScreen.bounds.size.width/4;

        CGFloatheight =70;

        UIImage* eliteScloolImage = [UIImageimageNamed:@""];

        UIButton* eliteScloolBtn = [[UIButtonalloc]initWithFrame:CGRectMake(width*0,10, width, height)];

        [eliteScloolBtnsetImage:eliteScloolImageforState:UIControlStateNormal];

        [eliteScloolBtnaddTarget:self action:@selector(showEliteSchoolAction:) forControlEvents:UIControlEventTouchUpInside];

        [self.contentViewaddSubview:eliteScloolBtn];

        CGRecteliteSchoolLabelFrame =CGRectMake(0,CGRectGetHeight(eliteScloolBtn.frame), width,15);

        UILabel* eliteSchoolLabel = [[UILabelalloc]initWithFrame:eliteSchoolLabelFrame];

        eliteSchoolLabel.textColor= [UIColorlightGrayColor];

        eliteSchoolLabel.textAlignment=NSTextAlignmentCenter;

        eliteSchoolLabel.font= [UIFontsystemFontOfSize:12];

        eliteSchoolLabel.text=@"第一中学";

        eliteSchoolLabel.numberOfLines=0;

        [eliteScloolBtnaddSubview:eliteSchoolLabel];

    }

    return self;

}

- (void)showEliteSchoolAction:(UIButton*)btn

{

    NSLog(@"名校风采");

}

@end

相关文章

  • 首页-- EliteSchoolTableViewCell

    #import @interface EliteSchoolTableViewCell : UITableView...

  • html+css导航栏制作——20160313

    水平导航栏(一) HTML部分: 个人首页 个人首页 个人首页 个人首页 个人首页 个人首页 CSS部分: *{ ...

  • 2018-10-17测试

    搜狐博客首页-搜狐 搜狐博客首页-搜狐 搜狐博客首页-搜狐 搜狐博客首页-搜狐 搜狐博客首页-搜狐 搜狐博客首页-...

  • 病案首页功能

    首页管理 首页信息录入 首页信息查询 首页信息浏览 首页信息保存 首页字典管理 诊断信息字典 手术信息字典 病理信...

  • 学习HM微博项目第7天

    步骤:首页14-时间 -> 首页15-来源 -> 首页16-配图相册 -> 首页17-头像 首页14-时间 通过...

  • 首页

    说明:本文集为Gradle官方用户手册的翻译版本。由于我水平有限,不会100%翻译,但我会尽可能完整翻译,有一些我...

  • 首页

    作业4 .box1{width: 960px;height: 40px;b...

  • 首页

    今天是我对抗抑郁症的第183天

  • 首页

    接口约定 使用httpsrestful风格用户端:https://{域名}/api/{接口版本号}/{resour...

  • 首页

    #import //首页 //UIViewController 视图控制器 //带有容器性质的controller...

网友评论

      本文标题:首页-- EliteSchoolTableViewCell

      本文链接:https://www.haomeiwen.com/subject/kcnkzxtx.html