码迷,mamicode.com
首页 >  
搜索关键字:note to self    ( 21530个结果
利用KVO监视一个view的frame
首先,keyPath一定是frame,而不是frame.origin.x之类的路径,因为再点下去的话,就是访问结构体内部的值了,KVO是无法检测的,会报错找不到KeyPath。代码如下:1 [_funcMenuVC.view addObserver:self forKeyPath:@"fra...
分类:其他好文   时间:2014-06-02 20:07:13    阅读次数:218
GCD异步下载网页功能
在不使用GCD下载情况:-(void)btnPress:(id)sender{self.labContent.text=@"";self.indicator.hidden=NO;[self.indicatorstartAnimating];NSOperationQueue*que=[[NSOperationQueuealloc]init];NSInvocationOperation*op=[[NSInvocationOperationalloc]initWithTarget:selfsele..
分类:Web程序   时间:2014-06-02 14:27:37    阅读次数:265
LeetCode: Recover Binary Search Tree [099]
【题目】 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 devise a constant space solution? confused what "{1,#,2,3}" ...
分类:其他好文   时间:2014-06-02 10:38:17    阅读次数:246
leetcode-Subsets
Subsets  Total Accepted: 13267 Total Submissions: 48509My Submissions Given a set of distinct integers, S, return all possible subsets. Note: Elements in a subset must be in non-desc...
分类:其他好文   时间:2014-06-02 10:28:35    阅读次数:186
监听键盘右下角的点击
?通过UITextField的代理方法能够监听键盘最右下角按钮的点击1.成为UITextField的代理self.textField.delegate = self;2.遵守UITextFieldDelegate协议,实现代理方法- (BOOL)textFieldShouldReturn:(UITe...
分类:其他好文   时间:2014-06-02 06:43:59    阅读次数:207
iOS: 布局可视化语法 Visual Format Syntax
可视化语法 Visual Format SyntaxThe following are examples of constraints you can specify using the visual format. Note how the text visually matches the im...
分类:移动开发   时间:2014-06-02 05:37:46    阅读次数:351
Can't add self as subview
iOS7刚发布的时候,总是出现这个 Can't add self as subview  的崩溃,团队内部没出现过,但是外部用户的crash频频上报这个崩溃。 异常描述和崩溃堆栈是这样的: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Can't add se...
分类:其他好文   时间:2014-06-01 17:32:08    阅读次数:489
LeetCode: Reverse Linked List II [092]
【题目】 Reverse a linked list from position m to n. Do it in-place and in one-pass. For example: Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2->5->NULL. Note: Given m, n satisfy the following condition: 1 ≤ m ≤ n ≤ length of list. 【题意】 ...
分类:其他好文   时间:2014-06-01 15:08:34    阅读次数:237
LeetCode: Binary Tree Inorder Traversal [094]
【题目】 Given a binary tree, return the inorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 return [1,3,2]. Note: Recursive solution is trivial, could you do it iteratively? confused what "{1,#,2...
分类:其他好文   时间:2014-06-01 13:01:23    阅读次数:279
【LeetCode】Merge Sorted Array
Merge Sorted ArrayGiven two sorted integer arrays A and B, merge B into A as one sorted array.Note: You may assume that A has enough space (size that ...
分类:其他好文   时间:2014-06-01 12:04:32    阅读次数:175
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!