-2
    const UIView * vLocalBottomButton = self.BottomButton;

    vLocalBottomButton =nil;

Basically I want to pass on self.BottomButton to a method that will run at outside the main thread. When the view is used, it'll be done at the main thread.

I just need to ensure that the view doesn't change. That's all. So I put it to a local variable and then pass that local variable to ensure that vLocalBottomButton didn't change.

Wolf
  • 9,679
  • 7
  • 62
  • 108
user4951
  • 32,206
  • 53
  • 172
  • 282

1 Answers1

3

You should create constant pointer. In your case:

UIView * const vLocalBottomButton = self.BottomButton;

//this won't compile therefore

vLocalBottomButton =nil;
Alexander Tkachenko
  • 3,221
  • 1
  • 33
  • 47