美文网首页
工作小tips

工作小tips

作者: iYeso | 来源:发表于2017-02-24 17:06 被阅读34次
1: 设置导航栏为透明
[self.navigationController.navigationBar subviews] objectAtIndex:0].alpha =0

http://blog.csdn.net/w_shuiping/article/details/50403617

http://blog.sina.com.cn/s/blog_4cd8dd1301014cvd.html

2: 设置状态栏的barItem的title的颜色
UINavigationBar.appearance().tintColor = UIColor.cyan
3: 设置图片作为背景

http://www.cnblogs.com/mancong/archive/2015/12/02/5013814.html

4>: app评分

http://www.jianshu.com/p/f2d3f5b3e0b3

5: Ipv6的测试

http://www.cocoachina.com/ios/20160525/16431.html

6: image的居中显示

http://blog.csdn.net/zhoutao198712/article/details/8762012

7: 读取系统的消息

http://blog.csdn.net/bitcser/article/details/53944777

8: 读取网页的标题

http://blog.csdn.net/zhaoweizheng66/article/details/51084395
http://www.cnblogs.com/junhuawang/p/5759224.html

9: 获取label的宽度和高度

http://blog.csdn.net/c_calary/article/details/53037958

10: tableView整体上移时的解决方案
11: 检查iOS项目中是否使用了IDFA

http://www.jianshu.com/p/23479325dfb0
http://www.jianshu.com/p/78d1fbc24e77
http://www.jianshu.com/u/07e63e5fb4ab
http://www.jianshu.com/p/e38c8c514af7
http://www.jianshu.com/p/3ef714214405

11: wkwebView增加进度条

http://www.jianshu.com/p/85ae953380f9

12:审核被拒

https://www.zhihu.com/question/33191327/answer/56159182

13: WKWebView的scrollView设置代理崩溃

http://www.jianshu.com/p/fb6df83f7ebd
http://blog.csdn.net/june_email/article/details/51282415

14: iOS开发Xcode崩溃在main函数入口时如何定位Bug

http://blog.csdn.net/deft_mkjing/article/details/53117341

15: CocoaPods更新工程后编译提示Pods-framework.sh:No Such File or Directo

http://blog.csdn.net/deft_mkjing/article/details/51867719

16: 百度推送30000

http://www.jianshu.com/p/acdf9efe2066
http://blog.csdn.net/u010731949/article/details/52555768

17 推送的坑

http://www.jianshu.com/u/f8650cb2b4eb
http://www.jianshu.com/p/a7384c6d0008 杀死app 保证点击推送通知跳转到相应的界面

18 设置导航栏的背景色

如果全局的设置导航栏的背景色

UINavigationBar.appearance().barTintColor = UIColor.red
19: 设置状态栏的状态
  • 1: 设置info.plistView controller-based status bar appearance设置为YES

    设置控制器管理状态栏
  • 2: // 设置状态拦的状态
    如果有导航栏 需要在自定义的导航栏设置
    如果没有就可以在当前的控制器设置

  // 设置状态拦的状态
  override var preferredStatusBarStyle: UIStatusBarStyle{
    return .lightContent
  }
20: 怎样设置navigationItem的间距

遇到self.navigationItem.rightBarButtonItems设置多个UIBarButtionItem 这时候我们需要每个之间有一定的间距 怎么设置那??

   let marginItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.fixedSpace, target: nil, action: nil)
    marginItem.width = 20
21: 设置导航栏的标题的颜色和字体
设置导航栏的标题的颜色和字体

思路: 在当前的控制器下设置attrubi

 self.navigationController?.navigationBar.titleTextAttributes =[NSForegroundColorAttributeName:UIColor.white,
 NSFontAttributeName:UIFont.boldSystemFont(ofSize: 18)]
22: 设置UIImage的渲染方式
 UIImage(named: "search@2x")?.withRenderingMode(UIImageRenderingMode.alwaysOriginal)
23:设置TabBar的背景色和每一个title的颜色
  UITabBar.appearance().tintColor = UIColor.blue
  UITabBar.appearance().barTintColor = UIColor.yellow
24:设置导航标题的颜色和字体
let attDic = NSMutableDictionary(dictionary: [NSFontAttributeName:UIFont.systemFont(ofSize: 16), NSForegroundColorAttributeName:UIColor.white])
navigationController?.navigationBar.titleTextAttributes = attDic as? [String : Any]
25: 跳转到appStore评论界面
NSString * commontStr = @"itms-apps://itunes.apple.com/cn/app/idxxxxxx?mt=8&action=write-review";
NSURL *url = [NSURL URLWithString:commontStr];
[[UIApplication sharedApplication] openURL:url];
26: 输入框抖动效果
CAKeyframeAnimation *shake = [CAKeyframeAnimation animationWithKeyPath:@"position.x"];
    shake.values = @[@0,@-10,@10,@-10,@0];
    shake.additive = YES;
    shake.duration = 0.25;
    [view.layer addAnimation:shake forKey:@"shake"];

相关文章

  • 工作小tips

    1: 设置导航栏为透明 http://blog.csdn.net/w_shuiping/article/detai...

  • iOS 11 适配以及Xcode 9小Tips

    iOS 11 适配以及Xcode 9小Tips iOS 11 适配以及Xcode 9小Tips

  • android 常用小知识点 tips (二)

    android 常用小知识点 tips (一)android 常用小知识点 tips (二) 持续更新中.... ...

  • iOS图片推送的一些开发小Tips

    iOS图片推送的一些开发小Tips iOS图片推送的一些开发小Tips

  • 小tips

    1.js删除字符串中指定内容 var str='我是一字符串'; str.replace('一','');//将“...

  • 小tips

    IntelliJ IDEA 想在创建文件时自动生成的注释,方法详见截图。

  • 小tips

    如果内容不是太丰富,直接放在一个页面就好,不要使用如下这种tab切换形式,tab切换成本比向下滚动页面的成本要高很...

  • 小tips

    做BIUS,其中underline与strikeout,打算用text-decoration来修饰。原以为不能共存...

  • 小tips

    动画需要获取当前的 Cell ,下面的调用在 viewDidLoad 中,有时候返回 nil,有时候成功。 UIC...

  • 小tips

    锯台架子木方长度一米一,高度暂定七十,下档长度一米一十五,斜撑是脚和下档链接。 然后是一个圆,中点是一...

网友评论

      本文标题:工作小tips

      本文链接:https://www.haomeiwen.com/subject/iwqtwttx.html