標題:
創建iPhone鎖定划動條的方法
[打印本頁]
作者:
tateray1352
時間:
2010-8-29 16:57
標題:
創建iPhone鎖定划動條的方法
iPhone關閉屏幕後可以自動鎖定。下面的代碼可以創建一個這樣的划動條。
代碼如下:
#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>
創建之後如果要獲取解鎖,可以重載unlock方法
- (void)unlock
{
//do something
}
原文在這裡。
歡迎光臨 168只魚@休閒論壇 (http://168fish.com.tw/)
Powered by Discuz! 7.0.0