On sets detection in iOS