- NO.1 最全面最高仿支付寶的手勢解鎖---下載
具體用法如下
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
// 解鎖界面 默認clip:YES, arrow:YES
PCCircleView *lockView = [[PCCircleView alloc] init];
lockView.delegate = self;
self.lockView = lockView;
[self.view addSubview:lockView];
}
#pragma - mark - circleView - delegate
#pragma mark - circleView - delegate - setting
- (void)circleView:(PCCircleView *)view type:(CircleViewType)type connectCirclesLessThanNeedWithGesture:(NSString *)gesture
{
NSString *gestureOne = [PCCircleViewConst getGestureWithKey:gestureOneSaveKey];
// 看是否存在第一個密碼
if ([gestureOne length]) {
NSLog(@"提示再次繪制之前繪制的第一個手勢密碼");
} else {
NSLog(@"密碼長度不合法%@", gesture);
}
}
- (void)circleView:(PCCircleView *)view type:(CircleViewType)type didCompleteSetFirstGesture:(NSString *)gesture
{
NSLog(@"獲得第一個手勢密碼%@", gesture);
// infoView展示對應選中的圓
}
- (void)circleView:(PCCircleView *)view type:(CircleViewType)type didCompleteSetSecondGesture:(NSString *)gesture result:(BOOL)equal
{
NSLog(@"獲得第二個手勢密碼%@",gesture);
if (equal) {
NSLog(@"兩次手勢匹配!可以進行本地化保存了");
} else {
NSLog(@"兩次手勢不匹配其监!");
}
}
#pragma mark - circleView - delegate - login or verify gesture
- (void)circleView:(PCCircleView *)view type:(CircleViewType)type didCompleteLoginGesture:(NSString *)gesture result:(BOOL)equal
{
// 此時的type有兩種情況 Login or verify
if (type == CircleViewTypeLogin) {
if (equal) {
NSLog(@"登陸成功!");
} else {
NSLog(@"密碼錯誤!");
}
} else if (type == CircleViewTypeVerify) {
if (equal) {
NSLog(@"驗證成功毯侦,跳轉(zhuǎn)到設置手勢界面");
} else {
NSLog(@"原手勢密碼輸入錯誤哭靖!");
}
}
}
- NO.2 最強個人界面集成---下載
具體用法如下
繼承LBPersonalPage_VC
- (void)viewDidLoad {
[super viewDidLoad];
//頭像設置
self.headImageView.image = [UIImage imageNamed:@"myheadimage.jpeg"];
//背景設置
self.imageBG.image = [UIImage imageNamed:@"BG.jpg"];
//昵稱設置
self.nameLabel.text = @"BISON";
}
//右邊按鈕
- (void)rightBtnAction{
NSLog(@"hello-rig");
}
//左邊按鈕
- (void)leftBtnAction{
NSLog(@"hello-left");
}
- NO.3 無限循環(huán)圖片輪播---下載
具體用法如下
繼承LBPersonalPage_VC
- (void)viewDidLoad {
[super viewDidLoad];
// 網(wǎng)絡加載圖片的輪播器
cycleScrollView.imageURLStringsGroup = imagesURLStrings;
// 本地加載圖片的輪播器
SDCycleScrollView *cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame: imagesGroup:圖片數(shù)組];
}
版權歸?Bison所有 如需轉(zhuǎn)載請保留原文超鏈接地址!否則后果自負侈离!