里面的Demo都沒(méi)有進(jìn)行封裝
一、mytaobao 模仿的淘寶中 我的淘寶界面的雙波浪圖
技術(shù)博客:地址 模仿我的淘寶雙波浪線和翻頁(yè)效果

模仿淘寶.gif
二、模仿動(dòng)動(dòng)軟件進(jìn)入菜單

CLDatePickerView.gif

CLDatePickerView.gif
三、加載動(dòng)畫 支付寶里面的加載動(dòng)畫效果

模仿淘寶.gif
四、模仿淘寶選擇購(gòu)物車 模仿淘寶選擇顏色、尺碼界面 并加入購(gòu)物車拋物線動(dòng)畫

模仿淘寶.gif
五、圖片輪播 三張imageView 相互切換實(shí)現(xiàn)的

輪播圖.gif
使用方法
- (void)viewDidLoad {
[super viewDidLoad];
CGRect frame = CGRectMake(0, 100, self.view.frame.size.width, 200);
NSArray *imageArr = @[@"1.jpg",@"2.png",@"3.jpg",@"4.jpg",@"1.jpg",@"2.png",@"3.jpg",@"4.jpg",@"1.jpg",@"2.png",@"3.jpg",@"4.jpg"];
CLCycleView *cycleView = [[CLCycleView alloc] initWithFrame:frame duration:3 imageArr:imageArr];
cycleView.delegate = self;
cycleView.currentPageIndicatorTintColor = [UIColor redColor];
cycleView.pageIndicatorTintColor = [UIColor blueColor];
cycleView.diameter = 20;
cycleView.cycleView = ^(NSInteger indexPage) {
NSLog(@"block顯示點(diǎn)擊%ld張圖片",indexPage);
};
self.cycleView = cycleView;
[self.view addSubview:cycleView];
}
#pragma mark - cycleViewDelegate
- (void)cycleViewDidSelected:(NSInteger)pageIndex {
NSLog(@"delegate顯示點(diǎn)擊%ld張圖片",pageIndex);
[self.cycleView stop];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"CLCycleView" message:[NSString stringWithFormat:@"點(diǎn)擊了第%ld張圖片,并且停止播放",pageIndex] preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"開(kāi)始輪播" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[self.cycleView start];
}]];
[self presentViewController:alert animated:YES completion:nil];
}
六、AlertController 模仿微信的彈出框

AlertController.gif
調(diào)用方法和UIAlertController一樣
CLAlertController *alert = [CLAlertController alertControllerWithTitle:@"更改頭像" message:@"選擇方式如下:各種小魔頭這是一個(gè)AlertController 用來(lái)學(xué)習(xí)用的這是一個(gè)AlertController 用來(lái)學(xué)習(xí)用的這是一個(gè)AlertController 用來(lái)學(xué)習(xí)用的" preferredStyle:CLAlertControllerStyleSheet];
[alert addAction:[CLAlertModel actionWithTitle:@"打開(kāi)相機(jī)" style:CLAlertActionStyleDefault handler:^(CLAlertModel *action) {
}]];
[alert addAction:[CLAlertModel actionWithTitle:@"保存照片" style:CLAlertActionStyleDefault handler:^(CLAlertModel *action) {
}]];
[alert addAction:[CLAlertModel actionWithTitle:@"打開(kāi)相冊(cè)" style:CLAlertActionStyleDestructive handler:^(CLAlertModel *action) {
}]];
[alert addAction:[CLAlertModel actionWithTitle:@"取消" style:CLAlertActionStyleCancel handler:^(CLAlertModel *action) {
}]];
[self presentToViewController:alert completion:nil];
七、CLDataPickerController 這個(gè)是年月選擇器 內(nèi)部用UIPickView實(shí)現(xiàn)的

CLDatePickerView.gif
使用方法
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
CLDatePickerView *datePicker = [[CLDatePickerView alloc] init];
datePicker.delegate = self;
[self.view addSubview:datePicker];
}
// 這個(gè)是代理方法
- (void)datePickerView:(CLDatePickerView *)datePickerView didSelectedItem:(NSString *)year month:(NSString *)month {
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"CLDatePickerView" message:[NSString stringWithFormat:@"選擇了:%@年%@月",year,month] delegate:nil cancelButtonTitle:@"取消" otherButtonTitles:nil];
[alertView show];
}
八、CLKeyboardPassWord 這個(gè)是密碼鍵盤 下面的數(shù)字是隨機(jī)生成的 對(duì)支付時(shí)輸入密碼更安全 調(diào)用只需要

CLKeyboardPassWord.gif
使用方法
key = [[CLKeyBoardPassWord alloc] initWithPassword:^(NSString *password) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"密碼" message:password delegate:self cancelButtonTitle:nil otherButtonTitles:@"確定", nil];
[alert show];
} backBlock:^(UIView *view) {
[key dismiss];
}];
[key show];
九、CLPhotoWall 這個(gè)是仿照微信的多選圖片

CLPhotoWall.gif
使用方法
可以用Cocoapods導(dǎo)入 pod "CLPhotoWall"
/*****************************************************************************/
/***************************下面是完成多選照片的方法*******************************/
/*****************************************************************************/
// 多張選擇圖片需要調(diào)用的方法如下
// 1、通過(guò)通知來(lái)獲取圖片
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(choosePhoto:) name:CLPhotoAssetSelectImageNotificationName object:nil];
}
//2、 實(shí)現(xiàn)通知方法 獲取圖片
- (void)choosePhoto:(NSNotification *)noti {
// 內(nèi)部存放的是CLPhotoAssetInfo的對(duì)象
/*
@property (nonatomic, strong) PHAsset *asset;
@property (nonatomic, strong) UIImage *nomalImage;
@property (nonatomic, strong) UIImage *largeImage;
*/
NSArray *images = noti.userInfo[CLPhotoAssetSelectImageNotificationUserInfoKey];
[self.dataSource addObjectsFromArray:images];
[self.collectionView reloadData];
NSLog(@"%@",images);
}
//3、 跳轉(zhuǎn)到圖片選擇界面
- (void)selectImage {
CLPhotoAlbumViewController *albumVC = [[CLPhotoAlbumViewController alloc] init];
albumVC.maxCount = 3;
albumVC.didSelectCount = self.dataSource.count;
[self.navigationController presentViewController:[[UINavigationController alloc] initWithRootViewController:albumVC] animated:YES completion:nil];
}
/*****************************************************************************/
/****************************上面是完成多選照片的方法******************************/
/*****************************************************************************/
最后附Demo地址
歡迎各位伙伴們的Star