1、设置tableview返回时取消选中状态- (void)viewWillAppear:(BOOL)animated{ [superviewWillAppear:animated]; [self.tableviewdeselectRowAtIndexPath:self.tableview.in.....
分类:
其他好文 时间:
2014-07-10 13:55:33
阅读次数:
197
1 UIGraphicsBeginImageContext(self.view.bounds.size);// 设置上下文2 3 [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];4 5 UIImage *image=UI...
分类:
移动开发 时间:
2014-07-10 11:01:17
阅读次数:
199
1 # -*-coding:gb2312-*- 2 3 #Function:测试一下多继承 4 5 class A: 6 7 def F1(self): 8 print '调用A.F1()' 9 10 def F2(self):11 ...
分类:
其他好文 时间:
2014-07-10 00:38:31
阅读次数:
367
1. 定义一个方法-(void) update{ }2. 对象注册,并关连消息[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(update) name:@"update" object:nil]3. 在...
分类:
其他好文 时间:
2014-07-07 17:45:21
阅读次数:
312
#!/usr/bin/env pythonimport wxclass MainWindow(wx.Frame): def __init__(self, parent, title): wx.Frame.__init__(self, parent, title=title, si...
分类:
其他好文 时间:
2014-07-07 17:37:18
阅读次数:
142
在代码的deletegater中写:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScre...
分类:
其他好文 时间:
2014-06-30 10:48:04
阅读次数:
240
只是一个简单的小实验,对比了下 延迟绑定 和 非延迟的效率
延迟绑定主要就是使用 static 关键字来替代原来的 self ,但功能非常强大了
实验代码:
class A {
protected static $cc1 = array('a1', 'b', 'c', 'd');
protected static $cc2 = array('a2', 'b', 'c', 'd')...
分类:
Web程序 时间:
2014-06-30 08:46:02
阅读次数:
183
看下面这段代码:#-*-coding:utf-8-*-importcopyclassPresent(object):def__init__(self,str_cmd):self._str_cmd=str_cmdprint"进入Present时的地址:",id(self._str_cmd)defset_value(self):temp="test_cmd"self._str_cmd=copy.deepcopy(temp)defget_value(self):returnself._s..
分类:
编程语言 时间:
2014-06-29 21:38:46
阅读次数:
318
//创建并从底部弹出来
- (void)viewDidLoad
{
[super
viewDidLoad];
[self
setupDocumentControllerWithURL:fileURL];
CGRect rect =
CGRectMake(0,
0, ScreenWidth,
ScreenHeight);
// [s...
分类:
其他好文 时间:
2014-06-28 08:34:02
阅读次数:
202
实用场景编号场景1数据库连接2<?php
/**
*PHP设计模式-单例模式
*@authorchengtao3
*/
classSingleton{
privatestatic$Instance=null;
/**
*公共静态方法获取实例
*@returnSingleton
*/
publicfunctiongetInstance(){
if(self::$Instance==null){
self::$Instanc..
分类:
Web程序 时间:
2014-06-28 00:12:03
阅读次数:
228