This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Image(uiImage: generateQRCode(from: "\(name)\n\(emailAddress)")) | |
| .interpolation(.none) //netlik sağlar | |
| .resizable() | |
| .scaledToFit() | |
| .frame(width: 200, height: 200) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Button(action: { | |
| self.isShowingScanner = true | |
| }) { | |
| Text("Show Scanner") | |
| }.padding() | |
| .sheet(isPresented: $isShowingScanner) { | |
| CodeScannerView(codeTypes: [.qr], simulatedData: "Some simulated data", completion: self.handleScan) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(txt_TCNumber == ""){ | |
| self.activeAlert = .tc | |
| self.showAlert = true | |
| return | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| enum ActiveAlert { | |
| case tc, parola, dogrulama, basarili | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .alert(isPresented: $showAlert) { | |
| switch activeAlert { | |
| case .tc: | |
| return Alert(title: Text("TC Kimlik"), message: Text("TC Kimlik Numaranızı girmediniz.")) | |
| case .parola: | |
| return Alert(title: Text("Parola"), message: Text("Parola girmediniz.")) | |
| case .dogrulama: | |
| return Alert(title: Text("Doğrulama"), message: Text("Doğrulama yapmadınız.")) | |
| case .basarili: | |
| return Alert(title: Text("Başarılı"), message: Text("Tüm kontroller başarılıdır.")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct ContentView: View { | |
| @State private var showingAlert = false | |
| var body: some View { | |
| Button(action: { | |
| self.showingAlert = true | |
| }) { | |
| Text("Show Alert") | |
| } | |
| .alert(isPresented: $showingAlert) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ///Bugünki adım sayısını getir methodu | |
| func getStepCountToday(){ | |
| self.getStepsCount(forSpecificDate: Date()) { (steps) in | |
| if steps == 0.0 { | |
| self.stepValue_Today = Int(steps) | |
| print("steps :: \(steps)") | |
| } | |
| else { | |
| DispatchQueue.main.async { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ///HealthKit İzni | |
| func getHealthKitPermission() { | |
| // delay(0.1) { | |
| guard HKHealthStore.isHealthDataAvailable() else { | |
| return | |
| } | |
| let stepsCount = HKObjectType.quantityType(forIdentifier: HKQuantityTypeIdentifier.stepCount)! | |
| self.healthkitStore.requestAuthorization(toShare: [], read: [stepsCount]) { (success, error) in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NavigationLink(destination: Sayfa3(anaSayfaGoster: self.$anaSayfaAktifMi), isActive: self.$goster){ | |
| Text("") | |
| }.isDetailLink(false) |
NewerOlder