mirror of https://github.com/oxen-io/session-ios
				
				
				
			Keeps original background color of a subview in during row selection
When a row is selected in UITableView, background colors of all UIView subviews gets changed. This class will prevent that from happening so that the blue dot can remain blue while the row is selected. Description and solution suggestions found in the following link: https://stackoverflow.com/questions/6745919/uitableviewcell-subview-disappears-when-cell-is-selected/27717607pull/1/head
							parent
							
								
									f9fc882864
								
							
						
					
					
						commit
						8984f659f3
					
				| @ -0,0 +1,12 @@ | |||||||
|  | // Created by Fredrik Lillejordet on 04.03.2018. | ||||||
|  | // Copyright © 2018 Open Whisper Systems. All rights reserved. | ||||||
|  | 
 | ||||||
|  | @objc class NeverClearUIView: UIView { | ||||||
|  |     override var backgroundColor: UIColor? { | ||||||
|  |         didSet { | ||||||
|  |             if backgroundColor != nil && backgroundColor!.cgColor.alpha == 0 { | ||||||
|  |                 backgroundColor = oldValue | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
					Loading…
					
					
				
		Reference in New Issue