
开发
ZHUTAN_123
这个作者很懒,什么都没留下…
展开
-
Lexical or Preprocessor Issue Group,masonry not found 问题 Pod
pod masonry 后,报错,提示报错信息Lexical or Preprocessor Issue Group,masonry not found ,从网上查找了很多资料,修改路径,manager scheme,尝试了各种方法,都无法变异通过.最后经过小伙伴的帮助检查,在Podfile文件里加入一句use_frameworks!后编译通过....原创 2020-04-01 12:04:27 · 834 阅读 · 0 评论 -
swift 各种控件的简单使用
1,button let btn1 = UIButton(frame: CGRect(x: 40, y: 80, width: 100, height: 40)) btn1.backgroundColor = UIColor.green btn1.setTitle("button", for: .normal) btn1.addT...原创 2018-08-11 10:56:03 · 2107 阅读 · 0 评论 -
百度云语音合成
上篇介绍了百度云语音识别的功能,接下来开始实现百度云语音合成的功能。接上篇:百度云语音识别一,配置环境,导入依赖的库文件二,#import "BDSSpeechSynthesizer.h"//遵循代理@interface ViewController ()<BDSSpeechSynthesizerDelegate>//初始化控件@property(non...原创 2018-08-18 14:16:14 · 968 阅读 · 0 评论 -
百度云语音识别
最近公司做项目,需要用到语音识别,所以自己根据百度云文档以及从网上查找的一些资源作出以下总结:一,准备工作1,新建一个项目2,在百度云开放平台创建应用,控制台>产品服务>人工智能>百度语音3,创建完应用后获得APPID,APPKEY,APP秘密。二,配置环境1,下载百度云语音识别SDK文件及三方库文件,并将文件导入工程,注意:BDVoiceRecognit...原创 2018-08-17 14:13:19 · 3130 阅读 · 0 评论 -
如何创建.a文件
1.首先创建一个新的工程,选择Framework&Libryary,在选择Cocoa Touch Static Library 工程名自己定义2.接下来你会看到自动生成.h和.m文件 可以在.m文件中写你要的代码.h.m4.接下来就是编译生成.a文件了快捷键(command+B)选中真机编译和选中模拟机编译对应生成的连个.a文件一个是真机的一个是模拟机的...原创 2018-10-06 16:12:16 · 2012 阅读 · 0 评论 -
Xcode10 #import 不提示头文件
Xcode --> File --> Workspace Settings --> Build System --> Legacy Build System原创 2018-10-10 15:27:19 · 6089 阅读 · 0 评论 -
上传项目到码云步骤
一、上传码云步骤在本地新建一个文件夹-----本地仓库这个时候的文件夹是空的,cd 文件夹路径 git init然后,连接远程仓库: git remote add orgin https://gitee.com/。。。.gitgitpull origin master将你的项目文件拷贝到本地仓库中使用git add . 命令git commit -m '...原创 2018-11-12 11:06:13 · 695 阅读 · 0 评论 -
iOS系统定位(一)
第一步.添加库 CoreLocation.framework第二步.在info.plist文件里添加 这两个描述 获得用户的允许权限1.Privacy - Location When In Use Usage Description -> 是否允许此App在使用期间访问你的位置?2.Privacy - Location Always Usage Description ->...原创 2018-12-04 10:31:36 · 1668 阅读 · 0 评论 -
调起手机相机拍照和手机相册选取多张图片
一、调起手机相机1.设置相机相册权限2.添加代理UINavigationControllerDelegate,UIImagePickerControllerDelegate3.设置代理//调起相机- (void)goCamara{ UIImagePickerController *picker = [[UIImagePickerController alloc]...原创 2019-03-01 10:18:08 · 905 阅读 · 0 评论 -
取消tabBaritem 点击事件
#import "BaseTabBarController.h"ViewController *voice = [[ViewController alloc]init]; [self createTabBarItemWithController:voice title:@"" image:[UIImage imageNamed:@"首页B01"] selectImage:[UIIm...原创 2019-02-27 11:50:22 · 551 阅读 · 0 评论 -
通过TZImagePickerController获取手机相册多张图片
一、介绍1.国人封装,易于解读2.通过cocoaPods可以封装3.没有二次依赖SDWebImage,一般不会报错4.可以不设置代理二、使用方法一:TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithSelectedAssets:_selectedAsset...原创 2019-03-20 11:20:32 · 1671 阅读 · 0 评论 -
iOS性能测试
一、Product-->Profile运行查看(注意:选项配置)(1)Separate by Thread:按线程分开进行分析。容易找出消耗资源的问题线程,特别是对于主线程,因为主线程要处理和渲染所有的接口数据及UI视图,当主线程受到阻塞性操作,一定会造成程序的卡顿,或停止响应。(2)Invert Call Tree:反向显示调用树。把调用层级最深的方法显示在最上面,容易...原创 2019-05-07 10:54:41 · 1022 阅读 · 0 评论 -
block详解
一、简述:a.每一个方法都是在被调用的时候从硬盘到内存,然后去执行,执行完就消失。在内存的栈区,不需要我们去管理。b.block,我们成为代码块,它类似一个方法,也是在栈区的。c.如果我们使用block作为一个对象的属性,则用copy关键词修饰。这样系统会把block的实现拷贝一份到堆区,保证代码块不会提前消亡,使我们对应的属性拥有该block的所有权。d.block常用于对象之间的通信...原创 2019-05-22 10:33:07 · 469 阅读 · 0 评论 -
swift 与 oc 混编
1,OC项目在导入swift文件前 先按照系统提示创建桥接文件2,在 targets -> Build Settings -> Packaging 中设置Defines Module 为YES3,在桥接文件中导入OC文件的头文件//#import "MyViewController.h"#import <UIKit/UIKit.h>@interface ...原创 2018-08-11 10:09:05 · 264 阅读 · 0 评论 -
Unable to find a pod with name, author, summary, or description matching `fmdb`
1,先移除掉本地的master,在终端输入pod repo remove master2,在终端输入cd ~/.cocoapods/repos3,把github上的spec下载下来,替换路径~/.cocoapods/repos目录下的master接着在终端输入命令:git clone --depth 1 https://github.com/CocoaPods/Specs.gi...原创 2018-07-24 15:13:10 · 2850 阅读 · 0 评论 -
ios错误收集
’NSConcreteMutableAttributedString initWithString:: nil value’ label.text 不能为空 将label.text = model.company_introduce,改为 label.text = [NSStringstringWithFormat:@”%@”,model.company_introduce];emaii原创 2017-04-11 08:58:40 · 467 阅读 · 0 评论 -
UM三方登录报错
①如果你的输出信息是-canOpenURL: failed for URL: “kindle://home” - error: “This app is not allowed to query for scheme kindle” 去你的 target 里面的 Build Settings 下的 Enable Bitcode,把它设置成 NO,这不一定会阻挡你的控制台继续输出这条信息,但是可原创 2017-04-30 15:24:14 · 709 阅读 · 0 评论 -
ios对象转换为字典
/** * 对象转换为字典 * * @param obj 需要转化的对象 * * @return 转换后的字典 */+ (NSDictionary*)getObjectData:(id)obj { NSMutableDictionary *dic = [NSMutableDictionary dictionary]; unsigned int propsCount;转载 2017-04-21 09:17:50 · 735 阅读 · 0 评论 -
支付宝支付思路
支付宝支付思路原创 2017-04-25 17:20:47 · 515 阅读 · 0 评论 -
推送证书绑定的Bundle identifier 与Xcode中的Bundle identifier 不匹配的错误
推送证书绑定的Bundle identifier 与Xcode中的Bundle identifier 不匹配的错误 The provisioning profile specified in your build settings (“xxxxx”) has an Bundle identifie of “xxx” which does not match your bundle identi原创 2017-05-08 16:58:44 · 4776 阅读 · 0 评论 -
数组、字典转为json字符串
+ (NSString *)dictionaryToJSONString:(NSDictionary *)dictionary { NSError *error = nil; NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dictionary options:NSJSONWritingPrettyPrinted原创 2017-04-21 09:43:57 · 560 阅读 · 0 评论 -
Xcode快捷键
1,查找 command+f command+shift+f 2, 新建工程 command+ shift+n 3, 新建类 conmand+n 4, 运行 command+r 5, 编译 command+b原创 2017-04-14 14:28:43 · 288 阅读 · 0 评论 -
清除缓存
// 显示缓存大小-( float )filePath{ NSString * cachPath = [ NSSearchPathForDirectoriesInDomains ( NSCachesDirectory , NSUserDomainMask , YES ) firstObject ]; return [ self folderSizeAtPath :cachPath];原创 2017-07-06 17:37:28 · 254 阅读 · 0 评论 -
shareSDK 报错
Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[__NSArrayM enqueue:]: unrecognized selector sent to instance 0x60000024ef40’ 这是用为没有在building settings 里的 Other Linker原创 2017-07-25 14:21:24 · 402 阅读 · 0 评论 -
解析数据时根据sort排序
NSString *topUrl = @"http://www.maidian.tv/?c=app&a=television_category"; [NetworkCore getInfoLine:topUrl withSuccessBlock:^(id responesObj) { NSArray *listArray = [responesObj objectForKey原创 2017-09-04 10:26:39 · 280 阅读 · 0 评论 -
jsonModel 中含有id的解决办法
.h@property (nonatomic,copy)NSString *nId;//编号- (void)setValue:(id)value forUndefinedKey:(NSString *)key ;.m- (void)setValue:(id)value forUndefinedKey:(NSString *)key { if([key isEqualToString:@原创 2017-09-04 11:13:53 · 1674 阅读 · 0 评论 -
MD5 加密
苹果包装了MD5加密的方法,使用起来十分的方便。 1、导入头文件:#import<CommonCrypto/CommonDigest.h> 2、MD5加密方法:- (NSString *) md5:(NSString *) input { const char *cStr = [input UTF8String]; unsigned char digest[CC_MD5_D原创 2017-09-16 11:53:16 · 239 阅读 · 0 评论 -
模拟器运行正常,真机报错:clang: error: linker command failed with exit code 1 (use -v to see invocation)
把yes 改为no原创 2017-08-31 13:16:51 · 499 阅读 · 0 评论