随笔分类 -  UI

摘要:UIViewController 的转场效果 当viewController通过push 或 present 进行转场时, 系统自带的动画是从右侧push进来一个新的viewControler (或从下面present 一个新的ViewController), 接下来我们要做的就是要自定义系统的这个 阅读全文
posted @ 2019-10-14 16:19 Da雪山 阅读(890) 评论(0) 推荐(0)
摘要:.h .m 阅读全文
posted @ 2018-12-05 09:39 Da雪山 阅读(4198) 评论(0) 推荐(0)
摘要:1. layer层 mask 遮罩效果 2. maskView 实现局部透明效果 //0.相当于maskView 将自己"投影"到 view上, 注意层级关系, 实际并不是在'灰色'的view上滑动, 而是投影到了"灰色"的view上了 //1.设置了遮罩mask属性后, 只显示重叠部分 //2.可 阅读全文
posted @ 2018-07-27 20:08 Da雪山 阅读(3143) 评论(0) 推荐(1)
摘要:#pragma mark -- 统一导航条样式 //统一导航条样式 UIFont *font = [UIFont systemFontOfSize:19.f]; NSDictionary *textAttributes = @{ NSFontAttributeName : font, NSForeg 阅读全文
posted @ 2017-03-14 09:01 Da雪山 阅读(469) 评论(0) 推荐(0)
摘要://.h #import <UIKit/UIKit.h> @interface YSWaterWaveView : UIView - (void)startWaveToPercent:(CGFloat)percent; - (void)setGrowthSpeed:(CGFloat)growthSp 阅读全文
posted @ 2017-02-07 17:44 Da雪山 阅读(663) 评论(0) 推荐(0)
摘要:demo 来源: https://github.com/jdg/MBProgressHUD/ //只有小菊花 - (void)indeterminateExample { // Show the HUD on the root view (self.view is a scrollable tabl 阅读全文
posted @ 2017-02-06 16:39 Da雪山 阅读(21186) 评论(0) 推荐(0)
摘要:CAEmitterLayer 实现雪花效果 首先需要导入#import <QuartzCore/QuartzCore.h> /**在iOS 5中,苹果引入了一个新的CALayer子类叫做CAEmitterLayer。CAEmitterLayer是一个高性能的粒子引擎,被用来创建实时例子动画如:烟雾, 阅读全文
posted @ 2017-01-04 10:17 Da雪山 阅读(267) 评论(0) 推荐(0)
摘要:from: http://www.tuicool.com/articles/vuyIriN 当我们使用系统自带的UICollectionViewFlowLayout无法实现我们的布局时,我们就可以考虑自定义layout。 所以,了解并学习一下自定义Layout是很有必要。 其实可以分三个步骤: fr 阅读全文
posted @ 2016-12-26 13:34 Da雪山 阅读(4557) 评论(0) 推荐(0)
摘要:// // ViewController.m // animation // // Created by xueshan on 16/12/15. // Copyright © 2016年 xueshan. All rights reserved. // #import "ViewControlle 阅读全文
posted @ 2016-12-15 20:23 Da雪山 阅读(2203) 评论(0) 推荐(0)
摘要:#define SNOWPOSITION (arc4random() % (int)self.view.frame.size.width) #define SNOWWIDTH (arc4random() % 20 + 10) @interface XLRightViewController () { 阅读全文
posted @ 2016-12-06 15:58 Da雪山 阅读(170) 评论(0) 推荐(0)
摘要:自定义 View .h #import <UIKit/UIKit.h> @interface PooCodeView : UIView @property (nonatomic, retain) NSArray *changeArray; @property (nonatomic, retain) 阅读全文
posted @ 2016-11-23 14:29 Da雪山 阅读(839) 评论(0) 推荐(0)
摘要:方法1 } 方法2 } 阅读全文
posted @ 2016-11-18 13:32 Da雪山 阅读(259) 评论(0) 推荐(0)
摘要:CAShapeLayer是基于贝塞尔曲线而存在的, 如果没有贝塞尔曲线提供路径来画出图形, CAShapeLayer就没有存在的意义, CAShapeLayer可以使得不用在 drawRect:方法中实现画图. 另外, CAShapeLayer是属于CoreAnimation框架的, 是基于GPU的 阅读全文
posted @ 2016-10-26 17:32 Da雪山 阅读(439) 评论(0) 推荐(0)
摘要:- (void)createBaseAnimation{ //基础动画 CABasicAnimation *animation = [CABasicAnimation animation]; animation.keyPath = @"bounds"; // animation.fromValue 阅读全文
posted @ 2016-09-19 22:10 Da雪山 阅读(213) 评论(0) 推荐(0)