码迷,mamicode.com
首页 >  
搜索关键字:self    ( 14215个结果
iOS 图片存到沙盒
- (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
nginx负载SignalR
前几天写了篇聊天室服务器扩展随想,今天有空开始实施第一步,聊天服务器用SignalR self-host,负载用nginx,当然这只是测试,实际使用可能还需要修改。第一步,搭好SignalR服务,端口分别设置为8099和8100。第二步,配置nginx对SignalR的集群,重点在下图中红色部分,一...
分类:其他好文   时间:2015-04-06 18:29:51    阅读次数:171
iOS禁止UIWebView 复制粘贴
(void)webViewDidFinishLoad:(UIWebView *)webView {// 禁止用户复制粘贴[self.webView stringByEvaluatingJavaScriptFromString:@”document.documentElement.style.webk...
分类:移动开发   时间:2015-04-06 17:02:54    阅读次数:308
__slots__
动态非常灵活, 创建一个class后, 给实例绑定一个属性:>>> class Bird:... pass...>>> s = Bird()>>> s.name = 'bob'>>> s.namebob也可以给实例绑定一个方法, 但是这对另一个实例是无效的:>>> def age(self,...
分类:其他好文   时间:2015-04-06 15:38:06    阅读次数:118
弹出键盘textview
-(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
PAT004 Root of AVL Tree
题目: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
爬虫框架scrapy 1个piplines 对应多个spider,并且分别处理
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
【新浪微博项目】05--自定义TabBarButton
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
使用autolayout的NSLayoutConstraint类中的constraintWithItem 、constraintsWithVisualFormat这两个类方法来创建视图并可以实现自动布局
#import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad{ [super viewDidLoad]; [self crea...
分类:其他好文   时间:2015-04-05 23:19:31    阅读次数:234
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!