草庐IT

default_delete

全部标签

ios - CoreData - 如何使用 validateForDelete : to determine if a managed object should be deleted

目标:我想检查一个托管对象以确保它可以删除期望:-[NSManagedObjectvalidateForDelete:]应该根据管理对象模型中的删除规则设置返回一个BOOLNSManagedObject类引用validateForDelete:Determineswhetherthereceivercanbedeletedinitscurrentstate.-(BOOL)validateForDelete:(NSError**)errorParameterserrorIfthereceivercannotbedeletedinitscurrentstate,uponreturncont

ios - com.apple.root.default-overcommit-priority -[CFString 释放] : message sent to deallocated instance

在我的应用中,线程13标记为:com.apple.root.default-overcommit-priority我在下面看到一个:0__forwarding__下面我有一个:6_pthread_wqthread导致:-[CFStringrelease]:messagesenttodeallocatedinstance我知道一条消息正在发送到一个已释放的实例,我的问题是我找不到发生这种情况的地方。我启用了僵尸程序、异常日志记录等。我还创建了一个导入的框架(带有完整的调试符号),我感觉这就是错误的来源。由于框架不能直接执行,必须导入,我该如何调试/单步执行等,以尝试找到触发此问题的确切行

ios - com.apple.root.default-overcommit-priority 中的不明崩溃

只是非常不清楚(至少对我而言)内存崩溃Crashed:com.apple.root.default-overcommit-priorityEXC_BAD_ACCESSKERN_INVALID_ADDRESSat0x4086ec0000000000Thread:Crashed:com.apple.root.default-overcommit-priority0libsystem_platform.dylib0x000000019587d550OSAtomicDequeue+161libsystem_malloc.dylib0x000000019583bfb4nano_pressure_

ios - 将 HealthKit Delete 传播到后端

希望这个问题听起来不要太傻,但我还没有找到解决方案。我目前正在使用与HealthKit集成的Xamarin编写一个应用程序。存储在HK的数据会定期同步到服务器。这是通过提取食物相关性的HKAnchoredObjectQuery完成的。由于数据是定期提取的,所以在同步之间,用户可能会删除HealthKit中的值。该删除需要在下一次同步时传播回服务器。我最初的想法是通过观察者查询来实现这一点。我的问题是:使用HealthKit的观察者查询,有没有办法确定触发查询的操作是否是删除操作?publicvoidCheckForDelete(Subjectsubject){varsampleType

ios - 移动行在索引路径 : how to delete section once last row is moved to another section

我有一个包含多个部分的表格View。我希望能够将行从一个部分移动到另一个部分,并在没有行时删除一个部分。我正在尝试通过moveRowAtIndexPath执行此操作,但我的代码不起作用并抛出NSRangeException异常。这是一个代码示例:-(void)tableView:(UITableView*)tableViewmoveRowAtIndexPath:(NSIndexPath*)fromIndexPathtoIndexPath:(NSIndexPath*)toIndexPath{NSUIntegerfromSection=[fromIndexPathsection];NSUI

iOS 7 : UITableViewController: Changing/Replacing Delete Button

免责声明:我知道调整此类内容不是最佳做法,因为它可能会在Apple决定更改其内部行为时中断。有一些解决方案,例如https://stackoverflow.com/a/12511432/271150这似乎适用于以前的iOS版本,但不适用于iOS7。当查看控件层次结构时,我可以看到UITableViewCellScrollView中有一个UITableViewCellDeleteConfirmationView。但是通过查看layoutSubviews或willTransitionToState中的SubViews集合,只有我自己的View,UITableViewCellDeleteCo

ios - ON DELETE CASCADE 在 ios 中的 sqlite3 中不起作用

我通过启用pragmaforeignkeysON以编程方式在ios中创建了一个.sqlite文件,如下所示NSFileManager*theFileManager=[NSFileManagerdefaultManager];if([theFileManagerfileExistsAtPath:[selfgetDatabasePath]]==NO){char*theError;constchar*databasePath=[[selfgetDatabasePath]UTF8String];constchar*enableForienKey=[@"PRAGMAforeign_keys=ON

ios - TableView :viewForHeaderInSection: default value?

我想要一个自定义部分标题,其余部分是默认标题。-(UIView*)tableView:(UITableView*)tableViewviewForHeaderInSection:(NSInteger)section{return???;}我要返回什么来只提供默认标题View? 最佳答案 默认的标题View是nil,因为根本没有标题! 关于ios-TableView:viewForHeaderInSection:defaultvalue?,我们在StackOverflow上找到一个类似的问

ios - UITableViewCell : Allowing Selective Deletion

我有一个表格View并希望允许对所有单元格进行重新排序,但是我不希望删除某些单元格。当UiTableView进入删除模式时,我不希望红色的“-”按钮出现在左侧,也不希望滑动手势调出这些单元格的删除按钮,但希望它发生在其他单元格上.有任何想法吗? 最佳答案 -(UITableViewCellEditingStyle)tableView:(UITableView*)tableVieweditingStyleForRowAtIndexPath:(NSIndexPath*)indexPath{//ifwecantdeletetheobjec

iphone - managedObjectContext 删除对象 :matches not deleting data from Core data base?

我正在尝试从iOS应用程序的核心数据库中删除行,但它不起作用,if(editingStyle==UITableViewCellEditingStyleDelete){appDelegate=[[UIApplicationsharedApplication]delegate];NSEntityDescription*entityDesc=[NSEntityDescriptionentityForName:@"PRODUCTTABLE"inManagedObjectContext:appDelegate.managedObjectContext];NSFetchRequest*reques