UIView contentModeContent ModescontentMode是UIView的属性,这个属性的值决定了,当视图的几何形状变化时如何复用它的内容。当视图第一次展示前,它会将自己的内容渲染成一张底层的bitmap. 然后视图的几何变化都不会使bitmap重新生成。而视图conten... Read More
posted @ 2015-11-26 15:37 sue_zheng Views(2840) Comments(0) Diggs(0) Edit
横屏支持常规方法支持旋转// controller的内容是否支持自动旋转- (BOOL)shouldAutorotate{ return YES;}模拟器iOS7.1 :转横屏时,被调用;横屏转竖屏,也被调用。模拟器iOS8.0 :转横屏时,被调用;横屏转竖屏,不被调用。模拟器iOS9.0 :... Read More
posted @ 2015-11-17 15:29 sue_zheng Views(942) Comments(0) Diggs(0) Edit
UIDeviceOrientationrefers to the physical orientation of the device whereasUIInterfaceOrientationrefers to the orientation of the user interface.UIDev... Read More
posted @ 2015-11-12 21:54 sue_zheng Views(1907) Comments(0) Diggs(0) Edit
BlockBlock内引用外部变量的问题// 强引用 #define BLog(prefix,obj) {NSLog(@"位置和指针变量名:%@ ,指针内存地址:%p, 指针值:%p ,指向的对象:%@ ",prefix,&obj,obj,obj);}- (void)blockVariableStr... Read More
posted @ 2015-11-10 23:32 sue_zheng Views(663) Comments(0) Diggs(0) Edit
触摸事件不共享问题在iOS中,当某个触摸事件被UIGestureRecongnizer对象识别出来,就会“吃掉”所有相关的触摸事件,导致其他UIGestureRecongnizer对象无法识别出这个事件解决方法:代理1.UIView的子类self.panGestureRecognizer= ... Read More
posted @ 2015-10-18 23:46 sue_zheng Views(1382) Comments(0) Diggs(0) Edit
iOS中识别双击事件的做法:创建UITapGestureRecognizer对象,设置numberOfTapsRequired的值为2,UITapGestureRecognizer *doubleTapRecognizer = [[UITapGestureRecognizer ... Read More
posted @ 2015-10-18 23:40 sue_zheng Views(1398) Comments(0) Diggs(0) Edit
实例变量和属性声明Person 文件中@interface Person : NSObject { NSString *_name; //实例变量} @property(copy) NSString *firstName; //属性 @property(copy) NSString... Read More
posted @ 2015-10-18 23:15 sue_zheng Views(410) Comments(0) Diggs(0) Edit
Dive into python中说道Tuple是不可变的List,一旦创建了一个Tuple,就不能以任何方式改变它。但是Tuple 比 list 操作速度快。如果您定义了一个值的常量集,并且唯一要用它做的是不断地遍历它,请使用 tuple 代替 list。我写了几行代码测试了一下:example_... Read More
posted @ 2015-07-19 23:04 sue_zheng Views(3089) Comments(0) Diggs(0) Edit
支持类似Path的左下角动画旋转菜单及横向划出菜单、圆心弹出菜单 项目地址:https://github.com/daCapricorn/ArcMenu一、关注3个效果点击中心控制点 的时候,展开效果:中心控制点旋转45度的动画周围children 弹出动画 2.点击中心控制点的时候,收缩动画:中心... Read More
posted @ 2014-12-09 15:39 sue_zheng Views(1095) Comments(0) Diggs(0) Edit
项目地址:https://github.com/chrisbanes/Android-PullToRefresh介绍几个主要的成员变量(1)下拉刷新有四种状态:点击刷新,list的item个数无法填满整个屏幕出现下面效果正在下拉,header出现,箭头向下,提示“下拉刷新”header正在下拉,箭头... Read More
posted @ 2014-10-24 13:01 sue_zheng Views(1008) Comments(3) Diggs(0) Edit