-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toggled switch overlaps table view cells #1
Comments
Hello gregbarbosa! This issue is caused by hierarchy of views in UITableViewCell(or it's descendant). UITableViewCell has func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier(kTableViewCellIdentifier, forIndexPath: indexPath) as TableViewCell
cell.layer.masksToBounds = true
return cell;
} I hope this helps You. |
@ooleynich thanks so much for the help. Understanding that helped me get my head around it all and what I was missing. Applying I've only have one other problem where my UITableViewCell is a custom cell that has the masksToBounds set to false because of a card style I'm applying to it. func cardSetup() -> Void {
cardView.alpha = 1.0
cardView.layer.masksToBounds = false
cardView.layer.cornerRadius = 2.0
cardView.layer.shadowColor = UIColor(white: 0.0, alpha: 0.35).CGColor!
cardView.layer.shadowOffset = CGSizeMake(0.0, 1.0)
cardView.layer.shadowRadius = 1.5
var path = UIBezierPath(rect: cardView.bounds)
cardView.layer.shadowPath = path.CGPath
cardView.layer.shadowOpacity = 0.75
} This causes some weirdness on the tableview with RAMPaperSwitch applied, but it works better than before. I'll play around with it some more. |
I'm glad you were able to get this working, I'm closing the issue. |
Thanks for putting paper-switch together! I immediately found uses for it and started putting it to work.
Not sure if it's expected or not, but I noticed when placing the switch into a table view's cell, the color bounds goes past the bounds of views inside the cell or even the cell's bounds itself. Could it be that I'm doing something wrong here?
The text was updated successfully, but these errors were encountered: