CommonTextAlertView *alert = [[CommonTextAlertView alloc] initWithMessage:@"自定义alert 输入框" placeholder:@"说点什么吧" okAction:@"确定" okActionStyle:TextAlertActionStyleDestructive cancelAction:@"取消" cancelActionStyle:TextAlertActionStyleDefault okHandler:^(NSString *alertString) {
} cancelHandler:^{
}];
[self.view addSubview:alert];
StarAlertView *alert = [[StarAlertView alloc] initWithMessage:@"打分" StarValue:0 okAction:@"确定" okActionStyle:StarAlertActionStyleDestructive cancelAction:@"取消" cancelActionStyle:StarAlertActionStyleDefault okHandler:^(CGFloat starValue) {
} cancelHandler:nil];
[self.view addSubview:alert];
StarTextAlertView *alert = [[StarTextAlertView alloc] initWithPlaceholder:@"说点什么吧" okAction:@"提交" okActionStyle:StarTextAlertActionStyleDestructive cancelAction:@"取消" cancelActionStyle:StarTextAlertActionStyleDefault okHandler:^(CGFloat starValue, NSString *alertString) {
} cancel:^{
}];
[self.view addSubview:alert];
其中带 Star 的 Alert 使用 HCSStarRatingView, 感谢作者.