自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(83)
  • 资源 (5)
  • 收藏
  • 关注

原创 资料分享:UIDocumentPickerViewController 分享超过30M的视频文件,应用闪退

// fileData 不断输出,卡住主线程,从而导致崩溃EBLog(@"---fileName:%@ fileData:%@",fileName,fileData);// 输出语句踩雷// fileData 过大,不断输出十六进制字符串,导致主线程卡住[fileCoordinator coordinateReadingItemAtURL:targetUrl options:0 error:&error byAccessor:^(NSURL *newURL) { EBLog(@.

2022-02-22 20:54:55 399

转载 vim更改缩进空格数和TAB键缩进数

打开/etc/virc附加如下内容:set tabstop=4 set shiftwidth=4 "设定 Tab 键缩进的空格数set tabstop=4 "设定编辑器将多少空格视为一个缩进set shiftwidth=4

2015-11-25 12:15:56 1104

原创 iOS 证书

其中Bundle Identifier为苹果的AppID,必须与应用发布是配置的Profile关联的AppID一致;Version为应用版本号,在App Store中显示的版本号,推荐与manifest.json中version下的name值一致;Build为编译版本号,App Store判断升级使用,推荐与manifest.json中version下的code值一致。

2015-08-25 15:07:57 513

原创 uitextfiled 输入 过滤

// 空格过滤-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{ NSString *str = textField.text; NSCharacterS

2015-08-20 17:51:36 448

原创 UITableView 删除cell 的问题

// 错误写法-(void)deleteTabelCellAction:(NSIndexPath *)indexPath{ [_tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; [_questionArray removeObjectAtIn

2015-08-19 14:42:10 476

原创 IOS 中设置UITextView 显示文本的光标

textView.selectedRange=NSMakeRange(0,0) ;   //起始位置textView.contentInset = UIEdgeInsetsMake(-24, -6, 0, 0); // 内容的位置                            第一个textfield return 之后,第二个textview 获取

2015-08-19 10:15:16 2824

原创 While reading XXX pngcrush caught libpng error: N

While reading /XXX/XXX/XXX/img1.png pngcrush caught libpng error: Not a PNG filCould not find file: /Users/XXX/Library/Developer/Xcode/DerivedData/CookBookDemo-cnttcobrbmvbddeiesgsxnfwihfe/Build/Produ

2015-08-18 16:22:59 563

原创 tableview 索引条问题

- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index// 有问题的写法#pragma mark -- 创建 section-(NSArray *)sectionIndexTitle

2015-08-13 17:31:28 1211

原创 git 基本使用

初始化一个Git仓库,使用git init命令。添加文件到Git仓库,分两步:第一步,使用命令git add ,注意,可反复多次使用,添加多个文件;第二步,使用命令git commit,完成。

2015-08-11 16:49:10 339

转载 malformed or corrupted AST file: 'Unable to load module "/Users/yx/Library/Developer/Xcode/DerivedDa

使用不同版本的XCode出现的问题:atal error: malformed or corrupted AST file: 'Unable to load module "/Users/yx/Library/Developer/Xcode/DerivedData/ModuleCache/1KA884DWE9ZMV/UIKit-2P3JYM7GVC64.pcm": module fil

2015-08-11 14:50:41 532

原创 nsdictionary ,nsarray 和 json 字符串 的转换

一,提交数据: foudation 类型转 json 字符串                                         1.字符拼接方法NSMutableString *listStr = [[NSMutableString alloc] initWithString:@"["]; for (NSString *t

2015-08-06 17:37:02 460

转载 Xcode 中放置图片的位置,Images.xcassets 和直接放在源文件目录中的区别

1.Images.xcassets中的素材(1)只支持png格式的图片(2) 图片只支持[UIImage imageNamed]的方式实例化,但是不能从Bundle中加载。[使用[NSBundle MainBundle] pathForResources 拿不到 images.xcassets里面图片的路径](3)  在编译时,Images.xcassets中的所有

2015-08-04 10:13:38 9739

原创 UIActionSheet

- (void)willPresentActionSheet:(UIActionSheet *)actionSheet{ NSArray *subViews = actionSheet.subviews; for (UIView *subViwe in actionSheet.subviews) { if ([subViwe

2015-07-29 16:02:53 409

转载 xxx is not in the sudoers file.This incident will be reported.的解决方法

xxx is not in the sudoers file.This incident will be reported.的解决方法1.切换到root用户下,怎么切换就不用说了吧,不会的自己百度去.2.添加sudo文件的写权限,命令是:chmod u+w /etc/sudoers3.编辑sudoers文件vi /etc/sudoers找到这行 root ALL

2015-07-16 14:31:10 1851

原创 uitoolbar item 自动调整布局

//创建barbuttonitem,样式是flexible,这个种barbuttonitem用于两个barbuttonitem之间 //调整两个item之间的距离.flexible表示距离是动态的,fixed表示是固定的 UIBarButtonItem *flexible = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:

2015-07-09 17:29:44 1691

转载 数据库操作添加数据 出错 unrecognized token:

在sqlite3插入数据表时,出现的错误: DB Error: 1 "unrecognized token: "522ee9ace4b0600fb8ffde24"" 解决方法:插入的字符串需加引号'NSString *sql_insert1 = [NSStringstringWithFormat:@"INSERT INTO %@ (%@,%@,%@,%@) VALUES

2015-04-22 17:27:57 10782

转载 h' file not found”, ShareSDK的路径,

换了电脑  访问/Users/zksd/Desktop/....../ShareSDK  ;路径错了ShareSDK的路径, targets的building里面有个search paths,在那里设置sharesdk的路径 Lexical or Preprocessor Issue '***.h' file not found 这样的错

2015-04-15 11:14:55 7402 1

转载 sharesdk WeiboSDK registerApp:kAppKey 崩溃

使用xcode6.1创建的项目, 添加新浪SDK,运行[WeiboSDK registerApp:kAppKey];这一步崩溃,抛出以下*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM weibosdk_WBSDKJSONString]:

2015-04-15 10:36:41 3658

原创 UIWebView 播放gif 动画

CGSize enterGifSize = [UIImage imageNamed:@"extra_service_entering.gif"].size; CGRect frame = CGRectMake((IPHONE_WIDTH - enterGifSize.width)/2, CGRectGetMaxY(logoIV.frame) + 30, enterGifSize.

2015-04-08 17:23:59 686

原创 UITableViewCell 间距问题

-(void)setFrame:(CGRect)frame{ if ([self.reuseIdentifier isEqualToString:@"PersonalPageVC_CellID1"]) { frame.origin.y += kTopInsect; frame.size.height -= 2*kTopInsect;

2015-03-27 14:30:03 512

原创 数组内容排序

// 按数组内容从小到大排序infoModel.fundPriceArray = [array sortedArrayWithOptions:NSSortStable usingComparator:^NSComparisonResult(id obj1, id obj2) { if ([obj1 f

2015-03-17 09:30:54 497

转载 UITextView placeholder 设置

UITextView上如何加上类似于UITextField的placeholder呢,其实在UITextView上加上一个UILabel或者UITextView,如果用UILable的话,会出现一个问题就是当placeholder的文字过长导致换行的时候就会出现问题,而用UITextView则可以有效避免此问题。- (BOOL)textView:(UITextView *)textView s

2015-03-09 16:15:32 666

原创 登录界面多个账户信息存储问题

方法一:使用归档:其实质就是读写文件操作,(归档,解档:archive,unarchive)// 归档+ (NSData *)archivedDataWithRootObject:(id)rootObject;+ (BOOL)archiveRootObject:(id)rootObject toFile:(NSString *)path;// 解档+ (id)unarchiveObj

2015-02-26 17:17:10 1498

原创 cell 控制子控件的显示和隐藏

-(void)showRightDot:(BOOL)isShow{ UIImageView *dotView = [self.contentView viewWithTag:701]; if (isShow) { if (!dotView) { dotView = [[UIImageView alloc] ini

2015-02-10 15:30:44 1638

原创

昨晚,梦到在熟悉的 806 教室考试数学,第一次考砸了,第二次同样的题目,还是考砸了。罗爹:太浮躁,这么浮躁怎么行。 语气中没有责骂,更多是担心,与叹息,我应该懂的,也知道自己要怎么做。不忘初心,方得始终。

2015-02-10 09:14:37 382

转载 block 循环引用的问题

ARC的本质ARC是编译器(时)特性,而不是运行时特性,更不是垃圾回收器(GC)。不同于XCode4可以在创建工程时选择关闭ARC,XCode5在创建的工程是默认开启ARC,没有可以关闭ARC的选项。如果需要对特定文件开启或关闭ARC,可以在工程选项中选择Targets -> Compile Phases -> Compile Sources,在里面找到对应文件

2015-02-09 16:55:10 965

原创 获取 UITableView 单个cell 的坐标点位置

聊天界面中,长按某个对话,弹出窗口,可以进行选中,复制。 该弹出窗口的坐标确定 用以下方法- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ CGRect popoverRect = [tableView convertRect:[tableVie

2015-02-09 14:30:56 1812

原创 手机清除缓存

- (void)clearCachesAction{ //删除本地缓存 NSLog(@"删除本地缓存...."); [self.hudManager With_label:@"正在删除" duration:30]; // 获取Caches目录路径 NSArray *paths = NSSearchPathForDirectoriesInDomain

2015-02-09 09:42:41 530

原创 UITextField 限制输入数字及小数点

#define kNumbersPeriod @"0123456789."-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{ NSCharacterSet

2015-02-07 12:22:04 474

转载 ios7的UITableView实现ios6的圆角效果

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{ if ([cell respondsToSelector:@selector(tintColor)]) { if (tableVie

2015-02-07 12:01:49 1106

原创 UINavigationContoller 多级页面 越级跳转 内存释放问题

在 arc  模式下 从第一个页面逐步 push 至第四个页面,再从第四个页面 ,直接 pop 到第一个页面,则第二,第三个页面自动被释放,不需要手动释放。pop 到第第一个页面时,第四个, 第三个,第二个 界面均已出栈   在手动管理下,必须找到第二,第三个页面,并且将其置空,否则 ,内存泄漏

2015-02-06 15:39:58 915

原创 UITableView 选中单元格 全都可以选

//// AddVisitTimeVC.m// com.yx129.yxClientDoctor3//// Created by yx on 15/1/30.// Copyright (c) 2015年 Guangzhou Yixiang Internet Technology Development Limited. All rights reserved.//#defi

2015-02-03 16:23:34 483

原创 cell 复用问题 cell中控件单选,多选,带标签图的不可选中

//// AddVisitTimeVC.h// com.yx129.yxClientDoctor3//// Created by yx on 15/1/30.// Copyright (c) 2015年 Guangzhou Yixiang Internet Technology Development Limited. All rights reserved.//#impo

2015-02-02 11:33:41 1140

原创 UITableView 上滑动 隐藏搜索框,下滑,显示搜索框

//// AuthSelectDoctorVC.m// com.yx129.yxClientDoctor3//// Created by yx on 15/1/4.// Copyright (c) 2015年 Guangzhou Yixiang Internet Technology Development Limited. All rights reserved.//#d

2015-01-29 17:52:05 4926

原创 UITabbar

@interface MainVC : UITabBarController@end- (void)viewDidLoad{ [super viewDidLoad]; if (SystemVersion > 6.0) [UITextField appearance].tintColor = [UIColor grayColor];

2015-01-23 11:29:14 431

原创 UISearchBar 的使用

//// AddDiseaseSubjectViewController.m// com.yx129.yxClientDoctor3//// Created by yx on 14/12/4.// Copyright (c) 2014年 Guangzhou Yixiang Internet Technology Development Limited. All rights re

2015-01-09 10:20:36 571

原创 用 UITextField 自定义UISearchBar 监听输入字符串改变的问题

用 UITextField 自定义的 UISearchBar  没有如下的 UISearchBar 中的协议方法- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText UITextField 中只有协议方法:-(BOOL)textField:(UITextField

2015-01-09 10:00:21 2900

原创 SearchBar 的触发事件

//-(BOOL)searchBar:(UISearchBar *)searchBar shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text//{//// if (![_keyword isEqualToString:_MySearchBar.text]) {// //

2015-01-07 18:11:16 822

转载 UITextfield placeholder

textField.placeholder = @"username is in here!"; [textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"]; [textField setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:

2014-12-09 19:46:55 450

原创 uitextField 收键盘操作

#pragma mark - 收键盘-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ [self.view endEditing:YES]; // 当多个textfield 时,不可用 这种方法// [_acountTF resignFirstResponder];//

2014-12-09 16:58:14 509

仿米折网界面

实现上拉,下拉加载刷新购物界面,但只实现了其中的一个界面,很简单,而且运行起来占内存大,有待改善

2014-11-23

仿 iphone 界面删除应用图标抖动

有全部关键注释代码,分别采用 NSTimer 以及 perform 来实现 实现,长按图标,所有图标抖动,点击图标左上方删除键,删除点击的图标, 仍可继续删除,单击 view 停止抖动

2014-10-19

韵达物流管理系统

mysql jsp ,实现了,业主注册,业主登录,系统管理员后台登录等功能。 有通知公告栏,物流信息栏,物流收费信息栏,客户信息栏等内容 资料完整,带有数据库文件,运行就有了

2013-12-17

瑟夫死亡游戏代码

n个人围成一个圈 每隔3个人杀一个人 问最后剩下的人的编号 工具用ArrayList 每一次遍历整个队列 计算出总共被杀的人的所有位置 将计算出的位置的所有值设为0;然后将值为零的一次性删除 arrayList remove 0 ;直到队列的长度为1">n个人围成一个圈 每隔3个人杀一个人 问最后剩下的人的编号 工具用ArrayList 每一次遍历整个队列 计算出总共被杀的人的所有位置 将计算出的位置的所有值设为0;然后将值为零的一次性删除 arrayList remove 0 ;直到队列的 [更多]

2013-11-16

仿XP画图板.rar

功能有: 1、工具栏中功能:截图并保存,橡皮擦,取色笔,铅笔,刷子,喷枪,文本框,直线,矩形,椭圆,圆角矩形等功能 2、颜色选择功能(2处):底部颜色选择(第一个大的方形显示画笔当前的颜色)、菜单栏中“颜色”选择器 3、鼠标形状的切换:如:选择喷枪工具后,进入绘图区,鼠标变为喷枪形状 4、清空画图面板的功能 5、打开图片,保存修改后的图片的功能

2013-08-25

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除