自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(19)
  • 资源 (1)
  • 收藏
  • 关注

原创 runtime

((void(*)(id,SEL))objc_msgSend)(currentController,@selector(fillAllMoney));

2016-02-29 15:02:03 200

原创 画图片

`- (void)rotateTapped:(id)sender { UIImage *currentImage = _imageView.image; CGImageRef currentCGImage = currentImage.CGImage;CGSize originalSize = currentImage.size;CGSize rotatedSize = CGS

2016-02-29 11:25:44 263

原创 打开其他应用程序

//在配置文件添加:URL types(NSArray)->URL Schemes(NSArray):my app; URL(NSString):@"任意"NSURL *url = [NSURL URLWithString:@"myapp://"]; [[UIApplication sharedApplication]openURL:url];

2016-02-26 16:29:48 273

原创 下载

2. /Documents/。使用该路径放置关键数据,也就是不能通过App重新生成的数据。该路径可通过配置实现iTunes共享文件。可被iTunes备份。(现在保存在该路径下的文件还需要考虑iCloud同步)3. /Library/。该路径下一般保存着用户配置文件。可创建子文件夹。可以用来放置您希望被备份但不希望被用户看到的数据。该路径下的文件夹,除Caches以外,都会被iTunes备份。4. /

2016-02-25 17:02:04 325

转载 一行代码实现 归档解档

源地址:http://www.jianshu.com/p/fed1dcb1ac9f一、变量声明为便于下文讨论,提前创建父类Biology以及子类Person:Biology:@interface Biology : NSObject{ NSInteger *_hairCountInBiology;}@property (nonatomic, copy) NSString *intro

2016-02-25 16:38:01 909

原创 runtime 增加实例变量

能否向编译后得到的类中增加实例变量?能否向运行时创建的类中添加实例变量?为什么?不能向编译后得到的类中增加实例变量;能向运行时创建的类中添加实例变量;解释下:因为编译后的类已经注册在 runtime 中,类结构体中的 objc_ivar_list 实例变量的链表 和 instance_size 实例变量的内存大小已经确定,同时runtime 会调用 class_setIvarL

2016-02-24 16:43:29 1231

原创 数组排序

NSArray *temp; [temp sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) { NSDictionary *temp1 = obj1; NSDictionary *temp2 = obj2; if (temp2[@"addti

2016-02-24 14:46:06 273

原创 CABaseAnimation

animationWithKeyPath的值:   transform.scale = 大小 transform.scale.x = 宽的缩放比例 transform.scale.y = 高的缩放比例 transform.rotation.z = 平面图的旋转 opacity = 透明度 margin zPosition bac

2016-02-23 18:04:35 385

原创 scrollview中圆角处理

//滚动中一直处理圆角会阻塞UI,可设置下面的属性// 使视图渲染内容被缓存起来,[self.layer setShouldRasterize:YES];[self.layer setRasterizationScale:[UIScreen mainScreen].scale];

2016-02-18 11:44:36 1351

原创 navigationController

//设置页面有上拉手势的时候隐藏导航栏,快速下拉则显示导航栏self.navigationController.hidesBarsOnSwipe = YES;//设置页面有单击事件的时候隐藏导航栏,再次点击显示导航栏self.navigationController.hidesBarsOnTap = YES;

2016-02-17 14:08:24 304

原创 NSDate

fmt.locale = [[NSLocale alloc] initWithLocaleIdentifier:@”en_US”];//默认 typedef CF_ENUM(CFIndex, CFDateFormatterStyle) { // date and time format styles kCFDateFormatterNoStyle = 0, // 无输出

2016-02-17 11:45:31 230

原创 tabbar ios

tabBar图片被tintColor填充问题解决:nav.tabBarItem.image = [[UIImageimageNamed:@“barImage”]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];nav.tabBarItem.selectedImage [[UIImag imageNamed:@"barImgaeSe

2016-02-17 11:44:14 226

原创 scrollview自定义pageEnable

#pragma mark <UIScrollViewDelegate>- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView { _startY = scrollView.contentOffset.y;}- (void)scrollViewDidEndDragging:(UIScrollView *)scrollV

2016-02-17 11:41:51 3428

原创 获取对象的属性名、属性值、属性特性,协议列表

unsigned int count; objc_property_t *properties = class_copyPropertyList([self class], &count); for (int i =0; i < count; i ++) { const char *propertyName =property_getName(propertie

2016-02-17 11:37:46 666

原创 round、ceil、floor

extern float ceilf(float); extern double ceil(double); extern long double ceill(long double);extern float floorf(float); extern double floor(double); extern long double floorl(longdouble);extern fl

2016-02-16 14:25:07 277

原创 绘制渐变色

//添加坐标的坐标点 UIBezierPath * pathtemp=[[UIBezierPath alloc] init]; [pathtemp moveToPoint:CGPointMake(10, 100)]; [pathtemp addLineToPoint:CGPointMake(50, 90)]; [pathtemp addLineToPoint:

2016-02-16 11:18:00 390

原创 scrollview

设置一直垂直方向弹簧效果:[scroll setAlwaysBounceVertical:YES];

2016-02-16 10:36:28 197

原创 抓取crash

@try {        NSString *str = [NSNullnull];        NSLog("%zi",str.length);    }    @catch (NSException *exception) {        NSString *msg = [NSStringstringWithFormat:@"name:%@

2016-02-01 14:50:31 240

原创 第三方

自定义tabBar     RDVTabBarController;

2016-02-01 14:06:59 255

iOS 10.3 disk image

~/Applications/Xcode7_3.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport, 或者右键xcode显示包内容,/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

2017-05-27

空空如也

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

TA关注的人

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