liangtong


  • 首页

  • 标签

  • 分类

  • 归档

  • 关于

  • 搜索

Beyond Compare for Mac免License方法

发表于 2017-12-15 | 分类于 技术分享 | 阅读次数:

本文操作仅供参考,如果感觉使用方面建议购买正版Beyond Compare链接。

具体操作

  • 下载Beyond Compare,然后依次 包含内容 -> Contents -> MacOS
  • 重命名 BCompare -> BCompare.real
  • 新建脚本,命名 BCompare ,修改权限
  • 打开,可以用了
1
2
bogon:MacOS liangtong$ echo "" > BCompare
bogon:MacOS liangtong$ chmod a+x BCompare

其中,新建脚本的内容如下:

1
2
3
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.real $@

最低支持iOS9系统对应状态栏、导航栏UI设置

发表于 2017-11-27 | 分类于 iOS | 阅读次数:

​ iOS9之后,APP在修改状态栏前端等颜色时,弃用了部分接口。比如:

1
2
// Setting the statusBarStyle does nothing if your application is using the default UIViewController-based status bar system.
@property(readwrite, nonatomic) UIStatusBarStyle statusBarStyle NS_DEPRECATED_IOS(2_0, 9_0, "Use -[UIViewController preferredStatusBarStyle]") __TVOS_PROHIBITED;

本文介绍最低支持iOS9系统对应的状态栏前段UI设置。

状态栏字体颜色

程序启动Launch画面

对应状态栏字体颜色,可以通过在plist文件中添加属性 UIStatusBarStyle (或者 Status bar style)来设置字体颜色为黑色 UIStatusBarStyleDefault ,或者白色 UIStatusBarStyleLightContent

功能页面

程序启动后,可以通过重写 UIViewController 中的方法 preferredStatusBarStyle 来实现。例如在程序的Base NavigationController中:

1
2
3
- (UIStatusBarStyle)preferredStatusBarStyle{
return UIStatusBarStyleLightContent;
}

导航栏字体颜色

可以在程序启动时,通过以下代码设置。例如以下代码将导航栏字体颜色设置为白色:

1
2
//NavigationBar 字体颜色
[[UINavigationBar appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName]];

背景颜色

在程序启动时,可以通过代码进行设置

1
2
UIColor* statusBarBackgroundColor;//状态栏颜色
[[UINavigationBar appearance] setBarTintColor:statusBarBackgroundColor];

XCode9对应iOS11系统适配

发表于 2017-11-22 | 分类于 iOS | 阅读次数:

​ 为了适配iOS11系统,将XCode工具升级到了9.1版本。本文记录适配过程中遇到的问题。

NSLocationAlwaysUsageDescription 变更为 NSLocationAlwaysAndWhenInUseUsageDescription

使用iBeacon技术,在程序不打开的情况下对区域进行监听时,需要将位置使用方式设置为Always。控制台出现以下log信息:

This app has attempted to access privacy-sensitive data without a usage description. The app’s Info.plist must contain both NSLocationAlwaysAndWhenInUseUsageDescription and NSLocationWhenInUseUsageDescription keys with string values explaining to the user how the app uses this data

意思是说在plist中需要设置请求位置服务的描述信息。字段名已经提供,只需要将info.plist中响应的字段修改下就可以了。

<—-持续更新中—->

12…20
liangtong

liangtong

Keep hungry keep foolish!

59 日志
7 分类
17 标签
GitHub E-Mail 微博 知乎
友情链接
  • lidm1989
© 2016 — 2018 liangtong
由 Hexo 强力驱动
|
主题 — NexT.Pisces v5.1.4