我可以使用http://forums.macrumors.com/showthread.php?t=545061中找到的线程中描述的技术设计自定义UITableViewCells并加载它们.但是,使用该方法不再允许您使用reuseIdentifier初始化单元格,这意味着您必须在每次调用时创建每个单元格的全新实例.有没有人想出一个很好的方法来缓存特定的单元格类型以便重用,但仍然可以在Interface Builder中设计它们?
从SQLite迁移到核心数据我想念的一件事是能够直接查询我的数据库来分析数据.是否有人知道允许以类似方式浏览Core Data商店的工具?
我有一个ArrayList自定义的简单Serializable对象,我想缓存到磁盘并重新启动时读取.我的数据很小,大约有25个对象,最多有5个列表,所以我认为SQLite会有点过分.在我将使用的iPhone世界中NSKeyedArchiver,NSKeyedUnarchiver哪个效果很好.在Android上,我试图用a FileOutputStream和for来做这个,ObjectOutputStream虽然结果是相同的,但性能很糟糕.是否有更好的(更快阅读)方式将小对象缓存到Android中的文件系统?
我需要为抽象基础对象创建复杂谓词.我想为不同的继承实体设置单独的谓词查询并关闭子实体类型,下面的示例是我想要做的,但是,我还没有找到引用实体名称或输入的方法谓词.
NSFetchRequest *request = [[NSFetchRequest alloc] init];
request.entity = [NSEntityDescription entityForName:@"MyCommonObjectBase" inManagedObjectContext:myContext];
NSPredicate *subclassAPredicate = [NSPredicate predicateWithFormat:@"someValue > %@ && entityName = %@", 100, @"SubclassA"];
NSPredicate *subclassBPredicate = [NSPredicate predicateWithFormat:@"someValue < %@ && entityName = %@", 50, @"SubclassB"];
request.predicate = [NSCompoundPredicate orPredicateWithSubpredicates:[NSArray arrayWithObjects:subclassAPredicate, subclassBPredicate, nil]];
Run Code Online (Sandbox Code Playgroud) 我试图GetUserAvailabilityRequest从南非标准时间打电话,该时间不遵守夏令时,但是,TimeZone元素需要StandardTime和DaylightTime子元素,这些子元素需要有关到DST或从DST切换的详细信息.省略这些元素会导致错误,提交任意数据也是如此.有谁知道拨打这个电话的正确方法?
更多细节基于@ jan-doggen的评论.在此示例中,用户位于南非标准时间
请求(任意ST和DST更改日期为1月1日)
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Body>
<GetUserAvailabilityRequest xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<t:TimeZone xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<Bias>-120</Bias>
<StandardTime>
<Bias>0</Bias>
<Time>00:00:00</Time>
<DayOrder>1</DayOrder>
<Month>1</Month>
<DayOfWeek>Wednesday</DayOfWeek>
</StandardTime>
<DaylightTime>
<Bias>0</Bias>
<Time>00:00:00</Time>
<DayOrder>1</DayOrder>
<Month>1</Month>
<DayOfWeek>Wednesday</DayOfWeek>
</DaylightTime>
</t:TimeZone>
<MailboxDataArray>
<t:MailboxData>
<t:Email>
<t:Address>test1@domain.com</t:Address>
</t:Email>
<t:AttendeeType>Organizer</t:AttendeeType>
<t:ExcludeConflicts>false</t:ExcludeConflicts>
</t:MailboxData>
<t:MailboxData>
<t:Email>
<t:Address>test2@domain.com</t:Address>
</t:Email>
<t:AttendeeType>Required</t:AttendeeType>
<t:ExcludeConflicts>false</t:ExcludeConflicts>
</t:MailboxData>
</MailboxDataArray>
<t:FreeBusyViewOptions>
<t:TimeWindow>
<t:StartTime>2013-05-13T00:55:11</t:StartTime>
<t:EndTime>2013-05-27T00:55:11</t:EndTime>
</t:TimeWindow>
<t:MergedFreeBusyIntervalInMinutes>15</t:MergedFreeBusyIntervalInMinutes>
<t:RequestedView>FreeBusyMerged</t:RequestedView>
</t:FreeBusyViewOptions>
</GetUserAvailabilityRequest>
</soap:Body>
Run Code Online (Sandbox Code Playgroud)
响应:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:-2146233088</faultcode>
<faultstring xml:lang="en-US">The specified time zone isn't valid.</faultstring>
<detail>
<m:ErrorCode xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">-2146233088</m:ErrorCode>
</detail>
</s:Fault>
</s:Body>
Run Code Online (Sandbox Code Playgroud)
看起来这应该是直截了当的,但我还没有找到一个很好的例子.我有一个简单的核心数据实体,我想分成两个独立的实体.Apple的文档在很高的层次上提到了它(映射概述),然而,目前还不清楚实际的映射模型应该将关系与新的拆分实体关联回原始模型.