We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
// 设置列宽 - (CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component { NSInteger columnCount = [self numberOfComponentsInPickerView:pickerView]; CGFloat columnWidth = self.pickerView.bounds.size.width / columnCount; if (self.pickerStyle.columnWidth > 0 && self.pickerStyle.columnWidth <= columnWidth) { return self.pickerStyle.columnWidth; } return columnWidth; }
单单宽度除以列数会导致长度超出屏幕, 但我没找到系统中这个关于间距的具体值.
若不实现 宽度 的代理方法 则系统会自动调整以适应屏幕,不过这样就失去了灵活性, 所以除了自己给columnWidth设定一个近似值外,还有什么更好的方式吗?
截图使用 375宽 iOS12 机型
The text was updated successfully, but these errors were encountered:
No branches or pull requests
单单宽度除以列数会导致长度超出屏幕, 但我没找到系统中这个关于间距的具体值.
若不实现 宽度 的代理方法 则系统会自动调整以适应屏幕,不过这样就失去了灵活性, 所以除了自己给columnWidth设定一个近似值外,还有什么更好的方式吗?
截图使用 375宽 iOS12 机型
The text was updated successfully, but these errors were encountered: