
object c
some_do
这个作者很懒,什么都没留下…
展开
-
object c中字符串与数组操作整理
1//创建字符串对象数组 NSArray *array = [str componentsSeparatedByString:@"@"];//就是以@为标示 输出看看啦 int count=[array count]; int i; for(i=0;i { printf("%i: %s\n",i,[[array objectAtIndex:i] UTF8Str转载 2013-03-16 13:54:54 · 810 阅读 · 0 评论 -
通过自定义TableCell上的button删除TableCell
经常用到在自定义TableCell上添加自定义形状的UIButton,通过这个button事件,可以删除这个TableCell,代码如下:- (IBAction)deleteCustomCellWithUIButton:(id)sender{ NSLog(@"Message From Custom Cell Received"); NSIndexPath *indexP原创 2013-03-20 11:02:58 · 923 阅读 · 0 评论 -
xcode修改代码目录结构出现clang: error: no such file or directory 解决方法
需要迁移一个开源工程的一部分内容到自己工程,迁移对方的工程到自己工程之后,因目录结构配置整理需要,对嵌入的工程目录进行了结构改变,编译后出现:clang: error: no such file or directory: '/Users/username/Desktop/echonest-echoprint-ios-sample-b937c04/Classes/ClassName/cla原创 2013-04-09 11:01:03 · 23865 阅读 · 1 评论 -
获得2点之间 所有点的坐标 --布雷森汉姆直线演算法 OC版本
不多说,上代码-(NSArray*)getAllPointsFromPoint:(CGPoint)fPoint toPoint:(CGPoint)tPoint{ NSMutableArray *ret = [NSMutableArray array]; float deltaX = fabsf(tPoint.x - fPoint.x); float delta原创 2014-05-11 09:25:11 · 2229 阅读 · 0 评论 -
UILabel alignTop / alignBottom
#pragma mark VerticalAlign@interface UILabel (VerticalAlign)- (void)alignTop;- (void)alignBottom;@end@implementation UILabel (VerticalAlign)- (void)alignTop{ CGSize fontSize = [self.text翻译 2015-05-04 16:28:50 · 669 阅读 · 0 评论