Blog icon indicating copy to clipboard operation
Blog copied to clipboard

BLOG MARKDOWN BAK AND SOME EXERCISES

Results 17 Blog issues
Sort by recently updated
recently updated
newest added

##### 1.Look towards player ``` C# using UnityEngine; using System.Collections; public class LookTowardMouse : MonoBehaviour { void Update () { //Mouse Position in the world. It's important to give it...

Unity3D
2015-10

在接触到开源项目 [Masonry](https://github.com/Masonry/Masonry) 后,里面的布局约束的链式写法让我颇感兴趣,就像下面这样 ``` objective-c UIEdgeInsets padding = UIEdgeInsetsMake(10, 10, 10, 10); [view1 mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(superview.mas_top).with.offset(padding.top); //with is an optional semantic filler make.left.equalTo(superview.mas_left).with.offset(padding.left); make.bottom.equalTo(superview.mas_bottom).with.offset(-padding.bottom); make.right.equalTo(superview.mas_right).with.offset(-padding.right); }]; ``` 其他语言比如 Lua,...

2015-01
IOS
Objective-C

**Xcode版本**:Xcode7.1 beta **iOS版本**:iOS9 beta 运行应用,报错:`Xcode process launch failed: Security`,应用由于安全性问题无法启动,以前没有此情况。 **解决办法**:设置-》通用-》描述文件-》开发商应用里的开发者帐号-》信任

IOS
2015-09

- [https://github.com/XVimProject/XVim/blob/master/Documents/Users/FeatureList.md](https://github.com/XVimProject/XVim/blob/master/Documents/Users/FeatureList.md) # Copy multi-lines 比如我要复制从第1行到第5行的数据,复制到第9行 1. 光标移到第5行任意位置,输入ma 2. 光标移到第1行任意位置,输入y'a(这一定要打这个“'”单引号,否则就进入“INSERT”状态了 3. 光标移到需要复制的行,输入p,行前复制输入大写P 或者 1. 把光标移到第9行 2. shift v 3. 再把光标移到第15行 4. y 5.再再把光标移到第16行 5. p 或者 Nyy命令复制从光标所在行开始的N行,一般在5行以内非常直观的数字时使用的比较多

2015-09
XVim

## 安装 - [https://github.com/supermarin/Alcatraz](https://github.com/supermarin/Alcatraz) - `curl -fsSL https://raw.github.com/supermarin/Alcatraz/master/Scripts/install.sh | sh` ## 卸载 - `rm -rf ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin` ## Xcode插件目录 - `~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins` ## Xcode UUID - `defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID`...

IOS
2015-09

1. 键值编码在什么情况适用? 2. 键值编码的弊端 - 属性路径的拼写:不能依赖智能提示,容易出现拼写错误 - 不能依赖编译器的检查,运行时才报错崩溃 3. 所有的键必须以小写字母开头

IOS
2015-09

## 问题描述 在心城的开发过程中,在处理音频部分时,有这么段代码 ``` objective-c NSError* error; self.audioRecorder = [[AVAudioRecorder alloc] initWithURL:[self getTempAudioPath] settings:settingDic error:&error];; //... if ([self.audioRecorder prepareToRecord]) { [self.audioRecorder record]; } ``` 在模拟器上崩溃,始终停在了`prepareToRecord`这一行,但真机测试没问题。怀疑是模拟器的bug。 [Stackoverflow问题讨论](http://stackoverflow.com/questions/10719758/preparetorecord-crashing) ## 解决办法(不是办法的办法) 在测试音频录制功能时,先暂时禁用掉Xcode的全局断点功能。之后,恢复正常开启全局断点。(默认快捷键:Command+Y)

2015-01
IOS