IOS 自定义实体类型转换为Dictionary

摘要: IOS 自定义model如果要转换位json与服务器进行交互的时候,我把model数据类型先转换为了dictionary然后在进行json序列化。#import @implementation ConvertToCustomClass+ (NSMutableArray *)convertCustom... 阅读全文
posted @ 2015-01-23 11:44 bakenG 阅读(471) 评论(0) 推荐(0)

根据屏幕转向方向和屏幕宽度变化改变UITableView显示效果 屏幕旋转

摘要: 获取屏幕转向和根据转向方向设置宽度;1、获取屏幕转向事件:[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(rotateScreen) name:UIDeviceOrientationDidChange... 阅读全文
posted @ 2015-01-23 11:25 bakenG 阅读(653) 评论(0) 推荐(0)

CALayer

摘要: CALayer可以做圆角、阴影、边框等效果;每个UIView内部都有一个Layer属性;是学习核心动画的基础;//设置圆角self.mainView.layer.cornerRadius = 30;(设置为50的话view变成圆形);UIImageView中不仅一个子图层,因此设置圆角时需要使用se... 阅读全文
posted @ 2015-01-23 11:24 bakenG 阅读(114) 评论(0) 推荐(0)

IOS 转场动画

摘要: 转场动画是用于两个view之前的切换效果;普通动画和关键帧动画是用于view中的某一个子视图的动画效果;CATransition *animation = [CATransition animation];animation.duration = 0.5f;//时间animation.type ... 阅读全文
posted @ 2015-01-23 11:22 bakenG 阅读(131) 评论(0) 推荐(0)

IOS 观察者模式

摘要: 一个对象状态改变,通知正在对他进行观察的对象,这些对象根据各自要求进行改变; 在cocoatouch框架中,NSNotification机制和KVO使用了观察者模式通知(notification)机制原理图 在通知机制中,对某个通知感兴趣的所有对象... 阅读全文
posted @ 2015-01-23 11:21 bakenG 阅读(180) 评论(0) 推荐(0)

NSRunloop 个人理解

摘要: 参考来源 http://www.dreamingwish.com/article/ios-multithread-program-runloop-the.htmlRunLoop是一个事件循环的消息处理机制(一个圈不停的转,等着”人"来给他发配任务);RunLoop就是一个循环,用来不停的调度工作以及... 阅读全文
posted @ 2015-01-23 11:18 bakenG 阅读(222) 评论(0) 推荐(0)

js获取浏览器大小

摘要: 1.document.documentElement与document.body页面具有 DTD,或者说指定了 DOCTYPE 时,使用 document.documentElement。页面不具有 DTD,或者说没有指定了 DOCTYPE,时,使用 document.body。在 IE 和 Firefox 中均是如此。为了兼容,不管有没有 DTD,可以使用如下代码:var scrollTop = window.pageYOffset //用于FF || document.documentElement.scrollTop || document.body.scrollTop || 0;var 阅读全文
posted @ 2012-09-18 17:39 bakenG 阅读(129) 评论(0) 推荐(0)

protected修饰符

摘要: protected修饰的变量是不能直接被子类继承使用的。 public class Base { public int a = 1; protected int b = 2; public void Fun() { int c = b; int d = e; } }class BaseChild : Base { int c; int d; public void printTe... 阅读全文
posted @ 2012-06-27 10:46 bakenG 阅读(171) 评论(0) 推荐(0)

Windows Phone开发(3):棋子未动,先观全局

摘要: http://blog.csdn.net/tcjiaan/article/details/7253259 阅读全文
posted @ 2012-06-26 09:49 bakenG 阅读(89) 评论(0) 推荐(0)

05-16

摘要: 1、$.each('这里写要循环遍历的对象集合',function(){ --JS的循环遍历 })2、在ASPX中,如果使用的是服务器空间,当编译为html标签的时候,会改变元素的id,所以使用jquery查找DOM元素的时候,使用属性选择器:$("#batch input[id$='cbxall']) 获取id为batch的元素下面所有的input元素中的id以cbxall结尾的元素$("#batch input[id!='cbxall']") 获取id为batch的元素下面所有的input元素中的id不是以cbx 阅读全文
posted @ 2012-05-16 16:56 bakenG 阅读(116) 评论(0) 推荐(0)