码迷,mamicode.com
首页 >  
搜索关键字:self    ( 14215个结果
Swift中如何传递Selector参数
Objective-C的@selector在Swift中用Selector结构体来替代。在Swift中,我们可以使用字符串常量来构造Selector,例如: let mySelector: Selector = "tappedButton:" 因为字符串最终会被自动转换成Selector。下面是一个例子: // Swift myButton.addTarget(self, ac...
分类:编程语言   时间:2014-11-01 13:29:59    阅读次数:215
mongodb study
#mongodb study - 读到101个记录不动了,卡住的语句好像是网络不通: > File "/Library/Python/2.7/site-packages/pymongo/cursor.py", line 1058, in next if len(self.__data) or self._refresh(): File "/Libr...
分类:数据库   时间:2014-10-31 22:21:27    阅读次数:331
ios开发 Reflection(三) 利用反射自动绑值
反射的具体应用,自动绑值获取属性列表 1 - (NSArray*)propertyKeys 2 { 3 unsigned int outCount, i; 4 objc_property_t *properties = class_copyPropertyList([self cla...
分类:移动开发   时间:2014-10-31 18:42:27    阅读次数:335
swift版本的快排和归并排序
class SortClass: NSObject { func quickSort(inout array:[Int]){ self.quick(&array, left: 0, right: array.count-1) } func quickMain(...
分类:编程语言   时间:2014-10-31 11:39:31    阅读次数:228
UITableView的多个UITextField时,有的被键盘挡住怎么解决
在UITableView中,经常有很多表单需要输入,有的表单比较靠下,一点击输入时键盘就会弹出,弹出有时候会盖住输入框,那怎么办呢?调用下面的方法,当然你输入的UITextField要有delegate = self。 当前的viewController要实现UITextFieldDelegate。...
分类:其他好文   时间:2014-10-31 11:35:34    阅读次数:191
Emma中文乱码解决方法
vim~/.emma/emmarc db_encoding=latin1 改为db_encoding=utf8 sudovim/usr/share/emma/emmalib/mysql_host.py跳到155行左右的_use_db(self, name, do_query=True),改成如下de...
分类:其他好文   时间:2014-10-31 11:35:16    阅读次数:199
UISearchDisplayController隐藏navigationBar需注意
不能调用self.navigationController.navigationBar.hidden = YES;调用此代码的话,你隐藏了navigationBar搜索展示控制器就拿不到导航条;就会再搞一个navigationBar,搜索展示控制器是要替换导航条的。(当点击searchBar时,它会...
分类:其他好文   时间:2014-10-30 23:53:30    阅读次数:256
ios监听输出设备变化(监听耳机插拔,蓝牙设备连接断开等)的实现
在ios6以前,我们有如下的方法: #import       [[AVAudioSession sharedInstance] setDelegate:self];   AudioSessionAddPropertyListener(kAudioSessionProperty_AudioRouteChange,audioRouteChangeL...
分类:移动开发   时间:2014-10-30 15:20:44    阅读次数:216
在iOS上present一个半透明的viewController
UIViewController *viewController = [[UIViewController alloc]init];UIViewController* controller = self.view.window.rootViewController;viewController.vi...
分类:移动开发   时间:2014-10-30 15:11:36    阅读次数:205
IOS NavigationController Toolbar学习笔记
1、首先将toolbar显示出来,在viewDidLoad中添加代码让toolbar显示,代码如下:[objc]view plaincopyprint?[self.navigationControllersetToolbarHidden:NOanimated:YES] 显示如下图:2、在ToolB....
分类:移动开发   时间:2014-10-30 10:48:21    阅读次数:210
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!