pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

<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="qeccimk" id='wJMRV'><tfoot id='wJMRV'></tfoot><dl id='wJMRV'><fieldset id='wJMRV'></fieldset></dl></div>
      1. UIProgressView 和自定義跟蹤和進(jìn)度圖像(iOS 5 屬性

        UIProgressView and Custom Track and Progress Images (iOS 5 properties)(UIProgressView 和自定義跟蹤和進(jìn)度圖像(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="soc0kwq" 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 和自定義跟蹤和進(jìn)度圖像(iOS 5 屬性)的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  我正在 iOS 5 中試驗(yàn)一些關(guān)于 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"圖像,這樣您就可以制作精美的進(jìn)度條而無需滾動(dòng)-擁有.

                  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 如何拉伸"進(jìn)度圖像,因?yàn)槲臋n有點(diǎn)古怪/或者有一些我不知道的標(biāo)準(zhǔn).無論如何,我想問是否有人可以幫助我了解如何取得適當(dāng)?shù)倪M(jìn)展和跟蹤圖像.

                  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.

                  無論我嘗試哪種尺寸,當(dāng)我加載自定義圖像時(shí)都會(huì)得到類似的結(jié)果:

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

                  我的測(cè)量結(jié)果如下:

                  • UIProgressView 長(zhǎng)度:226 個(gè)單位
                  • 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"]];
                  

                  然后你會(huì)得到奇怪的結(jié)果,因?yàn)樗噲D拉伸一個(gè) 10 像素寬的圖像來填充(例如)一個(gè) 100 像素寬的圖像視圖.這意味著(大致)圖像中的每個(gè)像素都將重復(fù) 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 像素寬的圖像視圖中,會(huì)像這樣拉伸它:

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

                  000000000011111111112222222222333333333344444444445555555555...
                  

                  這就是發(fā)生在你身上的事情.

                  This is what's happening to you.

                  真正希望發(fā)生的事情是這樣的:

                  What you really want to have happen is this:

                  01234567812345678123456781234567812345678...123456789
                  

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

                  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];
                  

                  如果您也希望它垂直平鋪,那么邊緣插入應(yīng)該是 {1, 1, 1, 1}(假設(shè)您想要一個(gè) 1 點(diǎn)邊框).

                  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).

                  對(duì) progressImage 做同樣的事情,你最終會(huì)得到看起來正確的東西:

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

                  您的圖片需要調(diào)整大小.

                  Your images need to be resizable.

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

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

                  相關(guān)文檔推薦

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

                      <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="2uiki2q" id='mY6Z2'><tfoot id='mY6Z2'></tfoot><dl id='mY6Z2'><fieldset id='mY6Z2'></fieldset></dl></div>
                          • 主站蜘蛛池模板: 亳州网络公司 - 亳州网站制作 - 亳州网站建设 - 亳州易天科技 | 澳门精准正版免费大全,2025新澳门全年免费,新澳天天开奖免费资料大全最新,新澳2025今晚开奖资料,新澳马今天最快最新图库-首页-东莞市傲马网络科技有限公司 | 自动记录数据电子台秤,记忆储存重量电子桌称,设定时间记录电子秤-昆山巨天 | 厌氧工作站-通用型厌氧工作站-上海胜秋科学仪器有限公司 | 酒吧霸屏软件_酒吧霸屏系统,酒吧微上墙,夜场霸屏软件,酒吧点歌软件,酒吧互动游戏,酒吧大屏幕软件系统下载 | Trimos测长机_测高仪_TESA_mahr,WYLER水平仪,PWB对刀仪-德瑞华测量技术(苏州)有限公司 | 环保袋,无纺布袋,无纺布打孔袋,保温袋,环保袋定制,环保袋厂家,环雅包装-十七年环保袋定制厂家 | 泥浆在线密度计厂家-防爆数字压力表-膜盒-远传压力表厂家-江苏大亚自控设备有限公司 | 锂辉石检测仪器,水泥成分快速分析仪-湘潭宇科分析仪器有限公司 | RV减速机-蜗轮蜗杆减速机-洗车机减速机-减速机厂家-艾思捷 | 圆形振动筛_圆筛_旋振筛_三次元振动筛-河南新乡德诚生产厂家 | 螺杆泵_中成泵业| 韦伯电梯有限公司| 东莞画册设计_logo/vi设计_品牌包装设计 - 华略品牌设计公司 | 日本东丽膜_反渗透膜_RO膜价格_超滤膜_纳滤膜-北京东丽阳光官网 日本细胞免疫疗法_肿瘤免疫治疗_NK细胞疗法 - 免疫密码 | 耐力板-PC阳光板-PC板-PC耐力板 - 嘉兴赢创实业有限公司 | 诚暄电子公司首页-线路板打样,pcb线路板打样加工制作厂家 | 焦作网 WWW.JZRB.COM | 北京办公室装修,办公室设计,写字楼装修-北京金视觉装饰工程公司 北京成考网-北京成人高考网 | 中高频感应加热设备|高频淬火设备|超音频感应加热电源|不锈钢管光亮退火机|真空管烤消设备 - 郑州蓝硕工业炉设备有限公司 | 德国进口电锅炉_商用电热水器_壁挂炉_电采暖器_电热锅炉[德国宝] | 铝机箱_铝外壳加工_铝外壳厂家_CNC散热器加工-惠州市铂源五金制品有限公司 | 实验室装修_实验室设计_实验室规划设计- 上海广建净化工程公司 | 北京印刷厂_北京印刷_北京印刷公司_北京印刷厂家_北京东爵盛世印刷有限公司 | 水质传感器_水质监测站_雨量监测站_水文监测站-山东水境传感科技有限公司 | 东莞猎头公司_深圳猎头公司_广州猎头公司-广东万诚猎头提供企业中高端人才招聘服务 | 耐磨陶瓷,耐磨陶瓷管道_厂家-淄博拓创陶瓷科技 | 油罐车_加油机_加油卷盘_加油机卷盘_罐车人孔盖_各类球阀_海底阀等车用配件厂家-湖北华特专用设备有限公司 | 西宁装修_西宁装修公司-西宁业之峰装饰-青海业之峰墅级装饰设计公司【官网】 | 利浦顿蒸汽发生器厂家-电蒸汽发生器/燃气蒸汽发生器_湖北利浦顿热能科技有限公司官网 | 搬运设备、起重设备、吊装设备—『龙海起重成套设备』 | 气动球阀_衬氟蝶阀_调节阀_电动截止阀_上海沃托阀门有限公司 | 阴离子聚丙烯酰胺价格_PAM_高分子聚丙烯酰胺厂家-河南泰航净水材料有限公司 | LHH药品稳定性试验箱-BPS系列恒温恒湿箱-意大利超低温冰箱-上海一恒科学仪器有限公司 | 蒸汽热收缩机_蒸汽发生器_塑封机_包膜机_封切收缩机_热收缩包装机_真空机_全自动打包机_捆扎机_封箱机-东莞市中堡智能科技有限公司 | 艺术涂料_进口艺术涂料_艺术涂料加盟_艺术涂料十大品牌 -英国蒙太奇艺术涂料 | 快速门厂家批发_PVC快速卷帘门_高速门_高速卷帘门-广州万盛门业 快干水泥|桥梁伸缩缝止水胶|伸缩缝装置生产厂家-广东广航交通科技有限公司 | 定量包装秤,吨袋包装称,伸缩溜管,全自动包装秤,码垛机器人,无锡市邦尧机械工程有限公司 | 本安接线盒-本安电路用接线盒-本安分线盒-矿用电话接线盒-JHH生产厂家-宁波龙亿电子科技有限公司 | 数显恒温油浴-电砂浴-高温油浴振荡器-常州迈科诺仪器有限公司 | 学生作文网_中小学生作文大全与写作指导 |