iosswifthuman-interface

Make cell view unavailable color


enter image description here

How to make cell unavailable view like in Settings app on the screen?


Solution

  • Just add below code in cellForRowAt indexPath:

    cell.isUserInteractionEnabled = false
    
    for view in cell.subviews {
        view.alpha = 0.5
    }