iOS 开发中遇到的问题
2017-05-22 17:48
274 查看
1:打印的字典或者数组中的值为 unicode 编码,转为中文
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:searchType.paramasDic options:NSJSONWritingPrettyPrinted error:nil]; NSString *jsonStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; NSLog(@"%@",jsonStr);
2:解决UITableView系统cell分隔线起始位置
cell.separatorInset = UIEdgeInsetsMake(0, 50, 0, 0);这里的先后顺序是上左下右3:在删除指定行的 cell 时崩溃:Assertion failure in -[UITableView _endCellAnimationsWithContext:], /BuildRoot/Library/Caches/com.app
//先 remove 再 delete [self.favoriteArray removeObject:f]; [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
4:cell 自带的左滑删除要实现的方法
-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { self.tableView.editing = !self.tableView.editing; } -(UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath { return UITableViewCellEditingStyleDelete; } -(NSString*)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath{ return @"取消"; } - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { return YES; }
相关文章推荐
- 关于 IOS 开发中遇到的 读取 cell xib 文件时导致死机的问题。
- 【iOS开发】创建static lib库做项目依赖及遇到问题
- ios开发遇到的问题
- iOS开发中遇到的问题整理 (一)
- iOS开发过程中遇到的问题总结
- IOS 开发遇到的问题
- ios开发遇到的问题1
- ios开发 CLLocationManager获取位置信息时遇到的一个小问题
- IOS开发笔记之五——Xcode 6.0 Beta编译工程时可能遇到的问题及参考解决方案
- IOS开发中遇到的各种问题以及解决方案集锦
- IOS开发遇到的问题和解决方法
- ios开发学习过程中遇到的一些问题
- 我在ios游戏开发中遇到的一些问题
- VMWare 7 安装Mac OS X 10.6 搭建IOS开发环境遇到的细节问题
- 【汇总】iOS开发及Xcode使用中遇到的一些报错问题汇总
- ios开发随笔记(五):Kobold2D开发遇到的编译问题
- ios app开发时遇到的问题和解决方法教程
- iOS开发中遇到的问题整理 (二)
- IOS开发笔记之自己遇到的问题
- 关于ios开发中遇到thread 1:exc_bad_access(code=1,address=0x50000010)类似的问题