添加視圖控制器
// add child viewController
UIViewController* controller =[[UIViewController alloc]init];
[self addChildViewController:controller];
controller.view.frame = CGRectMake(0, 44, WIDHT, HEIGHT - 44);
[self.view addSubview:controller.view];
[controller didMoveToParentViewController:self];
刪除視圖控制器
// remove child viewController
UIViewController *vc = [self.childViewControllers lastObject];
[vc.view removeFromSuperview];
[vc removeFromParentViewController];
常用手勢
UIPanGestureRecognizer(拖動)
UIPinchGestureRecognizer(捏合)
UIRotationGestureRecognizer(旋轉(zhuǎn))
UITapGestureRecognizer(點(diǎn)按)
UILongPressGestureRecognizer(長按)
?UISwipeGestureRecognizer(輕掃)
消除最后一根分割線
cell.separatorInset = UIEdgeInsetsMake(0, 0, 0, cell.bounds.size.width);
dispatch_group_t group = dispatch_group_create();
dispatch_group_async(group, dispatch_get_global_queue(0,0), ^{
//線程一
});
dispatch_group_async(group, dispatch_get_global_queue(0,0), ^{
// 線程二
});
dispatch_group_notify(group, dispatch_get_global_queue(0,0), ^{
//匯總
});
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者