IOS
fnjnkn
这个作者很懒,什么都没留下…
展开
-
IOS 自动填充视图控件长宽 笔记
self.view.autoresizingMask =UIViewAutoresizingFlexibleWidth| UIViewAutoresizingFlexibleHeight;原创 2013-04-01 13:23:54 · 735 阅读 · 0 评论 -
获取NSObject的所有属性
NSObject+Property.h#import @interface NSObject (Property)- (NSDictionary*)properties;@endNSObject+Property.m#import "NSObject+Property.h"#import @implementation NSObject (Property)-原创 2013-09-06 17:17:47 · 1471 阅读 · 0 评论 -
iOS定位原理和使用建议
iOS定位原理和使用建议http://ibbs.91.com/thread-1548870-1-1.html--------------------------------------------------------------------------------------------看到很多网友讨论iOS设备定位的问题,这里将我们所了解的关于iPhone、iPad、iP转载 2013-08-07 10:35:01 · 1421 阅读 · 0 评论 -
objective-c 标记方法过时
- METHOD DEPRECATED_ATTRIBUTE常用方法: #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) #define DEPRECATED_ATTRIBUTE __attr原创 2013-07-27 16:06:23 · 1561 阅读 · 0 评论 -
IOS 长按显示圆形菜单
今天比较有空就随便写了个以后会用到的功能,之后等空闲了再慢慢更新。目前仍有不少bug。。。颜色什么的可以自己改。之后会增加图片。https://github.com/fnjnkn/TouchMenu---IOS/效果:原创 2013-06-05 18:01:31 · 821 阅读 · 0 评论 -
Domain=NSCocoaErrorDomain Code=134100 "The operation couldn’t be completed. 错误的处理方法
转至 : http://d.hatena.ne.jp/watanata2000/20100711/1278837861 CoreData を試して最初につまずいたのがこれ。1個エンティティを追加しただけなのに、いきなりエラーかよ(怒)!2010-07-10 13:42:23.939 Locations[1817:207] Unresolved error Error Domain=NS转载 2013-05-23 11:28:47 · 1222 阅读 · 0 评论 -
UITableView 滚动到指定行 section
NSIndexPath *indexPath = [NSIndexPathindexPathForRow:0 inSection:2]; CGRect frame = [tableviewrectForSection:indexPath.section]; [tableview setContentOffset:CGPointMake(0, frame.origin.y原创 2013-04-25 11:39:19 · 7085 阅读 · 0 评论 -
UIButton 背景图片延长 笔记 stretchableImageWithLeftCapWidth的使用
- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight第一个参数从图片X坐标起,对输入值之后的位置进行拉伸。第二个则是Y坐标起,进行垂直方向的拉伸。原创 2013-03-28 12:58:10 · 579 阅读 · 0 评论 -
NSDate 时差问题 笔记
NSDate *currentDate = [NSDate date]; NSTimeZone *zone = [NSTimeZone systemTimeZone]; NSInteger interval = [zone secondsFromGMTForDate: currentDate]; NSDate *_date = [currentDate dateByAddingTime转载 2013-04-10 16:08:30 · 699 阅读 · 0 评论 -
ibtool 抽取 写入替换 MARK (Xcode 工具使用)
ibtool --generate-strings-file 抽取字符串ibtool --strings-file --write 写入替换(作用是基于源xib创建需要替换的xib,并使用strings 替换新创建的xib重的所有字符串)原创 2013-03-27 00:28:50 · 858 阅读 · 0 评论 -
ios weak和strong使用的区别
strong与weak是由ARC新引入的对象变量属性ARC引入了新的对象的新生命周期限定,即零弱引用。如果零弱引用指向的对象被deallocated的话,零弱引用的对象会被自动设置为nil。@property(strong) MyClass *myObject;相当于@property(retain) MyClass *myObject;@propert转载 2013-03-27 15:02:50 · 1096 阅读 · 0 评论 -
iOS 禁用多控件同时点击 笔记
[view setExclusiveTouch:YES];exclusiveTouchA Boolean value that indicates whether the receiver handles touch events exclusively.@property(nonatomic, getter=isExclusiveTouch) BOOL exclusive原创 2013-04-09 13:19:49 · 785 阅读 · 0 评论 -
[IOS] NSArray to Bytes
NSArray *arr = @[1,2,3,3,4,4,2,0] unsigned c = arr.count; uint8_t *bytes = (uint8_t*)malloc(sizeof(*bytes) * c); unsigned i; for (i = 0; i < c; i++) { NSString *原创 2013-08-21 15:58:46 · 2520 阅读 · 0 评论