微信小程序

<view class = "view"> <label class="title">更新设备</label> <view class = "btnView"> <button class="btn" bindtap="updateDeviceClick" >确定</button> </view> </view>……

阅读全文

ALAsset中fullScreenImage和fullResolutionImage使用中的区别

安装 参考链接: sunnyos 端口不能冲突 443 4443 和一个 自定义端口 环境配置 (debain x64) apt-get install build-essential apt-get install git-core golang wget http://www.golangtc.com/static/go/1.4.2/go1.4.2.linux-amd64.tar.gz tar -zxvf go1.4.2.linux-amd64.tar.gz mv go /usr/local/ ln -s /usr/local/go/bin/* /usr/bin/ ngrok编译 cd /usr/local/ git clone https://github.com/inconshreveable/ngrok.git export GOPATH=/usr/local/ngrok/ export NGROK_DOMAIN="linkfun.win" cd ngrok 证书生成 openssl genrsa -out rootCA.key 2048 openssl req -x509 -new -nodes -key rootCA.key -subj "/CN=$NGROK_DOMAIN" -days 5000 -out rootCA.pem openssl genrsa -out server.key 2048 openssl req -new -key server.key -subj "/CN=$NGROK_DOMAIN" -out server.csr openssl x509 -req -in server.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out server.crt -days 5000 复制证书 cp rootCA.pem assets/client/tls/ngrokroot.crt cp server.crt assets/server/tls/snakeoil.crt cp server.key assets/server/tls/snakeoil.key 修改日志路径 (搬瓦工……

阅读全文

免费提供内网映射服务 (已作废)

ngrok客户端 备注 1 暂时只提供ARM32版本 ,如 树莓派3以下的硬件使用 2 有需要的可以联系本blog主,邮箱:[email protected] arm32客户端 ngrok客户端命令 //http ./ngrok -subdomain=域名前缀 端口 ex: ./ngrok -subdomain=aaa 127.0.0.1:12345 //tcp ./ngrok -proto=tcp 端口 ex: ./ngrok -proto=tcp 123 登录客户端 访问 访问 http://test.linkfun.win 即访问本地地址 http://127.0.0.1:11111……

阅读全文

Reveal

Reveal 安装 1.软件路径 ps 使用前 请摆 R_Reveal.app 改为 Reveal.app app文件 破解文件 1.安装原版并运行一次(直接拖入应用即可) -- 假设安装到 /Applications/Reveal.app/ 2.打开/Applications/Reveal.app/Contents/MacOS/Reveal 改名为 Reveal_ 3.将附件复制进来 4.启动主程序即可! xcode中断点 UIApplicationMain expr……

阅读全文

IOS打包IPA

1.修改账户 2.修改证书 3.生成 1.选设备 2.product -> archive -> show in finder 4.IPA 1.show in finder 2.包内容拖到 5.上传内容……

阅读全文

JSPatch使用

JSPatch 热更新 参考文档 jspatch语法 JSPatchConvertor 这个转换代码不能直接使用 原理 装换工具 (js对象转oc对象) // JSChange.h #import <Foundation/Foundation.h> @interface JSChange : NSObject + (instancetype)boxObj:(id)obj; @end // JSChange.m #import "JSChange.h" @interface JSChange () @property (nonatomic) id obj; @end @implementation JSChange + (instancetype)boxObj:(id)obj { JSChange *boxing = [[JSChange alloc] init]; boxing.obj = obj; return boxing; } @end //用法 JSChange.boxObj("www.Q1231321132Q.com").obj() 嵌入项目代码 1 cocoapods target 'MIOS' do platform :ios, '8.0' pod "JSPatch" end 2 js嵌入 [JPEngine startEngine]; NSString *sourcePath = [[NSBundle mainBundle] pathForResource:@"mq" ofType:@"js"]; NSString *script = [NSString stringWithContentsOfFile:sourcePath encoding:NSUTF8StringEncoding error:nil]; [JPEngine evaluateScript:script]; 3 jsDemo require('UIColor,NSString,NSURLRequest,NSURL,JSChange'); defineClass('WebTest', { // viewDidLoad:……

阅读全文

tabview 性能优化

tableView性能优化 cell重用 1 定义ID 2 初始化 //tabview 初始化 - (UITableView*)TabView{ if (!_TabView) { UITableView* v = [[UITableView alloc]init]; v.delegate = self; v.dataSource = self; // 右侧指示器设置 v.sectionIndexBackgroundColor = [UIColor clearColor]; v.sectionIndexColor = PKSecondaryTextColor; v.sectionIndexMinimumDisplayRowCount = 0; // 不显示分割线 v.separatorStyle = UITableViewCellSeparatorStyleNone; [v registerClass:[PKCreateCircleAddFriendHeadCell class] forCellReuseIdentifier:@"head"]; [v registerNib:[UINib nibWithNibName:NSStringFromClass([PKCreateCircleAddFriendSeeCell class]) bundle:nil] forCellReuseIdentifier:@"body"]; _TabView = v; } return _TabView; } //cell 初始化 @implementation PKCreateCircleAddFriendHeadCell - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { [self setup]; } return self; } @end //xib cell 初始化 @implementation PKCreateCircleAddFriendSeeCell #pragma mark - Life cycle.生命周期方……

阅读全文

外部链接打开APP

外部链接打开APP 1 注册协议 /** 外部web传入路径 */ @property (nonatomic, strong) NSURL *openUrl; 2 启动设置 3 回调 // 其它应用启动本应用时,回调 - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{ self.openUrl = nil; BOOL result = [UMSocialSnsService handleOpenURL:url]; if (result == FALSE) { //调用其他SDK,例如支付宝SDK等 self.openUrl = url; } return result; } 4 处理 // 程序获得焦点 - (void)applicationDidBecomeActive:(UIApplication *)application { [PKTestMessage hidHUD]; // 1.发送程序启动通知 [[NSNotificationCenter defaultCenter] postNotificationName:ApplicationDidBecomeActiveNotification object:nil]; // 2.处理外部打开 if……

阅读全文

字符串emoji处理

单个字符emoji转UTF-8 //emojiTab + (NSArray*)emojiReplaceTab{ NSArray * emojiArray = @[@"😀",@"😁",@"😂",@"😃",@"😄",@"😅",@"😆",@"😈",@"😉"……

阅读全文