//这个frame是初设的,没关系,后面还会重新设置其size。
????UILabel?*label?=?[[UILabel?alloc]?initWithFrame:CGRectMake(0,0,0,0)];
????label.numberOfLines?=?0;
????label.bac...
分类:
移动开发 时间:
2015-07-10 00:35:10
阅读次数:
166
#include
#include
#include
typedef struct Node
{
int data;
struct Node *pNext;
}NODE,*PNODE;
typedef struct Stack
{
PNODE pTop;
PNODE pBottom;
}STACK,*PSTACK;
void init(PSTACK pS);
void push (PSTACK pS,int val);
void ...
分类:
其他好文 时间:
2015-07-10 00:32:08
阅读次数:
117
Collection├List 接口│├LinkedList 链表│├ArrayList 顺序结构动态数组类│└Vector 向量 线程安全│ └Stack 栈└SetMap├HashTable 线程安全├HashMap 可以接受key 为null的情况└WeakHashMap List接口...
分类:
编程语言 时间:
2015-07-09 21:09:22
阅读次数:
127
点击头像放大,其实原理就是在头像处创建一个和头像一样大小的scrollview,然后让其放大至屏幕大小,点击屏幕取消时将其frame恢复之前大小,然后让其消失。1.首先创建头像和用来创建点击手势的视图 AsyncImageView *touxiang=[[AsyncImageView alloc]i...
分类:
移动开发 时间:
2015-07-09 19:26:51
阅读次数:
216
iOS 关于滚动视图contentSize、contentOffset、contentInset 的整理
contentSize 是scrollview可以滚动的区域,比如frame = (0 ,0 ,320 ,480) contentSize = (320 ,960),代表你的scrollview可以上下滚动,滚动区域为frame大小的两倍。
contentOffset 是scrol...
分类:
移动开发 时间:
2015-07-09 16:10:37
阅读次数:
139
题目:
Implement the following operations of a stack using queues.
push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get the top element.empty() -- Re...
分类:
编程语言 时间:
2015-07-09 14:41:27
阅读次数:
135
var button1 = UIButton(frame: CGRectMake(100, 200, 100, 40))
button1 .setTitle("first button", forState:UIControlState.Normal)
button1.addTarget(self, action: "fi...
分类:
编程语言 时间:
2015-07-09 13:18:06
阅读次数:
359
解法一:非递归 1 vector preorderTraversal(TreeNode* root) 2 { 3 vector res; 4 if (root == NULL) 5 return res; 6 7 stack node_stack; 8 ...
分类:
其他好文 时间:
2015-07-09 13:09:15
阅读次数:
103
小知识点:
bounds和frame的区别:
bounds:绝对坐标,以本身坐标系为参照,原点(0,0)
frame:相对坐标,以父视图的坐标系为参照,原点任意。
1.打开网址 http://open.weibo.com/
...
分类:
其他好文 时间:
2015-07-09 11:24:33
阅读次数:
97
首先创建UIWebView,这个不难,设置frame,然后添加到self.view上即可:
UIWebView *webView = [[UIWebView alloc] initWithFrame:self.view.bounds];
webView.scalesPageToFit = YES;//自动对页面进行缩放以适应屏幕
[self.view addSubview:webView];
...
分类:
移动开发 时间:
2015-07-09 11:23:33
阅读次数:
147