在JavaScript可以使用try...catch来进行异常处理。例如: try { foo.bar();} catch (e) { alert(e.name + ": " + e.message);}目前我们可能得到的系统异常主要包含以下6种:EvalError: raised when ...
分类:
Web程序 时间:
2015-07-10 13:13:08
阅读次数:
128
先看题1var obj = {name:"a"}function bar(obj) { console.log(obj.name); obj = {name:"b"}; console.log(obj.name)}console.log(bar(obj))console.log(o...
分类:
Web程序 时间:
2015-07-10 09:19:42
阅读次数:
181
iOS7之后关于UINavigationBar和Status Bar都发生了一系列的改变,如果不需要兼容iOS7之后的设备,按照网上有些资料去解决问题会踩到一些坑。在iOS 7中,我们可以修改每个View Controller中状态栏的外观,而iOS7之前的状态栏都是白色风格。iOS7之前设置背景颜...
分类:
移动开发 时间:
2015-07-09 00:21:32
阅读次数:
182
addprefix 是makefile中的函数,是添加前缀的函数例如:$(addprefix src/,foo bar)返回值为“src/foo src/bar”.所以上面的意思是为dirver_dirs变量添加前缀,$(DRIVERS_DIR)/
分类:
其他好文 时间:
2015-07-08 14:29:07
阅读次数:
141
ios6 1、General设置 2、plist里面View controller-based status bar appearance 设置为NO 3、代码[UIApplicationsharedApplication].statusBarHidden=YES;4、-(BOOL)prefersS...
分类:
其他好文 时间:
2015-07-08 10:48:09
阅读次数:
89
问题描述:
因为设计需要,希望让ios7下的状态栏图标强制显示为白色的效果。
解决方案:
在info.plist里边增加主键View controller-based status bar appearance,设置value为YES。
在viewcontroller的实现中增加函数:
- (UIStatusBarStyle)preferredStatusBarStyle
{
/...
分类:
其他好文 时间:
2015-07-05 15:09:47
阅读次数:
108
NSArray是Foundation框架的一种集合类创建一个新的NSArrayNSArray *array = [NSArray arrayWithObjects:@"foo",@"bar",@"baz",nil];NSArray类是不可变的,创建以后就不能改变其内容。顺次访问数组中的元素: 1 N...
分类:
编程语言 时间:
2015-07-03 01:41:56
阅读次数:
224
2014-07-07更新:苹果在iOS 8中全面使用instancetype代替idSteven Fisher:只要一个类返回自身的实例,用instancetype就有好处。@interface Foo:NSObject - (id)initWithBar:(NSInteger)bar; // in...
分类:
移动开发 时间:
2015-07-02 22:25:41
阅读次数:
211
angular js 自带的$location方法十分强大,通过使用$location方法,我们可以获取到服务器的端口、杂乱连接中的path()部分(/所包含的部分);
例:
// given url http://example.com/#/some/path?foo=bar&baz=xoxo
var path = $location.path();
// => "/some/path"...
分类:
Web程序 时间:
2015-07-02 17:42:13
阅读次数:
181
在这里,精灵、动画精灵、button天才、经常使用的文本的使用一个、相关精灵1.加入精灵//创建精灵Spritebar_up=newSprite(400,0,RegionRes.getRegion(Res.BAR_UP), getVertexBufferObjectManager());//将精灵....
分类:
其他好文 时间:
2015-07-02 13:55:54
阅读次数:
105