【IOS开发】搜索和排序(好友列表,通讯录的实现,searchbar)
一、效果图:




二、概述
实现一个好友列表,可以分为男女两个选项,并且实现搜索和排序功能。我的数据是放在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)的更多相关文章
- IOS开发中使用CNContact\CNMutableContact 对通讯录增删改查
IOS开发中使用CNContact\CNMutableContact 对通讯录增删改查 首先当然是把CNcontact包含在工程中: @import Contacts; 1.下面是增加联系人的程序段: ...
- XMPP通讯开发-仿QQ显示好友列表和用户组
在 XMPP通讯开发-服务器好友获取以及监听状态变化 中我们获取服务器上的用户好友信息,然后结合XMPP通讯开发-好友获取界面设计 我们将两个合并起来,首先获取用户组,然后把用户组用List ...
- iOS开发UI篇—实现一个私人通讯录小应用【转】
转一篇学习segue不错的教程 一.该部分主要完成内容 1.界面搭建 2.功能说明 (1).只有当账号和密码输入框都有值的时候,登录按钮才能交互 (2). ...
- iOS开发基础之排序
Objective-C 有排序的API,省了我们很多事. 主要有以下3种方法. NSComparator NSArray *unsortedArray = @[@5,@3,@8,@1,@7]; NSA ...
- iOS UITableView制作类似QQ好友列表视图
#import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDele ...
- iOS实现类似QQ的好友列表,自由展开折叠(在原来TableView的基础上添加一个字典,一个Button)
//直接代码 只包含 折叠展开字典的处理搭建#import "CFViewController.h" @interface CFViewController ()<UITab ...
- 文顶顶iOS开发博客链接整理及部分项目源代码下载
文顶顶iOS开发博客链接整理及部分项目源代码下载 网上的iOS开发的教程很多,但是像cnblogs博主文顶顶的博客这样内容图文并茂,代码齐全,示例经典,原理也有阐述,覆盖面宽广,自成系统的系列教程 ...
- iOS开发之表视图爱上CoreData
在接触到CoreData时,感觉就是苹果封装的一个ORM.CoreData负责在Model的实体和sqllite建立关联,数据模型的实体类就相当于Java中的JavaBean, 而CoreData的功 ...
- 【转】 学习ios(必看经典)牛人40天精通iOS开发的学习方法【2015.12.2
原文网址:http://bbs.51cto.com/thread-1099956-1.html 亲爱的学员们: 如今,各路开发者为淘一桶金也纷纷转入iOS开发的行列.你心动了吗?想要行动吗?知道如何做 ...
- 10个优秀的Objective-C和iOS开发在线视频教程
如果你自己开发iOS应用,你肯定会发现网上有很多资源.学习编程的一个最好的方法就是自己写代码,而开始写代码的最快的方式就是看其他人怎么写.我们从海量视频和学习网站中整理出了我 如果你自己开发iOS应用 ...
随机推荐
- 控制执行流程——(Java学习笔记三)
if-else 控制程序流程最基本的形式 格式: if(boolean - expresion){ statement } 或 if(boolean - expresion){ stateme ...
- MyEclipse下一个XFire发展Webservice示例
最近的研究JAVA发展Webservice.网络发现几个热门选择AXIS.XFire.CFX(XFire下一代),打开前几天对这篇文章比较三种选择,他们已经有了一些概念. 样本,以确定自己的实践 在開 ...
- Java数据结构与算法(5) - ch05链表(LinkList)
双端链表与传统链表非常相似,但是它有一个新增的特性:即对最后一个链节点的引用,就像对第一个连接点的引用一样.注意与双向链表进行区别.
- FPGA笔记-阅读.dat文件
阅读.dat图像文件 .dat文件是matlab生成的图像文件 initial begin // Initialize Inputs CLK = 0; RST = 1; IMAGE_DATA = 0; ...
- MVC自定义过滤器,自定义Area过滤器,自定义Controller,Action甚至是ViewData过滤器
实现MVC自定义过滤器,自定义Area过滤器,自定义Controller,Action甚至是ViewData过滤器 MVC开发中几种以AOP方式实现的Filters是非常好用的,默认情况下,我们通过A ...
- sql语句查询列的说明
SELECT C.name,value FROM sys.columns C INNER JOIN sys.tables T ON C.object_id = T.object_idINNER JOI ...
- GhostDoc的使用
原文:GhostDoc的使用 一.简介 GhostDoc是Visual Studio的一个免费插件,可以为开发人员自动生成XML格式的注释文档. 二.下载 需要的朋友可以去这里下载,填个Email地址 ...
- SICP 锻炼 (1.45)解决摘要
SICP 1.45是对前面非常多关于不动点的习题的总结. 题目回想了我们之前在1.3.3节使用的不动点寻找方法.当寻找y -> x/y 的不动点的时候,这个变换本身不收敛.须要做一次平均阻尼才干 ...
- 去除a标签链接触摸时产生边框
排除误解 网络资料说这个属性只用于iOS(iPhone和iPad),其实是错误的,android手机大部分也是支持的,只是显示效果不一样,移动开发并不成熟,更多的还需要大家去实践来辨别真伪- - -w ...
- Appium Server源码分析之作为Bootstrap客户端
Appium Server拥有两个主要的功能: 它是个http服务器,它专门接收从客户端通过基于http的REST协议发送过来的命令 他是bootstrap客户端:它接收到客户端的命令后,需要想办法把 ...