創(chuàng)建iPhone鎖定劃動(dòng)條方法
作者:佚名
本文介紹的是創(chuàng)建iPhone鎖定劃動(dòng)條方法,內(nèi)容不多,代碼實(shí)現(xiàn),也很好理解,我們來看內(nèi)容。
創(chuàng)建iPhone鎖定劃動(dòng)條方法是本文要介紹的內(nèi)容,內(nèi)容不多,我們先來看內(nèi)容。
iPhone關(guān)閉屏幕后可以自動(dòng)鎖定。下面的代碼可以創(chuàng)建一個(gè)這樣的劃動(dòng)條。如圖所示:
代碼如下:
- #import <telephonyui /TelephonyUI.h>
- TPBottomLockBar* lockBar = [ [ TPBottomLockBar alloc ] initWithFrame:CGRectMake(0.0f, 340.0f, 320.0f, 100.0f) knobColor:1];
- [lockBar setLabel:@"Slide To Unlock"];
- [lockBar setFontSize: 14];
- [lockBar setDelegate: self];
- [contentView addSubview: lockBar];
- [lockBar startAnimating];
- </telephonyui>
創(chuàng)建之后如果要獲取解鎖,可以重載unlock方法
- - (void)unlock
- {
- //do something
- }
小結(jié):創(chuàng)建iPhone鎖定劃動(dòng)條方法的內(nèi)容介紹完了,希望本文對(duì)你有所幫助。
責(zé)任編輯:zhaolei
來源:
互聯(lián)網(wǎng)