JS高级—call(),apply(),bind() call() 介绍 通过提供一个新的this值给当前调用的函数/方法,从而改变this指向。 语法 fn.call(this.Arg, arg1, arg2,...) thisArg:当前调用函数this指向的对象 arg1, arg2:传递的其他参数(直接传给形参可不写) 特点 可以直接调用函数—fn.call() 可以改变被调用函数的this指向为指定的— fn.call(this. 移动开发 2025年04月18日 95 点赞 0 评论 19566 浏览
Swift Protocol - 用于通信 一个简单的例子: 比如你封装了一个View, 需要回调出去一个按钮事件 class TestView: UIView { // 注意这里要使用weak标记 weak var delegate: TestViewProtocol? fileprivate lazy var iEnterBtn: UIButton = { let btn 移动开发 2025年04月05日 134 点赞 0 评论 19721 浏览
Android EditText更改软键盘enter键 单独设置 imeOptions 不生效,需加上行数限制与输入类型,原因不知 android:maxLines="1" android:inputType="text" android:imeOptions="actionSearch" 设置多行 分享一:android EditText 单行显示并且设置imeOptions很简单,条件是在xml中将singleLine设置为true, 将 移动开发 2025年04月10日 80 点赞 0 评论 19832 浏览
Android debug包运行正常,release包崩溃 解决办法 1. 添加配置调试release包,这样的抓取的log日志,这种方式可以知道具体错误,(无法精准到是哪一行) /在 AndroidManifest.xml 文件的 application 标签中 添加以下配置,即可在release包下的日志了/ android:debuggable="true" tools:ignore="HardcodedDebugMode" 2.debu 移动开发 2024年11月03日 185 点赞 0 评论 19870 浏览
项目实训(一) 使用VSCode配置Flutter 本周(学期第四周)任务:1.简单学习Flutter,完成环境安装与配置2.探索Flutter与Unity集成方案 一、Flutter环境配置根据Flutter官方文档进行环境配置:开发 Android 应用 | Flutter 中文文档 - Flutter 中文开发者网站 - Flutter使用VS Code来安装Flutter 移动开发 2025年04月18日 63 点赞 0 评论 19972 浏览