private void ResetTextShadow(bool visible, NSSet touches)
{
var touch = touches.AnyObject as UITouch;
var view = touch.View;
if (view != null)
{
var cell = view.Superview as UITableViewCell;
if (cell != null && cell.SelectionStyle != UITableViewCellSelectionStyle.None)
{
var textLabel = view.Subviews.FirstOrDefault() as UILabel;
if (textLabel != null)
{
if (visible && oldTextShadowColor != null)
{
textLabel.ShadowColor = oldTextShadowColor;
} else
{
oldTextShadowColor = textLabel.ShadowColor;
textLabel.ShadowColor = UIColor.Clear;
}
}
var detailTextLabel = view.Subviews.LastOrDefault() as UILabel;
if (detailTextLabel != null)
{
if (visible && oldDetailTextShadowColor != null)
{
detailTextLabel.ShadowColor = oldDetailTextShadowColor;
} else
{
oldDetailTextShadowColor = detailTextLabel.ShadowColor;
detailTextLabel.ShadowColor = UIColor.Clear;
}
}
}
}
}
}