UIAlertController

- (void)tapSalePrice {spa

    // 修改銷售金額3d

    UIAlertController *alertCtrl = [UIAlertController alertControllerWithTitle:@"修改銷售價格" message:nil preferredStyle:UIAlertControllerStyleAlert];orm

    [alertCtrl addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {it

        textField.placeholder = @"請輸入銷售價格";io

        textField.textColor = [UIColor blueColor];date

        textField.clearButtonMode = UITextFieldViewModeWhileEditing;im

        textField.borderStyle = UITextBorderStyleNone;margin

        textField.layer.borderColor = [UIColor whiteColor].CGColor;top

        

    }];animate

    [alertCtrl addAction:[UIAlertAction actionWithTitle:@"肯定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {

        NSArray * textfields = alertCtrl.textFields;

        UITextField *textf = textfields[0];

        _editSalePri  = textf.text;

        NSLog(@"%@", _editSalePri);

        if (_editSalePri || _editSaleAmout) {

            [self updateSalesData];

        }

        

    }]];

    [self presentViewController:alertCtrl animated:YES completion:nil];

}

相關文章
相關標籤/搜索