0

I am write a subclass of UITableViewCell to loading some image from internet but when using dispatch_async it won't work imageUITableViewCell

class imageTableViewCell: UITableViewCell

private func updateCell() { dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0)) { } } 

error: cannot convert value of type 'qos_class_t' to expected argument type 'Int' fix-it replace "QOS_CLASS_USER_INITIATED" with Int(QOS_CLASS_USER_INITIATED)

can't figure out why,any idea will be appreciate

4
  • What wrong with that ? just replace it and then see what it wanted here! Commented Jun 1, 2017 at 13:35
  • 1
    You have to tell us more. What's not working? Do you have any error after or before compilation? Show some code. Commented Jun 1, 2017 at 13:40
  • @AbhishekMitra after replace four times it still won't compile and Xcode give up Commented Jun 1, 2017 at 13:48
  • @MichałKwiecień the code and compiler error are posted on picture just click the imageTableViewCell, I will post the text version asap Commented Jun 1, 2017 at 13:52

1 Answer 1

0
DispatchQueue.global(qos: .background).async { //fetch something DispatchQueue.main.async { //update UI } } 
Sign up to request clarification or add additional context in comments.

1 Comment

Please add an explanation of your answer.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.