- (void)viewDidLoad {
[super
viewDidLoad];
//初始化一个加载图片的试图
imageview=[[UIImageView
alloc]initWithFrame:CGRectMake(0,
50, self.view.frame.size.width,
self.view.frame.size.height-100)]...
分类:
移动开发 时间:
2015-04-06 18:49:30
阅读次数:
137
前几天写了篇聊天室服务器扩展随想,今天有空开始实施第一步,聊天服务器用SignalR self-host,负载用nginx,当然这只是测试,实际使用可能还需要修改。第一步,搭好SignalR服务,端口分别设置为8099和8100。第二步,配置nginx对SignalR的集群,重点在下图中红色部分,一...
分类:
其他好文 时间:
2015-04-06 18:29:51
阅读次数:
171
(void)webViewDidFinishLoad:(UIWebView *)webView {// 禁止用户复制粘贴[self.webView stringByEvaluatingJavaScriptFromString:@”document.documentElement.style.webk...
分类:
移动开发 时间:
2015-04-06 17:02:54
阅读次数:
308
动态非常灵活, 创建一个class后, 给实例绑定一个属性:>>> class Bird:... pass...>>> s = Bird()>>> s.name = 'bob'>>> s.namebob也可以给实例绑定一个方法, 但是这对另一个实例是无效的:>>> def age(self,...
分类:
其他好文 时间:
2015-04-06 15:38:06
阅读次数:
118
-(void)setTextView{UIView*view=[[UIViewalloc]initWithFrame:CGRectMake(0,528,320,40)];view.backgroundColor=[UIColorlightGrayColor];view.tag=100;[self.viewaddSubview:view];[viewrelease];UIImageView*p_w_picpathView1=[[UIImageViewalloc]initWithFrame:CGRectMake(..
分类:
其他好文 时间:
2015-04-06 11:34:26
阅读次数:
139
题目:An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at ...
分类:
其他好文 时间:
2015-04-06 11:15:43
阅读次数:
148
defprocess_item(self,item,spider):ifre.search(r‘***‘,item[‘lineContent‘].encode(‘utf8‘)):raiseDropItem("noneedin%s"%item[‘lineContent‘])else:ifspider.name==‘**‘:query=self.dbpool.runInteraction(self._conditional_insert,item)#query.addErrback(self.handle_err..
分类:
其他好文 时间:
2015-04-06 06:35:15
阅读次数:
1264
1.TabBar的层次结构
2.自定义TabBar的背景
可以将一个很短的图片拉长作为背景图片,方法:
self.backgroundColor = [UIColor
colorWithPatternImage:[UIImage
imageWithName:@"tabbar_background"]];
- (id)initWithFrame:(CGRect)f...
分类:
其他好文 时间:
2015-04-06 01:07:21
阅读次数:
177
一、随机数的声称 1、 arc4random()%10 2、 arc4random_uniform(10) 两种方法产生的效果都是一样的! 二、UIView的常见方法 1、addSubview [self.view addSubview:newView]; 2、NSarrary* subviews这...
分类:
其他好文 时间:
2015-04-05 23:29:54
阅读次数:
209
#import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad{ [super viewDidLoad]; [self crea...
分类:
其他好文 时间:
2015-04-05 23:19:31
阅读次数:
234