if (top.location != self.location){ top.location=self.location; }
分类:
其他好文 时间:
2014-11-19 17:38:31
阅读次数:
154
classMan(object):
def__init__(self,name,phone):
self.name=name
self.phone=phone
defInfo_p(self):
return"Person%shasphone%s"%(self.name,self.phone)
classStudent(Man):
gpa_total=[]
def__init__(self,name,phone,gpa):
Man.__init__(self,name,phone)
self.gpa=..
分类:
编程语言 时间:
2014-11-19 16:21:27
阅读次数:
230
function Player:addStateMachine() self.fsm_ = {} cc.GameObject.extend(self.fsm_) :addComponent("components.behavior.StateMachine") :export...
分类:
系统相关 时间:
2014-11-19 15:50:21
阅读次数:
295
代码:- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. self.title=@"验证邮箱的合法性"; NSString *...
分类:
其他好文 时间:
2014-11-19 15:47:26
阅读次数:
162
AppDelegate: self.window = UIWindow(frame: UIScreen.mainScreen().bounds) self.window!.backgroundColor = UIColor.whiteColor() self...
分类:
移动开发 时间:
2014-11-19 15:24:47
阅读次数:
207
//创建一个左边按钮
UIBarButtonItem *leftButton = [[UIBarButtonItem
alloc] initWithTitle:@"
style:UIBarButtonItemStylePlain
target:self
action:@selector(clickLeftButton)];
// leftButton.
...
分类:
其他好文 时间:
2014-11-19 10:58:55
阅读次数:
189
__call__ 和 __init__半毛钱的关系都没有。后者是构造类的实例时会调用的方法,并不是构造方法。前者是在实例上可以呼叫的方法。代码示例如下:>>> class foo: def __init__(self): print "init" def __call__(self): prin.....
分类:
编程语言 时间:
2014-11-19 00:02:27
阅读次数:
334
//将要显示键盘 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willShowKeyboard:) name:UIKeyboardWillShowNotification object...
分类:
移动开发 时间:
2014-11-19 00:02:23
阅读次数:
342
先用xcode5或更低版本创建一个Category,如图:然后拷贝以下代码到.m文件中:- (void) setAlpha:(float)alpha { if (self.superview.tag == noDisableVerticalScrollTag) { if ...
分类:
其他好文 时间:
2014-11-18 23:21:47
阅读次数:
342
在你需要使用的地方,首先要调用到这个UITableView,然后设置它的偏移量为 UITableView的内容高度减去UITableView的试图高度
具体demo:
[self.tableView setContentOffset:CGPointMake(0, self.tableView.contentSize.height - self.tableView.height)];...
分类:
移动开发 时间:
2014-11-18 13:37:28
阅读次数:
159