这个方法不仅可以设置Label行距,也可以设置自适应高度 //创建UILabel UILabel *label = [[UILabel alloc]initWithFrame:CG…
1: 获取手机和软件的一些基本信息 //手机序列号 NSString* identifierNumber = [[UIDevice currentDevice] uniqueIde…
-(NSString *)filterHTML:(NSString *)str { NSScanner * scanner = [NSScanner scannerWithStri…
AFNetworking对NSURLConnection和NSURLSession进行了封装. 下面分别用这两种方法请求数据 网址是 用来请求JSON数据的网址. NSString…
UIButton*rightButton = [[UIButton alloc]initWithFrame:CGRectMake(0,0,30,30)]; [rightButton…
- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the vi…
在iOS5.0以下,在程序中是不能直接设置系统屏幕亮度的,到了ios5.0以后将这个api开放给了开发者,这样我们就可以非常方更的更改系统屏幕的亮度, 使用方法也很简单 ,如下: …
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
//获取相册的所有图片 - (void)reloadImagesFromLibrary { self.images = [[NSMutableArray alloc] init];…
主要是将oc字符串转成c的字符串(char*),然后判断c的字符串的长度,因为中文字符占得长度是英文字符的两倍。 //判断一个字符书不是中文。 -(BOOL)isChinese:(…
在次之前,补充个内容。UIDevice是无法获得具体的设备型号的。 要获得设备型号,比如(iphone 4s, iphone5)这样的,要通过这样的办法。 1.引入头文件。 #in…
UIView *rightView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 44, 44)]; UIButton *set…