测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
许可证 | MIT |
发布时间最后发布 | 2015年6月 |
由 Mateusz Szklarek 维护。
Twitter: @SzklarekMateusz LinkedIn: Mateusz Szklarek 电子邮件: [email protected]
该存储库允许你达到类似于你可能已经在 Twitter 应用中看到的效果。
你需要的只是
MSTwitterSplashScreen
导入 ViewController.m<MSTwitterSplashScreen/MSTwitterSplashScreen.h>
@property (strong, nonatomic) MSTwitterSplashScreen *splashScreen;
MSTwitterSplashScreen
类的实例MSTwitterSplashScreen *twitterSplashScreen = ...
你需要提供 3 个参数
bézierPath
backgroundColor
或 topColor
和 bottomColor
用于渐变背景
logoColor
... = [[MSTwitterSplashScreen alloc] initSplashScreenWithBezierPath:bezierPath
backgroundColor:backgroundColor
logoColor:logoColor];
... = [[MSTwitterSplashScreen alloc] initSplashScreenWithBezierPath:bezierPath
backgroundWithGradientFromTopColor:topColor
bottomColor:bottomColor
logoColor:logoColor];
splashScreen.durationAnimation = 1.8f;
splashScreen
添加至视图作为子视图[self.view addSubview:splashScreen];
并分配给属性
self.splashScreen = splashScreen;
viewDidAppear:(BOOL)animated
中调用 startAnimation
方法- (void)viewDidAppear:(BOOL)animated
{
[self.twitterSplashScreen startAnimation];
}
您可以使用 Cocoapods 将 MSTwitterSplashScreen
集成到您的项目中。将以下行添加到您的 *.podfile
文件中。我为您推荐使用仍在开发的最新版本。
您可以使用 CocoaPods 安装库。为此,您需要在 Podfile 中添加以下行之一:
pod 'MSTwitterSplashScreen', '~> 1.0.6'
这创建了对版本 >= 1.0.6
和 < 1.1
的依赖项
对于最新版本或确切的开发版本(在生产环境中不推荐使用)
pod 'MSTwitterSplashScreen', :git => 'https://github.com/mateuszszklarek/MSTwitterSplashScreen.git', :tag => 'v1.0.6'
Pod 是我为了一个正在进行的项目所需的现有 Pod CBZSplashView
的简单修改。非常感谢 Callum Boddy 给我修改他的 Pod 的机会。
MIT 许可证(MIT)- 检查包含的 LICENSE 文件