- 博客(11)
- 资源 (3)
- 收藏
- 关注
原创 iOS 加粗字体方法 (不改变字体字号只加粗文字)
/** * 加粗字体方法 * label 要加粗的UILabel * BOOL YES = 加粗字体 NO = 去掉字体加粗 */ - (void)jiaCuFontFormLabel:(UILabel *)label jiaCu:(BOOL)jiaCu{ NSString *fontname = label.font.fontNam
2017-03-23 17:27:30 8199
原创 iOS 控制器跳转动画
/** 控制器跳转动画 */ +(void)tiaoZhuanDongHua:(NSString *)type { CATransition *animation = [CATransition animation]; //设置运动轨迹的速度 animation.timingFunction = UIViewAnimationCurveEa
2017-03-22 14:31:50 320
原创 iOS 图片自适应UIImageView
/** 图片自适应 ImageView */ + (void)imageZishiying:(UIImageView *)imageeView { [imageeView setContentScaleFactor:[[UIScreen mainScreen] scale]]; imageeView.contentMode = UIView
2017-03-22 14:25:26 783
原创 iOS 设置圆角
// 设置圆角 +(void)yuanjiao:(UIView *)view Radius:(CGFloat)Radius{ [view.layer setCornerRadius:Radius]; [view.layer setMasksToBounds:YES]; }
2017-03-22 14:23:16 440
原创 iOS 设置 tableView 代理, 注册 cell, 自适应高度.
// 设置 tableView 代理, 注册 cell, 自适应高度. +(void)tableViewRegister:(UITableView *)tableView identifier:(NSString *)identifier delegate:(id)delegate { tableView.estimatedRowHeight = 50.0f; table...
2017-03-22 14:22:06 659
原创 iOS 彩色图变黑白图
// 彩色图变黑白图 + (UIImage*)grayImage:(UIImage*)sourceImage { int width = sourceImage.size.width; int height = sourceImage.size.height; CGColorSpaceRef colorSpace = CGColorSpac
2017-03-22 14:19:04 1912
原创 Xcode 常用代码块
//定义类的属性 @property ( nonatomic, strong) *; @property ( nonatomic, weak) *; @property ( nonatomic, assign) ; @property ( nonatomic, copy) *; @property ( nonatomic, weak) id> de
2017-03-20 17:53:09 294
原创 collectionView代理方法快速设置cell大小上下左右间隔
#define JianGe 25 #define GeShu 4 #define ScreenWidth ([UIScreen mainScreen].bounds.size.width) #define Screenheight ([UIScreen mainScreen].bounds.size.height) //定义每个UICollectionView 的大小 - ( CG...
2017-03-20 12:33:19 8579
原创 iOS 导航条透明(以及自定义颜色)的方法,去掉导航条底部黑线,随着tableView滚动设置导航条变色
#import #define NAVBAR_CHANGE_POINT 30 @interface UINavigationBar (Awesome) - (void)lt_setBackgroundColor:(UIColor *)backgroundColor; - (void)lt_setElementsAlpha:(CGFloat)alpha; - (
2017-03-17 13:02:06 1765
原创 iOS 加载xib页面顶部被遮挡问题
- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib. // 方法一 if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:...
2017-03-16 11:09:57 1877 1
原创 iOS tatableViewCell添加button并获取点击事件
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; btn.frame = CGRectMake(cell.frame.size.width-70,20, 50.0f, cell.frame.size.height-60); [btn setTitle:@"预约" forStat
2017-03-14 12:07:24 2562
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人