YIem`s Blog -心比天高命比纸薄-链接找不到的请在站内搜索内容!

2015-12-15 iOS UI 实现 通讯录滚动

//
// RootViewController.m
// UI6_作业1
//
// Created by YIem on 15/12/14.
// Copyright (c) 2015年 www.yiem.net YIem博客. All rights reserved.
//

import "RootViewController.h"

import "LTView.h"

import "CellViewTableViewCell.h"

@interface RootViewController ()<UIScrollViewDelegate>

@end

@implementation RootViewController

[s1 release];
//
LTView *s2 = [[LTView alloc]initWithFrame:CGRectMake(0, 110, self.view.frame.size.width, 110)];
s2.backgroundColor = [UIColor whiteColor];
s2.label1.text = @"YIem";
s2.label2.text = @"1888888888";
s2.img.image = [UIImage imageNamed:@"900738"];
[phone addSubview:s2];
[s2 release];
//
LTView *s3 = [[LTView alloc]initWithFrame:CGRectMake(0, 220, self.view.frame.size.width, 110)];
s3.backgroundColor = [UIColor whiteColor];
s3.label1.text = @"吴晋儒";
s3.label2.text = @"12131313131";
s3.img.image = [UIImage imageNamed:@"900738"];
[phone addSubview:s3];
[s3 release];
//
LTView *s4 = [[LTView alloc]initWithFrame:CGRectMake(0, 330, self.view.frame.size.width, 110)];
s4.backgroundColor = [UIColor whiteColor];
s4.label1.text = @"吴壹";
s4.label2.text = @"645621364";
s4.img.image = [UIImage imageNamed:@"900738"];
[phone addSubview:s4];
[s4 release];
//
LTView *s5 = [[LTView alloc]initWithFrame:CGRectMake(0, 440, self.view.frame.size.width, 110)];
s5.backgroundColor = [UIColor whiteColor];
s5.label1.text = @"第五吴";
s5.label2.text = @"46989765489";
s5.img.image = [UIImage imageNamed:@"900738"];
[phone addSubview:s5];
[s5 release];
//
LTView *s6 = [[LTView alloc]initWithFrame:CGRectMake(0, 550, self.view.frame.size.width, 110)];
s6.backgroundColor = [UIColor whiteColor];
s6.label1.text = @"口天吴";
s6.label2.text = @"979879865";
s6.img.image = [UIImage imageNamed:@"900738"];
[phone addSubview:s6];
[s6 release];
//
LTView *s7 = [[LTView alloc]initWithFrame:CGRectMake(0, 660, self.view.frame.size.width, 110)];
s7.backgroundColor = [UIColor whiteColor];
s7.label1.text = @"萱草";
s7.label2.text = @"97561498456";
s7.img.image = [UIImage imageNamed:@"900738"];
[phone addSubview:s7];
[s7 release];
//
LTView *s8 = [[LTView alloc]initWithFrame:CGRectMake(0, 770, self.view.frame.size.width, 110)];
s8.backgroundColor = [UIColor whiteColor];
s8.label1.text = @"吴雨熙";
s8.label2.text = @"656656464";
s8.img.image = [UIImage imageNamed:@"900738"];
[phone addSubview:s8];
[s8 release];
    

}

/*

pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation

*/

@end



//
// LTView.h
// UI6_作业1
//
// Created by YIem on 15/12/14.
// Copyright (c) 2015年 www.yiem.net YIem博客. All rights reserved.
//

import <UIKit/UIKit.h>

@interface LTView : UIView
@property (nonatomic, retain)UILabel *label1;
@property (nonatomic, retain)UILabel *label2;
@property (nonatomic, retain)UILabel *label3;
@property (nonatomic, retain)UIImageView *img;
@end


//
// LTView.m
// UI6_作业1
//
// Created by YIem on 15/12/14.
// Copyright (c) 2015年 www.yiem.net YIem博客. All rights reserved.
//

import "LTView.h"

@implementation LTView

[_label1 release];
// phone
self.label2 = [[UILabel alloc]initWithFrame:CGRectMake(110, 70, 200, 30)];
[self addSubview:self.label2];
self.label2.textAlignment = NSTextAlignmentCenter;

self.label2.layer.borderWidth = 1.0;
self.label2.layer.cornerRadius = 5;
[_label2 release];

// [self.label2 release];

self.label3 = [[UILabel alloc]initWithFrame:CGRectMake(0, 105, 330, 1)];
self.label3.center = CGPointMake(self.center.x, 105);
[self addSubview:self.label3];
self.label3.backgroundColor = [UIColor blackColor];
[_label3 release];

}

//
//myLabel.layer.borderColor = [UIColor blackColor].CGColor;
//
//myLabel.layer.borderWidth = 2.0;

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.

*/

@end

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »