iOS

来源:互联网 发布:淘宝店铺图标大全 编辑:程序博客网 时间:2024/06/05 19:26

平常开发中,难免会遇到一些小问题,我把自己之前或者之后遇到的一些点写出来,给自己做个记录,如果能帮上大家的忙的话,也是极好的 ~ ~

  • 点击按钮或者cell时,push的动作或者present的工作有一种延迟的感觉,就好像点了一次没效果,再随意的点一次就OK了,just 下面这个方法加上就可以了 ,获取到当前主线程,去执行
dispatch_async(dispatch_get_main_queue(), ^{    WVPersonEditVC *editVC = [[WVPersonEditVC alloc]init];    editVC.hidesBottomBarWhenPushed = YES;    [self presentViewController:editVC animated:YES completion:nil];});
  • 顺便说一下,想要present出来的视图具备push的动画,你需要在present的时候新建一个导航视图控制器,去present导航,而不是视图,then,push吧 :
dispatch_async(dispatch_get_main_queue(), ^{    WVPersonEditVC *editVC = [[WVPersonEditVC alloc]init];    editVC.hidesBottomBarWhenPushed = YES;     UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:editVC];     [self.navigationController presentViewController:nav animated:YES completion:nil];});

OVER~

0 0
原创粉丝点击