在使用AutoLayout后,想要使用代码控制ScrollView的contentSize,应该在[super
viewDidAppear:animated]之后进行。http://willsbor-blog.logdown.com/posts/179101-ios-autolayout-at-sc...
分类:
其他好文 时间:
2014-05-26 23:45:38
阅读次数:
278
1:static:定义静态方法和属性,也可以用于定义静态变量以及后期静态变量2:extends:继承
例:\n" ; } } //儿子继承父亲类 class Bextends A { function example (){ e...
分类:
Web程序 时间:
2014-05-26 14:54:02
阅读次数:
250
public class HashMap extends AbstractMap
implements Map, Cloneable, Serializablepublic class TreeMap extends
AbstractMap implements Sorted...
分类:
编程语言 时间:
2014-05-26 13:34:23
阅读次数:
268
1、static:静态的静态对象不属于对象,它只属于一个类 class Person{ static
$type="小孩"; public $name; public $pwd;
}2、调用静态对象:person::$type类本身调用静态对象:self::$type3、extends:继承
分类:
其他好文 时间:
2014-05-26 13:12:08
阅读次数:
196
在用ActivityGroup实现的TabHost时,由tab1切换到tab2再切换回来时,会重新加载tab1里的activity
public class MainUIActivity extends ActivityGroup{
private Context context=this;
private TabHost mTabhost;
private String TAB...
分类:
移动开发 时间:
2014-05-26 05:04:45
阅读次数:
287
public ImageButton(Context context, AttributeSet
attrs, int defStyle) { super(context, attrs, defStyle); setFocusable(true); }
在...
分类:
移动开发 时间:
2014-05-25 23:24:31
阅读次数:
393
class SuperClass{ static{ System.out.println("super
class init!"); } static int superInt = 1; static String superString = "supS...
分类:
编程语言 时间:
2014-05-23 04:35:31
阅读次数:
253
import java.util.Random;
public class NumberSort{
/**
* 私有构造方法,禁止实例化
*/
private NumberSort(){
super();
}
/**
* 冒泡排序
* 比较相邻的元素。如果第一个比第二个大,就叫唤他们两个位置。
* 对每一组相邻的元素作同样的工作,从开始的第一对到结束后的最后一对,这样剩下的...
分类:
编程语言 时间:
2014-05-23 02:13:51
阅读次数:
364
昨晚把BaseScreen就敲好了, 也找到了屏幕放缩的最优和最简方式. 不多说, 看代码:
public BaseScreen(final SnakeGo game) { super(new ScalingViewport(Scaling.fit,
CommonConsts.Screen.WIDT...
分类:
其他好文 时间:
2014-05-22 14:52:32
阅读次数:
206
1、在fragment的代码中 @Override public void
onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub
super.onCreate(save...
分类:
其他好文 时间:
2014-05-22 13:48:05
阅读次数:
197