Assertion failure in void _UIPerformResizeOfTextViewForTextContainer
Well, the exception reason gives the problem away; you should run this code on the main thread. Try enclosing the view creation and nib loading using dispatch_sync
or dispatch_async
and passing the main queue using dispatch_get_main_queue()
.
Dismissin Alert in async complection Handler throws exception
Make sure your completion handler is called on the main thread. All UI-related operations must be performed on the main thread. You can wrap the call with dispatch_async
:
dispatch_async(dispatch_get_main_queue(), ^{
alert1.dismissViewControllerAnimated(true, completion: nil)
});
Related Topics
Change Pin Image on Mkmapview in Swift
Nspredicate Filtered by Year Moth Day
Read Binary Qr Code with Avfoundation
Xamarin "The Executable Was Signed with Invalid Entitlements"
Uipageviewcontroller Gesture Is Calling Viewcontrollerafter: But Doesn't Animate
How to Show Specific Language Keyboard When User Input Values in Uitextfield in iPhone App
How to Add a Custom Separator to Uitableviewcell
Initializing Swift Properties That Require "Self" as an Argument
Taking Photo with Custom Camera Swift 3
How to Launch My Settings Bundle from My Application
All Notifications Disappearing After Opening One of Them
Swift: Load Images Async in Uitableviewcell
Uitableview: Nested Section Headers
How to Add External Webvtt Subtitles into Http Live Stream on iOS Client