IOS-UIAlertController simple Encapsulation
// Notification box encapsulation method-(void) showAlertControllerWithMessage :( NSString *) message {UIAlertController * remindAV = [UIAlertController alertControllerWithTitle: @ "prompt" message: message preferredStyle: Response]; [remindAV addAction: [UIAlertAction actionWithTitle: @ "good" style: UIAlertActionStyleDefault handler: nil]; [self presentViewController: remindAV animated: YES completion: nil];} # pragma mark-network request-(void) getResult {// ensure that the input box is not empty if (self. sourceFD. text. length = 0) {[self showAlertControllerWithMessage: @ "select Source currency"]; return;} else if (self.tar getFD. text. length = 0) {[self showAlertControllerWithMessage: @ "select target currency"]; return;} else if (self. amountFD. text. length = 0) {[self showAlertControllerWithMessage: @ "Please select the exchange amount"]; return ;}//... make a network request when the input box is not Blank}