ios slider refactored into directive