一、效果图:

二、概述

实现一个好友列表,可以分为男女两个选项,并且实现搜索和排序功能。我的数据是放在plist文件中。

三、代码简述

代码结构如图,首先自定义一个Cell。

cell.h

 #import <UIKit/UIKit.h>

 @interface MyCell : UITableViewCell

 @property (nonatomic,retain) UIButton *tickButton;
@property (nonatomic,retain) UIImageView *selectView;
@property (nonatomic,retain) UIImageView *headView;
@property (nonatomic,retain) UIImageView *iconImageView;
@property (nonatomic,retain) UILabel *nameLabel;
@property(nonatomic,retain) UILabel *signLabel; - (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated;
- (void)setSelected:(BOOL)selected animated:(BOOL)animated; @end

cell.m

 #import "MyCell.h"

 @implementation MyCell

 - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
self.tickButton = [[UIButton alloc]initWithFrame:CGRectMake(, , , )];
[self.tickButton setBackgroundImage:[UIImage imageNamed:@"ic_tick_n.png"] forState:UIControlStateNormal];
[self.tickButton setUserInteractionEnabled:NO];
self.selectView = [[UIImageView alloc]initWithFrame:CGRectMake(, , , )];
self.selectView.image = [UIImage imageNamed:@"ic_-check_s.png"];
self.selectView.hidden = YES;
[self.tickButton addSubview:self.selectView];
[self.contentView addSubview:self.tickButton]; self.headView = [[UIImageView alloc] initWithFrame:CGRectMake(, , , )];
self.headView.tag = ;
[self.contentView addSubview:self.headView];
self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(, , , )];
self.nameLabel.backgroundColor = [UIColor clearColor];
self.nameLabel.textColor = [UIColor colorWithRed:42.0/255.0 green:42.0/255.0 blue:42.0/255.0 alpha:1.0];
self.nameLabel.font = [UIFont systemFontOfSize:];
self.nameLabel.numberOfLines = ;
self.nameLabel.tag = ;
[self.contentView addSubview:self.nameLabel];
UIImageView *iconImage = [[UIImageView alloc] initWithFrame:CGRectMake( + , , , )];
iconImage.tag = ;
iconImage.image = [UIImage imageNamed:@"ic_online@2x.png"];
[self.contentView addSubview: iconImage]; self.signLabel = [[UILabel alloc] initWithFrame:CGRectMake(, , , )];
self.signLabel.numberOfLines = ;
self.signLabel.backgroundColor = [UIColor clearColor];
self.signLabel.font = [UIFont systemFontOfSize:];
self.signLabel.textAlignment = NSTextAlignmentCenter;
self.signLabel.textColor = [UIColor colorWithRed:156.0/255.0 green:155.0/255.0 blue:155.0/255.0 alpha:1.0];
self.signLabel.tag = ;
[self.contentView addSubview:self.signLabel]; UIImageView *line = [[UIImageView alloc]initWithFrame:CGRectMake(, , , )];
[line setImage:[UIImage imageNamed:@"line@2x.png"]];
[self.contentView addSubview:line];
}
return self;
} - (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
[super setSelected:selected animated:animated];
if (selected) {
[self.selectView setHidden:NO];
} else {
[self.selectView setHidden:YES];
} } -(void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated
{
if(highlighted) {
[self.selectView setHighlighted:YES];
} else {
[self.selectView setHighlighted:NO];
}
} -(void)dealloc
{
[self.tickButton release];
[self.selectView release];
[self.headView release];
[self.iconImageView release];
[self.nameLabel release];
[self.signLabel release];
[super dealloc];
} @end

viewController.m

 #import "ViewController.h"
#import "MyCell.h"
#import "pinyin.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad
{
[super viewDidLoad];
[self.view setBackgroundColor:[UIColor colorWithRed:231.0/255.0 green:231.0/255.0 blue:231.0/255.0 alpha:1.0]]; unlimitBtn = [[UIButton alloc]initWithFrame:CGRectMake(, + , , )];
unlimitBtn.tag = ;
[unlimitBtn setBackgroundImage:[UIImage imageNamed:@"ic_option_lt_n@2x.png"] forState:UIControlStateNormal];
[unlimitBtn setBackgroundImage:[UIImage imageNamed:@"ic_option_lt_s@2x.png"] forState:UIControlStateSelected];
[unlimitBtn setTitleColor:[UIColor colorWithRed:156.0/255.0 green:155.0/255.0 blue:155.0/255.0 alpha:1.0] forState:UIControlStateNormal];
[unlimitBtn setTitleColor:[UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0] forState:UIControlStateSelected];
[unlimitBtn setTitle:@"不限" forState:UIControlStateNormal];
[unlimitBtn addTarget:self action:@selector(changeTab:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:unlimitBtn];
unlimitBtn.selected = YES;
type = ; manBtn = [[UIButton alloc]initWithFrame:CGRectMake(+-, +, , )];
manBtn.tag = ;
[manBtn setBackgroundImage:[UIImage imageNamed:@"ic_option_mt_n@2x.png"] forState:UIControlStateNormal ];
[manBtn setTitleColor:[UIColor colorWithRed:156.0/255.0 green:155.0/255.0 blue:155.0/255.0 alpha:1.0] forState:UIControlStateNormal];
[manBtn setBackgroundImage:[UIImage imageNamed:@"ic_option_mt_s@2x.png"] forState:UIControlStateSelected ];
[manBtn setTitleColor:[UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0] forState:UIControlStateSelected];
[manBtn setTitle:@"男" forState:UIControlStateNormal];
[manBtn addTarget:self action:@selector(changeTab:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:manBtn]; womanBtn = [[UIButton alloc]initWithFrame:CGRectMake(+-, +, , )];
womanBtn.tag = ;
[womanBtn setBackgroundImage:[UIImage imageNamed:@"ic_option_rt_n@2x.png"] forState:UIControlStateNormal ];
[womanBtn setTitleColor:[UIColor colorWithRed:156.0/255.0 green:155.0/255.0 blue:155.0/255.0 alpha:1.0] forState:UIControlStateNormal];
[womanBtn setBackgroundImage:[UIImage imageNamed:@"ic_option_rt_s@2x.png"] forState:UIControlStateSelected ];
[womanBtn setTitleColor:[UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0] forState:UIControlStateSelected];
[womanBtn setTitle:@"女" forState:UIControlStateNormal];
[womanBtn addTarget:self action:@selector(changeTab:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:womanBtn]; unlimitBtn.contentEdgeInsets=UIEdgeInsetsMake(-, , , );
manBtn.contentEdgeInsets=UIEdgeInsetsMake(, , , );
womanBtn.contentEdgeInsets=UIEdgeInsetsMake(, , , );
[unlimitBtn.titleLabel setFont:[UIFont systemFontOfSize:]];
[manBtn.titleLabel setFont:[UIFont systemFontOfSize:]];
[womanBtn.titleLabel setFont:[UIFont systemFontOfSize:]]; personArray = [[NSMutableArray alloc]init];
filteredArray = [[NSMutableArray alloc] init];
sectionArray = [[NSMutableArray alloc]init];
userIdArray = [[NSMutableArray alloc]init];
jieheiArr = [[NSMutableArray alloc]init];
breakArr = [[NSMutableArray alloc]init]; NSString *path = [[NSBundle mainBundle] pathForResource:@"myinfo" ofType:@"plist"];
[personArray addObjectsFromArray:[NSMutableArray arrayWithContentsOfFile:path]]; [self initSearchBar];
[self initTableView]; } -(void)initTableView
{
contectTableV = [[UITableView alloc]initWithFrame:CGRectMake(, , , self.view.frame.size.height - )];
contectTableV.dataSource = self;
contectTableV.delegate = self;
[contectTableV setBackgroundColor:[UIColor colorWithRed:231.0/255.0 green:231.0/255.0 blue:231.0/255.0 alpha:1.0]];
[contectTableV setSeparatorColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"line@2x.png"]]];
[contectTableV setAllowsMultipleSelection:YES];
[self.view addSubview:contectTableV]; searchTableV = [[UITableView alloc]initWithFrame:CGRectMake(, , , self.view.frame.size.height-)];
[searchTableV setBackgroundColor:[UIColor colorWithRed:231.0/255.0 green:231.0/255.0 blue:231.0/255.0 alpha:1.0]];
[searchTableV setSeparatorColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"line@2x.png"]]];
searchTableV.delegate = self;
searchTableV.dataSource = self;
[self.view addSubview:searchTableV];
searchTableV.hidden = YES; [self changeGroup]; } -(void)initSearchBar
{
searchbar = [[UISearchBar alloc]initWithFrame:CGRectMake(, , , )];
searchbar.backgroundColor = [UIColor clearColor];
searchbar.tintColor = [UIColor blueColor];
searchbar.delegate = self;
for (UIView *subview in searchbar.subviews)
{
if ([subview isKindOfClass:NSClassFromString(@"UISearchBarBackground")]) {
[subview removeFromSuperview];
}
if ([subview isKindOfClass:[UITextField class]]) {
[(UITextField*)subview setBackground:[UIImage imageNamed:@"bg_search.png"]];
[(UITextField*)subview setBackgroundColor:[UIColor clearColor]];
[(UITextField *)subview setBorderStyle:UITextBorderStyleNone];
}
}
[self.view addSubview:searchbar];
} -(void)changeTab:(id)sender
{
if([sender tag]==)
{
type = ;
unlimitBtn.selected = YES;
manBtn.selected = NO;
womanBtn.selected = NO;
[unlimitBtn setFrame:CGRectMake(, , , )];
[manBtn setFrame:CGRectMake(+-, , , )];
[womanBtn setFrame:CGRectMake(+-, , , )]; }
else if([sender tag]==)
{
type = ;
unlimitBtn.selected = NO;
manBtn.selected = YES;
womanBtn.selected = NO;
[unlimitBtn setFrame:CGRectMake(, , , )];
[manBtn setFrame:CGRectMake(+-, , , )];
[womanBtn setFrame:CGRectMake(+-, , , )]; }
else
{
type = ;
unlimitBtn.selected = NO;
manBtn.selected = NO;
womanBtn.selected = YES;
[unlimitBtn setFrame:CGRectMake(, , , )];
[manBtn setFrame:CGRectMake(+-, , , )];
[womanBtn setFrame:CGRectMake(+-, , , )]; }
[self getlistDataWithType:type];
[self changeGroup]; }
-(void)getlistDataWithType:(int)selectType
{
[personArray removeAllObjects]; NSString *path = [[NSBundle mainBundle] pathForResource:@"myinfo" ofType:@"plist"];
NSMutableArray *array = [NSMutableArray arrayWithContentsOfFile:path];
if (selectType == )
{ for (int i = ; i < [array count]; i++)
{
if ([[[array objectAtIndex:i]objectForKey:@"sex"] isEqualToNumber:[NSNumber numberWithInt:]])
{
[personArray addObject:[array objectAtIndex:i]];
}
}
NSLog(@"manArr%@",personArray);
}else if (selectType == )
{
for (int i = ; i < [array count]; i++)
{
if ([[[array objectAtIndex:i]objectForKey:@"sex"] isEqualToNumber:[NSNumber numberWithInt:]])
{
[personArray addObject:[array objectAtIndex:i]];
}
}
NSLog(@"womanArr%@",personArray);
}else
{
[personArray addObjectsFromArray:array];
} } -(void)changeGroup
{
[sectionArray removeAllObjects];
[userIdArray removeAllObjects];
for (int i = ; i < ; i++)
{
[sectionArray addObject:[NSMutableArray array]];
[userIdArray addObject:[NSMutableArray array]];
}
NSString *sectionName;
for (NSDictionary *dict in personArray)
{
if([self searchResult:[dict objectForKey:@"nickname"] searchText:@"曾"])
sectionName = @"Z";
else if([self searchResult:[dict objectForKey:@"nickname"] searchText:@"解"])
sectionName = @"X";
else if([self searchResult:[dict objectForKey:@"nickname"] searchText:@"仇"])
sectionName = @"Q";
else if([self searchResult:[dict objectForKey:@"nickname"] searchText:@"朴"])
sectionName = @"P";
else if([self searchResult:[dict objectForKey:@"nickname"] searchText:@"查"])
sectionName = @"Z";
else if([self searchResult:[dict objectForKey:@"nickname"] searchText:@"能"])
sectionName = @"N";
else if([self searchResult:[dict objectForKey:@"nickname"] searchText:@"乐"])
sectionName = @"Y";
else if([self searchResult:[dict objectForKey:@"nickname"] searchText:@"单"])
sectionName = @"S";
else
sectionName = [[NSString stringWithFormat:@"%c",pinyinFirstLetter([[dict objectForKey:@"nickname"] characterAtIndex:])] uppercaseString];
NSUInteger firstLetter = [ALPHA rangeOfString:[sectionName substringToIndex:]].location;
if (firstLetter != NSNotFound)
{
[[sectionArray objectAtIndex:firstLetter] addObject:[dict objectForKey:@"nickname"]];
[[userIdArray objectAtIndex:firstLetter] addObject:[dict objectForKey:@"userid"]];
}
NSLog(@"changegropsectionArray:%@",sectionArray);
NSLog(@"changegropuserIdArray:%@",userIdArray);
}
[contectTableV reloadData];
[searchTableV reloadData];
} #pragma mark -
#pragma mark tableViewDeleagte -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
if (tableView == contectTableV ) {
return ;
}
else
{
return ;
}
} //左边的字母快速搜索
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView
{
if(tableView == contectTableV)
{
NSMutableArray *indices = [NSMutableArray arrayWithObject:UITableViewIndexSearch];
for (int i = ; i < ; i++)
[indices addObject:[[ALPHA substringFromIndex:i] substringToIndex:]];
return indices;
}
else
{
return nil;
} } - (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index
{
if (title == UITableViewIndexSearch)
{
[contectTableV scrollRectToVisible:searchbar.frame animated:NO];
return -;
}
return [ALPHA rangeOfString:title].location; } - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
if(sectionArray.count>)
{
if ([[sectionArray objectAtIndex:section] count] == )
{
return ;
}
else
{
return ;
}
}
else
{
return ;
} } - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { UIView *headView = [[UIView alloc] initWithFrame:CGRectMake(, , , )];
headView.backgroundColor = [UIColor clearColor]; UIView *lineView = [[UIView alloc]initWithFrame:CGRectMake(, , , )];
[lineView setBackgroundColor:[UIColor colorWithRed:42.0/255.0 green:42.0/255.0 blue:42.0/255.0 alpha:1.0]];
[headView addSubview:lineView]; UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(, , , )];
titleLabel.backgroundColor = [UIColor clearColor];
titleLabel.textColor = [UIColor colorWithRed:/255.0 green:/255.0 blue:/255.0 alpha:1.0];
titleLabel.font = [UIFont systemFontOfSize:15.0];
titleLabel.text = [NSString stringWithFormat:@"%@", [[ALPHA substringFromIndex:section] substringToIndex:]];
[headView addSubview:titleLabel];
return headView; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (tableView == contectTableV)
{ return [[sectionArray objectAtIndex:section] count];
}
else
{
[filteredArray removeAllObjects];
NSLog(@"personarray%@",personArray);
for(NSDictionary *perdict in personArray)
{ NSString * name = @"";
for (int i = ; i < [[perdict objectForKey:@"nickname"] length]; i++)
{
if([name length] < )
name = [NSString stringWithFormat:@"%c",pinyinFirstLetter([[perdict objectForKey:@"nickname"] characterAtIndex:i])];
else
name = [NSString stringWithFormat:@"%@%c",name,pinyinFirstLetter([[perdict objectForKey:@"nickname"] characterAtIndex:i])];
}
if ([self searchResult:name searchText:searchbar.text])
[filteredArray addObject:[perdict objectForKey:@"nickname"]];
else
{
if ([self searchResult:[perdict objectForKey:@"nickname"] searchText:searchbar.text])
{
[filteredArray addObject:[perdict objectForKey:@"nickname"]];
}
}
}
return filteredArray.count; } } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
MyCell *cell = (MyCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[MyCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
if (tableView == contectTableV)
{
if(personArray.count>)
{
if(indexPath.row<[[sectionArray objectAtIndex:indexPath.section] count])
{
cell.nameLabel.text = [[sectionArray objectAtIndex:indexPath.section] objectAtIndex:indexPath.row]; for (NSDictionary *onedict in personArray)
{
if([cell.nameLabel.text isEqualToString:[onedict objectForKey:@"nickname"]]) {
if ([[onedict objectForKey:@"sex"] isEqualToNumber:[NSNumber numberWithInt:]])
{
[cell.headView setImage:[UIImage imageNamed:@"bg_man_01@2x.png"]];
}
else
{
[cell.headView setImage:[UIImage imageNamed:@"bg_woman_01@2x.png"]];
}
if ([[onedict objectForKey:@"sign"] isKindOfClass:[NSNull class]])
{
cell.signLabel.text = @" ";
}
else
{
cell.signLabel.text = [onedict objectForKey:@"sign"]; }
}
}
}
}
}
else
{
if(indexPath.row<[filteredArray count])
{
cell.nameLabel.text = [filteredArray objectAtIndex:indexPath.row];
for (NSDictionary *onedict in personArray)
{
if([cell.nameLabel.text isEqualToString:[onedict objectForKey:@"nickname"]])
{
if ([[onedict objectForKey:@"sex"] isEqualToNumber:[NSNumber numberWithInt:]])
{ [cell.headView setImage:[UIImage imageNamed:@"bg_man_01@2x.png"]];
}
else
{
[cell.headView setImage:[UIImage imageNamed:@"bg_woman_01@2x.png"]];
} if ([[onedict objectForKey:@"sign"] isKindOfClass:[NSNull class]])
{
cell.signLabel.text = @" ";
}
else
{
cell.signLabel.text = [onedict objectForKey:@"sign"]; } } }
}
}
return cell;
} - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSString *userId = [[NSString alloc]init];
NSString *userName = [[NSString alloc]init];
NSLog(@"useridArr%@",userIdArray);
if (tableView == contectTableV)
{
userId = [[userIdArray objectAtIndex:[indexPath section]]objectAtIndex:[indexPath row]];
[jieheiArr addObject:userId];
[breakArr addObject:userId];
}
else
{
userName = [filteredArray objectAtIndex:[indexPath row]];
NSLog(@"username%@",userName);
for (int i = ; i < [personArray count]; i++) {
if ([[[personArray objectAtIndex:i]objectForKey:@"nickname"] isEqualToString:userName])
{
userId = [[personArray objectAtIndex:i]objectForKey:@"userid"];
NSLog(@"userId%@",userId);
[jieheiArr addObject:userId];
[breakArr addObject:userId];
} }
}
NSLog(@"jieheiarray%@ --breakarray%@",jieheiArr,breakArr); } -(void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"indexPath section%d and row%d",indexPath.section,indexPath.row);
NSString *userId = [[NSString alloc]init];
userId = [[userIdArray objectAtIndex:[indexPath section]]objectAtIndex:[indexPath row]]; [jieheiArr removeObject:userId];
[breakArr removeObject:userId]; NSLog(@"jieheiarray%@ --breakarray%@",jieheiArr,breakArr);
} - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return ;
} - (void)searchBarTextDidBeginEditing:(UISearchBar *)asearchBar{
// searchbar.prompt = @"输入字母、汉字或电话号码搜索";
} - (void) searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
{
if(searchText.length == )
{
[searchBar resignFirstResponder];
[searchbar setText:@""];
searchTableV.hidden = YES;
}
else
{
searchTableV.hidden = NO;
[searchTableV reloadData];
} }
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar
{
[searchBar resignFirstResponder];
[searchTableV reloadData];
searchTableV.hidden = NO;
} - (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar
{
[searchbar setText:@""];
searchbar.prompt = nil;
[searchbar setFrame:CGRectMake(0.0f, 0.0f, 320.0f, 44.0f)];
contectTableV.tableHeaderView = searchbar;
} -(BOOL)searchResult:(NSString *)contactName searchText:(NSString *)searchT
{
NSComparisonResult result = [contactName compare:searchT options:NSCaseInsensitiveSearch range:NSMakeRange(, searchT.length)];
if (result == NSOrderedSame)
return YES;
else
return NO;
} - (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
} @end

代码下载

【IOS开发】搜索和排序(好友列表,通讯录的实现,searchbar)的更多相关文章

  1. IOS开发中使用CNContact\CNMutableContact 对通讯录增删改查

    IOS开发中使用CNContact\CNMutableContact 对通讯录增删改查 首先当然是把CNcontact包含在工程中: @import Contacts; 1.下面是增加联系人的程序段: ...

  2. XMPP通讯开发-仿QQ显示好友列表和用户组

    在 XMPP通讯开发-服务器好友获取以及监听状态变化   中我们获取服务器上的用户好友信息,然后结合XMPP通讯开发-好友获取界面设计    我们将两个合并起来,首先获取用户组,然后把用户组用List ...

  3. iOS开发UI篇—实现一个私人通讯录小应用【转】

    转一篇学习segue不错的教程 一.该部分主要完成内容 1.界面搭建                        2.功能说明 (1).只有当账号和密码输入框都有值的时候,登录按钮才能交互 (2). ...

  4. iOS开发基础之排序

    Objective-C 有排序的API,省了我们很多事. 主要有以下3种方法. NSComparator NSArray *unsortedArray = @[@5,@3,@8,@1,@7]; NSA ...

  5. iOS UITableView制作类似QQ好友列表视图

                #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDele ...

  6. iOS实现类似QQ的好友列表,自由展开折叠(在原来TableView的基础上添加一个字典,一个Button)

    //直接代码 只包含 折叠展开字典的处理搭建#import "CFViewController.h" @interface CFViewController ()<UITab ...

  7. 文顶顶iOS开发博客链接整理及部分项目源代码下载

    文顶顶iOS开发博客链接整理及部分项目源代码下载   网上的iOS开发的教程很多,但是像cnblogs博主文顶顶的博客这样内容图文并茂,代码齐全,示例经典,原理也有阐述,覆盖面宽广,自成系统的系列教程 ...

  8. iOS开发之表视图爱上CoreData

    在接触到CoreData时,感觉就是苹果封装的一个ORM.CoreData负责在Model的实体和sqllite建立关联,数据模型的实体类就相当于Java中的JavaBean, 而CoreData的功 ...

  9. 【转】 学习ios(必看经典)牛人40天精通iOS开发的学习方法【2015.12.2

    原文网址:http://bbs.51cto.com/thread-1099956-1.html 亲爱的学员们: 如今,各路开发者为淘一桶金也纷纷转入iOS开发的行列.你心动了吗?想要行动吗?知道如何做 ...

  10. 10个优秀的Objective-C和iOS开发在线视频教程

    如果你自己开发iOS应用,你肯定会发现网上有很多资源.学习编程的一个最好的方法就是自己写代码,而开始写代码的最快的方式就是看其他人怎么写.我们从海量视频和学习网站中整理出了我 如果你自己开发iOS应用 ...

随机推荐

  1. 包装类、Object类——Java笔记(八)

    包装类:     基本数据类型的包装类     基本数据类型 包装类 byte Byte short Short int Integer long Long char Character float ...

  2. Ubuntu Server 14.04 LTS(64bit)已安装 weblogic Server 12c(12.1.3) Zip Distribution

    这里说的对Ubuntu Server 14.04 LTS(64bit)已安装weblogic Server 12c(12.1.3) Zip Distribution遇到的问题.至于Windows什么好 ...

  3. js isArray小结

    原文:[转载]js isArray小结 在日常开发中,我们经常需要判断某个对象是否是数组类型的,在js中检测对象类型的常见的方法有几种: 1.typeof操作符.对于Function.String.N ...

  4. Visio Premium 2010钥匙+激活破解方法

    Visio Premium 2010钥匙+激活破解方法: 安装时能够使用的关键: GR24B-GC2XY-KRXRG-2TRJJ-4X7DC VWQ6G-37WBG-J7DJP-CY66Y-V278X ...

  5. 【高德地图API】从零开始学高德JS API(五)路线规划——驾车|公交|步行

    原文:[高德地图API]从零开始学高德JS API(五)路线规划——驾车|公交|步行 先来看两个问题:路线规划与导航有什么区别?步行导航与驾车导航有什么区别? 回答: 1.路线规划,指的是为用户提供3 ...

  6. [LeetCode]N-Queens 八皇后问题扩展(经典深层搜索)

    The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens ...

  7. XSS Overview

    什么是XSS? 跨站脚本攻击(Cross Site Scripting):攻击者往Web页面里插入恶意脚本,当用户浏览该页面时,嵌入页面的脚本代码会被执行,从而达到恶意攻击用户的特殊目的.恶意的内容通 ...

  8. MapReduce 编程模型

    一.简单介绍 1.MapReduce 应用广泛的原因之中的一个在于它的易用性.它提供了一个因高度抽象化而变得异常简单的编程模型. 2.从MapReduce 自身的命名特点能够看出,MapReduce ...

  9. php中echo(),print(),print_r()用法

    原文 php中echo(),print(),print_r()用法 从我对echo(),print(),print_r()这个函数的理解是echo可输入字符串变量常量,print与echo差不多,但p ...

  10. hdu oj1102 Constructing Roads(最小生成树)

    Constructing Roads Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Other ...