码迷,mamicode.com
首页 >  
搜索关键字:self    ( 14215个结果
cookbook 6.2 定义常量
任务:需要定义一些模块级别的变量(比如命名的常量),而且客户代码无法将其重新绑定;解决方案:#coding = utf-8class _const(object): class ConstError(TypeError): pass def __setattr__(self,name,v...
分类:其他好文   时间:2014-10-01 16:48:41    阅读次数:158
项目总结小问题
iPhone官方SDK:如何隐藏UINavigationBar隐藏:[self.navigationControllersetNavigationBarHidden:NOanimated:YES];显示:[self.navigationControllersetNavigationBarHidden:YESanimated:YES];隐藏返回键self.navigationItem.hidesBackButton=YES;
分类:其他好文   时间:2014-10-01 14:27:31    阅读次数:123
根据View找控制器
- (UIViewController*)viewController{ for (UIView* next = [self superview]; next; next = next.superview) { UIResponder* nextResponder = [next...
分类:其他好文   时间:2014-09-30 21:36:20    阅读次数:154
关于cocos2dx之lua使用TableView
在手机游戏的开发中,滚动是一项非常重要的操作,而cocos2dx中使用的最广泛的就属于TableView了,不过由于cocos2dx的接口比较晦涩,所以需要一个熟悉的过程。本文主要讲解如何使用TableView。 首先当然是创建一个TableView,这比较简单,和其他控件差不多。看看示例代码: self._skillView = cc.TableView:create(cc.size(wi...
分类:其他好文   时间:2014-09-30 18:27:09    阅读次数:295
视图切换的几种方法
代码:-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ //切换方法1 //动画效果:左右滑动 //必须有导航器视图才能切换 [self.navigationController pushView...
分类:其他好文   时间:2014-09-30 14:54:19    阅读次数:165
cookbook 6.1 温标的转换
class Temperature(Object): coefficients={'c':(1.0,0.0,-273.15),'f':(1.8,-273.15,32.0),'r':(1.8,0.0,0.0)} def __init__(self,**kwargs): try...
分类:其他好文   时间:2014-09-30 14:35:49    阅读次数:209
sublime text 另一种对齐
1 #coding=utf-8 2 import sublime, sublime_plugin 3 4 class AutoAlignmentCommand(sublime_plugin.TextCommand): 5 def run(self, edit): 6 pr...
分类:其他好文   时间:2014-09-29 21:11:21    阅读次数:234
IOS StroyBoard 切换操作
storyboard之间的切换有三种方法:[self presentViewController:viewControllerToPresentanimated:YES completion:nil];[self.navigationController pushViewController:vie...
分类:移动开发   时间:2014-09-29 11:08:47    阅读次数:181
ios8下LocationManager及Nsnotification使用
locationservice使用ios8之前locationservice在应用开启self.locationManager=[[CLLocatonManageralloc]init][self.locationManagerstartUpdatingLocation];在iOS8上需要加上kCLAuthorizationStatusAuthorizedAlways,在app中的info.plist中添加NSLocationAlwaysUsageDescripti..
分类:移动开发   时间:2014-09-29 11:00:01    阅读次数:179
【iOS开发-22】navigationBar导航条和navigationItem设置:基本搞定导航条上的文字和按钮以及各种跳转
navigationBar导航条可以看做是self.navigationController导航控制器的一个属性,可以直接用点来表示self.navigationController.navigationBar,当然navigationBar自己还有很多属性,比如样式barStyle、背景backgroundColor、frame属性(可以获取宽高这些信息),还可以用setBackgroundImage方法设置背景图片,当然图片多了可以使用clipsToBounds剪裁。...
分类:移动开发   时间:2014-09-29 00:37:26    阅读次数:321
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!