测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
许可证 | MIT |
发布上次发布 | 2015年6月 |
由 Rahul Jiresal 维护。
一个展示垂直滚动状态信息的 UIView 子类。当新的信息被设置时,之前的消息会向上滚动并渐隐。
欲了解更多信息,请查看屏幕截图或尝试示例项目。
要运行示例项目,请先从仓库中克隆,并在 Example 目录下运行 pod install
。
使用方法很简单!
self.statusView = [[VerticallyScrollingStatusView alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height / 2, self.view.frame.size.width, 100.0f)];
[self.view addSubview:self.statusView];
或者如果你使用 PureLayout,
self.statusView = [VerticallyScrollingStatusView newAutoLayoutView];
[self.view addSubview:self.statusView];
[self.statusView autoCenterInSuperview];
[self.statusView autoMatchDimension:ALDimensionWidth toDimension:ALDimensionWidth ofView:self.view withOffset:-30.0f];
[self.statusView autoSetDimension:ALDimensionHeight toSize:100.0f];
然后自定义它!
[self.statusView setAnimationDuration:0.5f];
[self.statusView setFont:[UIFont systemFontOfSize:18.0]];
[self.statusView setTextColor:[UIColor blackColor]];
[self.statusView setNumberOfLines:2];
唯一的依赖就是 PureLayout。但是,如果你是通过 CocoaPods 安装的话,就不需要担心这方面了。
VerticallyScrollingStatusView 通过 CocoaPods 提供。要安装它,只需将以下行添加到你的 Podfile 中
pod "VerticallyScrollingStatusView"
Rahul Jiresal, [email protected], 网站, twitter
如果你喜欢这个 pod,或者有任何建议,请告诉我。欢迎任何 pull request 请求!
VerticallyScrollingStatusView 可在 MIT 许可证下使用。有关更多信息,请参阅 LICENSE 文件。