记得在cocoa中也有property的概念,python中的property与cocoa里的property好像是差不多的。下面是它的两种用法。用法一:class test(object): def __init__(self): print "init is calling"...
分类:
编程语言 时间:
2014-10-24 18:05:25
阅读次数:
239
storyboard上创建多个viewcontroller在miancontroller上添加viewcontroller的跟视图-(void)viewDidLoad{[superviewDidLoad];self.navigationController.navigationBar.translucent=NO;//createandaddourtwochildrenviewcontrollersfromourstoryboardself.child1=[self.storyboa..
分类:
其他好文 时间:
2014-10-24 16:45:51
阅读次数:
123
1.Reachability// 监听网络状态改变的通知[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkStateChange) name:kReachabilityChangedNot...
分类:
移动开发 时间:
2014-10-24 16:22:23
阅读次数:
343
[_yourTextField addTarget:self action:@selector(eventEditingChange:) forControlEvents:UIControlEventEditingChanged];-(void)eventEditingChange:(UITextF...
分类:
其他好文 时间:
2014-10-24 14:16:58
阅读次数:
203
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
self.viewController = [[[_ViewController alloc] initWithNibName:@"_ViewController_iPhone" bundle:nil] autorele...
分类:
移动开发 时间:
2014-10-23 22:50:34
阅读次数:
203
#!/use/bin/env python#encoding=gbkimportQueueclassStack():def__init__(self, volume=0):self.list=[0foriinrange(0,1000)]ifvolume==0else[0foriinrange(0,v...
分类:
其他好文 时间:
2014-10-23 20:42:47
阅读次数:
200
#!/use/bin/env python#encoding=gbkimportsysclassNode():def__init__(self, data,next=None):self.data=dataself.next=next"""单链表:1. 初始化单链表2. 单链表是否为空3. 单链表的...
分类:
其他好文 时间:
2014-10-23 20:37:14
阅读次数:
185
代码: #import?<Foundation/Foundation.h>
@interface?MyClass?:?NSObject
-?(void)?funcA;
-?(void)?funcAA;
+?(void)?funcA;
+?(void)?funcAA;
@end
@implementation?MyClass
-?(void)?f...
分类:
其他好文 时间:
2014-10-23 14:38:24
阅读次数:
193
NSDictionary * dict=[NSDictionary dictionaryWithObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName]; self.navigationController.naviga.....
分类:
其他好文 时间:
2014-10-23 14:13:20
阅读次数:
142
判断横竖屏。http://www.cocoachina.com/ask/questions/show/121301//self.cameraView是相机view - (NSUInteger)supportedInterfaceOrientations{ UIInterfaceOrientat...
分类:
移动开发 时间:
2014-10-23 12:13:03
阅读次数:
289