软件介绍
CityPicker
这是一个类似于携程商旅类型的城市选择器
特性
1.无侵入性
2.使用方便
展示
使用方法
1.将工程中CityPicker中的Citypicker文件夹拖入你要使用的工程
2 调用下方函数即可
CityPickerViewController *vc = [CityPickerViewController new];
[self BottomPushViewController:vc];
vc.selectCityModelHandler = ^(CityModel *model){
[sender setTitle:model.CityName forState:0];
};
3.如果想使用向上弹出的动画调用
-(void)BottomPushViewController:(UIViewController *)VC
{
CATransition *transition = [CATransition animation];
transition.duration = 0.4f;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionMoveIn;
transition.subtype = kCATransitionFromTop;
transition.delegate = self;
[self.navigationController.view.layer addAnimation:transition forKey:nil];
[self.navigationController pushViewController:VC animated:NO];
}
4.完成