【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应用 ...
随机推荐
- crawler_微信采集方案
仅供参考
- cmd介面,进adb命令提示符error
有几个操作的电话系统测试,需要输入adb命令时出现了头疼的事,当输入命令,一个直接报执行:error 推荐处理的方法: 1.当然就是关机重新启动.之前我是这样,挺麻烦.必进在win7上输入命令费时间. ...
- 【百度地图API】如何在地图上添加标注?——另有:坐标拾取工具+打车费用接口介绍
原文:[百度地图API]如何在地图上添加标注?--另有:坐标拾取工具+打车费用接口介绍 摘要: 在这篇文章中,你将学会,如何利用百度地图API进行标注.如何使用API新增的打车费用接口. ------ ...
- update与fixedupdate差别
猴子原创,欢迎转载.转载请注明: 转载自Cocos2D开发网--Cocos2Dev.com,谢谢! 原文地址: http://www.cocos2dev.com/?p=307 今天有人问我问什么我在处 ...
- Android checkCallingPermission()方法返回值问题
Android开发检查权限时,发现调用checkCallingPermission()总是返回值-1,而Binder.getCallingPid() == Process.myPid()又总是返回tr ...
- Socket 学习(三)
前2节,说的是 Server 与 Client 的数据交互.服务端IP.端口固定,客户端 网服务端发送消息的时候,他的Socket对面被服务端获取到了,而且链接没有中断,他当然可以很容易回复信息. 现 ...
- 去掉UITableView HeaderView或FooterView随tableView 移动的黏性
去掉UITableView HeaderView或FooterView随tableView 移动的黏性(sticky) 控制器中实现以下方法即可: - (void)scrollViewDidScrol ...
- 各种oracle参数查询语句
各种oracle参数查询语句 1.show parameter:--显示各个系统参数配置 2.select * from v$parameter;--显示各个系统参数配置 2.show paramet ...
- CRUD功能的JqGrid表格
CRUD功能的JqGrid表格 之前的项目也曾用过JgGrid对它的基本功能也是略有了解,网上有个国外的开源的项目,但是不适合个人的风格,所以花了3天空余的时间封装了下JqGrid,也算是参加开发工作 ...
- 在ASP.NET应用中执行后台任务
在ASP.NET应用中执行后台任务 昨天下午,在微软的MVP 2015社区大讲堂上给大家分享了一个题目:在ASP.NET应用中执行后台任务.这是一点都不高大上,并且还有点土气的技术分享.不过我相信很多 ...