码迷,mamicode.com
首页 >  
搜索关键字:self    ( 14215个结果
摇一摇和手势
1.设置摇动,或要使他变要第一响应者 [[UIApplication sharedApplication]setApplicationSupportsShakeToEdit:YES]; [self canBecomeFirstResponder];2.实现下面几个函数来控制摇一摇的触发的动作- (....
分类:其他好文   时间:2014-08-30 09:57:19    阅读次数:266
iOS常见问题之动态修改UINavigationController的rightBarButtonItem的title
1.初始化,在viewDidLoad里,为navigationItem添加名称为“添加分栏”的按钮 2.试图更改按钮名称失败,尝试通过如下方式修改按钮的名称,但是失败了 3.既然只改标题不起作用,那就把整个按钮换掉吧! 创建一个新的按钮,用这个新按钮替换self.navigationItem.rightBarButtonItem,这次总算可以了,谢天谢地!!!...
分类:移动开发   时间:2014-08-30 08:48:29    阅读次数:514
Remove Nth Node From End of List
# Definition for singly-linked list.class ListNode: def __init__(self, x): self.val = x self.next = Noneclass Solution: # @return ...
分类:其他好文   时间:2014-08-29 19:40:58    阅读次数:164
iOS语音播放之切换听筒和扬声器的方法解决方案
[[UIDevice currentDevice] setProximityMonitoringEnabled:YES]; //建议在播放之前设置yes,播放结束设置NO,这个功能是开启红外感应 //添加监听 [[NSNotificationCenter defaultCenter] addObserver:self                          ...
分类:移动开发   时间:2014-08-29 18:27:48    阅读次数:280
有趣的程序
1.to_proc class Array def to_proc proc { |receiver| receiver.send *self } end end [ 'Hello', 'Goodbye' ].map &[ :+, ' BeiJing!' ] #=> ["Hello BeiJing!", "Goodbye BeiJing!"] recei...
分类:其他好文   时间:2014-08-29 18:18:48    阅读次数:165
回调中释放自己会不会导致崩溃?
比如- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ [self.pickerViewremoveFromSuperview]; .....
分类:其他好文   时间:2014-08-29 17:59:28    阅读次数:222
Path Sum
# Definition for a binary tree nodeclass TreeNode: def __init__(self, x): self.val = x self.left = None self.right = Noneclas...
分类:其他好文   时间:2014-08-29 17:36:18    阅读次数:135
Set Matrix Zeroes
class Solution: # @param matrix, a list of lists of integers # RETURN NOTHING, MODIFY matrix IN PLACE. def setZeroes(self, matrix): di...
分类:其他好文   时间:2014-08-29 16:00:48    阅读次数:203
python2.7批量创建虚拟机
#?-*-?coding:?cp936?-*- #jk409?于2014-8-27用python2.7编写的批量复制文件和修改虚拟机配置文件的脚本 import?os,os.path,shutil import?re,time class?main: ????def?__init__(self,name,drive,...
分类:编程语言   时间:2014-08-29 11:18:48    阅读次数:251
代码截屏的实现
//代码截屏 //(1)设置要截屏的图片大小 UIGraphicsBeginImageContext(self.view.frame.size); //(2)对哪个视图截图固定大小得图片 [self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; //(3)获取截图的图片对象 UI...
分类:其他好文   时间:2014-08-29 11:08:07    阅读次数:145
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!