1 // sa = new ScaleAnimation(0, 1, 0, 1,100,50); 2 // sa = new ScaleAnimation(0, 1, 0, 1, Animation.RELATIVE_TO_SELF, 0.5f, Animation.R...
分类:
其他好文 时间:
2014-08-31 21:26:51
阅读次数:
434
桌面便签软件是Android上常用软件的一种,比如比较早的Sticky Note,就曾非常流行,而实际上使用android平台对widget开发的支持,桌面便签类软件是非常易于开发的。 本文通过逐步实现一个简单的桌面便签软件,和大...
分类:
移动开发 时间:
2014-08-31 18:53:12
阅读次数:
383
UIView *view=[[UIView alloc] initWithFrame:CGRectMake(50, 50, 100, 100)]; view.backgroundColor=[UIColor redColor]; view.tag=10; [self.w...
分类:
移动开发 时间:
2014-08-31 17:02:11
阅读次数:
166
Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime comp...
分类:
其他好文 时间:
2014-08-31 14:27:21
阅读次数:
146
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
self.view.backgroundColor = [UIColor whiteColor];
UIScrollView *scrollView = [[UIScrollVie...
分类:
其他好文 时间:
2014-08-31 09:18:51
阅读次数:
259
1.设置摇动,或要使他变要第一响应者 [[UIApplication sharedApplication]setApplicationSupportsShakeToEdit:YES]; [self canBecomeFirstResponder];2.实现下面几个函数来控制摇一摇的触发的动作- (....
分类:
其他好文 时间:
2014-08-30 09:57:19
阅读次数:
266
1.初始化,在viewDidLoad里,为navigationItem添加名称为“添加分栏”的按钮
2.试图更改按钮名称失败,尝试通过如下方式修改按钮的名称,但是失败了
3.既然只改标题不起作用,那就把整个按钮换掉吧!
创建一个新的按钮,用这个新按钮替换self.navigationItem.rightBarButtonItem,这次总算可以了,谢天谢地!!!...
分类:
移动开发 时间:
2014-08-30 08:48:29
阅读次数:
514
Two elements of a binary search tree (BST) are swapped by mistake.
Recover the tree without changing its structure.
Note:
A solution using O(n)
space is pretty straight forward. Could you devis...
分类:
其他好文 时间:
2014-08-29 21:28:08
阅读次数:
313
# 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
[[UIDevice currentDevice] setProximityMonitoringEnabled:YES]; //建议在播放之前设置yes,播放结束设置NO,这个功能是开启红外感应
//添加监听
[[NSNotificationCenter defaultCenter] addObserver:self
...
分类:
移动开发 时间:
2014-08-29 18:27:48
阅读次数:
280