- 博客(8)
- 资源 (2)
- 收藏
- 关注
原创 UITableView 自定义UITableViewCell
自定义UITableViewCell 步骤:这里拿带有checkBox按钮的UITableViewCell作为例子。先上效果图先新增加个类:CheckBoxCell继承自UITableViewCell。分别修改CheckBoxCell.h和CheckBoxCell.m.增加4个输出口:IBOutlet UIImageView *theImage; IBOutlet
2012-10-31 16:35:28 3671
原创 ios 常见错误整理 持续更新
1. mutating method sent to immutable object'从字面上理解:可变的消息发给了不可变的对象。比如NSDictionary类型的对象调用setValue方法.应该把NSDictionary 改成NSMutableDictionary类型。2.Local declaration of 'content' hides instance variab
2012-10-18 16:04:56 17135 1
原创 ios 内存管理之auto release
对于有返回值的方法,返回值初始化后,在返回值之前是否该释放?看下面的例子-(NSString*)getNamesText:(NSArray *)peopleArray{ NSMutableString *strResult=[[NSMutableString alloc]init ]; for (NSDictionary *item in peopleArray) {
2012-10-16 14:31:29 1476
原创 ios 关于UITableView UITableViewCellAccessoryCheckmark 混乱的问题
大家都知道UITableViewCellAccessoryCheckmark是让UITableView每条记录后面打上对勾,如下图所示并且可以多选。但会有一个问题,上下滚动的时候,会发现对号错乱的情况。究其原因应该是cell重用的问题。UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cel
2012-10-16 10:05:17 7930
转载 ios 调用打电话、短信等功能
邮件 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto://devprograms@apple.com"]]; 电话 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://8004664411"]]; sm
2012-10-14 17:16:07 1945
原创 UITableView多选
实现方法:- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *oneCell = [tableView cellForRowAtIndexPath: indexPath]; if (oneC
2012-10-13 17:13:01 741
原创 ios 该不该加self
纠结了两天的问题,终于找到原因了!错误情形:类的成员变量NSArray array.经过@property(nonatomic,copy)和@synthesize。在类的初始化方法里对array赋值array=[result objectForKey:@"list"];打印array:NSLog(@"array is %@",array);结果正常。然后将array作为tablev
2012-10-12 15:59:09 1046
转载 NSError 错误code对照
http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Constants/Reference/reference.htmlFoundation Constants ReferenceNSError Codes NSE
2012-10-10 15:36:45 36617
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人