代码: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. //写法比较新奇 UIColor *bgColor =[UIColor redColor]; self.view.backgroundColor = bgColor; }    …
​1. [代码][其他]代码     void *bitmapData; //内存空间的指针,该内存空间的大小等于图像使用RGB通道所占用的字节数. static CGContextRef CreateRGBABitmapContext (CGImageRef inImage){CGContextRef context = NULL;CGColorSpaceRef colorSpace;int bitmapByteCount;int bitmapBytesPerRow;    size_t pi…
一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController : UIViewController { UIView* zhuView; } @end RootViewController.m #import "RootViewController.h" @interface RootViewController () @end @implemen…
一,工程图. 二,效果图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController : UIViewController <UIGestureRecognizerDelegate> @end RootViewController.m #import "RootViewController.h" @interface RootViewController ()…
一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController : UIViewController @end RootViewController.m #import "RootViewController.h" //加入头文件 #import "NTChartView.h" @interface RootViewControl…
UITbarController之前有在这篇文章讲解:http://www.cnblogs.com/niit-soft-518/p/4447940.html 如果自定义了UITabBarItem的图片,用上述文章创建的时候,发现选中的图的边框颜色默认是蓝色的, 解决这个问题就需要设置 UIImage的渲染模式 imageWithRenderingMode 设置UIImage的渲染模式:UIImage.renderingMode 着色(Tint Color)是iOS7界面中的一个.设置UIImag…
一,效果图. 二,工程图. 三,代码. AppDelegate.m - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for cust…
上图中间区域的翅膀不能变形,Android的点九能很好的解决,但是iOS的stretchableImageWithLeftCapWidth没法一次性指定拉伸区域,最后发现https://www.jianshu.com/p/bb3300cf15c4 的解决思路,然后修改了下,/** 拉伸图片 -- 拉伸四周保持中间大图不变形 @param size 所需要设置的大小 @param baseImage 原图 @return 拉伸好的图片 */- (UIImage *)dc_stretchLeftAn…
公司的业务涉及到统计图的有很多,最近一直echarts里面踩各种坑,感觉应该建立一个echarts专题才对,前端的东西博大精深,无论在哪一个知识点,只要细细深究,都是别有一方天地在等待,随着需求的不同,代码改动的也自然会很多,静下心来,总结好,下次在遇到就会变的得心应手无所不能了. 在网站上看到的研究文档:http://echarts.baidu.com/api.html 其实这是很简单的东西,但对于不懂的人来说,却是一个小小为难了一下的坎,对于明白的人来说,是一个简单的不能再简单的属性了. 话…