我在提交更新之前一直在测试...来自iOS4,并且已经遇到以下情况...... 1)从我的应用程序创建PDF.2)似乎不一致,因为在大多数情况下我可以创建没有问题的新PDF.3)崩溃日志指示ExportView的第341行崩溃,我已经配置了该行,因此该行上唯一的项目是CFRangeMake.请注意,控制台中存在一个值,因为在多行中使用了相同的值.
一些注意事项:使用Xcode 4.6,目标是iOS6,完全ARC,在新iPad上测试.
任何帮助都将非常感谢!!
我删除了一些崩溃日志和控制台日志以缩短这篇文章!对它的长度表示歉意!
要应用于PDF创建的字符串的方法:
- (CFMutableAttributedStringRef) CreateAttributedString:(int*) dateLength
titleLength:(int*) titleLength
{
NSLog(@"Current EntryIndex: %d", _entryIndex);
NSLog(@"Current Entry: %@", _currentEntry); // current entry is set from the parent view controller via PrepareForSegue
NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"MMMM dd, yyyy, h:mm aaa"];
NSString * dateString = [dateFormatter stringFromDate:_currentEntry.created];
*dateLength = [dateString length];
NSLog(@"DateString: %@", dateString);
NSLog(@"2nd DateLength: %d", *dateLength);
NSString *title = _entryTitle;
*titleLength = [title length];
NSString *bodyString = _entryText;
NSString *contentString = [NSString …Run Code Online (Sandbox Code Playgroud)