zl程序教程

您现在的位置是:首页 >  移动开发

当前栏目

iOS 开发小技巧

ios开发 技巧
2023-09-14 08:57:56 时间
1.隐藏多余的tableView的cell分割线

 self.tableView.tableFooterView= [[UIView alloc]init];
2.取消系统自带的返回字样

 [[UIBarButtonItem appearance]setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60) forBarMetrics:UIBarMetricsDefault];
3.滑动时隐藏navigation

 self.navigationController.hidesBarsOnSwipe=YES;
4.页面跳转是隐藏tabBar

 TwoViewController *twoVC = [[TwoViewController alloc] init];

 twoVC.hidesBottomBarWhenPushed =YES;
5.ScrollView不能滑到顶

 self.automaticallyAdjustsScrollViewInsets=NO;
6.按钮点击发光效果

 button.showsTouchWhenHighlighted =YES;
7.长按手势只执行一次

 if(sender.state == UIGestureRecognizerState)
8.隐藏状态栏

 - (BOOL)prefersStatusBarHidden

 returnYES;

 }
9.在使用view的缩放的时候,layer.border.width随着view的放大,会出现锯齿化的问题。

 self.layer.allowsEdgeAntialiasing = YES;
10、在自定义返回按钮的时候,侧滑手势返回往往默认失效了,怎么让侧滑有效呢 UIButton *btn =[UIButton buttonWithType:UIButtonTypeCustom];

[btn setTitle:@"返回" forState:UIControlStateNormal];

[btn addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside];

btn.frame=CGRectMake(0, 0, 60, 40);

[btn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];

UIBarButtonItem *item =[[UIBarButtonItem alloc]initWithCustomView:btn];

self.navigationItem.leftBarButtonItem=item;
添加下面这一句代码即可

self.navigationController.interactivePopGestureRecognizer.delegate=(id)self;

[ios开发]-APP-上架流程 由于苹果的机制,在非越狱机器上安装必须通过官方的Appstore, 开发者开发好应用后上传Appstore,也需要通过审核等环节。 AppCan作为一个跨主流平台的一个开发平台,也对ipa包上传Appstore作了支持。 本文从三个流程来介绍如何实现AppCan在 线编译出ipa包,以及上传到苹果Appstore。