SimpleUIKit 1.0.7

SimpleUIKit 1.0.7

测试已测试
语言语言 Obj-CObjective C
许可 MIT
发布最后发布2020年2月

Markus Emrich 维护。



  • Markus Emrich

SimpleUIKit

这是一组简化了 UIKit API 的集合。有关如何使用所有 API 的示例,请参阅包含的 Example Project。

Screenshots

SimpleActivityView

一个简单易懂、易于定制的 activity view。示例

[[SimpleActivityView activityViewWithTitle:@"Title"]
presentActivityViewOnView:view
activityBlock:^(SimpleActivityView *activityView, SimpleActivityViewDismissBlock dismissBlock) {
  // do something that takes a while
  dismissBlock(); // call to dismiss the view again
}];

SimpleLocalNotification

一个用于安排本地通知的简化 API。示例

[[SimpleLocalNotification sharedInstance] scheduleLocalNotificationWithAlertBody:@"Notification Text"
                                                             timeIntervalFromNow:60*5 // in 5 minutes
                                                                uniqueIdentifier:@"001"
                                                                      completion:nil];

SimpleTableView

一个简化的 tableView API。非常适合简单的静态 tableView。最大的好处是单元格的定义以及它的动作都在非常接近的位置,这使得它的可读性非常高。同时,它也非常容易在不同行之间移动行等,无需在 indexPath 等方面花费思考。

如何定义一个简单的行,包括其手势处理器的示例

[STVRow rowWithCellReuseIdentifier:reuseIdentifier
                             title:@"Cell Title"
                          subtitle:nil
                configureCellBlock:nil
                    didSelectBlock:^(STVRow *STVRow, UITableViewCell *cell, UITableView *tableView, NSIndexPath *indexPath) {
  // tap handler
}];

SimpleAlertController

一个用于展示Alert和ActionSheets的简化API。简单确认Alert的示例

[UIAlertController presentFromViewController:viewController
                                   withTitle:@"Alert Title"
                                     message:@"Alert Message"
                     confirmationButtonTitle:@"Ok"];

SimpleMotionEffects

为您的视图添加动画效果的简化API。示例

[view addMotionEffectWithMovement:CGPointMake(100, 100)];

阅读更多

SimpleAttributedString

修改NSMutableAttributedString实例的简单API。示例

[mutableString setFont:[UIFont boldSystemFontOfSize:textSize]
                 color:[UIColor orangeColor]
      forRangeOfString:@"Judy Hopps"];

SimplePositioning

用于简化视图布局/定位的简单UIView类别。示例

view.frameOrigin = CGPointMake(100, 100);
anotherView.frameRight = self.frameWidth - 20;
thirdView.centerX = self.frameWidth / 2.0;