一、效果图:

二、概述

实现一个好友列表,可以分为男女两个选项,并且实现搜索和排序功能。我的数据是放在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. JavaScript之数组去重

    前言:昨天看到了别人发的帖子,谈到了面试题中经常出现的数组去重的问题.作为一个热爱学习.喜欢听老师话的好孩纸,耳边忽然想起来高中老师的谆谆教导:不要拿到题就先看答案,要先自己思考解答,然后再对照答案检 ...

  2. js中frame的操作问题

    这里以图为例,在这里把frame之间的互相操作简单列为:1变量2方法3页面之间元素的互相获取. A  首先从 父(frameABC)------->子(frameA,frameB,frameC) ...

  3. DHot.exe 热点新闻

    别人的电脑上的今日插件U菜,打开几个PPT文件,和一个视频文件(默认的音频和视频打开百度),结果突然弹出一个热点广告信息表,形式与风格QQ非常相似,例如下面的附图: 托盘图标: 经过搜索.得到例如以下 ...

  4. Struts1——离BeanUtils看struts其原理1

    在Struts中非常典型的特点就是使用了ActionForm来搜集表单数据,可是搜集到的表单数据所有都是String类型的.假设我们直接拿来使用我们会面临一个非常麻烦的问题就是频繁的类型装换. Str ...

  5. EasyX

    官方网站:http://www.easyx.cn/   安装图解:http://www.easyx.cn/news/View.aspx?id=5   系统支持[1]  编译环境版本:Visual C+ ...

  6. 【iOS发展-70】点菜系统案例:使用文本框inputView和inputAccessoryView串联UIPickerView、UIDatePicker和UIToolBar

    (1)效果 (2)先在storyboard中设计界面,然后源码(直接在ViewController中码) #import "ViewController.h" @interface ...

  7. 【转】细说 Form (表单)

    阅读目录 开始 简单的表单,简单的处理方式 表单提交,成功控件 多提交按钮的表单 上传文件的表单 MVC Controller中多个自定义类型的传入参数 F5刷新问题并不是WebForms的错 以Aj ...

  8. autorun.vbs病毒的清除办法

    症状:计算机里面出现一堆autorun为文件名称的文件,删除后出现找不到autorun.vbs的提示.我就打开当中的一个文件:Autorun.bat,内容例如以下: @echo off  //不显示系 ...

  9. 分布式服务弹性框架“Hystrix”实践与源码研究(一)

    文章初衷 为了应对将来在线(特别是无线端)业务量的成倍增长,后端服务的分布式化程度需要不断提高,对于服务的延迟和容错管理将面临更大挑战,公司框架和开源团队选择内部推广Netflix的Hystrix,一 ...

  10. Access denied for user: &#39;root@localhost&#39; (Using password: YES)

    centos 设备mysql成功后 首次使用root登录发生:Access denied for user: 'root@localhost' (Using password: YES) 因为mysq ...