Swift
-
문자 발송하기.IOS 2023. 9. 15. 15:51
import MessageUI //sms mail class ViewController: UIViewController ,WKScriptMessageHandler,MFMessageComposeViewControllerDelegate ,MFMailComposeViewControllerDelegate // [비동기 처리 수행] DispatchQueue.main.async { let controller = MFMessageComposeViewController() controller.body = body[1] as! String //문자 내용 if body[0] as! String != "" { // 발송자 번호 모를땐 추가 안함. controller.recipients = [body[0] as! String..
-
문자 클립보드 복사하기.IOS 2023. 9. 15. 15:48
UIPasteboard.general.string = "저장할 문자 작성." if let storedString = UIPasteboard.general.string { print(storedString) let alert = UIAlertController(title: "클립보드 복사", message: "복사 완료 되었습니다.", preferredStyle: UIAlertController.Style.alert) let action = UIAlertAction(title: "확인", style: UIAlertAction.Style.default) alert.addAction(action) self.present(alert, animated: true) }
-
값 저장하고 가져오기IOS 2023. 9. 15. 15:46
if let body = message.body as? Array { print("Received message from JavaScript: \(body)") print("Received message from JavaScript: \(body[0])") print("Received message from JavaScript: \(body[1])") UserDefaults.standard.set(body[0], forKey: "id") //아이디 저장 UserDefaults.standard.set(body[1], forKey: "pw") //비번 저장 let DataID = UserDefaults.standard.string(forKey: "id") print("DataID :\(String(descr..