gpt4 book ai didi

iphone - [NSCF编号_isNaturallyRTL] : unrecognized selector sent to instance 0x605ac10

转载 作者:行者123 更新时间:2023-12-02 00:12:13 25 4
gpt4 key购买 nike

我的应用程序崩溃并显示该关键字。没有错误和警告。有人可以帮助我吗?

这是显示的堆栈:

Call stack at first throw: (
0 CoreFoundation 0x012ccbe9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x014215c2 objc_exception_throw + 47
2 CoreFoundation 0x012ce6fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x0123e366 ___forwarding___ + 966
4 CoreFoundation 0x0123df22 _CF_forwarding_prep_0 + 50
5 UIKit 0x0042d35e -[UITextField setText:] + 53
6 MyApp 0x0006427a -[FilePropertiesViewController viewWillAppear:] + 442
7 UIKit 0x003c4d52 -[UIView(Hierarchy) _willMoveToWindow:withAncestorView:] + 207
8 UIKit 0x003cfa2b -[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:] + 378
9 UIKit 0x003cfa5c -[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:] + 427
10 UIKit 0x003cfa5c -[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:] + 427
11 UIKit 0x003c6b36 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 370
12 UIKit 0x003c514f -[UIView(Hierarchy) addSubview:] + 57
13 UIKit 0x006ad8ae -[UIPopoverView presentFromRect:inView:contentSize:backgroundStyle:animated:] + 1920
14 UIKit 0x006a0a4c -[UIPopoverView presentFromRect:inView:animated:] + 236
15 UIKit 0x006d9b20 -[UIPopoverController presentPopoverFromRect:inView:permittedArrowDirections:animated:] + 1046
16 MyApp 0x0001f90f -[codeViewController arrangeTabWithTypeGesture:andNumtag:] + 4683
17 MyApp 0x0001e68f -[codeViewController setTap2:] + 99
18 UIKit 0x0061e9c7 -[UIGestureRecognizer _updateGestureWithEvent:] + 727
19 UIKit 0x0061a9d6 -[UIGestureRecognizer _delayedUpdateGesture] + 47
20 UIKit 0x00620fa5 _UIGestureRecognizerUpdateObserver + 584
21 UIKit 0x0062118a _UIGestureRecognizerUpdateGesturesFromSendEvent + 51
22 UIKit 0x003bc6b4 -[UIWindow _sendGesturesForEvent:] + 1292
23 UIKit 0x003b7f87 -[UIWindow sendEvent:] + 105
24 UIKit 0x0039b37a -[UIApplication sendEvent:] + 447
25 UIKit 0x003a0732 _UIApplicationHandleEvent + 7576
26 GraphicsServices 0x0191fa36 PurpleEventCallback + 1550
27 CoreFoundation 0x012ae064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
28 CoreFoundation 0x0120e6f7 __CFRunLoopDoSource1 + 215
29 CoreFoundation 0x0120b983 __CFRunLoopRun + 979
30 CoreFoundation 0x0120b240 CFRunLoopRunSpecific + 208
31 CoreFoundation 0x0120b161 CFRunLoopRunInMode + 97
32 GraphicsServices 0x0191e268 GSEventRunModal + 217
33 GraphicsServices 0x0191e32d GSEventRun + 115
34 UIKit 0x003a442e UIApplicationMain + 1160
35 MyApp 0x00002680 main + 102
36 MyApp 0x00002611 start + 53
37 ??? 0x00000001 0x0 + 1

)

更新

这是代码:

-(void)viewWillAppear:(BOOL)animated{
DocSegmentedModel *docSegmentedModel = [docProperties objectAtIndex:index];
NSString *segmenid = docSegmentedModel.docSegmentId;
NSFileManager *filemgr = [NSFileManager defaultManager];
NSDictionary *attribs;
NSString *sizes;

NSString *localFilePath = docSegmentedModel.docSegmentLocalPath;
NSLog(@"segmen id : %@", segmenid);

//get file name
fileName.text = docSegmentedModel.docSegmentFileName;

//get file size
attribs = [filemgr attributesOfItemAtPath:localFilePath error:NULL];
sizes = [attribs objectForKey:@"NSFileSize"];


NSLog(@"local path : %@", localFilePath);
NSLog(@"filesize : %@", sizes);
fileSize.text = sizes;

[filemgr release];
[attribs release];

}

当我设置 fileSize.text = Sizes 时,代码崩溃了;

这是dealloc方法:

- (void)dealloc {

[fileSize release];

[super dealloc];

}

最佳答案

_isNaturallyRTLNSString 的未记录方法。我假设 fileSize 是一个 UILabel,因此您需要将 NSString 分配给其 text 属性。但是,fileManager 返回的字典包含一个 NSNumber 对象,该对象对应于 NSFileSize 键,其中包含一个 unsigned long long 值。因此,您将一个 NSNumber 对象分配给一个 NSString 属性,这是行不通的。

尝试fileSize.text = [sizes stringVlue];

关于iphone - [NSCF编号_isNaturallyRTL] : unrecognized selector sent to instance 0x605ac10,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4538446/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com