最近項目里有個需求要彈出輸入框,GitHub上搜了一圈沒發現太合適的輪子,就自個兒擼了一個,傳送門在這里https://github.com/wozyao/ZYInputAlert,有需要的同學可以down下來跑一下,用法比較簡單。
__weak typeof(self) weakSelf = self;
ZYInputAlertView *alertView = [ZYInputAlertView alertView];
alertView.placeholder = @"輸入開心的事兒···";[alertView confirmBtnClickBlock:^(NSString *inputString) {
weakSelf.inputLabel.text = inputString;
}];
[alertView show];

alert.gif