首页 文章 精选 留言 我的

精选列表

搜索[Swift开发],共10000篇文章
优秀的个人博客,低调大师

【iOS 开发】iOS 10.3 如何更换 app 图标

iOS 10.3 开放了更换 app 图标的 API,核心方法是下面这个: func setAlternateIconName(_ alternateIconName: String?, completionHandler: ((Error?) -> Void)? = nil) 这是官方文档,但是你还需要在 info.plist 里面填一些东西才能让它起作用,这部分官方注释内容在这里。 但 info.plist 如何填写这部分读起来还是有些晦涩,一时可能搞不清楚如何操作,下面做个示范。 Assets.xcassets info.plist <key>CFBundleIcons</key> <dict> <key>CFBundleAlternateIcons</key> <dict> <key>blackBgColor</key> <dict> <key>CFBundleIconFiles</key> <array> <string>blackBgColor</string> </array> <key>UIPrerenderedIcon</key> <false/> </dict> </dict> <key>CFBundlePrimaryIcon</key> <dict> <key>CFBundleIconFiles</key> <array> <string>AppIcon60x60</string> </array> </dict> </dict> 如图,<code>Primary Icon</code> 字段写为 <code>AppIcon60x60</code> 是因为这里 xcassets 里面我只导入了 60pt@2x 和 60pt@3x 的图片资源,这里选为 60 是因为对于 iPhone,60pt 的图片资源图标所需最高质量,更低分辨率的版本系统会自动压缩以展示。 <code>blackBgColor</code> 是我的用于替换原生图标的图片资源。文件名需要和 info.plist 中保持一致(注意 info.plist 中用到了两次 "blackBgColor"),同时这也是你在代码中设置图标时,需要给 API 传入的参数。同样是 60pt@2x 和 60pt@3x 的图片资源,文件不通过 Assets.xcassets 添加进来,而是直接放到目录中。 如果你需要支持 iPad,建议这里使用 83.5pt(iPad Pro)的图片资源。另外还有些其他关于在 iPad 上替换图标的注意事项,在这里有说明,注意我们这里在 info.plist 里面所用的 key 是<code> CFBundleIcons</code>,还有另外一个 key 是 <code>CFBundleIcons~ipad</code>。 替换图标部分的代码就超级简单了: import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() } @IBAction func changeAppIcon(_ sender: Any) { if UIApplication.shared.supportsAlternateIcons { print("you can change this app's icon") }else { print("you cannot change this app's icon") return } if let name = UIApplication.shared.alternateIconName { // CHANGE TO PRIMARY ICON UIApplication.shared.setAlternateIconName(nil) { (err:Error?) in print("set icon error:\(String(describing: err))") } print("the alternate icon's name is \(name)") }else { // CHANGE TO ALTERNATE ICON UIApplication.shared.setAlternateIconName("blackBgColor") { (err:Error?) in print("set icon error:\(String(describing: err))") } } } } 这是上述所有内容的完整 demo 地址 screentshot

优秀的个人博客,低调大师

Android和Unity混合开发——解决方案

按这篇文章来做 http://blog.csdn.net/a369414641/article/details/53436477 要注意的地方 1.app是Android Libray,否则无法打包出.aar包 你可以自已在工程里加Android Libray,名字无所谓 2.文章中没有说manifest怎么修改lauch activty,只 说拿Unity安装目录下的manifest.xml,本人修改后出错 提示un merge,大意是无法合并的意思,目前不知如何解决 所以本人未修改,然后可以生成APK 收获是虽然启动时不能指定自已的MainActivety,但是代码里用AndroidJavaClass可以调用到.aar包里面的类

优秀的个人博客,低调大师

VR(虚拟现实)开发资源汇总

Daydream https://developers.google.cn Virtual Reality High Performance googlevr Google VR for Android GVR SDK and NDKRelease Notes http://www.apkmirror.com/apk/google-inc com.google.vr.vrcore com.google.android.vr.home Google Inc. Daydream (Daydream) Google Inc. Google VR Services (Daydream) What is Google Daydream DaydreamPerformance HUD Daydream Controller手柄数据的解析 How do I fix my Daydream controller Google Daydream Controller Teardown Daydream controller : Comprehensive guide Use the Daydream View controller and headset 谷歌Daydream VR平台应用需求:如何设计VR应用 Algorithm Conversion Quaternion to Euler Conversion Euler to Quaternion ATW Timewarp Asynchronous timewarp How Does Time Warping Work Difference_between_ATW_ASW_and_Reprojection Bluetooth Bluetooth Core Specification HID-over-GATT NordicSemiconductor Dialog-semiconductor SmartBond™ DA14681 Android Bluetooth Low Energy NordicSDK and Documentation Calculate throughput for a BLE link Introduction to Bluetooth Low Energy Android Lollipop: Bluetooth LE Matures Bluetooth Low Energy vs. Classic Bluetooth Getting Started with Bluetooth Low Energy Maximizing BLE Throughput on iOS and Android How different BLE packet types influence throughput Analysis of Latency Performance of Bluetooth Low Energy (BLE) Networks FTS4BT™ Bluetooth® Protocol Analyzer and Packet Sniffer CPAS-11(Frontline_16.10.12321.12610) Latency Front Buffer Rendering Reducing latency in mobile VR by using single buffered strip rendering The importance of fine-grained GPU preemption support for VR Touch IQS525-B000 Unity Unity Editor and Android Runtime for Daydream Unity Download GVR-Unity-SDK Unity3d Quaternion 四元数(Quaternion)和旋转 Qualcomm 基于骁龙 VR SDK的VR图形优化 EGL EGL10 Tracer for OpenGL ES

资源下载

更多资源
优质分享App

优质分享App

近一个月的开发和优化,本站点的第一个app全新上线。该app采用极致压缩,本体才4.36MB。系统里面做了大量数据访问、缓存优化。方便用户在手机上查看文章。后续会推出HarmonyOS的适配版本。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册
修改密码
忘记密码