上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 36 下一页
摘要: Easiest way:// Prefs.h#define PREFS_MY_CONSTANT @"prefs_my_constant"Better way:// Prefs.hexternNSString*const PREFS_MY_CONSTANT;// Prefs.mNSString*const PREFS_MY_CONSTANT =@"prefs_my_constant";http://stackoverflow.com/questions/538996/constants-in-objective-c 阅读全文
posted @ 2014-01-03 17:11 cocoajin 阅读(387) 评论(0) 推荐(0)
摘要: TableViewCell多选;CheckBox;- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (!cell) { cell = [[... 阅读全文
posted @ 2013-12-30 15:52 cocoajin 阅读(1150) 评论(0) 推荐(0)
摘要: iOS 使用 AVCaptureVideoDataOutputSampleBufferDelegate获取实时拍照的视频流可用于实时视频聊天实时视频远程监控#import // Create and configure a capture session and start it running- (void)setupCaptureSession{ NSError *error = nil; // Create the session AVCaptureSession *session = [[AVCaptureSession alloc] init]; // ... 阅读全文
posted @ 2013-12-27 15:48 cocoajin 阅读(5696) 评论(0) 推荐(0)
摘要: 一:使用 iOS 系统UIImagePickerController获取视频大小获取视频长度- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. self.title = @"AVVideo Demo"; CGRect theFrame = CGRectMake(10, 15, 130, 20); [self addOpBtnWith:@"pick Video" frame:theFrame action:@selector 阅读全文
posted @ 2013-12-27 15:43 cocoajin 阅读(4796) 评论(0) 推荐(0)
摘要: 一:先建议两张表Person,Score 分别代表,学生表,分数表在 Person的Relationships里面建立关系,指向分数score二:coreData生成的两个表: Person @class Score;@interface Person : NSManagedObject@property (nonatomic, retain) NSString * address;@property (nonatomic, retain) NSNumber * age;@property (nonatomic, retain) NSString * name;@property (nona. 阅读全文
posted @ 2013-12-26 15:56 cocoajin 阅读(2340) 评论(0) 推荐(0)
摘要: 一:使用Core Data 的可用数据类型NSAttributeTypeDefines the possible types of NSAttributeType properties. These explicitly distinguish between bit sizes to ensure data store independence.typedef enum {NSUndefinedAttributeType = 0,NSInteger16AttributeType = 100,NSInteger32AttributeType = 200,NSInteger64Attribute 阅读全文
posted @ 2013-12-26 11:41 cocoajin 阅读(716) 评论(0) 推荐(0)
摘要: 一:流程同样需要先查询出指定记录更新指定记录二:代码://更新操作- (void)updateThePersonData{ NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; [fetchRequest setEntity:[NSEntityDescription entityForName:@"Entity" inManagedObjectContext:self.appDelegate.managedObjectContext]]; //更新谁的条件在这里配置; NSString *th... 阅读全文
posted @ 2013-12-26 11:22 cocoajin 阅读(1160) 评论(0) 推荐(0)
摘要: 一:操作流程先查询得到某条要删除的数据然后删除某记录二:演示代码//删除- (void)deleteThePersonData{ NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; [fetchRequest setEntity:[NSEntityDescription entityForName:@"Entity" inManagedObjectContext:self.appDelegate.managedObjectContext]]; //删除谁的条件在这里配置; NSString ... 阅读全文
posted @ 2013-12-26 11:09 cocoajin 阅读(686) 评论(0) 推荐(0)
摘要: 一:iOS文件上传提示URL错误Invalid parameter not satisfying: fileURL'二:解决方法:NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"wallpaper" ofType:@"jpg"];NSURL* imageURL = [NSURL fileURLWithPath:imagePath isDirectory:NO]; 注意:FileUrl 要调用 NSURL的 file 开头的类方法;参考http://stackoverfl 阅读全文
posted @ 2013-12-25 22:06 cocoajin 阅读(2821) 评论(0) 推荐(0)
摘要: 一:AFNetworking的文件上传: 主要几个以下类似- (BOOL)appendPartWithFileURL:(NSURL *)fileURL name:(NSString *)name error:(NSError * __autoreleasing *)error;二:主要代码: //配置文件上传 //图片data 上传 //UIImage *upImage = [UIImage imageNamed:@"testImage.png"]; //NSData ... 阅读全文
posted @ 2013-12-25 22:02 cocoajin 阅读(7348) 评论(0) 推荐(0)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 36 下一页