Objective C 拼接字符串的几种方法

下面介绍使用Objective C连接多个字符串的几种方法。使用 stringByAppendingString 方法将两个字符串连接成一个新字符串:NSString *string1 = @"Thi...
2020-02-24 Objective C 评论 0

Objective C 警告 Values of type 'NSUInteger' should not be used as format arguments

警告的出现在使用 Objective C 的 NSLog 打印数组的长度或者使用 NSUInteger变量。// 定义一个数组NSArray *arr = @[@"1", @"2"];NSLog(@"...
2020-02-15 Objective C 评论 0

Objective C 根据文件的扩展名获取 MIME Type

使用 http post上传文件,需要将文件资源类型传给服务器,这样服务器就可以判断文件是图片还是音视频等。下面介绍在 iOS 项目下,使用了 Objective C,根据文件名称的扩展类型,获取文件...
2020-02-14 Objective C 评论 0
MIP.watch('startSearch', function (newVal, oldVal) { if(newVal) { var keyword = MIP.getData('keyword'); console.log(keyword); // 替换当前历史记录,新增 MIP.viewer.open('/s/' + keyword, {replace: true}); setTimeout(function () { MIP.setData({startSearch: false}) }, 1000); } }); MIP.watch('goHome', function (newVal, oldVal) { MIP.viewer.open('/', {replace: false}); });