https://github.com/YouXianMing

05 2014 档案

摘要:About Core ImageCore Image is an image processing and analysis technology designed to provide near real-time processing forstill and video images. It ... 阅读全文
posted @ 2014-05-31 16:11 YouXianMing 阅读(518) 评论(0) 推荐(0) 编辑
摘要:OpenGLES渲染OpenGLES使用GPU渲染图片,不占用CPU,但其使用还是挺复杂的.先用OpenGLES显示一张图片://// ShowViewController.m// OpenGLES//// Copyright (c) 2014年 Y.X. All rights reserve... 阅读全文
posted @ 2014-05-30 11:24 YouXianMing 阅读(4467) 评论(0) 推荐(0) 编辑
摘要:封装CIImage实现实时渲染CIImage属于CoreImage里面的东东,用来渲染图片的,为什么要封装它呢?其实很简单,封装好之后使用更加方便.如果直接使用CIImage渲染图片,使用的流程如下:只要你仔细研究一下CIImage,你会发现,filter部分与context部分是彼此分离的,con... 阅读全文
posted @ 2014-05-29 09:44 YouXianMing 阅读(1138) 评论(0) 推荐(0) 编辑
摘要:UINavigationController与UITabBarController相关问题UINavigationController与UITabBarController混用是非常常见的,有时候会遇到UINavigationController推出(push)出controller后隐藏UITab... 阅读全文
posted @ 2014-05-28 13:24 YouXianMing 阅读(658) 评论(2) 推荐(1) 编辑
摘要:使用FontAwesomehttps://github.com/PrideChung/FontAwesomeKit为什么要使用FontAwesome呢,其实,它的字体就是矢量图,无论是放大还是缩小都不失真的矢量图哦.1. 下载源码,导入文件夹FontAwesomeKit,然后引入头文件FontAwe... 阅读全文
posted @ 2014-05-28 09:59 YouXianMing 阅读(1123) 评论(0) 推荐(0) 编辑
摘要:CAGradientLayer实现图片渐变透明效果要实现的效果如下:源码://// RootViewController.m// CAGradientLayer//// Copyright (c) 2014年 Y.X. All rights reserved.//#import "RootVi... 阅读全文
posted @ 2014-05-27 14:01 YouXianMing 阅读(4116) 评论(0) 推荐(0) 编辑
摘要:将NSString变成贝塞尔曲线https://github.com/aderussell/string-to-CGPathRefNSString中的字符串是可以通过CoreText框架将其转换成贝塞尔曲线的.源码://// RootViewController.m// StringPath//... 阅读全文
posted @ 2014-05-27 10:20 YouXianMing 阅读(928) 评论(0) 推荐(0) 编辑
摘要:CAGradientLayer渐变颜色动画或许你用过CAGradientLayer,你知道他是用于渐变颜色的,但你是否直到,CAGradientLayer的渐变颜色是可以动画的哦.源码://// RootViewController.m// CAGradientLayer//// Copyri... 阅读全文
posted @ 2014-05-27 09:23 YouXianMing 阅读(1918) 评论(1) 推荐(0) 编辑
摘要:如何使用地图的注解功能实现了协议MKAnnotation的对象才能够被用地图上的注解对象,一般都是如下定义的.DisplayMap.h + DisplayMap.m//// DisplayMap.h// MoreMapInfo//// Copyright (c) 2014年 Y.X. All ... 阅读全文
posted @ 2014-05-26 10:30 YouXianMing 阅读(926) 评论(0) 推荐(0) 编辑
摘要:使用AKLocationManager定位https://github.com/ideaismobile/AKLocationManager以下是使用情况:是不是很简单呢,我们可以将它的步骤进一步封装,让它更简单!源码如下:YXLocationManager.h + YXLocationManage... 阅读全文
posted @ 2014-05-26 09:48 YouXianMing 阅读(582) 评论(0) 推荐(0) 编辑
摘要:LocationCoder地图经纬度解析其实,在地图里面将地图解析成有意义的地址,或者把地址转换成有意义的经纬度都是很容易的事情,只是我将其封装了支持KVO,通知中心,block取结果,代理取结果而已.能通过组合的方式来封装对象扩展功能就绝对不会用继承的方式来扩展功能,只有当组合解决不了问题时才会使... 阅读全文
posted @ 2014-05-26 09:09 YouXianMing 阅读(751) 评论(0) 推荐(0) 编辑
摘要:VVeboImageViewhttps://github.com/johnil/VVeboImageViewA UIImageView to play gif with low memory.一个UIImageView,占用低内存来播放gif图片。 阅读全文
posted @ 2014-05-25 20:43 YouXianMing 阅读(372) 评论(0) 推荐(0) 编辑
摘要:JNWSpringAnimationhttps://github.com/jwilling/JNWSpringAnimationJNWSpringAnimationis a subclass ofCAKeyframeAnimationthat adds support for creating da... 阅读全文
posted @ 2014-05-24 17:05 YouXianMing 阅读(672) 评论(0) 推荐(0) 编辑
摘要:GMCPagingScrollViewhttps://github.com/GalacticMegacorp/GMCPagingScrollViewGMCPagingScrollView is a UIView containing a horizontally scrolling paging U... 阅读全文
posted @ 2014-05-23 09:32 YouXianMing 阅读(743) 评论(0) 推荐(0) 编辑
摘要:DBCamera轻量级定制摄像头https://github.com/danielebogo/DBCameraDBCamera is a simple custom camera with AVFoundation.DBCamera使用了AVFoundation框架并简单的定制了摄像头.Gettin... 阅读全文
posted @ 2014-05-23 08:47 YouXianMing 阅读(1016) 评论(0) 推荐(0) 编辑
摘要:使用正则表达式寻找字符串中出现了几个[***]样式的字符串源码如下:- (NSUInteger)analyseRX:(NSString *)string withPatternString:(NSString *)patternString{ // \\[[^\\]]+\\] 用以匹... 阅读全文
posted @ 2014-05-22 09:11 YouXianMing 阅读(498) 评论(0) 推荐(0) 编辑
摘要:文章转载自http://www.cocoachina.com/applenews/devnews/2014/0521/8504.htmliOS文字排版(CoreText)那些事儿转自阿毛的蛋疼地第一次比较深入接触iOS文字排版相关内容是在12年底,实现某IM项目聊天内容的图文混排,照着nimbus的... 阅读全文
posted @ 2014-05-21 22:48 YouXianMing 阅读(793) 评论(0) 推荐(0) 编辑
摘要:辉光的UIView辉光UIView使用了一个UIView的一个category,名为UIView+Glow,请自行到github上查找.源码如下://// RootViewController.m// GlowView//// Copyright (c) 2014年 Y.X. All righ... 阅读全文
posted @ 2014-05-21 09:09 YouXianMing 阅读(389) 评论(1) 推荐(0) 编辑
摘要:使用WebViewJavascriptBridge与UIWebView交互https://github.com/marcuswestin/WebViewJavascriptBridge核心的地方:UIWebView在加载完网页之后,通过方法stringByEvaluatingJavaScriptFr... 阅读全文
posted @ 2014-05-20 10:25 YouXianMing 阅读(1939) 评论(0) 推荐(0) 编辑
摘要:使用UICollectionView使用UICollectionView的流程:1. 设定一个UICollectionViewFlowLayout2. 使用这个设定的UICollectionViewFlowLayout来初始化UICollectionView3. 设置代理对象4. 继承UIColle... 阅读全文
posted @ 2014-05-19 18:03 YouXianMing 阅读(2786) 评论(4) 推荐(3) 编辑
摘要:UIButton中的**EdgeInsets是做什么用的?UIEdgeInsetsMakeCreates an edge inset for a button or view.An inset is a margin around the drawing rectangle where each s... 阅读全文
posted @ 2014-05-19 09:28 YouXianMing 阅读(936) 评论(0) 推荐(0) 编辑
摘要:CoreImage-with-EAGLContexthttps://github.com/anaglik/CoreImage-with-EAGLContextSimple example of drawing manipulated image to CIContext based on EAGLC... 阅读全文
posted @ 2014-05-18 06:49 YouXianMing 阅读(846) 评论(0) 推荐(0) 编辑
摘要:SAMCoreImageViewhttps://github.com/soffes/SAMCoreImageViewRender a CIImage in an OpenGL thingy so it's real fast and junk. You won't see any speed up ... 阅读全文
posted @ 2014-05-17 08:10 YouXianMing 阅读(227) 评论(0) 推荐(0) 编辑
摘要:NSImage+HHTint - Tints grayscale images using CoreImagehttps://github.com/gloubibou/NSImage-HHTintThis category on NSImage adds a single method:- (NSI... 阅读全文
posted @ 2014-05-17 07:53 YouXianMing 阅读(388) 评论(0) 推荐(0) 编辑
摘要:使用iCarousel的旋转木马效果请求图片https://github.com/nicklockwood/iCarousel先看看效果: 源码如下://// RootViewController.m//// Created by YouXianMing on 14-5-16.// Copy... 阅读全文
posted @ 2014-05-16 17:10 YouXianMing 阅读(1084) 评论(0) 推荐(0) 编辑
摘要:使用TFHpple解析htmlhttps://github.com/topfunky/hpple前期准备工作引入静态库文件添加库文件的 header search paths(注意,必须选中 All)将从github上下载的源码包拖入工程当中准备工作结束使用详情我们来解析网址 http://www.... 阅读全文
posted @ 2014-05-16 11:50 YouXianMing 阅读(5763) 评论(1) 推荐(0) 编辑
摘要:使用MapKit框架地图显示最简单显示地图的代码://// RootViewController.m// CoreLocation//// Copyright (c) 2014年 Y.X. All rights reserved.//#import "RootViewController.h"... 阅读全文
posted @ 2014-05-15 09:54 YouXianMing 阅读(516) 评论(0) 推荐(0) 编辑
摘要:定制UITabBar显示样式思路是这样子的:1. 初始化UITabBarController,并装载进来几个其他的ViewController2. 获取每个控制器的UITabBarItem3. 单独配置每个ViewController对应的UITabBarItem(其中,文字可以设置偏移量)就这么简... 阅读全文
posted @ 2014-05-14 11:17 YouXianMing 阅读(2432) 评论(0) 推荐(0) 编辑
摘要:使用UIScreenEdgePanGestureRecognizer写iOS7侧边栏A UIScreenEdgePanGestureRecognizer looks for panning (dragging) gestures that start near an edge of the scre... 阅读全文
posted @ 2014-05-13 09:14 YouXianMing 阅读(6092) 评论(0) 推荐(1) 编辑
摘要:使用UIWebView中html标签显示富文本用UIWebView来渲染文本并期望达到富文本的效果开销很大哦!Work本人此处直接加载自定义字体"新蒂小丸子体",源码不公开,望见谅.代码如下:渲染后效果如下图所示,效果是不是挺不错的呢.我们再把尽头两个字渲染成红色试试.源码:- (void)view... 阅读全文
posted @ 2014-05-12 10:44 YouXianMing 阅读(3125) 评论(0) 推荐(0) 编辑
摘要:使用UIDynamicAnimator创建重力感应的Viewhttp://www.raywenderlich.com/zh-hans/52617/uikit-力学教程详细教程请参考上面的链接,此处仅仅是最简单的使用而已.//// RootViewController.m// DynamicVie... 阅读全文
posted @ 2014-05-12 09:23 YouXianMing 阅读(399) 评论(0) 推荐(0) 编辑
摘要:注意:NimbusKit 是Github上iOS部分开源库排名前20中的一员。http://nimbuskit.info/https://github.com/jverkoey/nimbushttp://latest.docs.nimbuskit.info/Nimbus is a toolkit f... 阅读全文
posted @ 2014-05-11 08:48 YouXianMing 阅读(650) 评论(0) 推荐(0) 编辑
摘要:IOS DEVELOPMENT TIPS & TRICKS - PART Ihttp://blog.trifork.com/2013/12/19/ios-development-tips-tricks-part-i/As you might know, I am very fond of devel... 阅读全文
posted @ 2014-05-10 06:43 YouXianMing 阅读(730) 评论(0) 推荐(0) 编辑
摘要:用CIFilter生成QRCode二维码图片CIFilter不仅仅可以用来做滤镜,它还可以用来生成二维码.CIFilterEffect.h + CIFilterEffect.m//// CIFilterEffect.h// CIFilter//// Created by YouXianMing... 阅读全文
posted @ 2014-05-09 17:03 YouXianMing 阅读(4041) 评论(0) 推荐(2) 编辑
摘要:使用CoreImage教程CoreImage包含有很多实用的滤镜,专业处理图片的库,为了能看到各种渲染效果,请使用如下图片素材.现在可以开始教程了:#define FIX_IMAGE(image) fixImageWidth(image, 320.f)// 固定图片的宽度UIImage * fix... 阅读全文
posted @ 2014-05-09 15:45 YouXianMing 阅读(3733) 评论(0) 推荐(0) 编辑
摘要:转自 CocoaChina http://www.cocoachina.com/macdev/uiue/2014/0505/8315.html你应该知道的应用UI动态设计规则这篇文章中,我主要阐述了UI动效设计中需要注意的问题以及原因,而不是教授制作UI动效额技巧。随着大家对于这一领域的关注(很大程... 阅读全文
posted @ 2014-05-09 12:53 YouXianMing 阅读(279) 评论(0) 推荐(0) 编辑
摘要:UIScrollView中的手势UIScrollView自带了两个手势,分别为:UIPanGestureRecognizerUIPinchGestureRecognizer他们都是readonly的.监听UIPanGestureRecognizer手势是UIPanGestureRecognizer的... 阅读全文
posted @ 2014-05-09 11:00 YouXianMing 阅读(3236) 评论(0) 推荐(1) 编辑
摘要:iOS手势处理iOS手势有着如下几种:UITapGestureRecognizerUIPinchGestureRecognizerUIRotationGestureRecognizerUISwipeGestureRecognizerUIPanGestureRecognizerUILongPressG... 阅读全文
posted @ 2014-05-08 10:45 YouXianMing 阅读(1356) 评论(0) 推荐(0) 编辑
摘要:ARC以及MRC中setter方法的差异有时候,你会需要重写setter或者getter方法,你知道么,ARC与MRC的setter方法是有着差异的呢.先看下MRC下的setter方法:在看下ARC下的setter方法:小结:1. 一旦你重写了getter.setter方法,你必须使用@synthe... 阅读全文
posted @ 2014-05-07 15:41 YouXianMing 阅读(3384) 评论(0) 推荐(0) 编辑
摘要:运行时中给一个对象绑定另外一个对象category中,如果想要添加一个属性,通常的做法是不可能的.我们都知道,category只能增加方法,不能增加属性.但在运行时中我们可以动态的绑定一个对象.有以下两个方法来绑定以及获取绑定的对象:objc_setAssociatedObject Sets an ... 阅读全文
posted @ 2014-05-07 14:37 YouXianMing 阅读(450) 评论(0) 推荐(0) 编辑
摘要:通知中心NSNotificationCenter的使用Cocoa框架中,通知中心以及KVO都属于设计模式中的观察者.Source在使用通知中心之前,对通知中心类进行了简单的封装,以便可读性更强.NotificationCenter.h + NotificationCenter.m通知中心发送消息的核... 阅读全文
posted @ 2014-05-07 09:51 YouXianMing 阅读(473) 评论(0) 推荐(1) 编辑
摘要:KVO的使用KVO是一种设计模式,名为观察者.addObserver:forKeyPath:options:context:通知其他对象的方法,这个方法在NSObject中就已经申明了,也就是说任何继承自NSObject的对象都可以使用KVO.我们来实现一个对象a值改变的时候去通知对象b.新建两个M... 阅读全文
posted @ 2014-05-06 18:16 YouXianMing 阅读(1952) 评论(0) 推荐(0) 编辑
摘要:iOS文件处理类这是一个用来简化iOS中关于文件操作的一个类,所有方法都为类方法.SourceFile.h//// File.h// FileManager//// http://home.cnblogs.com/u/YouXianMing///// Copyright (c) 2014年 ... 阅读全文
posted @ 2014-05-06 16:02 YouXianMing 阅读(592) 评论(0) 推荐(0) 编辑
摘要:FZEasyFile的使用https://github.com/jiecao-fm/FZEasyFile操作沙盒文件很恶心,但用上FZEasyFile就变得简单了.以前你需要这么做才行:NSFileManager *fileManager = [NSFileManager defaultManage... 阅读全文
posted @ 2014-05-06 09:22 YouXianMing 阅读(511) 评论(0) 推荐(0) 编辑
摘要:使用GPUImage渲染图片教程Prepare - 准备GPUImage开源库并不像普通的开源库那样子,拖进你的工程中就可以用.以下将详细的告诉你如何将GPUImage导入到你的工程当中.首先上官网下载源码: https://github.com/BradLarson/GPUImage解压后打开以下... 阅读全文
posted @ 2014-05-05 17:34 YouXianMing 阅读(5352) 评论(1) 推荐(1) 编辑
摘要:使用NSURLConnection实现大文件断点下载由于是实现大文件的断点下载,不是下载一般图片什么的.在设计这个类的时候本身就不会考虑把下载的文件缓存到内存中,而是直接写到文件系统.要实现断点下载,需要满足1个条件,那就是,必须要服务器支持断点下载.实现的思路是这样子的:1. 第一次会获取到被下载... 阅读全文
posted @ 2014-05-05 15:34 YouXianMing 阅读(1373) 评论(0) 推荐(0) 编辑
摘要:教你如何封装异步网络连接NSURLConnection实现带有百分比的下载注:本教程需要你对block有着较为深刻的理解,且对如何封装对象有着一些经验.也许你已经用惯了AFNetworking2.0,或者是ASIHTTPRequest(这个已经都不更新了,还不支持ARC,放弃为妙^_^),或者还有其... 阅读全文
posted @ 2014-05-05 11:47 YouXianMing 阅读(498) 评论(0) 推荐(0) 编辑
摘要:使用FMDB教程本教程针对于第一次接触开源库FMDB的同胞,从如何下载源码如何导入工程如何创建数据库如何写增删改查开始.使用的时最新版本的FMDB v2.3.此教程开始日期为 2014.5.5Preparation - 准备工作首先,你得需要去下载源码 https://github.com/ccgu... 阅读全文
posted @ 2014-05-05 09:30 YouXianMing 阅读(816) 评论(0) 推荐(1) 编辑
摘要:使用NSOperation以及NSOperationQueueNSOperation vs. Grand Central Dispatch (GCD)在Mac OS X v10.6和iOS4之前,NSOperation 与 NSOperationQueue 不同于GCD,他们使用了完全不同的机制。从... 阅读全文
posted @ 2014-05-04 16:52 YouXianMing 阅读(1369) 评论(0) 推荐(1) 编辑
摘要:ARC中的@autoreleasepool还有作用吗?QUESTIONFor the most part with ARC (Automatic Reference Counting), we don't need to think about memory management at all wi... 阅读全文
posted @ 2014-05-04 13:21 YouXianMing 阅读(1195) 评论(1) 推荐(0) 编辑
摘要:iOS7中计算UILabel中字符串的高度iOS7中出现了新的方法计算UILabel中根据给定的Font以及str计算UILabel的frameSize的方法.本人提供category如下:UILabel+StringFrame.h//// UILabel+StringFrame.h// Lab... 阅读全文
posted @ 2014-05-04 10:57 YouXianMing 阅读(3441) 评论(1) 推荐(1) 编辑
摘要:Pop is an extensible animation engine for iOS and OS X. In addition to basic static animations, it supports spring and decay dynamic animations, makin... 阅读全文
posted @ 2014-05-03 19:29 YouXianMing 阅读(1236) 评论(0) 推荐(0) 编辑
摘要:DTCoreText从HTML文档中创建富文本https://github.com/Cocoanetics/DTCoreText注意哦亲,DTRichTextEditor这个组件是收费的,不贵,才650美元而已^_^。DTCoreTextThis project aims to duplicate ... 阅读全文
posted @ 2014-05-03 07:34 YouXianMing 阅读(1583) 评论(0) 推荐(0) 编辑
摘要:ARC中block块作为属性的使用笔记block较难理解,根据在内存中的分布情况就分为3种类型,根据使用的情形又分为很多很多种。虽然用起来容易,但使用不当会造成内存泄露,虽然都是这么说,但你真的研究过为什么会泄露吗?为什么有些时候外部变量进入block的时候会导致引用计数+1呢?本人做过MRC以及A... 阅读全文
posted @ 2014-05-02 08:46 YouXianMing 阅读(848) 评论(3) 推荐(1) 编辑
摘要:Canvas 不用写代码的动画https://github.com/CanvasPod/CanvasCanvas is a project to simplify iOS development for both designers and developers. It had been diffi... 阅读全文
posted @ 2014-05-02 07:19 YouXianMing 阅读(461) 评论(0) 推荐(0) 编辑
摘要:Blocks and Variableshttps://developer.apple.com/library/ios/documentation/cocoa/conceptual/Blocks/Articles/bxVariables.htmlhttp://stackoverflow.com/qu... 阅读全文
posted @ 2014-05-01 07:42 YouXianMing 阅读(591) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示