I am trying to change the visibility of few sub layers within my AGSDynamicMapServiceLayer.But didn't found any solution for same.
Please help.
You can specify which layers in the service should be visible by modifying the visibleLayers property. For more information, please refer to this guide page: Dynamic map service layer—ArcGIS Runtime SDK for iOS | ArcGIS for Developers. Here's a code snippet from the documentation.
//only display ‘ushigh’ (id=0) and ‘states’ (id=1) layer
layer.visibleLayers = [0, 1]