- (IBAction)onClickAmount:(id)sender {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"" message:@"" preferredStyle:UIAlertControllerStyleAlert];
[alertController addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {
textField.placeholder = @"물량을 입력하세요";
textField.secureTextEntry = NO;
textField.keyboardType = UIKeyboardTypeNumberPad;
}];
UIAlertAction *confirmAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
NSLog(@"물량을 입력하세요 %@", [[alertController textFields][0] text]);
//compare the current password and do action here
}];
[alertController addAction:confirmAction];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
NSLog(@"Canelled");
}];
[alertController addAction:cancelAction];
[self presentViewController:alertController animated:YES completion:nil];
}
'Objective-C, SQLite3' 카테고리의 다른 글
테이블 항목 기본 선택 (0) | 2022.02.15 |
---|---|
class 변수 쓰지 말자... (0) | 2021.06.11 |
nullable, nonnull (0) | 2021.05.26 |
select 구현 예제 (0) | 2021.05.26 |
sqlite3 파일 생성 (0) | 2021.05.26 |