1.构造函数不会被继承到子类。2.子类的构造函数中的第一行(除注释外)必须是父类对象(super)的构造函数。如果没有显示指定,则有两种情况:1)如果父类有默认构造器(不带参数的构造器才是默认构造器),则会隐式地调用它(super()),此时不会出错;2)如果父类没有默认构造器,则会出错。class...
分类:
编程语言 时间:
2014-08-06 21:55:12
阅读次数:
256
用处:在一个连续的区间中选择一个值-(void)viewDidLoad{ [super viewDidLoad]; CGRect frame = CGRectMake(20,20,200,0); self.slider = [[UISlider alloc]initWithFrame:fra...
分类:
其他好文 时间:
2014-08-06 18:31:51
阅读次数:
235
用处:开关空间,用于处理两种状态-(void)viewDidLoad{ [super viewDidLoad]; CGRect frame = CGRectMake(20,20,0,0); self.switch = [[UISwitch alloc]initWithFrame:frame]; //...
分类:
其他好文 时间:
2014-08-06 18:23:01
阅读次数:
213
用处:输入控件-(void)viewDidLoad{ [super viewDidLoad];//设置大小CGRect frame = CGRectMake(20,20,150,40);//实例化UITextFieldself.tf = [[UITextField alloc]initWithFra...
分类:
其他好文 时间:
2014-08-06 17:16:41
阅读次数:
213
最近温习《learn objective-c on the mac》第4章关于重写的调用了[super setFillColor:c]很不理解其作用,可能是因为翻译逻辑不清的原因吧,特地写了个小例子理解一下定义一个father类和son类father:#import @interface fathe...
分类:
其他好文 时间:
2014-08-06 11:41:41
阅读次数:
241
public class NotificationTest extends Activity
{
static final int NOTIFICATION_ID = 0x1123;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setC...
分类:
移动开发 时间:
2014-08-05 19:23:00
阅读次数:
202
cell被重用如何提前知道?
重写cell的prepareForReuse官方头文件中有说明.当前已经被分配的cell如果被重用了(通常是滚动出屏幕外了),会调用cell的prepareForReuse通知cell.注意这里重写方法的时候,注意一定要调用父类方法[super prepareForReuse] .这个在使用cell作为网络访问的代理容器时尤其要注意,需要在这里通知取消掉前一次网络...
分类:
其他好文 时间:
2014-08-05 15:58:09
阅读次数:
352
UITableView.01:section:组别row:行号【1】拖入一个UITableView【2】将TableView的dataSource与控制器连接【3】首先得遵循UITableView的数据源协议代码1.加入显示数据内容- (void)viewDidLoad{ [super vie...
分类:
其他好文 时间:
2014-08-05 00:20:28
阅读次数:
412
Problem Description
Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to yo...
分类:
其他好文 时间:
2014-08-04 17:50:47
阅读次数:
158
fromdecimalimport*fromPyQt4.QtGuiimport*fromPyQt4.Qtimport*fromPyQt4.QtCoreimport*importsysclassExample(QWidget):def__init__(self,args=None):super(Exa...
分类:
其他好文 时间:
2014-08-04 10:32:47
阅读次数:
245