12 2015 档案
摘要://创建一个字符串对象 NSString * str_1 = @"Hello"; //字面量方法 int a = 123; NSString * str_2 = [NSString stringWithFormat:@"%d",a]; //可完成字符串的拼接以...
阅读全文
摘要:使用方法先导入头文件#import "NSData+AES.h"//AES测试//用来密钥NSString *key = @"123456";//用来发送的原始数据NSString *secret = @"I Love You";//数据转码NSData *plain = [secret dataU...
阅读全文
摘要:使用方法先导入头文件#import "SHA1.h"//SHA1测试NSString* sh1=[SHA1 getSha1String:@"123"];NSLog(@"sh1=%@ 长度:%d",sh1,[sh1 length]);NSString * sh2=[SHA1 getSha256Str...
阅读全文
摘要:使用方法先导入头文件#import "MD5.h"//md5测试NSString * md1= [MD5 md5:@"123" ];NSLog(@"32bit=%@",md1);//16位MD5测试NSString * md2=[MD5 getMd5_16Bit_String:@"123" isUp...
阅读全文
摘要:1.修改默认初始化方法 构建便利构造器 2.重写系统description方法 用于测试 3. NSString相关操作 4.NSArray相关操作 5.NSDictionary相关操作 6.KVC键值编码 7.NSDate相关操作 8.Protocol协议实现方法 9.Delegate委托代理 1
阅读全文
摘要:在项目开发中,我们经常可以看到如下所示的代码:@property(nonatomic,copy)NSString*isbatchapprove;@property(nonatomic,copy)NSString*currentResult;@property(nonatomic,copy)NSStr...
阅读全文
摘要:UI Tests是什么?UI Tests是一个自动测试UI与交互的Testing组件UI Tests有什么用?它可以通过编写代码、或者是记录开发者的操作过程并代码化,来实现自动点击某个按钮、视图,或者自动输入文字等功能。UI Tests的重要性在实际的开发过程中,随着项目越做越大,功能越来越多,仅仅...
阅读全文
摘要:在AFURLResponseSeriallzation.m的226行 手动添加@"text/html" 添加之前解锁文件
阅读全文
摘要:官网地址https://github.com/AFNetworking/AFNetworking#import - (void)viewDidLoad { //GET方法 //创建查询字符串 NSString* str=@"http://apis.juhe.cn/cook/quer...
阅读全文
摘要:#import "UIImageView+WebCache.h"@interface WeatherViewController ()@end@implementation WeatherViewController- (void)viewDidLoad { [super viewDidLoa...
阅读全文
摘要:第三方库CocoaPodCocoaPod并不是iOS上的第三方库 而是大名鼎鼎的第三方库的管理工具在CocoaPod没有出现之前 第三方库的管理是非常痛苦的 尤其是一些大型的库(比如nimbus) 每次对库进行更新 都可能会非常的痛苦CocoaPod的出现解决了这些问题 以Framework的方式引...
阅读全文
摘要:1.基础框架的搭建1.1 pod引入常用的第三方类库1.2 创建基础文件夹结构/目录结构Resource———存放声音/图片/xib/storyboard 等资源文件Define——宏定义, 常用的常量/常用的方法Category——类别, 主要是对第三方框架的封装/对系统类的方法的额外增加View...
阅读全文
摘要:#pragma mark 实现NSURLSessionDataDelegate代理@interface ViewController (){ UIButton* sessionPostButton; UIButton* sessionDelegatePostButton; UITa...
阅读全文
摘要:@interface ViewController (){ UIButton* getButton; UIButton* postButton; UITableView* table; NSMutableArray* array;}@end@implementation Vi...
阅读全文
摘要://同步请求 //创建NSString用来存储请求的网址 NSString* str=@"http://v.juhe.cn/weather/index?format=2&cityname=沈阳&key=41cf6f9685a8776dc8384806c262ca0e"; //用UT...
阅读全文
摘要:@interface ViewController (){ UITableView* table; NSMutableArray* parseResult;}@end@implementation ViewController- (void)viewDidLoad { [super...
阅读全文
摘要:@interface ViewController (){ UIImageView* iv; UIButton* btn; UILabel* lbl;}@end@implementation ViewController- (void)viewDidLoad { [super...
阅读全文
摘要:用Cocoa Pods导入控件以后 直接导头文件 复制以下代码[SCNetworkReachability host:@"github.com" reachabilityStatus:^(SCNetworkStatus status){ switch (status) { ...
阅读全文
摘要:1:更新系统Ruby 在终端复制以下代码 可能需要输入本机密码 直接输入回车就行 不会显示密码 sudo gem update --system 2:更改镜像 在终端复制以下代码 依次输入 gem sources --removehttps://rubygems.org/ gem sources -
阅读全文
摘要:- (void)viewDidLoad { [super viewDidLoad]; UIButton* ag=[[UIButton alloc]initWithFrame:CGRectMake(screenWidth/2-75, 174, 150, 150)]; UIIm...
阅读全文
摘要:UIWebView* webPage=[[UIWebView alloc]initWithFrame:CGRectMake(0, 0, screenWidth, screenHeight-64)];NSURL* url=[[NSURL alloc]initWithString:@"http://ww...
阅读全文
摘要://个性推荐 歌单 主播电台 排行榜 NSArray* promoteArray=@[@"个性推荐",@"歌单",@"主播电台",@"排行榜"]; UISegmentedControl* promoteSgement=[[UISegmentedControl alloc]init...
阅读全文
摘要:系统默认颜色是蓝色的 视觉效果非常难看在push进的ViewController中写//修改UINavigationController的文字颜色self.navigationController.navigationBar.tintColor=[UIColor whiteColor];//修改UI...
阅读全文
摘要:NSDictionary *dic = [NSDictionarydictionaryWithObjectsAndKeys:[UIColorblackColor],UITextAttributeTextColor, [UIFontfontWithName:@"SnellRoundhand-Bold...
阅读全文

浙公网安备 33010602011771号