setstate from protected to public

setstate should be change to public access so that we can use it outside, according to http://www.cplusplus.com/reference/ios/ios/setstate/