久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<tfoot id='wJMRV'></tfoot>

<small id='wJMRV'></small><noframes id='wJMRV'>

    <bdo id='wJMRV'></bdo><ul id='wJMRV'></ul>
<legend id='wJMRV'><style id='wJMRV'><dir id='wJMRV'><q id='wJMRV'></q></dir></style></legend>

      <i id='wJMRV'><tr id='wJMRV'><dt id='wJMRV'><q id='wJMRV'><span id='wJMRV'><b id='wJMRV'><form id='wJMRV'><ins id='wJMRV'></ins><ul id='wJMRV'></ul><sub id='wJMRV'></sub></form><legend id='wJMRV'></legend><bdo id='wJMRV'><pre id='wJMRV'><center id='wJMRV'></center></pre></bdo></b><th id='wJMRV'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='wJMRV'><tfoot id='wJMRV'></tfoot><dl id='wJMRV'><fieldset id='wJMRV'></fieldset></dl></div>
      1. UIProgressView 和自定義跟蹤和進度圖像(iOS 5 屬性

        UIProgressView and Custom Track and Progress Images (iOS 5 properties)(UIProgressView 和自定義跟蹤和進度圖像(iOS 5 屬性))
        1. <tfoot id='d7v34'></tfoot>

            <tbody id='d7v34'></tbody>

          <small id='d7v34'></small><noframes id='d7v34'>

        2. <i id='d7v34'><tr id='d7v34'><dt id='d7v34'><q id='d7v34'><span id='d7v34'><b id='d7v34'><form id='d7v34'><ins id='d7v34'></ins><ul id='d7v34'></ul><sub id='d7v34'></sub></form><legend id='d7v34'></legend><bdo id='d7v34'><pre id='d7v34'><center id='d7v34'></center></pre></bdo></b><th id='d7v34'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='d7v34'><tfoot id='d7v34'></tfoot><dl id='d7v34'><fieldset id='d7v34'></fieldset></dl></div>
              • <bdo id='d7v34'></bdo><ul id='d7v34'></ul>

                  <legend id='d7v34'><style id='d7v34'><dir id='d7v34'><q id='d7v34'></q></dir></style></legend>
                  本文介紹了UIProgressView 和自定義跟蹤和進度圖像(iOS 5 屬性)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我正在 iOS 5 中試驗一些關于 UIProgressView 的新屬性.它們是:

                  I am experimenting with some new properties in iOS 5 regarding UIProgressView. They are:

                  @property(nonatomic, retain) UIImage *progressImage;
                  @property(nonatomic, retain) UIImage *trackImage;

                  這些新屬性支持自定義progress"和track"圖像,這樣您就可以制作精美的進度條而無需滾動-擁有.

                  These new properties enable the customisation of the "progress" and the "track" image, so that you can make fancy progress bars without having to roll-your-own.

                  然而,我無法理解 Apple 如何拉伸"進度圖像,因為文檔有點古怪/或者有一些我不知道的標準.無論如何,我想問是否有人可以幫助我了解如何取得適當的進展和跟蹤圖像.

                  I however cannot understand how Apple "stretches" the progress images, because documentation is a little flakey / OR there is some standard I am not aware of. Regardless, I am asking if someone can help me understand how to make appropriate progress and tracking images.

                  無論我嘗試哪種尺寸,當我加載自定義圖像時都會得到類似的結果:

                  I get results like this when I load my custom images, no matter which sizes I try:

                  我的測量結果如下:

                  • UIProgressView 長度:226 個單位
                  • trackingImage.png:10 像素
                  • progressImage.png: 7px

                  最后,這是我的自定義圖片:

                  Lastly, here are my custom images:

                  progressImage.png

                  trackImage.png

                  推薦答案

                  這是怎么回事:

                  您提供給 UIProgressView 的圖像基本上被推入 UIImageViews,而 UIImageView 正在拉伸圖像以填充空間.

                  The images you provide to the UIProgressView are basically being shoved in to UIImageViews, and the UIImageView is stretching the image to fill the space.

                  如果你只是這樣做:

                  [progressView setTrackImage:[UIImage imageNamed:@"track.png"]];
                  

                  然后你會得到奇怪的結果,因為它試圖拉伸一個 10 像素寬的圖像來填充(例如)一個 100 像素寬的圖像視圖.這意味著(大致)圖像中的每個像素都將重復 10 次.所以如果我們圖像中的像素是:

                  Then you're going to get weird results, because it's trying to stretch a 10px wide image to fill (for example) a 100px wide image view. This means (roughly) that every pixel in the image will be repeated 10 times. So if the pixels in our image were:

                  0123456789
                  

                  然后將該圖像直接放入 100 像素寬的圖像視圖中,會像這樣拉伸它:

                  Then putting that image straight into a 100px wide image view would stretch it something like this:

                  000000000011111111112222222222333333333344444444445555555555...
                  

                  這就是發生在你身上的事情.

                  This is what's happening to you.

                  真正希望發生的事情是這樣的:

                  What you really want to have happen is this:

                  01234567812345678123456781234567812345678...123456789
                  

                  換句話說,您希望圖像有一個從不拉伸的 1 點左邊緣、要平鋪的中心和一個也從不拉伸的 1 點右邊緣.為此,你需要調整圖片大小:

                  In other words, you want the image to have a 1 point left edge that is never stretched, the center to be tiled, and to have a 1 point right edge that is also never stretched. To do this, you'll need to make the image resizable:

                  UIImage *track = [[UIImage imageNamed:@"track"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 1, 0, 1)];
                  [progressView setTrackImage:track];
                  

                  如果您也希望它垂直平鋪,那么邊緣插入應該是 {1, 1, 1, 1}(假設您想要一個 1 點邊框).

                  If you want this to tile appropriately vertically as well, then the edge insets should be {1, 1, 1, 1} (assuming you want a 1 point border).

                  progressImage 做同樣的事情,你最終會得到看起來正確的東西:

                  Do the same to the progressImage, and you'll end up with something that looks correct:

                  您的圖片需要調整大小.

                  Your images need to be resizable.

                  這篇關于UIProgressView 和自定義跟蹤和進度圖像(iOS 5 屬性)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to animate a UIImageview to display fullscreen by tapping on it?(如何通過點擊動畫 UIImageview 以顯示全屏?)
                  To stop segue and show alert(停止 segue 并顯示警報)
                  iOS 5 storyboard, programmatically determine path(iOS 5 故事板,以編程方式確定路徑)
                  Icon already includes gloss effects(圖標已經包含光澤效果)
                  How does UIEdgeInsetsMake work?(UIEdgeInsetsMake 是如何工作的?)
                  drawRect circle and animate size/color(drawRect 圓和動畫大小/顏色)

                      <tbody id='mY6Z2'></tbody>
                      <bdo id='mY6Z2'></bdo><ul id='mY6Z2'></ul>

                      <tfoot id='mY6Z2'></tfoot>

                        1. <small id='mY6Z2'></small><noframes id='mY6Z2'>

                          • <legend id='mY6Z2'><style id='mY6Z2'><dir id='mY6Z2'><q id='mY6Z2'></q></dir></style></legend>

                            <i id='mY6Z2'><tr id='mY6Z2'><dt id='mY6Z2'><q id='mY6Z2'><span id='mY6Z2'><b id='mY6Z2'><form id='mY6Z2'><ins id='mY6Z2'></ins><ul id='mY6Z2'></ul><sub id='mY6Z2'></sub></form><legend id='mY6Z2'></legend><bdo id='mY6Z2'><pre id='mY6Z2'><center id='mY6Z2'></center></pre></bdo></b><th id='mY6Z2'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='mY6Z2'><tfoot id='mY6Z2'></tfoot><dl id='mY6Z2'><fieldset id='mY6Z2'></fieldset></dl></div>
                          • 主站蜘蛛池模板: 午夜欧美日韩 | 91亚洲一区 | 一区视频在线免费观看 | 日韩一区二区三区在线视频 | 成人自拍视频 | 啪啪精品| 欧美一区二区三区在线观看 | 久久久久亚洲 | 成人精品久久日伦片大全免费 | 日韩欧美不卡 | 99这里只有精品视频 | 国产一区在线免费观看 | 精品99久久久久久 | 麻豆久久久久久久 | 欧美大片一区 | 国产在线小视频 | 国产精品a免费一区久久电影 | 欧美激情国产日韩精品一区18 | 国产一级毛片精品完整视频版 | 久久精品日产第一区二区三区 | 伊人在线 | 综合久久久 | 亭亭五月激情 | 91看片网| 久久久夜色精品亚洲 | 亚洲综合在线一区二区 | 日本久久久一区二区三区 | 九九热在线观看 | 欧美成人免费在线 | 国产精品久久久久久久久久久久 | 人人鲁人人莫人人爱精品 | 欧美一区二区三区在线观看 | 日本精品一区二区三区视频 | 久久久亚洲一区 | 久久精品99| 精品视频一区二区三区在线观看 | av综合站 | 淫片专区 | 亚洲网站在线 | 日本在线你懂的 | 久草.com|