自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(29)
  • 收藏
  • 关注

原创 webstorm配置内存参数,解决卡顿

找到.vmoptions这个文件,路径如下webstorm安装主目录>bin>.vmoptions更改为第二行:-Xms526m第三行:-Xmx1024m(ps:这里-Xms最大值不能超过1024,否则webstorm将无法打开)重启ps:本地电脑64位,同时修改了.vmoptions...

2020-06-30 10:13:29 1563

原创 npm,yarn如何查看源和换源

pm config get registry // 查看npm当前镜像源npm config set registry https://registry.npm.taobao.org/ // 设置npm镜像源为淘宝镜像yarn config get registry // 查看yarn当前镜像源yarn config set registry https://registry.npm.taobao.org/ // 设置yarn镜像源为淘宝镜像镜像源地址部分如下:npm ---.

2020-06-29 10:11:14 1228

原创 百度网速解除网站

https://www.baiduwp.com

2019-09-11 18:05:53 952

转载 Mac 上安装node、npm

对于前端开发者,node、npm是必备安装环境。目前,最推荐的使用nvm进行node版本管理及对应版本的npm安装。具体安装步骤如下:1.使用curl或wget安装nvmcurl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh|bashor wget -qO- https://raw.githubuse...

2018-07-16 10:01:52 344

原创 一些常用的宏

#define NavigationBar_HEIGHT 44#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)#define SAFE_RELEASE(x) [x release];x=n

2014-12-31 14:32:52 286

原创 NSThread的使用

//    1. 创建子线程    [self performSelectorInBackground: withObject:];    //    2. 创建了一个新的子线程    [NSThread detachNewThreadSelector:@selector(print) toTarget:self withObject:nil];    //    3. 通

2014-09-12 08:42:09 370

原创 block代替协议自定义UIScrollView实现分页效果

#import @interface CustomScrollView : UIView@property (nonatomic, strong) NSInteger (^numberOfPageInScrollView)(CustomScrollView*);@property (nonatomic, strong) UIView *(^scroll)(CustomScrollView

2014-08-20 21:35:36 441

原创 UITabBarController

只有被装在该数组的视图控制器才能够在运行的时候移动位置 tabBarCtrl.customizableViewControllers = @[viewCtrl6, viewCtrl3]; viewCtrl.tabBarItem.badgeValue = nil;//@"新消息"; tabBarCtrl.tabBar.translucent = NO;//半透明hi

2014-08-18 22:14:55 525

原创 NSString的一些常用方法

NSString 方法名名词开头的不会改变当前对象的内容,动词开头会改变对象的内容 把字符串str通过字符集(/;’)分割 NSString *str = @"aaaa/a/a;s;d’sd.exe";NSArray *arr = [str componentsSeparatedByCharactersInSet: [NSCharacterSet characterSetWithCh

2014-08-16 14:32:11 401

原创 默认初始化方法的过程

创建一个类的对象时,一定要调用它们的默认初始化器或者指定的初始化器进行初始化具体:创建一个 Monkey 继承自NSObject 的类,定义3个实例变量#import @interface Monkey : NSObject- (id)initWithWeight: (int)weight;- (id)initWithWeight:(int)weight height:(int)he

2014-08-13 22:36:12 466

原创 NSURLConnection

//同步方法发送请求并获取返回数据 NSURLResponse *response = [[NSURLResponse alloc]init]; NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:nil]; NSLog(@"%

2014-08-08 19:17:39 321

原创 layoutSubviews 方法的使用

1.一定不能手动调用(和dealloc类似)2.自动调用的情况:改变父视图frame..之类的与布局相关的方法时; 改变它本身的frame/bounds...的时候; 添加到父视图上时(addSubview); 调用它的setNeedsLayout方法的时候(可能)- (void)layoutSubviews{ //3.一般情况下 [super layoutSub

2014-08-06 19:09:50 370

原创 NSFileManager 类 文件的管理

//单例类,相当于一个文件管理者 NSFileManager *fileManager = [NSFileManager defaultManager];//递归获取指定文件路径下的所有文件或文件夹- (NSArray *)subpathsAtPath:(NSString *)path;//读取文件内容- (NSData *)contentsAtPath:(NSString *)

2014-08-06 11:42:03 451

原创 NSFileHandle 类 不能创建文件

打开文件读写游标均是指向文件开始位置c语言: FILE * fopen/fwrite/fread/fclose/fseek//标准输入+ (id)fileHandleWithStandardInput;//标准输出+ (id)fileHandleWithStandardOutput;+ (id)fileHandleWithStandardError;+ (id)fileHandleWithNull

2014-08-05 22:32:13 598

原创 从网络获取图片的程序

把一个含有至少10张图片的地址列表用一个UITableView    显示.(required)    —  然后点击其中一项后用今天的方法下载图片图片并保存到文件中,并跳转或弹出到另一个页面,在页面内显示该图片.(required)    —  当再次点击的时候,如果该图片已经下载过,就不必再重新下载. (optional)

2014-08-04 22:37:02 467

原创 block的一些规则和定义block的方法

①#pragma mark 使用typedef来声明blocktypedef int (^BlockType) (void);typedef void (^BlockType2)(void);typedef int (^BlockType3)(int a, int b);②//自定义一个compare方法,通过每次两个对象之间的排序实现数组的排序NSInteger compar

2014-08-01 17:33:36 730

原创 NSArray/NSMutableArray

EndIt *end0 = [[EndIt alloc] init]; EndIt *end1 = [[EndIt alloc] init]; EndIt *end2 = [[EndIt alloc] init]; EndIt *end3 = [[EndIt alloc] init]; EndIt *end4 = [[EndIt alloc] init];

2014-07-31 21:05:59 419

原创 NSKeyedArchiver/NSKeyedUnarchiver归档解归档的使用

2014-07-30 22:55:06 555

原创 对象的拷贝(NSCopying/NSMutableCopying)

①Shallow 浅拷贝 Deep 深拷贝Shallow值复制对象本身,而不会复制对象引用的其他对象Deep复制对象本身还有对象所引用的其它对象Foundation框架里支持拷贝的类,默认是Shallow②对于系统的类,copy返回的是一个不可变对象(复制的对象是可变对象也一样),MutableCop返回可变对象Shallow和Deep的区别就是Deep需要实现copyWithZon

2014-07-29 17:49:44 407

转载 c语言结构体用法

结构(struct)     结构是由基本数据类型构成的、并用一个标识符来命名的各种变量的组合。 结构中可以使用不同的数据类型。     1. 结构说明和结构变量定义     在Turbo C中, 结构也是一种数据类型, 可以使用结构变量, 因此,  象其它 类型的变量一样, 在使用结构变量时要先对其定义。     定义结构变量的一般格式为: 

2014-07-22 21:16:59 303

原创 一个小小的笔顺程序,按钮太多,暂时实现了两个

#import "AppDelegate.h"#import "PigViewController.h"@interface AppDelegate () @end@implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinis

2014-07-17 08:29:24 1113 1

原创 按钮,图片,瑞士国旗的升降,手势

//// ViewController.m// OCGuoQi//// Created by apple on 14-7-8.// Copyright (c) 2014年 apple . All rights reserved.//#import "ViewController.h"@interface ViewController (){ UIView *redView; UIButton *b

2014-07-10 09:19:36 748

原创 修改声明为const的变量的值

#include #include usingnamespace std;intmain(void){    inttemp = 4;    //non use volatile    std::cout <<"non use volatile:"     const int a = 1;    void*pa = (void *

2014-07-08 18:42:15 503

转载 tableView详解

-、建立 UITableView DataTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 320, 420)]; [DataTable setDelegate:self]; [DataTable setDataSource:self]; [self.view addSubview:DataTable]; [

2014-06-29 17:58:44 337

转载 iOS学习之Table View的简单使用

目录视图摘要视图订阅有奖征资源,博文分享有内涵          5月推荐博文汇总          第二届战神杯编程挑战月赛          2014 CSDN博文大赛          重金悬赏:OpenStack实践文章 iOS学习之Table View的简单使用分类: iOS开发入门2012-06

2014-06-29 17:15:45 333

原创 Swift中tableViewCelll和ImageView中图片背景显示的问题

图片被列表tui

2014-06-28 00:09:14 451

原创 简单的音乐播放器

import UIKitimport AVFoundationclass ViewController:UIViewController {   var url: NSURL!   var timer: NSTimer!    var mp3file ="/Users/apple/Desktop/music/2.mp3"   var pl

2014-06-25 13:25:49 477

原创 枚举,结构,类

enum Week{    case Mon    case Sun(String, Int, String)    func print(){        switch self{        case .Mon:            println("星期一")        case .Sun:            println("星期天")  

2014-06-13 20:15:47 476

原创 optional(对象与实例)

//对象/实例       var ani1: Animal = Animal()        ani1.weight =10        ani1.age =1        ani1.eat()                println("\(ani1.weight)")

2014-06-12 21:17:46 2978

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除