Skip to content
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

cell的accessory不是选择none的话好像会出现部分cell的Label不见了 #29

Closed
wxfstwxf opened this issue May 26, 2015 · 2 comments

Comments

@wxfstwxf
Copy link

image

@sunnyxx
Copy link
Member

sunnyxx commented May 27, 2015

1.3 版本已经修复,对于每种 AccessoryType 都枚举了固定的宽度,在计算时减去了这个宽度:

CGFloat contentViewWidth = CGRectGetWidth(self.frame);
    if (cell.accessoryView) {
        contentViewWidth -= 16 + CGRectGetWidth(cell.accessoryView.frame);
    } else {
        static CGFloat systemAccessoryWidths[] = {
            [UITableViewCellAccessoryNone] = 0,
            [UITableViewCellAccessoryDisclosureIndicator] = 34,
            [UITableViewCellAccessoryDetailDisclosureButton] = 68,
            [UITableViewCellAccessoryCheckmark] = 40,
            [UITableViewCellAccessoryDetailButton] = 48
        };
        contentViewWidth -= systemAccessoryWidths[cell.accessoryType];
    }

请注意更新新版本。

@sunnyxx sunnyxx closed this as completed May 27, 2015
@wxfstwxf
Copy link
Author

OK,thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants