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

UI9_UITableView练习

//
// RootViewController.h
// UI9_UITableView练习
//
// Created by YIem on 15/12/17.
// Copyright (c) 2015年 www.yiem.net YIem博客. All rights reserved.
//

import <UIKit/UIKit.h>

@interface RootViewController : UIViewController

@end


//
// RootViewController.m
// UI9_UITableView练习
//
// Created by YIem on 15/12/17.
// Copyright (c) 2015年 www.yiem.net YIem博客. All rights reserved.
//

import "RootViewController.h"

import "SecondViewController.h"

@interface RootViewController ()<UITableViewDataSource, UITableViewDelegate, PassDelegate>
@property (nonatomic, retain)UITableView *tableView;
@property (nonatomic, retain)NSMutableArray *dataArr;
@property (nonatomic, retain)NSIndexPath *index;// 记录点击的cell位置
@end

@implementation RootViewController

// _tableView.backgroundColor = [UIColor yellowColor];

[self.view addSubview:_tableView];
[_tableView release];


_tableView.delegate = self;
_tableView.dataSource = self;


// 数据处理
self.dataArr = [@[@"大娃", @"二娃", @"三娃", @"四娃", @"五娃", @"六娃", @"七娃"]mutableCopy];

}

// 点击cell

/*

pragma mark - Navigation

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

*/

@end



//
// SecondViewController.h
// UI9_UITableView练习
//
// Created by YIem on 15/12/17.
// Copyright (c) 2015年 www.yiem.net YIem博客. All rights reserved.
//

import <UIKit/UIKit.h>

@protocol PassDelegate <NSObject>

@end
@interface SecondViewController : UIViewController

@property (nonatomic, copy)NSString *name;

@property (nonatomic, assign) id<PassDelegate>delegate;

@end


//
// SecondViewController.m
// UI9_UITableView练习
//
// Created by YIem on 15/12/17.
// Copyright (c) 2015年 www.yiem.net YIem博客. All rights reserved.
//

import "SecondViewController.h"

@interface SecondViewController ()
@property (nonatomic, retain)UITextField *textField;
@end

@implementation SecondViewController

/*

pragma mark - Navigation

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

*/

@end
//
// SecondViewController.m
// UI9_UITableView练习
//
// Created by YIem on 15/12/17.
// Copyright (c) 2015年 www.yiem.net YIem博客. All rights reserved.
//

import "SecondViewController.h"

@interface SecondViewController ()
@property (nonatomic, retain)UITextField *textField;
@end

@implementation SecondViewController

/*

pragma mark - Navigation

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

*/

@end

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