简体   繁体   English

iOS7 UIPickerView / UIScrollView

[英]iOS7 UIPickerView / UIScrollView

I'm using a UIPickerView in a somewhat unorthodox way to allow users to select a series of images (in this case, they're words on a background, but they can just easily be pictures): 我使用UIPickerView以某种非正统的方式允许用户选择一系列图像(在这种情况下,它们是背景上的文字,但它们可以很容易地成为图片):

在此输入图像描述

Under iOS6 this worked great, but with iOS7 as you can see, the edges of the images fade to white, which makes the control unusuable for this purpose. 在iOS6下,这很好用,但是你可以看到,iOS7的图像边缘渐渐变白,这使得控件无法用于此目的。

My question are -- 我的问题是 -

a) Would there be a way of "fixing" this and still using the UIPickerView control? a)是否有办法“修复”并仍然使用UIPickerView控件? If so, what kind of approach might one take? 如果是这样,可能会采取什么样的方法?

b) If I can't modify the views to eliminate the problem, would a practical alternative to be to use three UIScrollViews to replicate this functionality? b)如果我无法修改视图以消除问题,那么使用三个UIScrollViews复制此功能是否可行?

c) I have at times modified the views presented in a UIPickerView, and I'm considering trying to do that here, ie, to just plug in my own replacement views. c)我有时修改了UIPickerView中显示的视图,我正在考虑在这里尝试这样做,即只插入我自己的替换视图。 But I'm unclear on whether that is practical... I'm questioning how the blur effect is added to these views at the top and bottom and how I might go about eliminating them. 但我不清楚这是否实用......我正在质疑模糊效果如何在顶部和底部添加到这些视图以及如何消除它们。

That's a lot for one post; 这个帖子很多; I'm just trying to decide what the best approach might be to deal with this issue. 我只想确定解决这个问题的最佳方法。

TIA for any suggestions or guidance... 任何建议或指导的TIA ......

I ended up making some adjustments to the implementation that improved the appearance somewhat. 我最终对实现做了一些调整,改善了外观。 We slightly increased the overall size of the picker by scaling it 1.25 (when in portrait view) or 1.40 (when in landscape view). 我们通过缩放1.25(在纵向视图中)或1.40(在横向视图中)略微增加了拾取器的整体尺寸。 At the same time, I slightly reduced the size of the images in the picker. 与此同时,我略微缩小了选择器中图像的大小。 The end result was that overall the frame was bigger, but the images were about the same size as before. 最终结果是整体框架更大,但图像大小与以前大致相同。 But the regions where the appearance is blurred are safely out of view unless one really looks hard for them. 但是外观模糊的地区是安全的,除非一个人真的很难看。 We have judged this will work for now. 我们认为这将暂时有效。

Ultimately, the UIPickerView has, in our opinion, taken a huge step backward with ios7. 最终,UIPickerView在我们看来已经向ios7迈出了一大步。 We are anticipating the need to write something of our own to accommodate our needs in the long run but these changes have allowed us to get by for now. 我们预计需要自己编写一些东西来满足我们的需求,但这些变化使我们现在能够顺利完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM