@interface ViewController (){ Shape *_shape;}@end@implementation ViewController- (void)loadView{ //设置画板 self.view=[[SimpleDrawBoard alloc]ini...
分类:
其他好文 时间:
2014-09-04 22:13:40
阅读次数:
245
1.密码判断
至少包含数字、字母(区分大小写)、符号中的2种
NSString *regex = @"^(?![A-Z]+$)(?![a-z]+$)(?!\\d+$)(?![\\W_]+$)\\S+$";
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"self matches %@",re...
分类:
其他好文 时间:
2014-09-04 19:05:50
阅读次数:
210
不多解释,预防普通锁不正规的获取与释放#!/usr/bin/env python# -*- coding: utf-8 -*-import threadingimport timeclass MyThread(threading.Thread): def run(self): g...
分类:
编程语言 时间:
2014-09-04 19:00:19
阅读次数:
201
- (void)loadData { NSMutableArray *array = [NSMutableArray arrayWithCapacity:10]; if ([self.title isEqualToString:@"名字"]) { self.nameStr = inputT...
分类:
移动开发 时间:
2014-09-04 16:34:39
阅读次数:
179
抄自http://beyondvincent.com/blog/2014/03/17/five-tips-for-using-self-signed-ssl-certificates-with-ios/ios7以后,inhouse安装需要ssl了,一般用商用的,不想用商用的,就自己弄一个,通过ope...
分类:
移动开发 时间:
2014-09-04 14:40:09
阅读次数:
232
首先重写UITableViewCell的初始化方法:- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (...
分类:
移动开发 时间:
2014-09-04 09:46:27
阅读次数:
195
OC的self相当于C++里面的this吧。一般都是隐形的,就是不写出来的。其实就是自己的意思,谁调用就说的是谁,那么super呢?就是父类,谁调用那么就是谁的父类。...
分类:
其他好文 时间:
2014-09-03 16:49:07
阅读次数:
211
http://ued.ctrip.com/blog/?p=3589#more-3589以前做项目的时候就依葫芦画瓢的设置 { font-family:arial,”microsoft yahei”,simsun,sans-self; } 等类似的字体,然而当更多的设备和系统出现后,以前这样的设置已不...
分类:
Web程序 时间:
2014-09-03 16:42:16
阅读次数:
209
在
iOS7中,如果某个UIViewController的self.view第一个子视图是UIScollView,同时当这个
UIViewController被push或initWithRootController成为
UINavigationController控制的Controller时,这个UIViewController的view的子视图
UIScollView的所有子视图,都会被下移64px。这个..
分类:
其他好文 时间:
2014-09-03 15:07:17
阅读次数:
159
1.searchResultsUpdater:设置显示搜索结果的控制器 ????_mySearchController.searchResultsUpdater?=?self; 2.dimsBackgroundDuringPresentation:设置开始搜索时背景显示与否 ????_mySearchControll...
分类:
移动开发 时间:
2014-09-03 13:23:17
阅读次数:
196