Mac iPhone
文章平均质量分 79
bingwa
这个作者很懒,什么都没留下…
展开
-
ShareKit编译错误的处理
sharekit的下载地址:http://getsharekit.com/install/直接下载用的时候,会出现 not such file" style="">#import not such file解决方法:修改#import 成 #import原创 2012-04-19 14:40:46 · 1091 阅读 · 2 评论 -
让同一iphone项目能编译两个版本--正式版、lite版
让同一iphone项目能编译两个版本--正式版、lite版博客原文地址:在同一iphone项目添加lite版在同一iphone项目添加lite版(二)作为基本的推广手段,缩减关键功能,增加ADMob或iAD的lite版应用是必要的。但为了lite单纯另开一个项目,不断在在lite和完整版项目中同步代码,肯定是不行的,最好的办法,就是在同一个xco转载 2011-12-14 23:38:59 · 864 阅读 · 0 评论 -
iOS Path
1 Documents 存放应用数据文件,iTunes可以备份。2Library 应用相关文件。可以使用NSUserDefaults类访问的应用设置文件。3 tmp:临时文件4iOS和UNIX类似,文件名称都是大小写敏感 //获取主目录 NSString *homePath = NSHomeDirectory(); NSString *tmpPath =NSTempora原创 2011-12-20 23:55:19 · 772 阅读 · 0 评论 -
iOS Obj-C
发现不少函数经常用,有时熟悉的还是会忘记。1 respondsToSelector 判断是否可以执行这个selector 常用的例子SEL selector = @selector(xxoxx); if ([number respondsToSelector:selector]) { [number performSelector:selector];原创 2011-12-03 18:37:09 · 649 阅读 · 0 评论 -
XCode 4.2 新功能 - Storyboard
转载:http://blog.sina.com.cn/s/blog_61f4999d0100x0el.html XCode4.2 新功能 - Storyboard最近開始比較有空在玩 XCode 4.2(iOS5 Beta3),赫然發現它多了個 Storyboard 的東東。Storyboard 這個東西一般來說是在做創意發想的時候,用來转载 2011-12-07 23:47:52 · 574 阅读 · 0 评论 -
ios中的shake
比较简单的实现。UIResponder类中有几个监控响应的Responding to Touch Events– touchesBegan:withEvent:– touchesMoved:withEvent:– touchesEnded:withEvent:– touchesCancelled:withEvent:Responding to Motion Even原创 2011-12-07 17:46:02 · 1829 阅读 · 0 评论 -
plist操作
很早以前写了一个库,结果找不到了。再害怕遗忘,随便整理了几点操作,以后想起来再补充。//.h#import @interface BPlistFileManager : NSObject {@private NSMutableString* filename_;@private NSString *path; }+(BPlistFileMana原创 2011-12-06 22:55:32 · 437 阅读 · 0 评论 -
关于iOS中的Icon的设置
1 iphone需要的icon如下图:2 iPad需要的icon3兼容情况下需要的icon4 Icon在文件中的添加过程4.1在info.plist中找到Icon file文件,删掉或者内容清掉。4.2 创建一个Icon files选项,设置Array类型,在它的Item中添加对应的Icon名称。如图原创 2011-12-04 21:55:05 · 1327 阅读 · 0 评论 -
UI的几个函数小结
1 sizeToFit 自动设置文字的间距和View的大小- (void)sizeToFitCall this method when you want to resize the current view so that it uses the most appropriate amount of space. Specific UIKit views resize thems原创 2011-12-04 00:42:10 · 709 阅读 · 0 评论 -
宏定义,判断是否高清屏
宏定义,判断是否高清屏 ,ipad,simulator ,方法如下:// 是否高清屏#define isRetina ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen]转载 2011-11-26 23:03:47 · 592 阅读 · 0 评论 -
emoji list
Emoji List461搜寻一次不容易。进行记录下。Complete Emoji ListTo use an emoji, write the complete code (emoji:xxx) in [square brackets]emoji:000 emoji:001 emoji:002 emoji:003 emoji:004 emoji转载 2012-02-02 22:03:32 · 1216 阅读 · 0 评论 -
iphone emoji
iPhone Emoji Decimal Character Entitieshttp://barrow.io/posts/iphone-emoji/The complete list of iPhone emoji and their respective decimal character entities:&#x转载 2012-02-02 22:25:03 · 3608 阅读 · 0 评论 -
NSString & CFStringRef
NSString and CFStringRef are "Toll free bridged", meaning that you can simply typecast between them.For example:CFStringRef aCFString = (CFStringRef)aNSString;works perfectly and transparently.原创 2012-04-19 22:52:04 · 1919 阅读 · 0 评论 -
iOS的iCon 启动画面
关于命名不再操心了,直接在xcode4.3中支持可视化的操作。拖进去,自动命名的,不用我们在考虑什么名称了,iCon一样。应用程序图标Icon.png(57x57) - Homescreen icon on iPhone/iPod touchIcon@2x.png(114x114) - Homescreen icon on iPhone 4Icon-72(72x72) -H原创 2012-04-17 10:14:24 · 691 阅读 · 0 评论 -
How To Choose The Best XML Parser for Your iPhone Project
http://www.raywenderlich.com/553/how-to-chose-the-best-xml-parser-for-your-iphone-project综述,用libxml2还是很不错的。不论xml的大小,或者对XPath的支持here are a lot of options when it comes to parsing XML on the i转载 2012-04-12 20:47:17 · 680 阅读 · 0 评论 -
xcode 4.3 debug 不能按行进行的一个解决方案
晚上debug还是ok的,早上运行的时候,发现xcode不能够进行单步调试,调试的时候总是跳来跳去的。查找了一下很多方法,都不可行。因为我用的是xcode 4.3.1,所以还是需要自己找下原因。修复的方法,在Product->Edit Scheme 中,选择 Run xxx.app, 选择Build Configuration,调整到debug。如果仅仅在Project中选择Debug,但原创 2012-04-06 10:18:54 · 1169 阅读 · 0 评论 -
IOS字体大小,字号的问题 UIFont
IOS字体大小,字号的问题 UIFont2011-06-29 16:44UIFontParametersfontSizeThe size (in points) to which the font is scaled. This value must be greater than 0.0.fontSize实际的参数是pointSize,是像素点。windows转载 2012-04-07 14:08:32 · 8471 阅读 · 0 评论 -
(iPhone/iPad开发)在SDK5.0前后变化后通用方法
最好的方法还是查看下iOS5 和iOS 4.3版本的函数差异表。提前预防下,对于diffrent function进行判断下。由于比较多,就不罗列了。转载别人写好的一个。5.0前后,对应的调用方法变了参数,而且如果用了5.0以后的方法在低版本上无法使用,而用低版本对用的方法,apple已经不提倡,现在有一种解决办法[cpp] view plaincopyAboutV转载 2012-04-05 00:10:37 · 627 阅读 · 0 评论 -
KVO
原来URL:http://nachbaur.com/blog/back-to-basics-using-kvo讲的通俗易懂 。One of the things I like most about Apple’s iOS SDK is the consistent and easy-to-use API they provide. Across all their diffe转载 2012-02-28 23:24:49 · 709 阅读 · 0 评论 -
NSString 十六进值
比较简单,直接用NSScanner获取这个值BOOL bvalue = [[NSScanner scannerWithString:valueStr] scanHexInt:&nvalue];原创 2012-02-21 18:56:48 · 630 阅读 · 0 评论 -
UIView中文部分翻译
UIView本来想翻译完的,可是翻着翻着就懒了。有时间再翻翻。UIView Class ReferenceInherits from UIResponder : NSObjectConforms to NSCodingNSObject (NSObject)Framework /System/Library/Frameworks/UIKit.原创 2011-12-29 23:49:57 · 962 阅读 · 0 评论 -
iOS游戏开发 几个有利工具
Link:http://mobile.51cto.com/iphone-274659.htm GameSalad 利用视觉化的工具包开发游戏。:http://games.qq.com/a/20110223/000144.htm转载 2011-11-27 10:14:37 · 365 阅读 · 0 评论 -
objective-c NSLog
NSLog很像printf,同样会在console中输出显示结果。%@ 对象 • %d, %i整数 • %u 无符整形 %f 浮点/双字 %x, %X二进制整数 %o 八进制整数• %zu size_t • %p原创 2011-10-17 23:17:17 · 363 阅读 · 0 评论 -
iPhone 中少许信息汇总
1 获取device 信息 [UIDevice currentDevice]2 时区 [NSTimeZone localTimeZone]3 地点 CLLocationManagerNSURL:进行encoding stringByAddingPercentEscapesUsingEncoding 否则中文等会出错。原创 2011-04-08 23:52:00 · 376 阅读 · 0 评论 -
使用CoreTelephony获得SIM卡网络运营商名称
使用CoreTelephony获得SIM卡网络运营商名称转载 2011-04-08 22:27:00 · 659 阅读 · 0 评论 -
借光转载mac的特殊按键
all is the special key in the mac book.原创 2011-03-30 18:41:00 · 475 阅读 · 0 评论 -
Ojb-C memory manager
autorelease转载 2011-03-30 11:15:00 · 1383 阅读 · 0 评论 -
Xcode的小总结(持续更新)
<br />1 Refactor 不可用。可能是c++进行了混编。这个时候xcode就不支持用refactor。只能用command + alt+F进行替换了原创 2011-03-29 22:22:00 · 477 阅读 · 0 评论 -
mac shortcut。 Xcode shortcut
隐藏xcode command+h隐藏其它 command+option+h关闭窗口 command+w 也看样把当前的项目关闭保存文件 command+s保存所有文件 command+option+s另存为 command+shift+s保存所有文件 command+option+s另存为 command+shift+s重构 command+shift+j (选中方法名)重构 command+shift+j (选中方法名)屏开所有 control+u折叠方法 c原创 2011-03-29 22:19:00 · 1278 阅读 · 0 评论 -
object.c c++ mixed code and it support the stl
code原创 2011-03-29 22:48:00 · 641 阅读 · 0 评论 -
NSArray NSDictionary
NSArray and so on原创 2011-03-30 23:21:00 · 616 阅读 · 0 评论 -
NSString in Obj-C
1 应该用isEqualToString2 compare这个可以提供排列。而且还可以进行按照字符串的字符长度进行排列。NSString *str= [NSString stringWithFormat:@"100"]; NSString *str2 =[NSString stringWithFormat:@"100"]; NSComparisonResult resul = [str compare:str2 options:NSCaseInsensitiveSearch|NSNume原创 2011-03-30 22:07:00 · 478 阅读 · 0 评论 -
Format the time
fomat the time原创 2011-04-12 10:53:00 · 385 阅读 · 0 评论 -
MD5加密 iphone
md5转载 2011-04-12 12:59:00 · 555 阅读 · 0 评论 -
sqlite3
建立数据库档案用sqlite3建立数据库的方法很简单,只要在shell下键入(以下$符号为shell提示号,请勿键入):$ sqlite3 foo.db如果目录下没有foo.db,sqlite3就会建立这个数据库。sqlite3并没有强制数据库档名要怎么取,因此如转载 2011-10-13 22:17:01 · 397 阅读 · 0 评论 -
Objective-C之Private peoperty
private property原创 2011-04-24 21:34:00 · 512 阅读 · 0 评论 -
simple codes for property
<br />哈哈 <br /> <br />//assign<br />property = newValue;<br /> <br />//retain<br />if(property != newValue)<br />{<br /> [property release];<br /> property =[newValue retain];<br />}<br /> <br />//copy<br />if(property != newValue)<br />{<br /> [property r原创 2011-04-21 18:03:00 · 499 阅读 · 0 评论 -
Objective-C 之Static Analysis 2
Objective-C 之Static Analysis 2各种的attributes原创 2011-04-21 17:20:00 · 1443 阅读 · 0 评论 -
Objective-C 之 Attribute & Package
Method and Class Attributes@package Instance Variables原创 2011-04-21 11:51:00 · 1821 阅读 · 0 评论 -
Json 格式简单学习
Json转载 2011-04-20 22:40:00 · 489 阅读 · 0 评论