Last active
August 29, 2015 14:17
-
-
Save lzwjava/3d8fe8e500bcd580cb4e to your computer and use it in GitHub Desktop.
MCTestViewController.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MCTestViewController.m | |
// ClassNet | |
// | |
// Created by lzw on 15/3/26. | |
// Copyright (c) 2015年 lzw. All rights reserved. | |
// | |
#import "MCTestViewController.h" | |
@interface MCTestViewController () | |
@property (nonatomic,strong) UITableView* tableView; | |
@end | |
@implementation MCTestViewController | |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
[self.view addSubview:self.tableView]; | |
} | |
-(UITableView*)tableView{ | |
if(_tableView==nil){ | |
_tableView=[[UITableView alloc] initWithFrame:self.view.frame]; | |
_tableView.delegate=self; | |
_tableView.dataSource=self; | |
} | |
return _tableView; | |
} | |
- (void)didReceiveMemoryWarning { | |
[super didReceiveMemoryWarning]; | |
// Dispose of any resources that can be recreated. | |
} | |
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ | |
return 1; | |
} | |
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ | |
UITableViewCell* cell=[[UITableViewCell alloc] init]; | |
cell.textLabel.text=@"text"; | |
return cell; | |
} | |
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ | |
return 44; | |
} | |
// Row display. Implementers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
import <UIKit/UIKit.h>
@interface MCTestViewController : UIViewController<UITableViewDataSource,UITableViewDelegate>
@EnD