文献翻译英文.docx

上传人:b****2 文档编号:1174771 上传时间:2022-10-18 格式:DOCX 页数:7 大小:21.92KB
下载 相关 举报
文献翻译英文.docx_第1页
第1页 / 共7页
文献翻译英文.docx_第2页
第2页 / 共7页
文献翻译英文.docx_第3页
第3页 / 共7页
文献翻译英文.docx_第4页
第4页 / 共7页
文献翻译英文.docx_第5页
第5页 / 共7页
点击查看更多>>
下载资源
资源描述

文献翻译英文.docx

《文献翻译英文.docx》由会员分享,可在线阅读,更多相关《文献翻译英文.docx(7页珍藏版)》请在冰豆网上搜索。

文献翻译英文.docx

文献翻译英文

苹果官方API翻译

1.UIImageView

AUIImageViewobjectdisplaysasingleimageorasequenceofanimatedimagesinyourinterface.ImageviewsletyouefficientlydrawanyimagethatcanbespecifiedusingaUIImageobject.Forexample,youcanusethisclasstodisplaythecontentsofmanystandardimagefiles,suchasJPEGandPNGfiles.Youcanconfigureimageviewsprogrammaticallyorinyourstoryboardfileandchangetheimagestheydisplayatruntime.Foranimatedimages,youcanalsousethemethodsofthisclasstostartandstoptheanimationandspecifyotheranimationparameters.

2.UIImage

AUIImageobjectmanagesimagedatainyourapp.Youuseimageobjectstorepresentimagedataofallkinds,andtheUIImageclassiscapableofmanagingdataforallimageformatssupportedbytheunderlyingplatform.Imageobjectsareimmutable,soyoualwayscreatethemfromexistingimagedata,suchasanimagefileondiskorprogrammaticallycreatedimagedata.Animageobjectmaycontainasingleimageorasequenceofimagesyouintendtouseinananimation.

3.NSTimer

YouusetheNSTimerclasstocreatetimerobjectsor,moresimply,timers.Atimerwaitsuntilacertaintimeintervalhaselapsedandthenfires,sendingaspecifiedmessagetoatargetobject.Forexample,youcouldcreateanNSTimerobjectthatsendsamessagetoawindow,tellingittoupdateitselfafteracertaintimeinterval.

Timersworkinconjunctionwithrunloops.Touseatimereffectively,youshouldbeawareofhowrunloopsoperate—seeNSRunLoopandThreadingProgrammingGuide.Noteinparticularthatrunloopsmaintainstrongreferencestotheirtimers,soyoudon’thavetomaintainyourownstrongreferencetoatimerafteryouhaveaddedittoarunloop.

Atimerisnotareal-timemechanism;itfiresonlywhenoneoftherunloopmodestowhichthetimerhasbeenaddedisrunningandabletocheckifthetimer’sfiringtimehaspassed.Becauseofthevariousinputsourcesatypicalrunloopmanages,theeffectiveresolutionofthetimeintervalforatimerislimitedtoontheorderof50-100milliseconds.Ifatimer’sfiringtimeoccursduringalongcalloutorwhiletherunloopisinamodethatisnotmonitoringthetimer,thetimerdoesnotfireuntilthenexttimetherunloopchecksthetimer.Therefore,theactualtimeatwhichthetimerfirespotentiallycanbeasignificantperiodoftimeafterthescheduledfiringtime.SeealsoTimerTolerance.

4.UIScrollView

UIScrollViewisthesuperclassofseveralUIKitclassesincludingUITableViewandUITextView.

ThecentralnotionofaUIScrollViewobject(or,simply,ascrollview)isthatitisaviewwhoseoriginisadjustableoverthecontentview.Itclipsthecontenttoitsframe,whichgenerally(butnotnecessarily)coincideswiththatoftheapplication’smainwindow.Ascrollviewtracksthemovementsoffingersandadjuststheoriginaccordingly.Theviewthatisshowingitscontent“through”thescrollviewdrawsthatportionofitselfbasedontheneworigin,whichispinnedtoanoffsetinthecontentview.Thescrollviewitselfdoesnodrawingexceptfordisplayingverticalandhorizontalscrollindicators.Thescrollviewmustknowthesizeofthecontentviewsoitknowswhentostopscrolling;bydefault,it“bounces”backwhenscrollingexceedstheboundsofthecontent.

Theobjectthatmanagesthedrawingofcontentdisplayedinascrollviewshouldtilethecontent’ssubviewssothatnoviewexceedsthesizeofthescreen.Asusersscrollinthescrollview,thisobjectshouldaddandremovesubviewsasnecessary.

Becauseascrollviewhasnoscrollbars,itmustknowwhetheratouchsignalsanintenttoscrollversusanintenttotrackasubviewinthecontent.Tomakethisdetermination,ittemporarilyinterceptsatouch-downeventbystartingatimerand,beforethetimerfires,seeingifthetouchingfingermakesanymovement.Ifthetimerfireswithoutasignificantchangeinposition,thescrollviewsendstrackingeventstothetouchedsubviewofthecontentview.Iftheuserthendragstheirfingerfarenoughbeforethetimerelapses,thescrollviewcancelsanytrackinginthesubviewandperformsthescrollingitself.SubclassescanoverridethetouchesShouldBegin:

withEvent:

inContentView:

pagingEnabled,andtouchesShouldCancelInContentView:

methods(whicharecalledbythescrollview)toaffecthowthescrollviewhandlesscrollinggestures.

Ascrollviewalsohandleszoomingandpanningofcontent.Astheusermakesapinch-inorpinch-outgesture,thescrollviewadjuststheoffsetandthescaleofthecontent.Whenthegestureends,theobjectmanagingthecontentviewshouldshouldupdatesubviewsofthecontentasnecessary.(Notethatthegesturecanendandafingercouldstillbedown.)Whilethegestureisinprogress,thescrollviewdoesnotsendanytrackingcallstothesubview.

TheUIScrollViewclass

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 成人教育 > 成考

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1