我们常常需要用到按钮需要文字和图片同时显示,例如:
我们需要定义一个UIButton的子类
实现文件
- (id)initWithFrame:(CGRect)frame
{
self = [super
initWithFrame:frame];
if (self) {
//可根据自己的需要随意调整
...
分类:
移动开发 时间:
2014-07-26 02:57:06
阅读次数:
265
先来一个离线版本的线段树: 1 /* 2 ID:esxgx1 3 LANG:C++ 4 PROG:hdu4417 5 */ 6 #include 7 #include 8 #include 9 #include 10 using namespace std; 11 12 ...
分类:
其他好文 时间:
2014-07-26 01:10:16
阅读次数:
289
/* super 的作用: 1 . super可以在子类中引用父类的成员,通过 .的方式和属性。this相对应。 2. 在子类的构造方法中可以可使用super(参数列表)语句调用父类的构造方法 3. 注意: 子类的构造方法中一定要调用父类的构造方法.... */
分类:
编程语言 时间:
2014-07-25 14:22:01
阅读次数:
212
我们都知道 this 和 super 关键字,在 调用 构函数的时候,
都必须写在第一行中!
this 调用的是当前的类的构造函数!
super 调用的是父类的构造函数!
this和super可不可以重复??
class Student extends Person
{
int grade;
Student()
{
super();
S...
分类:
其他好文 时间:
2014-07-25 10:59:31
阅读次数:
246
1 UIView自带的方法 2 1> - (void)layoutSubviews; 3 * 当一个控件的frame发生改变的时候就会自动调用 4 * 一般在这里布局内部的子控件(设置子控件的frame) 5 * 一定要调用super的layoutSubviews方法 6 7 2> - (voi.....
分类:
其他好文 时间:
2014-07-25 02:38:44
阅读次数:
209
在自己的app中安装assets目录下的apk文件
public class MainActivity extends Activity {
Context mContext;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);...
分类:
移动开发 时间:
2014-07-24 23:29:43
阅读次数:
370
- (void)viewDidLoad
{
[super viewDidLoad];
UIImageView * animatedImageView = [[UIImageView alloc]initWithFrame:CGRectMake(60, 80, 200, 300)];
animatedImageView.backgrou...
分类:
其他好文 时间:
2014-07-24 23:24:34
阅读次数:
356
packagecom.parami.pkapp.view;importandroid.content.Context;importandroid.util.AttributeSet;importandroid.widget.VideoView;/***videoview全屏*@authorlhy**/publicclassMyVideoViewextendsVideoView{ publicMyVideoView(Contextcontext) { super(context); //TODOAuto..
分类:
其他好文 时间:
2014-07-24 17:55:17
阅读次数:
187
Problem DescriptionNowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know...
分类:
其他好文 时间:
2014-07-24 17:28:16
阅读次数:
241
继承标识:Java使用extends/implement,C++使用:super:调用父类的某些东西instanceof:RTTI机制(A is instanceif B)final:类似于C++中的const,static区别001:extends and implementimplement--...
分类:
编程语言 时间:
2014-07-24 17:20:21
阅读次数:
227