受到 Twitter 欢迎画面启发的。
创建一个与 Twitter 使用的类似的自定义欢迎画面。
只需放置您的位图/矢量图像并选择一个背景颜色,即可开始使用。
如果您愿意,我还添加了一些自定义选项。
Twitter: @callumboddy
轻松简单
UIImage *icon = [UIImage imageNamed:kMyIcon];
UIColor *color = [UIColor colorWithHexString:kMyColor];
CBZSplashView *splashView = [CBZSplashView splashViewWithIcon:icon backgroundColor:color];
// customize duration, icon size, or icon color here;
[self.view addSubview:splashView];
[splashView startAnimation];
UIBezierPath *icon = [UIBezierPath myIcon]; // Generate path from vector using something like paintCode
UIColor *color = [UIColor colorWithHexString:kMyColor];
CBZSplashView *splashView = [CBZSplashView splashViewWithBezierPath:icon backgroundColor:color];
// customize duration, icon size, or icon color here;
[self.view addSubview:splashView];
[splashView startAnimation];
或者如果您想的话,在完成时还可以进行动画处理...
[self downloadLoadsOfAmazingContentWithCompletion:^(BOOL success, NSError *error) {
[splashView startAnimation];
}];
CBZSplashView 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中
pod 'CBZSplashView', '~> 1.0.0'
添加对 colorWithPatternImage 的支持
基于矢量图的实施,更接近 Twitter 的实现
如果您想请求新功能,请随时提出问题。
1.0.0
0.1.1:
功能:添加了用于操作动画持续时间的属性,例如 splashView.animationDuration = 2; (秒)
更改:动画不再自动触发,您必须调用 [splashView startAnimation];
0.1.0 - 在火车上完成,非常混乱
Callum Boddy,[email protected]
CBZSplashView 在 MIT 许可下可用。有关更多信息,请参阅 LICENSE 文件。