摘要:
啥都不说了,直接上代码,做了一个Category #import <UIKit/UIKit.h>@interface UILabel (ChangeLineSpaceAndWordSpace)/** * 改变行间距 */+ (void)changeLineSpaceForLabel:(UILabel 阅读全文
摘要:
开发过程中难免用到圆角以及恶心的半圆角,看代码 半圆角:这是把左边的两个角切成了圆角 UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:btn.bounds byRoundingCorners:(UIRectCorner 阅读全文
摘要:
在项目中有时候需要弹出活动弹框,由于原生的样式会固定,所以考虑h5显示,这就需要webView的背景色半透明,如图: 让 UIWebView 背景透明需要以下设置 webView.backgroundColor = [UIColor clearColor];
webView.opaque = NO; 阅读全文
摘要:
做项目时经常要获取到当前控制器来进行一些操作,故用下边的方法可以获取到 + (UIViewController *)getCurrentVC { UIWindow *window = [[UIApplication sharedApplication].windows firstObject]; i 阅读全文