Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode complains "attribute private can only be used in a non local scope" when I tried to add private in front of a function

When I tried to add private in front of a function, the xcode complains that "attribute private can only be used in a non local scope". I thought "private" is suppose to be used for things that you want to keep local right?

Could someone tell me how to get ride of the error message? I still want to keep the function private.

enter image description here

like image 616
Thor Avatar asked Aug 01 '16 21:08

Thor


1 Answers

I made it here from searching for this error attribute private can only be used in a non local scope. In my case it was caused by a missing closing bracket at the end of a switch statement. Hope this helps someone.

like image 133
teradyl Avatar answered Dec 08 '22 01:12

teradyl