Я пытаюсь передать строку из Parse в свой текстовый комментарий, он работал с uitextfield, и это не с uitextview.настройка текста внутри UITextview из parse - swift 2
Вот код,
self.companyBackgroundTextview.text = (employerProfileObject.valueForKey("companyBackground")?.capitalizedString)! as String
Код выше это возвращается ошибка .Это ошибка,
2015-10-29 13:36:38.592 TestView[5033:290374] *** Assertion failure in void _UIPerformResizeOfTextViewForTextContainer(NSLayoutManager *, UIView<NSTextContainerView> *, NSTextContainer *, NSUInteger)(), /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIFoundation_Sim/UIFoundation-432/UIFoundation/TextSystem/NSLayoutManager_Private.m:1551
2015-10-29 13:36:38.605 TestView[5033:290374] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Only run on the main thread!'
*** First throw call stack:
(
0 CoreFoundation 0x000000010d70ef45 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010d186deb objc_exception_throw + 48
2 CoreFoundation 0x000000010d70edaa +[NSException raise:format:arguments:] + 106
3 Foundation 0x000000010cdd26b2 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 169
4 UIFoundation 0x0000000113ffaa7f -[NSLayoutManager(NSPrivate) _resizeTextViewForTextContainer:] + 409
5 UIFoundation 0x0000000113ffa7a1 -[NSLayoutManager(NSPrivate) _recalculateUsageForTextContainerAtIndex:] + 2397
6 UIFoundation 0x00000001140331fa -[NSLayoutManager textStorage:edited:range:changeInLength:invalidatedRange:] + 747
7 UIFoundation 0x00000001140332d2 -[NSLayoutManager processEditingForTextStorage:edited:range:changeInLength:invalidatedRange:] + 47
8 UIFoundation 0x000000011405aa76 -[NSTextStorage _notifyEdited:range:changeInLength:invalidatedRange:] + 152
9 UIFoundation 0x000000011405a591 -[NSTextStorage processEditing] + 349
10 UIFoundation 0x000000011405a1eb -[NSTextStorage endEditing] + 82
11 UIKit 0x000000010e5f4f2c -[UITextView setAttributedText:] + 250
12 UIKit 0x000000010e5fcb31 -[UITextView setText:] + 188
13 TestView 0x000000010b843333 _TFFC8Occupost18ProfileEmployerTVC9fetchDataFS0_FT_T_U_FT_T_ + 4467
14 TestView 0x000000010b7e0997 _TTRXFo__dT__XFdCb__dT__ + 39
15 libdispatch.dylib 0x000000010f7ece5d _dispatch_call_block_and_release + 12
16 libdispatch.dylib 0x000000010f80d49b _dispatch_client_callout + 8
17 libdispatch.dylib 0x000000010f7f5bef _dispatch_root_queue_drain + 1829
18 libdispatch.dylib 0x000000010f7f54c5 _dispatch_worker_thread3 + 111
19 libsystem_pthread.dylib 0x000000010fb554f2 _pthread_wqthread + 1129
20 libsystem_pthread.dylib 0x000000010fb53375 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
это сработало! Спасибо за ваше время! это информативно! – suisied