PhoneGap:iOS 7 中的 UIPickerView 不会像在 iOS 6 中那样自动调整字体大小。关于如何在 iOS 7 中实现的任何解决方案?
Posted
技术标签:
【中文标题】PhoneGap:iOS 7 中的 UIPickerView 不会像在 iOS 6 中那样自动调整字体大小。关于如何在 iOS 7 中实现的任何解决方案?【英文标题】:PhoneGap : UIPickerView in iOS 7 does not adjust font size automatically as it does in iOS 6. Any solution for how can I achieve in iOS 7? 【发布时间】:2013-12-24 05:49:05 【问题描述】:PhoneGap:ios 7 中的 UIPickerView 不会像在 iOS 6 中那样自动调整字体大小。有什么解决方案可以在 iOS 7 中实现吗?
【问题讨论】:
【参考方案1】:最后添加optgroup
就可以了... :)
<select>
<option selected="" disabled="">Select a value</option>
<option>Grumpy wizards make toxic brew for the evil Queen and Jack</option>
<option>Quirky spud boys can jam after zapping five worthy Polysixes</option>
<option>The wizard quickly jinxed the gnomes before they vaporized</option>
<option>All questions asked by five watched experts amaze the judge</option>
<optgroup label=""></optgroup>
</select>
【讨论】:
【参考方案2】:检查这个:- UIKitUICatalog/UIPickerView
You cannot customize the appearance of picker views.
但是您可以选择其他方法。您可以在此委托方法中返回自定义 UILabel
:-
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view
UILabel *label = [[UILabel alloc] init];
// Set frame, font color, font size, text, etc properties here.
return label;
【讨论】:
这是关于PhoneGap的,其中html“ 好的。我认为 PhoneGap 方法与 iOS 方法相同,因为它们都使用相同的 IDE,即 Xcode。以上是关于PhoneGap:iOS 7 中的 UIPickerView 不会像在 iOS 6 中那样自动调整字体大小。关于如何在 iOS 7 中实现的任何解决方案?的主要内容,如果未能解决你的问题,请参考以下文章
使用 PhoneGap 3.2 在 iOS 7 上延迟后淡出闪屏