- 博客(43)
- 资源 (7)
- 收藏
- 关注
转载 iOS--蓝牙 ble4.0 CoreBluetooth
CoreBluetooth的API是基于BLE4.0的标准的。这个框架涵盖了BLE标准的所有细节。仅仅只有新的iOS设备和Mac是和BLE标准兼容的:iPhone4S,iPhone5,MacMini,New iPad,MacBook Air,MacBook Pro。还有iPhone iOS6的模拟器也支持。这是非常有用的,在你没有一个真正的iOS设备而用模拟器去调试你的程序。相关的类
2014-08-21 10:29:31
9962
2
转载 MAC 配置环境变量
1 首先查看PATH 命令:$PATH 2 如何设置PATH 命令:echo "export PATH=xxxxxx:$PATH" >> ~/.bash_profile 解释:把"export PATH=xxxxxx:$PATH"输出打印到~/.bash_profile中去。3 Unix知识补充:~/.bash_profile介绍 mac和linux终端一般用
2014-06-17 20:46:21
958
原创 MAC常用命令
显示Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles -bool true隐藏Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles -bool false或者显示Mac隐藏文件的命令:defaults write com.apple.finder AppleS
2013-05-28 13:52:19
885
转载 IOS-基于xcode4的iOS framework 制作教程
首先按步骤进行:1.新建一个Cocoa Touch Static Library(这个就不截图了,相信大家都会)2.然后删除target 如图:3.在xcode菜单选择file–new–new–target,然后按图示选择说明:IOS工程的选项里面没有Bundel,所以选择Mac里面的4.删除Build Phases里面的link库如图(删除Cocoa framew
2013-05-26 15:30:50
1169
转载 Mac系统下配置Android开发环境变量及工具安装图
http://download.youkuaiyun.com/detail/shijiucdy/5264717
2013-04-16 16:55:06
1202
转载 电话中,经常听到的英语服务语
1、空号:中文:您好!您所拨打的号码是空号,请核对后再拨。英文:Sorry! The number you dialed does notexist, please check it and dial later.2、被叫用户关机:中文:您好!您所拨打的电话已关机。英文:Sorry! The subscriber you dialed is power of
2013-04-11 13:50:49
1085
原创 ios-非ARC项目转换成ARC
步骤:Edit-->Refactor-->Convert to Objective-C ARC...-->Check-->Next-->Save-->(若有提示Continue)
2013-04-09 09:50:16
3855
原创 ARC与非ARC在一个项目中同时使用
ARC与非ARC在一个项目中同时使用,Targets-->Target--> Build Phases--->Complie Sources中选择需要ARC的文件双击,并在输入框中输入:-fobjc-arc,如果不要ARC则输入:-fno-objc-arc
2013-04-09 09:44:28
1343
转载 IOS-UIWebView字体控制
//字体大小 [webView stringByEvaluatingJavaScriptFromString:@"document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust= '200%'"]; //字体颜色 [webView stringByEvaluatingJavaScriptFromS
2013-04-03 16:04:40
3042
原创 IOS------Warning
处理警告:1,Validate Project Settings(update to recommended settings)A:2,'xxxxxxx' is deprecated:first deprecated in ios 5.0 A:ios系统版本不支持xxxxxxx方法3,Incomplete implemention A:.m文件
2013-04-03 14:33:39
7313
转载 property's synthesized getter follows Cocoa naming convention for returning 'owned' objects
违犯了ARC命名规则,成员变量不要以new,copy作为前缀。关于ARC规则,请参考http://mobile.51cto.com/iphone-313122.htm基本的ARC使用规则: 1。代码中不能使用retain, release, retain, autorelease 2。不重载dealloc(如果是释放对象内存以外的处理,是可以重载该函数的,但是不能调用[
2013-04-01 17:18:24
1360
转载 IOS-处理异常崩溃(摘自iPhone Tutorials)
基本上有两种类型的崩溃可能发生:SIGABRT(也称为EXC_CRASH)和EXC_BAD_ACCESS1 异常断点第一步第二步第三步2Zombies第一步第二步附:运行并静态分析内存
2013-04-01 16:37:16
2260
原创 IOS-线程异步操作GCD
NSAutoreleasePool * pool = [[NSAutoreleasePoolalloc] init]; const char* queueName = [[[NSDatedate] description] UTF8String]; dispatch_queue_t myQueue = dispatch_queue_create(
2013-04-01 15:41:51
6769
原创 NSDate 一些常用方法(待补充)
/** **判断 日期是否是本周 **/-(BOOL)isCurrentWeek:(NSString *)dateStr{ NSDateFormatter *dateFormatter=[[NSDateFormatteralloc]init]; [dateFormatter setDateFormat:@"yyyy-MM-dd"]; NSDate *d
2013-04-01 15:08:03
2185
转载 ios-iPhone Objective-C EXC_BAD_ACCESS问题
iPhone Objective-C EXC_BAD_ACCESS问题 写程序遇到 Bug 并不可怕,大部分的问题,通过简单的 Log 或者 代码分析并不难找到原因所在。但是在 Objective-C 编程中遇到 EXC_BAD_ACCESS 问题的时候,通过简单常规的手段很难发现问题。 写程序遇到 Bug 并不可怕,大部分的问题,通过简单的 Log 或者 代码分析并不难找到原因
2012-11-15 14:56:01
1216
转载 iOS-如何让xcode自动检查内存泄露
在project-setting中找到 “Run Static Analyzer” 键,然后把值修改为“YES”.这样在编码的时候,xcode就可以自动为我们检查内存泄露了.
2012-11-15 10:59:28
6395
原创 ios-IBOutlet造成的内存泄漏
在iphone中,只要控件使用IBOutlet连接 ,则必须release它。无论它是否有@property(nonatomic,assign),@property(nonatomic,retain)属性。原因如下:On Mac OS X, IBOutlets are connected like this:Look for a method called
2012-11-15 10:52:22
1442
转载 ios--苹果应用商店审核指南中文翻译
前言我们很高兴您付出宝贵的才华与时间来开发iOS应用程序。从职业与报酬的角度而言,这对于成千上万的开发员一直都是一项值得投入的事业。我们希望帮助您加入 这个成功的组织。这是我们首次发布《应用程序商店评估指导》(App Store Review Guidelines)。通过它,我们希望帮助您解决开发应用程序时遇到的问题,以便于您在提交应用程序时,可以加快审批流程的速度。我们将
2012-11-15 10:10:48
2101
原创 ios-调试程序打印详细信息 文件名 函数名 行号
#ifdef DEBUG# define DebugLog(fmt, ...) NSLog((@"\n[文件名:%s]\n""[函数名:%s]\n""[行号:%d] \n" fmt), __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__);#else# define DebugLog(...);#endif说明:放在项目名-pre
2012-11-01 16:09:07
4154
原创 iOS-上传应用程序到app store
1 登录网站,进入ios Dev Center--ios Provisioning Portal--点击provisioning--Distribution--New profile--填写profile Name(如:test_Distribution),选择App ID(真机测试时)--点击Submit--刷新页面--2 这时打开xcode -organizer-Development--
2012-06-06 15:15:29
12013
原创 iOS -真机测试详细步骤
1 进入网址developer.apple.com--ios Dev Center2 登录之后,点击右上角的ios Developer Program 下面的ios Provisioning Portal3 如果添加新设备,点击Devices--> Add Devices--> 填写Device Name ,Device ID(打开xco
2012-06-06 15:13:07
21020
原创 ios-拉伸图片变形解决办法:选取某一区域
UIImageView *fieldImage=[[UIImageViewalloc]initWithFrame:CGRectMake(37,48+35,240, 32)]; fieldImage.userInteractionEnabled=YES; fieldImage.contentStretch=CGRectMake(0,0.4, 1, 0
2012-06-06 15:06:02
4962
原创 ipad-group table的背景色设置成透明的
table.backgroundColor=[UIColorclearColor];//在iphone上只写这一句就可以但在ipad上要写下边这一句table.backgroundView=nil;
2012-05-26 13:12:17
2660
原创 iOS-字符串转化成NSDate类型 计算与当前时间的相差 月数 天数
NSString *dateStr=[dicobjectForKey:@"date"];// 2012-05-17 11:23:23 NSCalendar *gregorian = [[NSCalendaralloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSUInteger unitFlags
2012-05-18 11:52:51
9761
原创 iOS-获取的NSDate date时间与实际相差8个小时解决方案
NSDate *date = [NSDatedate]; NSTimeZone *zone = [NSTimeZonesystemTimeZone]; NSInteger interval = [zone secondsFromGMTForDate: date]; NSDate *localeDate = [date dateByAddingTim
2012-05-18 11:47:18
10727
原创 iOS-问题:warning: Unable to read symbols for /Users/ttyc/Library/Developer/Xcode/iOS DeviceSupport/5.
解决方案:拷贝/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/AccessibilityBundles 这个AccessibilityBundles文件夹 到Users/ttyc/Library/Developer/Xcode/iOS DeviceSupport/5.
2012-05-18 10:38:27
3794
原创 iphone-隐藏tabbar会出现空白,不能被其他view使用问题
- (void) hideTabBar:(BOOL) hidden{ [UIViewbeginAnimations:nilcontext:NULL]; [UIViewsetAnimationDuration:0]; for(UIView *view in self.tabBarController.view.subview
2012-04-12 10:37:13
2377
原创 iphone--字符串去除空格
NSCharacterSet *whitespace = [NSCharacterSetwhitespaceAndNewlineCharacterSet]; NSString * stringStr = [self.titleField.textstringByTrimmingCharactersInSet:whitespace];//stringStr为self.titleFiel
2012-04-07 15:54:45
4363
原创 iOS-自定义修改拍照界面retake和use按钮
-(UIView *)findView:(UIView *)aView withName:(NSString *)name{ Class cl = [aView class]; NSString *desc = [cl description]; if ([name isEqualToString:desc])
2012-04-05 11:49:20
7545
原创 ios-获取系统相簿里边的所有照片
#import-(void)getImgs{ dispatch_async(dispatch_get_main_queue(), ^{ NSAutoreleasePool *pool = [[NSAutoreleasePoolalloc]init]; ALAssetsLibraryA
2012-03-28 18:34:21
20344
1
原创 iOS-iphone自定义状态栏
-(void)setRefreshWindow{ CGRect frame = CGRectMake(0.0,0.0, 320.0,20.0); statusbarWindow = [[UIWindow alloc] initWithFrame:frame]; [statusbarWindowsetBackgroundColor:[UIColo
2012-03-28 10:37:19
1912
原创 iOS-调用系统的短信和发送邮件功能,实现短信分享邮件分享
导入MessageUI.framework.h文件中#import#import实现 MFMailComposeViewControllerDelegate, MFMessageComposeViewControllerDelegate.m 文件//邮件-(void)showMailPicker { Class mailClass
2012-03-17 17:35:47
20203
原创 ios-复制字符串到剪贴板
UIPasteboard *pasteboard = [UIPasteboardgeneralPasteboard]; pasteboard.string =self.label.text;
2012-03-17 15:27:50
49308
原创 iOS-响应上下左右滑动手势
-(void)viewDidLoad{UISwipeGestureRecognizer *recognizer; recognizer = [[UISwipeGestureRecognizeralloc]initWithTarget:selfaction:@selector(handleSwipeFrom:)]; [recognizer setDirection:
2012-03-17 14:42:29
44878
1
原创 iOS-UILabel的宽度自适应文字
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0,0,0,0)];//这个frame是初设的,没关系,后面还会重新设置其size。[label setNumberOfLines:0];NSString *s = @"abcdefghijklmn";UIFont *font = [UIFont fontWithNam
2012-03-17 14:35:57
37040
原创 iOS-UIActionSheet的简单使用和调用系统相簿
实现UIActionSheetDelegateUIActionSheet *menu = [[UIActionSheetalloc] initWithTitle: @"" delegate:self can
2012-03-17 14:33:56
3181
转载 iOS-UITableView 实现分页显示的代码
iPhone之UITableView实现分页显示的代码 UITableview 能够列表显示许多内容,也是我们开发中经常用的一个组件。我们经常会分页显示列表,如先显示 10条记录,点击更多在添加 10 条,以此类推,下面是实现类似更多显示的一个 demo。 实现的效果如下: 点击 “More…”,实现后面的效果.
2012-03-17 14:32:38
8822
原创 iOS-UITextField和UITextView隐藏键盘
self._textField.returnKeyType=UIReturnKeyDone;self._textField.delegate=self;- (BOOL)textFieldShouldReturn:(UITextField *)textField{ [textField resignFirstResponder]; return YES;}
2012-03-17 14:31:15
12026
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人